From 82d2b368d9569666dac82317b24d9d9814097cfb Mon Sep 17 00:00:00 2001 From: marco_carollo Date: Fri, 29 Nov 2024 15:00:31 +0100 Subject: [PATCH] changing some accordion --- .../assets/css/d4science_theme.css | 2 +- .../assets/css/d4science_theme.css.map | 2 +- .../assets/js/d4science_scripts.js | 1 + .../assets/scss/d4science_theme.scss | 89 ++++++++++- .../d4science_theme/templates/page.html | 2 +- .../templates/snippets/facet_list.html | 150 ++++++------------ .../snippets/home_breadcrumb_item.html | 2 +- .../templates/snippets/search_form.html | 35 ++-- 8 files changed, 163 insertions(+), 120 deletions(-) diff --git a/ckanext-d4science_theme/ckanext/d4science_theme/assets/css/d4science_theme.css b/ckanext-d4science_theme/ckanext/d4science_theme/assets/css/d4science_theme.css index ac72248..1fc6b3f 100644 --- a/ckanext-d4science_theme/ckanext/d4science_theme/assets/css/d4science_theme.css +++ b/ckanext-d4science_theme/ckanext/d4science_theme/assets/css/d4science_theme.css @@ -1 +1 @@ -@import"https://fonts.googleapis.com/css2?family=Poppins:wght@400;600&display=swap";@-webkit-keyframes fadeIn{from{opacity:0}to{opacity:1}}@keyframes fadeIn{from{opacity:0}to{opacity:1}}body{font-family:"Poppins";background-image:url("/catalog/bgsite.svg");background-size:cover;background-repeat:no-repeat}.header-title{padding:5%;max-width:80%;margin:0 auto}@media(max-width: 767px){.header-title{max-width:100%}}.header-title h1{font-size:50px;text-align:center;line-height:1.2;font-weight:bold;color:#3f3f3f}.header-title h1 span{color:#3d85c6}@media(max-width: 767px){.header-title h1{font-size:30px}}.header-title p{font-size:30px;text-align:center;line-height:1.4}@media(max-width: 767px){.header-title p{font-size:20px}}.search-bar-home{transition:.3s all ease}.search-bar-home span{border-radius:20px 0px 0px 20px}.search-bar-home span img{color:#3d85c6}.search-bar-home input{box-shadow:none;border-radius:0px 20px 20px 0px;height:40px}.search-bar-home input:focus{box-shadow:none;border-color:#3d85c6}.search-bar-home:focus-within span{border-color:#3d85c6}.search-bar-home .see-tags{float:right;margin-bottom:15px}.search-bar-home .see-tags a{color:#3d85c6}.search-bar-home .see-items{float:left;margin-bottom:15px}.search-bar-home .see-items a{color:#3d85c6}.tags-list{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:22px;margin-top:18px}.tags-list .tag-element{flex-basis:calc(20% - 22px);text-align:center;background:#fff;border-radius:20px;height:30px;display:flex;align-items:center;font-size:16px;font-weight:700;justify-content:space-around;border:1px solid #dce9f5;padding:0px 6px 0px 6px}.tags-list .tag-element:hover{background-color:#eff5fa}.tags-list .tag-element .counter{font-size:9px;font-weight:700;background:#eff5fa;border-radius:58px;padding:0px 2.952px;display:flex;justify-content:center;align-items:center;color:#3d85c6}.tab-container{border-bottom:2px solid #ddd;overflow-x:auto;overflow-y:hidden}.tab-container .tabs-d4science{display:flex;cursor:pointer;position:relative;width:62%;gap:10px}.tab-container .tabs-d4science .tab{flex:1;padding:10px 15px 10px 0px;display:flex;align-items:center;gap:4px;position:relative;transition:.3s all ease;color:#a0aec0}.tab-container .tabs-d4science .tab.active{color:#3d85c6;font-weight:bold}.tab-container .tabs-d4science .tab.active .tab-icon{filter:invert(53%) sepia(31%) saturate(664%) hue-rotate(164deg) brightness(93%) contrast(88%)}.tab-container .tabs-d4science .indicator{position:absolute;bottom:-2px;height:4px;width:18%;background-color:#3d85c6;transition:transform .3s ease,width .3s ease}.tab-container .tabs-d4science .tab-content{display:none;padding:20px;border:1px solid #ddd}.tab-container .tabs-d4science .tab-content.active{display:block}.browse{font-size:31px;font-weight:700;margin-bottom:30px}.chip-1,.chip-2{height:40px;border:2px solid #000;margin:5px auto}#search-for-organizations .card-tab,#search-for-groups .card-tab{height:200px;border-radius:8px;border:2px solid #3d85c6;transition:.3s all ease}#search-for-organizations .card-tab:hover,#search-for-groups .card-tab:hover{background-color:#eff5fa}#search-for-organizations .card-content,#search-for-groups .card-content{height:100%;display:flex;flex-direction:column;justify-content:center;align-items:center;text-align:center;gap:20px;font-size:16px;font-weight:700}#search-for-organizations .card-content img,#search-for-groups .card-content img{max-width:80%;height:auto}#search-for-organizations .card-content p,#search-for-groups .card-content p{min-width:20px;max-width:25px;margin:0 auto;background:#3d85c6;border-radius:5px;color:#fff}.stats h2{color:#3f3f3f;font-weight:700;font-size:38px}.stats h2 span{color:#3d85c6}.stats .stat-item .stat-label{font-size:26px;color:#4e4e4f}.stats .stat-item .stat-number{font-size:52px;font-weight:700;color:#3d85c6;margin-right:4px}.format-tab .format,.format-tab .tag,.tags-tab .format,.tags-tab .tag{height:50px;align-items:center;display:flex;justify-content:center;border:1px solid #3d85c6;border-radius:8px;background-color:#eff5fa;text-decoration:none;transition:.3s all ease}.format-tab .format a,.format-tab .tag a,.tags-tab .format a,.tags-tab .tag a{color:#3d85c6;font-weight:700}.format-tab .format:hover,.format-tab .tag:hover,.tags-tab .format:hover,.tags-tab .tag:hover{background-color:#3d85c6;border:1px solid #eff5fa}.format-tab .format:hover a,.format-tab .tag:hover a,.tags-tab .format:hover a,.tags-tab .tag:hover a{color:#eff5fa;font-weight:700;text-decoration:none}li.home i{color:#3d85c6}.main{background-color:#fff}.main .wrapper{border:none;box-shadow:none}.main .toolbar .breadcrumb .active a{font-weight:normal}/*# sourceMappingURL=d4science_theme.css.map */ \ No newline at end of file +@import"https://fonts.googleapis.com/css2?family=Poppins:wght@400;600&display=swap";@-webkit-keyframes fadeIn{from{opacity:0}to{opacity:1}}@keyframes fadeIn{from{opacity:0}to{opacity:1}}body{font-family:"Poppins";background-image:url("/catalog/bgsite.svg");background-size:cover;background-repeat:no-repeat}h3{font-size:32px;font-weight:700}.header-title{padding:5%;max-width:80%;margin:0 auto}@media(max-width: 767px){.header-title{max-width:100%}}.header-title h1{font-size:50px;text-align:center;line-height:1.2;font-weight:bold;color:#3f3f3f}.header-title h1 span{color:#3d85c6}@media(max-width: 767px){.header-title h1{font-size:30px}}.header-title p{font-size:30px;text-align:center;line-height:1.4}@media(max-width: 767px){.header-title p{font-size:20px}}.search-bar-home,.search-bar{transition:.3s all ease}.search-bar-home span,.search-bar span{border-radius:20px 0px 0px 20px}.search-bar-home span img,.search-bar span img{color:#3d85c6}.search-bar-home input,.search-bar input{box-shadow:none;border-radius:0px 20px 20px 0px;height:40px}.search-bar-home input:focus,.search-bar input:focus{box-shadow:none;border-color:#3d85c6}.search-bar-home:focus-within span,.search-bar:focus-within span{border-color:#3d85c6}.search-bar-home .see-tags,.search-bar .see-tags{float:right;margin-bottom:15px}.search-bar-home .see-tags a,.search-bar .see-tags a{color:#3d85c6}.search-bar-home .see-items,.search-bar .see-items{float:left;margin-bottom:15px}.search-bar-home .see-items a,.search-bar .see-items a{color:#3d85c6}.search-bar{margin-bottom:3rem}.search-bar span{border-radius:8px 0px 0px 8px}.search-bar input{border-radius:0px 8px 8px 0px}.tags-list{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:22px;margin-top:18px}.tags-list .tag-element{flex-basis:calc(20% - 22px);text-align:center;background:#fff;border-radius:20px;height:30px;display:flex;align-items:center;font-size:16px;font-weight:700;justify-content:space-around;border:1px solid #dce9f5;padding:0px 6px 0px 6px}.tags-list .tag-element:hover{background-color:#eff5fa}.tags-list .tag-element .counter{font-size:9px;font-weight:700;background:#eff5fa;border-radius:58px;padding:0px 2.952px;display:flex;justify-content:center;align-items:center;color:#3d85c6}.tab-container{border-bottom:2px solid #ddd;overflow-x:auto;overflow-y:hidden}.tab-container .tabs-d4science{display:flex;cursor:pointer;position:relative;width:62%;gap:10px}.tab-container .tabs-d4science .tab{flex:1;padding:10px 15px 10px 0px;display:flex;align-items:center;gap:4px;position:relative;transition:.3s all ease;color:#a0aec0}.tab-container .tabs-d4science .tab.active{color:#3d85c6;font-weight:bold}.tab-container .tabs-d4science .tab.active .tab-icon{filter:invert(53%) sepia(31%) saturate(664%) hue-rotate(164deg) brightness(93%) contrast(88%)}.tab-container .tabs-d4science .indicator{position:absolute;bottom:-2px;height:4px;width:18%;background-color:#3d85c6;transition:transform .3s ease,width .3s ease}.tab-container .tabs-d4science .tab-content{display:none;padding:20px;border:1px solid #ddd}.tab-container .tabs-d4science .tab-content.active{display:block}.browse{font-size:31px;font-weight:700;margin-bottom:30px}.chip-1,.chip-2{height:40px;border:2px solid #000;margin:5px auto}#search-for-organizations .card-tab,#search-for-groups .card-tab{height:200px;border-radius:8px;border:2px solid #3d85c6;transition:.3s all ease}#search-for-organizations .card-tab:hover,#search-for-groups .card-tab:hover{background-color:#eff5fa}#search-for-organizations .card-content,#search-for-groups .card-content{height:100%;display:flex;flex-direction:column;justify-content:center;align-items:center;text-align:center;gap:20px;font-size:16px;font-weight:700}#search-for-organizations .card-content img,#search-for-groups .card-content img{max-width:80%;height:auto}#search-for-organizations .card-content p,#search-for-groups .card-content p{min-width:20px;max-width:25px;margin:0 auto;background:#3d85c6;border-radius:5px;color:#fff}.stats h2{color:#3f3f3f;font-weight:700;font-size:38px}.stats h2 span{color:#3d85c6}.stats .stat-item .stat-label{font-size:26px;color:#4e4e4f}.stats .stat-item .stat-number{font-size:52px;font-weight:700;color:#3d85c6;margin-right:4px}.format-tab .format,.format-tab .tag,.tags-tab .format,.tags-tab .tag{height:50px;align-items:center;display:flex;justify-content:center;border:1px solid #3d85c6;border-radius:8px;background-color:#eff5fa;text-decoration:none;transition:.3s all ease}.format-tab .format a,.format-tab .tag a,.tags-tab .format a,.tags-tab .tag a{color:#3d85c6;font-weight:700}.format-tab .format:hover,.format-tab .tag:hover,.tags-tab .format:hover,.tags-tab .tag:hover{background-color:#3d85c6;border:1px solid #eff5fa}.format-tab .format:hover a,.format-tab .tag:hover a,.tags-tab .format:hover a,.tags-tab .tag:hover a{color:#eff5fa;font-weight:700;text-decoration:none}.toolbar .home span{display:block;color:#3d85c6;font-weight:700}.main .secondary{padding-right:0px !important}.accordion{margin:8px 0px}.accordion .accordion-item{border:0}.accordion .accordion-item .accordion-body{padding:0}.accordion .accordion-item .accordion-body ul li{border-radius:0px;border:none}.accordion .accordion-item .accordion-body ul li.active{background-color:#3d85c6;border:none}.accordion .accordion-item .accordion-body ul li.active a{color:#fff}.accordion .accordion-item .accordion-body ul li.active a span{color:#fff}.accordion .accordion-item .accordion-body ul li a{display:flex;justify-content:space-between;color:#4e4e4f;font-weight:700}.accordion .accordion-item .accordion-body ul li a span{background-color:rgba(241,242,242,.2);color:#4e4e4f}.accordion .accordion-item .accordion-button{color:#4e4e4f;font-weight:700;font-size:16px;border-radius:8px 8px 0px 0px;background-color:#f1f2f2}.accordion .accordion-item .accordion-button::after{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='currentColor' class='bi bi-plus-lg' viewBox='0 0 16 16'%3E%3Cpath fill-rule='evenodd' d='M8 2a.5.5 0 0 1 .5.5v5h5a.5.5 0 0 1 0 1h-5v5a.5.5 0 0 1-1 0v-5h-5a.5.5 0 0 1 0-1h5v-5A.5.5 0 0 1 8 2'/%3E%3C/svg%3E");transition:.3s all ease}.accordion .accordion-item .accordion-button:focus{box-shadow:none}.accordion .accordion-item .accordion-button:not(.collapsed){box-shadow:none}.accordion .accordion-item .accordion-button:not(.collapsed)::after{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='currentColor' class='bi bi-dash' viewBox='0 0 16 16'%3E%3Cpath d='M4 8a.5.5 0 0 1 .5-.5h7a.5.5 0 0 1 0 1h-7A.5.5 0 0 1 4 8'/%3E%3C/svg%3E")}.main{background-color:#fff}.main .wrapper{border:none;box-shadow:none}.main .toolbar .breadcrumb .active a{font-weight:normal}/*# sourceMappingURL=d4science_theme.css.map */ \ No newline at end of file diff --git a/ckanext-d4science_theme/ckanext/d4science_theme/assets/css/d4science_theme.css.map b/ckanext-d4science_theme/ckanext/d4science_theme/assets/css/d4science_theme.css.map index f7105ba..5bbf1be 100644 --- a/ckanext-d4science_theme/ckanext/d4science_theme/assets/css/d4science_theme.css.map +++ b/ckanext-d4science_theme/ckanext/d4science_theme/assets/css/d4science_theme.css.map @@ -1 +1 @@ -{"version":3,"sourceRoot":"","sources":["../scss/d4science_theme.scss","../scss/_variables.scss"],"names":[],"mappings":"AACQ,oFAER,0BACE,KACE,UAEF,GACE,WAGJ,kBACE,KACE,UAEF,GACE,WAGJ,KACE,sBACA,4CACA,sBACA,4BAEF,cACE,WACA,cAIA,cAHA,yBAHF,cAII,gBAGF,iBACE,eACA,kBACA,gBACA,iBACA,MClCU,QDmCV,sBACE,MCtCS,QDwCX,yBATF,iBAUI,gBAGJ,gBACE,eACA,kBACA,gBACA,yBAJF,gBAKI,gBAKN,iBACE,wBACA,sBACE,gCACA,0BACE,MC3DS,QD8Db,uBACE,gBACA,gCACA,YACA,6BACE,gBACA,aCpES,QDyEX,mCACE,aC1ES,QD8Eb,2BACE,YACA,mBACA,6BACE,MClFS,QDqFb,4BACE,WACA,mBACA,8BACE,MCzFS,QD8Ff,WACE,aACA,eACA,mBACA,uBACA,SACA,gBACA,wBACE,4BACA,kBACA,WCrGY,KDsGZ,mBACA,YACA,aACA,mBACA,eACA,gBACA,6BACA,yBACA,wBACA,8BACE,iBC9GgB,QDgHlB,iCACE,cACA,gBACA,WCnHgB,QDoHhB,mBACA,oBACA,aACA,uBACA,mBACA,MC9HS,QDmIf,eACE,6BACA,gBACA,kBACA,+BACE,aACA,eAEA,kBACA,UACA,SAEA,oCACE,OACA,2BACA,aACA,mBACA,QACA,kBACA,wBACA,MCtJY,QDwJZ,2CACE,MC1JO,QD2JP,iBACA,qDACE,8FAMN,0CACE,kBACA,YACA,WACA,UACA,iBCxKS,QDyKT,6CAEF,4CACE,aACA,aACA,sBAGF,mDACE,cAKN,QACE,eACA,gBACA,mBAGF,gBAEE,YACA,sBACA,gBAKA,iEACE,aACA,kBACA,yBACA,wBACA,6EACE,iBCvMgB,QD2MpB,yEACE,YACA,aACA,sBACA,uBACA,mBACA,kBACA,SACA,eACA,gBACA,iFACE,cACA,YAEF,6EACE,eACA,eACA,cACA,WClOS,QDmOT,kBACA,WAMJ,UACE,MCzOU,QD0OV,gBACA,eACA,eACE,MC/OS,QDmPX,8BACE,eACA,MCjPY,QDmPd,+BACE,eACA,gBACA,MC1PS,QD2PT,iBAOJ,sEAEE,YACA,mBACA,aACA,uBACA,yBACA,kBACA,iBCrQkB,QDsQlB,qBACA,wBACA,8EACE,MC9QS,QD+QT,gBAEF,8FACE,iBClRS,QDmRT,yBACA,sGACE,MChRc,QDiRd,gBACA,qBAQN,UACE,MChSW,QDoSf,MACE,iBClSc,KDmSd,eACE,YACA,gBAEF,qCACE","file":"d4science_theme.css"} \ No newline at end of file +{"version":3,"sourceRoot":"","sources":["../scss/d4science_theme.scss","../scss/_variables.scss"],"names":[],"mappings":"AACQ,oFAER,0BACE,KACE,UAEF,GACE,WAGJ,kBACE,KACE,UAEF,GACE,WAGJ,KACE,sBACA,4CACA,sBACA,4BAGF,GACE,eACA,gBAEF,cACE,WACA,cAIA,cAHA,yBAHF,cAII,gBAGF,iBACE,eACA,kBACA,gBACA,iBACA,MCvCU,QDwCV,sBACE,MC3CS,QD6CX,yBATF,iBAUI,gBAGJ,gBACE,eACA,kBACA,gBACA,yBAJF,gBAKI,gBAKN,6BACE,wBACA,uCACE,gCACA,+CACE,MChES,QDmEb,yCACE,gBACA,gCACA,YACA,qDACE,gBACA,aCzES,QD8EX,iEACE,aC/ES,QDmFb,iDACE,YACA,mBACA,qDACE,MCvFS,QD0Fb,mDACE,WACA,mBACA,uDACE,MC9FS,QDmGf,YACE,mBACA,iBACE,8BAGF,kBACE,8BAIJ,WACE,aACA,eACA,mBACA,uBACA,SACA,gBACA,wBACE,4BACA,kBACA,WCrHY,KDsHZ,mBACA,YACA,aACA,mBACA,eACA,gBACA,6BACA,yBACA,wBACA,8BACE,iBC9HgB,QDgIlB,iCACE,cACA,gBACA,WCnIgB,QDoIhB,mBACA,oBACA,aACA,uBACA,mBACA,MC9IS,QDmJf,eACE,6BACA,gBACA,kBACA,+BACE,aACA,eAEA,kBACA,UACA,SAEA,oCACE,OACA,2BACA,aACA,mBACA,QACA,kBACA,wBACA,MCtKY,QDwKZ,2CACE,MC1KO,QD2KP,iBACA,qDACE,8FAMN,0CACE,kBACA,YACA,WACA,UACA,iBCxLS,QDyLT,6CAEF,4CACE,aACA,aACA,sBAGF,mDACE,cAKN,QACE,eACA,gBACA,mBAGF,gBAEE,YACA,sBACA,gBAKA,iEACE,aACA,kBACA,yBACA,wBACA,6EACE,iBCvNgB,QD2NpB,yEACE,YACA,aACA,sBACA,uBACA,mBACA,kBACA,SACA,eACA,gBACA,iFACE,cACA,YAEF,6EACE,eACA,eACA,cACA,WClPS,QDmPT,kBACA,WAMJ,UACE,MCzPU,QD0PV,gBACA,eACA,eACE,MC/PS,QDmQX,8BACE,eACA,MCjQY,QDmQd,+BACE,eACA,gBACA,MC1QS,QD2QT,iBAOJ,sEAEE,YACA,mBACA,aACA,uBACA,yBACA,kBACA,iBCrRkB,QDsRlB,qBACA,wBACA,8EACE,MC9RS,QD+RT,gBAEF,8FACE,iBClSS,QDmST,yBACA,sGACE,MChSc,QDiSd,gBACA,qBAMR,oBACE,cACA,MC/Sa,QDgTb,gBAGF,iBACE,6BAGF,WACE,eACA,2BACE,SACA,2CACE,UAEE,iDACE,kBACA,YACA,wDACE,iBClUG,QDmUH,YACA,0DACE,MClUE,KDmUF,+DACE,MCpUA,KDwUN,mDACE,aACA,8BACA,MC1UM,QD2UN,gBAEA,wDACE,sCACA,MC/UI,QDqVd,6CACE,cACA,gBACA,eACA,8BACA,yBACA,oDACE,+TACA,wBAEF,mDACE,gBAGF,6DACE,gBACA,oEACE,4PAOV,MACE,iBC/Wc,KDgXd,eACE,YACA,gBAEF,qCACE","file":"d4science_theme.css"} \ No newline at end of file diff --git a/ckanext-d4science_theme/ckanext/d4science_theme/assets/js/d4science_scripts.js b/ckanext-d4science_theme/ckanext/d4science_theme/assets/js/d4science_scripts.js index 9c226f2..71d0da8 100644 --- a/ckanext-d4science_theme/ckanext/d4science_theme/assets/js/d4science_scripts.js +++ b/ckanext-d4science_theme/ckanext/d4science_theme/assets/js/d4science_scripts.js @@ -330,3 +330,4 @@ function openTab(event, tabId) { indicator.style.transform = `translateX(${tabPosition}px)`; indicator.style.width = `${tabWidth}px`; } + diff --git a/ckanext-d4science_theme/ckanext/d4science_theme/assets/scss/d4science_theme.scss b/ckanext-d4science_theme/ckanext/d4science_theme/assets/scss/d4science_theme.scss index a5060b9..3798c24 100644 --- a/ckanext-d4science_theme/ckanext/d4science_theme/assets/scss/d4science_theme.scss +++ b/ckanext-d4science_theme/ckanext/d4science_theme/assets/scss/d4science_theme.scss @@ -23,6 +23,11 @@ body { background-size: cover; background-repeat: no-repeat; } + +h3{ + font-size: 32px; + font-weight: 700; +} .header-title { padding: 5%; max-width: 80%; @@ -53,7 +58,7 @@ body { } } -.search-bar-home { +.search-bar-home, .search-bar{ transition: 0.3s all ease; span { border-radius: 20px 0px 0px 20px; @@ -93,6 +98,17 @@ body { } } +.search-bar { + margin-bottom: 3rem; + span { + border-radius: 8px 0px 0px 8px; + } + + input { + border-radius: 0px 8px 8px 0px; + } +} + .tags-list { display: flex; flex-wrap: wrap; @@ -284,10 +300,71 @@ body { } } +.toolbar .home span { + display: block; + color: $primary_color; + font-weight: 700; +} -li.home { - i{ - color:$primary_color +.main .secondary { + padding-right: 0px !important; +} + +.accordion { + margin: 8px 0px; + .accordion-item { + border: 0; + .accordion-body { + padding: 0; + ul { + li { + border-radius: 0px; + border: none; + &.active { + background-color: $primary_color; + border: none; + a { + color: $neutral_color; + span { + color: $neutral_color; + } + } + } + a { + display: flex; + justify-content: space-between; + color: $paragraph_color; + font-weight: 700; + + span { + background-color: rgba(241, 242, 242, 0.2); + color: $paragraph_color; + } + } + } + } + } + .accordion-button { + color: #4e4e4f; + font-weight: 700; + font-size: 16px; + border-radius: 8px 8px 0px 0px; + background-color: #f1f2f2; + &::after { + background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='currentColor' class='bi bi-plus-lg' viewBox='0 0 16 16'%3E%3Cpath fill-rule='evenodd' d='M8 2a.5.5 0 0 1 .5.5v5h5a.5.5 0 0 1 0 1h-5v5a.5.5 0 0 1-1 0v-5h-5a.5.5 0 0 1 0-1h5v-5A.5.5 0 0 1 8 2'/%3E%3C/svg%3E"); + transition: 0.3s all ease; + } + &:focus { + box-shadow: none; + } + + &:not(.collapsed) { + box-shadow: none; + &::after { + background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='currentColor' class='bi bi-dash' viewBox='0 0 16 16'%3E%3Cpath d='M4 8a.5.5 0 0 1 .5-.5h7a.5.5 0 0 1 0 1h-7A.5.5 0 0 1 4 8'/%3E%3C/svg%3E"); + } + } + } } } @@ -298,6 +375,6 @@ li.home { box-shadow: none; } .toolbar .breadcrumb .active a { - font-weight:normal + font-weight: normal; } -} \ No newline at end of file +} diff --git a/ckanext-d4science_theme/ckanext/d4science_theme/templates/page.html b/ckanext-d4science_theme/ckanext/d4science_theme/templates/page.html index 507ee17..bfe6dae 100644 --- a/ckanext-d4science_theme/ckanext/d4science_theme/templates/page.html +++ b/ckanext-d4science_theme/ckanext/d4science_theme/templates/page.html @@ -45,7 +45,7 @@ {% endblock %} -
+
{# The pre_primary block can be used to add content to before the rendering of the main content columns of the page. diff --git a/ckanext-d4science_theme/ckanext/d4science_theme/templates/snippets/facet_list.html b/ckanext-d4science_theme/ckanext/d4science_theme/templates/snippets/facet_list.html index fad6fc1..3594455 100644 --- a/ckanext-d4science_theme/ckanext/d4science_theme/templates/snippets/facet_list.html +++ b/ckanext-d4science_theme/ckanext/d4science_theme/templates/snippets/facet_list.html @@ -1,100 +1,50 @@ -{# - Construct a facet module populated with links to filtered results. - - name - The field name identifying the facet field, eg. "tags" - - title - The title of the facet, eg. "Tags", or "Tag Cloud" - - label_function - Renders the human-readable label for each facet value. - If defined, this should be a callable that accepts a `facet_item`. - eg. lambda facet_item: facet_item.display_name.upper() - By default it displays the facet item's display name, which should - usually be good enough - - if_empty - A string, which if defined, and the list of possible facet items is empty, - is displayed in lieu of an empty list. - - count_label - A callable which accepts an integer, and returns a string. This controls - how a facet-item's count is displayed. - - extras - Extra info passed into the add/remove params to make the url - - alternative_url - URL to use when building the necessary URLs, instead of the default - ones returned by url_for. Useful eg for dataset types. - - hide_empty - Do not show facet if there are none, Default: false. - - within_tertiary - Boolean for when a facet list should appear in the the right column of the - page and not the left column. - - #} - {% block facet_list %} - {% set hide_empty = hide_empty or false %} - {% with items = items or h.get_facet_items_dict(name) %} - {% if items or not hide_empty %} - {% if within_tertiary %} - {% set nav_class = 'nav nav-pills nav-stacked' %} - {% set nav_item_class = ' ' %} - {% set wrapper_class = 'nav-facet nav-facet-tertiary' %} - {% endif %} - {% block facet_list_item %} -
- {% block facet_list_heading %} -

- - {% set title = title or h.get_facet_title(name) %} - {{ title }} -

- {% endblock %} - {% block facet_list_items %} - {% with items = items or h.get_facet_items_dict(name) %} - {% if items %} - - - - {% else %} -

{{ _('There are no {facet_type} that match this search').format(facet_type=title) }}

- {% endif %} - {% endwith %} - {% endblock %} -
- {% endblock %} - {% endif %} - {% endwith %} - {% endblock %} - \ No newline at end of file +{% block facet_list %} + {% set hide_empty = hide_empty or false %} + {% with items = items or h.get_facet_items_dict(name) %} + {% if items or not hide_empty %} +
+
+

+ +

+
+
+ {% block facet_list_items %} + + {% if items %} +
    + {% for item in items %} + {% set href = h.remove_url_param(name, item.name, extras=extras, alternative_url=alternative_url) if item.active else h.add_url_param(new_params={name: item.name}, extras=extras, alternative_url=alternative_url) %} + {% set label = label_function(item) if label_function else item.display_name %} + {% set count = count_label(item['count']) if count_label else ('(%d)' % item['count']) %} +
  • + + {{ label }} {{ count }} + +
  • + {% endfor %} +
+ {% else %} +

{{ _('There are no {facet_type} that match this search').format(facet_type=title) }}

+ {% endif %} + {% endblock %} +
+
+
+
+ {% endif %} + {% endwith %} +{% endblock %} diff --git a/ckanext-d4science_theme/ckanext/d4science_theme/templates/snippets/home_breadcrumb_item.html b/ckanext-d4science_theme/ckanext/d4science_theme/templates/snippets/home_breadcrumb_item.html index 0cdceaa..d7a3d6a 100644 --- a/ckanext-d4science_theme/ckanext/d4science_theme/templates/snippets/home_breadcrumb_item.html +++ b/ckanext-d4science_theme/ckanext/d4science_theme/templates/snippets/home_breadcrumb_item.html @@ -1,6 +1,6 @@ {# Used to insert the home icon into a breadcrumb #}
  • {{ _('Home') }} {{ _('Home') }}
  • diff --git a/ckanext-d4science_theme/ckanext/d4science_theme/templates/snippets/search_form.html b/ckanext-d4science_theme/ckanext/d4science_theme/templates/snippets/search_form.html index 9d755c2..20160a1 100644 --- a/ckanext-d4science_theme/ckanext/d4science_theme/templates/snippets/search_form.html +++ b/ckanext-d4science_theme/ckanext/d4science_theme/templates/snippets/search_form.html @@ -9,16 +9,31 @@
    {% block search_input %} -
    - - {% block search_input_button %} - - + + + {% endblock %} {% block search_search_fields %} @@ -47,9 +62,9 @@ {% block search_title %} {% if not error %} -

    {% snippet 'snippets/search_result_text.html', query=query, count=count, type=type %}

    +

    {% snippet 'snippets/search_result_text.html', query=query, count=count, type=type %}

    {% else %} -

    Error

    +

    Error

    {% endif %} {% endblock %}