diff --git a/web/modules/custom/joinup_core/joinup_core.deploy.php b/web/modules/custom/joinup_core/joinup_core.deploy.php index adb21e2503adf808fdeb35b2210544d6f2854681..d23968e7228443fda98e0ee39020ff58a89ecadd 100644 --- a/web/modules/custom/joinup_core/joinup_core.deploy.php +++ b/web/modules/custom/joinup_core/joinup_core.deploy.php @@ -13,117 +13,3 @@ */ declare(strict_types = 1); - -use Drupal\sparql_entity_storage\UriEncoder; - -/** - * Fix glossary link for solution entities. - */ -function joinup_core_deploy_109200(array &$sandbox = []): string { - /** @var \Drupal\sparql_entity_storage\SparqlEntityStorageInterface $solutionStorage */ - $solutionStorage = \Drupal::entityTypeManager() - ->getStorage('rdf_entity'); - - /** @var \Drupal\menu_link_content\MenuLinkContentStorageInterface $menuLinkContentStorage */ - $menuLinkContentStorage = \Drupal::entityTypeManager() - ->getStorage('menu_link_content'); - - if (empty($sandbox['ids'])) { - $solutionIds = $solutionStorage->getQuery() - ->accessCheck(FALSE) - ->condition('rid', 'solution') - ->execute(); - - $sandbox['ids'] = array_values($solutionIds); - $sandbox['max'] = count($sandbox['ids']); - $sandbox['current'] = 0; - } - - $ids = array_splice($sandbox['ids'], 0, 100); - - /** @var \Drupal\solution\Entity\SolutionInterface $solution */ - foreach ($solutionStorage->loadMultiple($ids) as $solution) { - $menuIds = $menuLinkContentStorage->getQuery() - ->accessCheck(FALSE) - ->condition('menu_name', 'ogmenu-', 'STARTS_WITH') - ->condition('title', 'Glossary') - ->condition('link.uri', 'route:entity.rdf_entity.glossary', 'STARTS_WITH') - ->condition('link.uri', UriEncoder::encodeUrl($solution->id()), 'ENDS_WITH') - ->execute(); - - if (empty($menuIds)) { - continue; - } - - /** @var Drupal\menu_link_content\Entity\MenuLinkContent $menuLinkContent */ - $menuLinkContent = $menuLinkContentStorage->load(reset($menuIds)); - if (!$menuLinkContent) { - continue; - } - - $menuLinkContent->link->uri = str_replace( - UriEncoder::encodeUrl($solution->id()), - UriEncoder::encodeUrl($solution->getCollection()->id()), - $menuLinkContent->link->uri - ); - $menuLinkContent->save(); - } - - $sandbox['current'] += count($ids); - $sandbox['#finished'] = (int) empty($sandbox['ids']); - - return "Updated {$sandbox['current']} of {$sandbox['max']} glossary menu links."; -} - -/** - * Adding blocked users before the spam activity (03/12/2022) to queue. - */ -function joinup_core_deploy_109201(): string { - $from_date = new \DateTime("2022/12/03"); - $users_ids = \Drupal::entityQuery('user') - ->accessCheck(FALSE) - ->condition('status', '0') - ->condition('uid', 1, '>') - ->condition('created', $from_date->getTimestamp(), '<=') - ->execute(); - - $count = count($users_ids); - $queue = \Drupal::queue('joinup_removed_users'); - $queue->createQueue(); - - while (!empty($users_ids)) { - $ids = array_splice($users_ids, 0, 10); - $queue->createItem($ids); - } - - return "Add $count users to queue."; -} - -/** - * Clears the entity definition cache. - */ -function joinup_core_deploy_109202(): string { - $entityTypeManager = \Drupal::entityTypeManager(); - $entityTypeManager->clearCachedDefinitions(); - - // Install the field_discussion_logo field to the discussion node bundle. - try { - $fieldStorage = $entityTypeManager->getStorage('field_storage_config')->load('node.field_discussion_logo'); - $fieldStorage->setTranslatable(TRUE); - $fieldStorage->save(); - } - catch (\Exception $e) { - return 'Could not install discussion logo field storage.'; - } - - try { - $field = $entityTypeManager->getStorage('field_config')->load('node.discussion.field_discussion_logo'); - $field->setTranslatable(TRUE); - $field->save(); - } - catch (\Exception $e) { - return 'Could not install discussion logo field instance.'; - } - - return 'Entity definition cache cleared. Discussion logo installed.'; -} diff --git a/web/modules/custom/joinup_core/joinup_core.install b/web/modules/custom/joinup_core/joinup_core.install index 2ad16249a28c97b43c66f65fcfcd7981e348486b..3b6ea26f2bbcc0edce7a26bbd563a2689a1a033a 100644 --- a/web/modules/custom/joinup_core/joinup_core.install +++ b/web/modules/custom/joinup_core/joinup_core.install @@ -8,7 +8,6 @@ declare(strict_types = 1); use Drupal\Core\Site\Settings; -use Drupal\field\Entity\FieldStorageConfig; use Drupal\user\Entity\User; /** @@ -93,42 +92,3 @@ function joinup_core_requirements($phase): array { return $requirements; } - -/** - * Enables the `memcache` module. - */ -function joinup_core_update_109200(): void { - \Drupal::service('module_installer')->install(['memcache']); -} - -/** - * Update and trim existing first and family names. - */ -function joinup_core_update_109201(): void { - $database = \Drupal::database(); - $num_chars = 100; - $fields_to_update = ['field_user_family_name', 'field_user_first_name']; - $storage_schema = \Drupal::keyValue('entity.storage_schema.sql'); - - foreach ($fields_to_update as $field_name) { - $table_name = 'user__' . $field_name; - $database->query("UPDATE {$table_name} SET {$field_name}_value = SUBSTR({$field_name}_value, 1, 100) WHERE LENGTH({$field_name}_value) > 100"); - - // Resize the columns. - $database->query("ALTER TABLE {$table_name} MODIFY {$field_name}_value VARCHAR($num_chars)"); - - // Update storage schema. - $storage_key = "user.field_schema_data." . $field_name; - $field_schema = $storage_schema->get($storage_key); - $field_schema["user__{$field_name}"]['fields']["{$field_name}_value"]['length'] = $num_chars; - $storage_schema->set($storage_key, $field_schema); - - // Update field configuration. - \Drupal::configFactory()->getEditable("field.storage.user.{$field_name}") - ->set('settings.max_length', $num_chars) - ->save(TRUE); - - // Update field storage configuration. - FieldStorageConfig::loadByName('user', $field_name)->save(); - } -} diff --git a/web/themes/ventuno/assets/css/homepage.min.css b/web/themes/ventuno/assets/css/homepage.min.css index 623e1a088bf8436e86db6be154988c4b328a7e00..f9c69edfa6d9e0dcbe774c81c72174b7a43bf480 100644 --- a/web/themes/ventuno/assets/css/homepage.min.css +++ b/web/themes/ventuno/assets/css/homepage.min.css @@ -1,2 +1,2 @@ -.h1--disguised{color:#555859;font-size:1rem;font-weight:400;line-height:1.5}.joinup-layout .block>.about-what__title,.joinup-layout .block>h2{color:#143b76;font-size:1.25rem;font-weight:700;line-height:1.2;margin-bottom:1em;padding-top:.75em;text-transform:uppercase}.joinup-layout .field--name-field-topic{line-height:1.2;margin-bottom:.5rem}.joinup-layout .field--name-field-topic .field__item{display:inline-block}.joinup-layout .field--name-field-topic a{background-color:#e7f1fb;border-radius:.25rem;color:#fff;color:#0b4e97;display:inline-block;font-size:.75em;font-size:.875rem;font-weight:700;font-weight:400;line-height:1;padding:.35em .65em;text-align:center;vertical-align:baseline;white-space:nowrap}.block-entityqueue--highlighted-content .views-row,.view-in-the-spotlight .views-row,.view-latest-news .views-row{margin-bottom:1.5rem}.block-entityqueue--highlighted-content .views-row:last-child,.view-in-the-spotlight .views-row:last-child,.view-latest-news .views-row:last-child{margin-bottom:0}.block-entityqueue--highlighted-content .field--name-body,.view-in-the-spotlight .field--name-body,.view-latest-news .field--name-body{color:#555859}.block-entityqueue--highlighted-content article h2,.view-in-the-spotlight article h2,.view-latest-news article h2{font-size:1rem;font-weight:500;line-height:1.5}.block-entityqueue--highlighted-content article h2 a,.view-in-the-spotlight article h2 a,.view-latest-news article h2 a{color:#242626}.block-entityqueue--highlighted-content article img,.view-in-the-spotlight article img,.view-latest-news article img{border-radius:.5rem}.iop-gradient{-webkit-text-fill-color:transparent;background:linear-gradient(90deg,#c2d962 0,#f6921e);-webkit-background-clip:text}.region-featured{background-image:url(../images/wave.svg),url(../images/background.svg),linear-gradient(#004494,#004494 50%,#082330 0,#082330);background-position:0 55%,0 55%;background-repeat:no-repeat;background-size:100% auto}@media (min-width:768px){.region-featured{background-image:url(../images/banner-md.svg),linear-gradient(90deg,#004494 0,#004494 30%,#082330 0,#082330);background-position:50%;background-size:auto 100%}}.region-featured .block-views-exposed-filter-blocksearch-page-1{padding-bottom:.5rem}@media (min-width:992px){.region-featured .block-views-exposed-filter-blocksearch-page-1{margin-right:1rem}}.region-featured .block-views-exposed-filter-blocksearch-page-1 .search-bar .search-bar__input{border-bottom-left-radius:50rem;border-style:none;border-top-left-radius:50rem;font-size:1rem;padding:1rem 1.5rem}@media (min-width:768px){.region-featured .block-views-exposed-filter-blocksearch-page-1 .search-bar .search-bar__input{padding-bottom:0;padding-top:0}}.region-featured .block-views-exposed-filter-blocksearch-page-1 .search-bar .btn-search{background-color:#fff;border-bottom-right-radius:50rem;border-top-right-radius:50rem;color:#212529;font-size:0;padding:.425rem 1rem}.region-featured .block-views-exposed-filter-blocksearch-page-1 .search-bar .btn-search:before{background-color:#143b76;content:"";display:inline-block;font-size:1.2rem;height:1em;margin:.25rem 0;-webkit-mask-image:url(../icons/search.svg);mask-image:url(../icons/search.svg);-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;-webkit-mask-size:contain;mask-size:contain;vertical-align:-.125em;width:1em}.region-featured .block-views-exposed-filter-blocksearch-page-1 .search-bar .btn-search:hover{box-shadow:none}.region-featured .joinup-welcomes{font-size:1.5rem}@media (min-width:768px){.region-featured .joinup-welcomes{font-size:1.75rem}}@media (min-width:992px){.region-featured .joinup-welcomes{font-size:2.5rem}}.about-how,.about-what,.about-who{color:#555859}.block-views-blockin-the-spotlight-block{border-bottom:1px solid rgba(20,59,118,.1);height:100%;padding-bottom:3rem}.block-views-blockin-the-spotlight-block>h2:before{background-color:#eba843;content:"";display:inline-block;height:1em;margin-right:.5rem;-webkit-mask-image:url(../icons/star.svg);mask-image:url(../icons/star.svg);-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;-webkit-mask-size:contain;mask-size:contain;vertical-align:-.125em;width:1em}.block-views-blockin-the-spotlight-block .field--name-field-topic a{border-radius:50rem;margin-bottom:.5rem;margin-right:.5rem;padding-left:1rem;padding-right:1rem}.view-in-the-spotlight{counter-reset:spotlight-counter}.view-in-the-spotlight .views-row{display:flex;flex-direction:column}@media (min-width:768px){.view-in-the-spotlight .views-row{flex-direction:row}}.view-in-the-spotlight .views-row .news__logo-wrapper{text-align:center}@media (min-width:768px){.view-in-the-spotlight .views-row .news__logo-wrapper{width:calc(25% - 33px)}}@media (min-width:992px){.view-in-the-spotlight .views-row .news__logo-wrapper{width:calc(33.33333% - 33px)}}@media (min-width:768px){.view-in-the-spotlight .views-row .news__field-wrapper{width:calc(66.66667% + 33px)}}.view-in-the-spotlight .views-row .metadata{color:#6d7173;font-size:.75rem;margin-top:.5rem}.view-in-the-spotlight .views-row:before{color:rgba(20,59,118,.7);content:counter(spotlight-counter,decimal-leading-zero);counter-increment:spotlight-counter;display:inline-block;font-size:1.25rem;font-weight:700;line-height:1;margin-bottom:.5rem;padding-right:1rem}.block-entityqueue--highlighted-content{border-bottom:1px solid rgba(20,59,118,.1);height:100%;padding-bottom:3rem;position:relative}.block-entityqueue--highlighted-content>h2:before{background-color:#eba843;content:"";display:inline-block;height:1em;margin-right:.5rem;-webkit-mask-image:url(../icons/award.svg);mask-image:url(../icons/award.svg);-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;-webkit-mask-size:contain;mask-size:contain;vertical-align:-.125em;width:1em}.block-entityqueue--highlighted-content .more-link{bottom:1rem;position:absolute}@media (min-width:768px){.block-entityqueue--highlighted-content .more-link{right:0;top:12px}}.block-entityqueue--highlighted-content .more-link:after{background-color:currentColor;content:"";display:inline-block;height:1em;margin-left:.5rem;-webkit-mask-image:url(../icons/arrow-right.svg);mask-image:url(../icons/arrow-right.svg);-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;-webkit-mask-size:contain;mask-size:contain;vertical-align:-.125em;width:1em}.block-entityqueue--highlighted-content article .logo{margin-bottom:1.5rem}.block-entityqueue--highlighted-content article .description{color:#555859}.block-entityqueue--highlighted-content article .topics a{border-radius:50rem;padding-left:1rem;padding-right:1rem}.block-views-blocklatest-news-block{margin-bottom:3rem;position:relative}.block-views-blocklatest-news-block>h2:before{background-color:#eba843;content:"";display:inline-block;height:1em;margin-right:.5rem;-webkit-mask-image:url(../icons/lightning-charge.svg);mask-image:url(../icons/lightning-charge.svg);-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;-webkit-mask-size:contain;mask-size:contain;vertical-align:-.125em;width:1em}.block-views-blocklatest-news-block .more-link{bottom:-2rem;position:absolute}@media (min-width:768px){.block-views-blocklatest-news-block .more-link{right:0;top:12px}}.block-views-blocklatest-news-block .more-link:after{background-color:currentColor;content:"";display:inline-block;height:1em;margin-left:.5rem;-webkit-mask-image:url(../icons/arrow-right.svg);mask-image:url(../icons/arrow-right.svg);-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;-webkit-mask-size:contain;mask-size:contain;vertical-align:-.125em;width:1em}.block-views-blocklatest-news-block .view-latest-news article{display:flex;flex-direction:row}.block-views-blocklatest-news-block .view-latest-news article .dated-listing--date{color:rgba(20,59,118,.7);display:flex;flex-flow:column;font-weight:700;line-height:1;padding-right:1rem;text-align:center;text-transform:uppercase}.block-views-blocklatest-news-block .view-latest-news article .dated-listing--date .date--day{font-size:1.25rem}.block-views-blocklatest-news-block .view-latest-news article .dated-listing--date .date--month{font-size:1rem;line-height:1.4}.block-views-blocklatest-news-block .view-latest-news article .dated-listing--content h2{font-size:1rem;font-weight:500;line-height:1.5}.block-views-blocklatest-news-block .view-latest-news article .dated-listing--content h2 a{color:#242626}.block-views-blocklatest-news-block .field--name-field-topic a{border-radius:50rem;margin-bottom:.5rem;margin-right:.5rem;padding-left:1rem;padding-right:1rem}.block-entityqueue--highlighted-event{height:100%;margin-bottom:3rem;position:relative}.block-entityqueue--highlighted-event>h2:before{background-color:#eba843;content:"";display:inline-block;height:1em;margin-right:.5rem;-webkit-mask-image:url(../icons/calendar.svg);mask-image:url(../icons/calendar.svg);-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;-webkit-mask-size:contain;mask-size:contain;vertical-align:-.125em;width:1em}.block-entityqueue--highlighted-event .more-link{bottom:-2rem;position:absolute}@media (min-width:768px){.block-entityqueue--highlighted-event .more-link{right:0;top:12px}}.block-entityqueue--highlighted-event .more-link:after{background-color:currentColor;content:"";display:inline-block;height:1em;margin-left:.5rem;-webkit-mask-image:url(../icons/arrow-right.svg);mask-image:url(../icons/arrow-right.svg);-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;-webkit-mask-size:contain;mask-size:contain;vertical-align:-.125em;width:1em}.block-entityqueue--highlighted-event article{align-items:center;background:#dadee0 url(../images/highlighted-event.jpg) no-repeat 50%;background-size:cover;border-radius:.5rem;color:#fff;display:flex;flex-flow:column;justify-content:center;padding:1.5rem;text-align:center}@media (min-width:992px){.block-entityqueue--highlighted-event article{padding:3rem}}.block-entityqueue--highlighted-event article header{margin-bottom:3rem;padding-bottom:3rem}.block-entityqueue--highlighted-event article header h3{border-bottom:4px solid #fff;color:#fff;font-size:1.25rem;font-weight:400;text-transform:uppercase}.block-entityqueue--highlighted-event article>h2{color:#fff;line-height:1.25;margin-bottom:.25rem}.block-entityqueue--highlighted-event article .field--name-field-event-date{font-size:1rem;font-weight:400}.block-entityqueue--highlighted-event article footer{margin-top:3rem;padding-top:3rem}.block-joinup-front-page-explore-block{margin-bottom:3rem;padding-bottom:3rem;padding-top:3rem;position:relative}.block-joinup-front-page-explore-block:before{background:#f5f6f7;bottom:0;content:"";margin-left:calc(50% - 50vw);position:absolute;top:0;width:100vw;z-index:-1}@media (min-width:768px){.block-joinup-front-page-explore-block:before{background:linear-gradient(0deg,#fff 8rem,#f5f6f7 0)}}.block-joinup-front-page-explore-block .explore-block-title{border-bottom:1px solid rgba(20,59,118,.1);font-size:1.25rem;font-weight:700;margin-bottom:1.5rem;padding-bottom:1.5rem;text-transform:uppercase}.block-joinup-front-page-explore-block .explore-block-title:before{background-color:#eba843;content:"";display:inline-block;height:1em;margin-right:.5rem;-webkit-mask-image:url(../icons/eye.svg);mask-image:url(../icons/eye.svg);-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;-webkit-mask-size:contain;mask-size:contain;vertical-align:-.125em;width:1em}.block-joinup-front-page-explore-block .nav-tabs{border:none;margin-bottom:1rem}@media (min-width:768px){.block-joinup-front-page-explore-block .nav-tabs{position:absolute;right:0;top:2.5rem}}.block-joinup-front-page-explore-block .nav-tabs .nav-link{background:none;border:none;color:#6d7173;margin:.5rem;padding:0 0 .4rem}@media (min-width:1200px){.block-joinup-front-page-explore-block .nav-tabs .nav-link{margin:1.5rem}}.block-joinup-front-page-explore-block .nav-tabs .nav-link.active{border-bottom:4px solid #000;color:#000}.block-joinup-front-page-explore-block .tab-content .tab-pane .see-more{display:block}.block-joinup-front-page-explore-block .tab-content .tab-pane .tab-data article{background-color:#fff;border-radius:.5rem;display:flex!important;flex-flow:column;height:100%;margin-right:1.5rem;padding:1.5rem}.block-joinup-front-page-explore-block .tab-content .tab-pane .tab-data article .layout{flex-grow:1}.block-joinup-front-page-explore-block .tab-content .tab-pane .tab-data article .layout .layout__region{display:flex;flex-direction:column;height:100%}.block-joinup-front-page-explore-block .tab-content .tab-pane .tab-data article h1{font-size:1.25rem;font-weight:500;line-height:1.5}.block-joinup-front-page-explore-block .tab-content .tab-pane .tab-data article h1 a{-webkit-line-clamp:2;-webkit-box-orient:vertical;color:#3d3f40;display:-webkit-box;overflow:hidden}.block-joinup-front-page-explore-block .tab-content .tab-pane .tab-data article .explore-item__description{-webkit-line-clamp:7;-webkit-box-orient:vertical;color:#6d7173;display:-webkit-box;flex-grow:1;margin-bottom:1.5rem;overflow:hidden}.block-joinup-front-page-explore-block .tab-content .tab-pane .tab-data article .date{color:#6d7173;font-size:.75rem}.block-joinup-front-page-explore-block .tab-content .tab-pane .tab-data article .date .field--name-created,.block-joinup-front-page-explore-block .tab-content .tab-pane .tab-data article .date .field--name-published-at{padding-top:.4rem}.block-joinup-front-page-explore-block .tab-content .tab-pane .tab-data article .read-more-wrapper{align-self:flex-end;margin-top:-1.8rem}.block-joinup-front-page-explore-block .tab-content .tab-pane .tab-data article .read-more{float:right}.block-joinup-front-page-explore-block .tab-content .tab-pane .tab-data article .read-more:hover{text-decoration:none}.glide__outer{margin-left:-1rem;overflow:hidden;padding:1rem;width:calc(100% + 2rem)}.glide__slides,.glide__track{overflow:visible}.glide__slide{box-shadow:0 .1rem .4rem .1rem rgba(0,0,0,.1);display:flex!important;height:auto!important}.glide__arrows{display:flex;float:left}.glide__arrow{background-color:#fff;border:none;height:40px;width:40px}.glide__arrow:hover{box-shadow:0 .1rem .4rem .1rem rgba(0,0,0,.1)}.glide__arrow--left{margin-right:1rem}.glide__arrow--left span.icon:before{-webkit-mask-image:url(../icons/chevron-left.svg);mask-image:url(../icons/chevron-left.svg)}.glide__arrow--left span.icon:before,.glide__arrow--right span.icon:before{background-color:#143b76;content:"";display:inline-block;height:1em;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;-webkit-mask-size:contain;mask-size:contain;vertical-align:-.125em;width:1em}.glide__arrow--right span.icon:before{-webkit-mask-image:url(../icons/chevron-right.svg);mask-image:url(../icons/chevron-right.svg)} +.h1--disguised{color:#555859;font-size:1rem;font-weight:400;line-height:1.5}.joinup-layout .block>.about-what__title,.joinup-layout .block>h2{color:#143b76;font-size:1.25rem;font-weight:700;line-height:1.2;margin-bottom:1em;padding-top:.75em;text-transform:uppercase}.joinup-layout .field--name-field-topic{line-height:1.2;margin-bottom:.5rem}.joinup-layout .field--name-field-topic .field__item{display:inline-block}.joinup-layout .field--name-field-topic a{background-color:#e7f1fb;border-radius:.25rem;color:#fff;color:#0b4e97;display:inline-block;font-size:.75em;font-size:.875rem;font-weight:700;font-weight:400;line-height:1;padding:.35em .65em;text-align:center;vertical-align:baseline;white-space:nowrap}.block-entityqueue--highlighted-content .views-row,.view-in-the-spotlight .views-row,.view-latest-news .views-row{margin-bottom:1.5rem}.block-entityqueue--highlighted-content .views-row:last-child,.view-in-the-spotlight .views-row:last-child,.view-latest-news .views-row:last-child{margin-bottom:0}.block-entityqueue--highlighted-content .field--name-body,.view-in-the-spotlight .field--name-body,.view-latest-news .field--name-body{color:#555859}.block-entityqueue--highlighted-content article h1,.block-entityqueue--highlighted-content article h2,.view-in-the-spotlight article h1,.view-in-the-spotlight article h2,.view-latest-news article h1,.view-latest-news article h2{font-size:1rem;font-weight:500;line-height:1.5}.block-entityqueue--highlighted-content article h1 a,.block-entityqueue--highlighted-content article h2 a,.view-in-the-spotlight article h1 a,.view-in-the-spotlight article h2 a,.view-latest-news article h1 a,.view-latest-news article h2 a{color:#242626}.block-entityqueue--highlighted-content article img,.view-in-the-spotlight article img,.view-latest-news article img{border-radius:.5rem}.iop-gradient{-webkit-text-fill-color:transparent;background:linear-gradient(90deg,#c2d962 0,#f6921e);-webkit-background-clip:text}.region-featured{background-image:url(../images/wave.svg),url(../images/background.svg),linear-gradient(#004494,#004494 50%,#082330 0,#082330);background-position:0 55%,0 55%;background-repeat:no-repeat;background-size:100% auto}@media (min-width:768px){.region-featured{background-image:url(../images/banner-md.svg),linear-gradient(90deg,#004494 0,#004494 30%,#082330 0,#082330);background-position:50%;background-size:auto 100%}}.region-featured .block-views-exposed-filter-blocksearch-page-1{padding-bottom:.5rem}@media (min-width:992px){.region-featured .block-views-exposed-filter-blocksearch-page-1{margin-right:1rem}}.region-featured .block-views-exposed-filter-blocksearch-page-1 .search-bar .search-bar__input{border-bottom-left-radius:50rem;border-style:none;border-top-left-radius:50rem;font-size:1rem;padding:1rem 1.5rem}@media (min-width:768px){.region-featured .block-views-exposed-filter-blocksearch-page-1 .search-bar .search-bar__input{padding-bottom:0;padding-top:0}}.region-featured .block-views-exposed-filter-blocksearch-page-1 .search-bar .btn-search{background-color:#fff;border-bottom-right-radius:50rem;border-top-right-radius:50rem;color:#212529;font-size:0;padding:.425rem 1rem}.region-featured .block-views-exposed-filter-blocksearch-page-1 .search-bar .btn-search:before{background-color:#143b76;content:"";display:inline-block;font-size:1.2rem;height:1em;margin:.25rem 0;-webkit-mask-image:url(../icons/search.svg);mask-image:url(../icons/search.svg);-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;-webkit-mask-size:contain;mask-size:contain;vertical-align:-.125em;width:1em}.region-featured .block-views-exposed-filter-blocksearch-page-1 .search-bar .btn-search:hover{box-shadow:none}.region-featured .joinup-welcomes{font-size:1.5rem}@media (min-width:768px){.region-featured .joinup-welcomes{font-size:1.75rem}}@media (min-width:992px){.region-featured .joinup-welcomes{font-size:2.5rem}}.about-how,.about-what,.about-who{color:#555859}.block-views-blockin-the-spotlight-block{border-bottom:1px solid rgba(20,59,118,.1);height:100%;padding-bottom:3rem}.block-views-blockin-the-spotlight-block>h2:before{background-color:#eba843;content:"";display:inline-block;height:1em;margin-right:.5rem;-webkit-mask-image:url(../icons/star.svg);mask-image:url(../icons/star.svg);-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;-webkit-mask-size:contain;mask-size:contain;vertical-align:-.125em;width:1em}.block-views-blockin-the-spotlight-block .field--name-field-topic a{border-radius:50rem;margin-bottom:.5rem;margin-right:.5rem;padding-left:1rem;padding-right:1rem}.view-in-the-spotlight{counter-reset:spotlight-counter}.view-in-the-spotlight .views-row{display:flex;flex-direction:column}@media (min-width:768px){.view-in-the-spotlight .views-row{flex-direction:row}}.view-in-the-spotlight .views-row .news__logo-wrapper{text-align:center}@media (min-width:768px){.view-in-the-spotlight .views-row .news__logo-wrapper{width:calc(25% - 33px)}}@media (min-width:992px){.view-in-the-spotlight .views-row .news__logo-wrapper{width:calc(33.33333% - 33px)}}@media (min-width:768px){.view-in-the-spotlight .views-row .news__field-wrapper{width:calc(66.66667% + 33px)}}.view-in-the-spotlight .views-row .metadata{color:#6d7173;font-size:.75rem;margin-top:.5rem}.view-in-the-spotlight .views-row:before{color:rgba(20,59,118,.7);content:counter(spotlight-counter,decimal-leading-zero);counter-increment:spotlight-counter;display:inline-block;font-size:1.25rem;font-weight:700;line-height:1;margin-bottom:.5rem;padding-right:1rem}.block-entityqueue--highlighted-content{border-bottom:1px solid rgba(20,59,118,.1);height:100%;padding-bottom:3rem;position:relative}.block-entityqueue--highlighted-content>h2:before{background-color:#eba843;content:"";display:inline-block;height:1em;margin-right:.5rem;-webkit-mask-image:url(../icons/award.svg);mask-image:url(../icons/award.svg);-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;-webkit-mask-size:contain;mask-size:contain;vertical-align:-.125em;width:1em}.block-entityqueue--highlighted-content .more-link{bottom:1rem;position:absolute}@media (min-width:768px){.block-entityqueue--highlighted-content .more-link{right:0;top:12px}}.block-entityqueue--highlighted-content .more-link:after{background-color:currentColor;content:"";display:inline-block;height:1em;margin-left:.5rem;-webkit-mask-image:url(../icons/arrow-right.svg);mask-image:url(../icons/arrow-right.svg);-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;-webkit-mask-size:contain;mask-size:contain;vertical-align:-.125em;width:1em}.block-entityqueue--highlighted-content article .logo{margin-bottom:1.5rem}.block-entityqueue--highlighted-content article .description{color:#555859}.block-entityqueue--highlighted-content article .topics a{border-radius:50rem;padding-left:1rem;padding-right:1rem}.block-views-blocklatest-news-block{margin-bottom:3rem;position:relative}.block-views-blocklatest-news-block>h2:before{background-color:#eba843;content:"";display:inline-block;height:1em;margin-right:.5rem;-webkit-mask-image:url(../icons/lightning-charge.svg);mask-image:url(../icons/lightning-charge.svg);-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;-webkit-mask-size:contain;mask-size:contain;vertical-align:-.125em;width:1em}.block-views-blocklatest-news-block .more-link{bottom:-2rem;position:absolute}@media (min-width:768px){.block-views-blocklatest-news-block .more-link{right:0;top:12px}}.block-views-blocklatest-news-block .more-link:after{background-color:currentColor;content:"";display:inline-block;height:1em;margin-left:.5rem;-webkit-mask-image:url(../icons/arrow-right.svg);mask-image:url(../icons/arrow-right.svg);-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;-webkit-mask-size:contain;mask-size:contain;vertical-align:-.125em;width:1em}.block-views-blocklatest-news-block .view-latest-news article{display:flex;flex-direction:row}.block-views-blocklatest-news-block .view-latest-news article .dated-listing--date{color:rgba(20,59,118,.7);display:flex;flex-flow:column;font-weight:700;line-height:1;padding-right:1rem;text-align:center;text-transform:uppercase}.block-views-blocklatest-news-block .view-latest-news article .dated-listing--date .date--day{font-size:1.25rem}.block-views-blocklatest-news-block .view-latest-news article .dated-listing--date .date--month{font-size:1rem;line-height:1.4}.block-views-blocklatest-news-block .view-latest-news article .dated-listing--content h2{font-size:1rem;font-weight:500;line-height:1.5}.block-views-blocklatest-news-block .view-latest-news article .dated-listing--content h2 a{color:#242626}.block-views-blocklatest-news-block .field--name-field-topic a{border-radius:50rem;margin-bottom:.5rem;margin-right:.5rem;padding-left:1rem;padding-right:1rem}.block-entityqueue--highlighted-event{height:100%;margin-bottom:3rem;position:relative}.block-entityqueue--highlighted-event>h2:before{background-color:#eba843;content:"";display:inline-block;height:1em;margin-right:.5rem;-webkit-mask-image:url(../icons/calendar.svg);mask-image:url(../icons/calendar.svg);-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;-webkit-mask-size:contain;mask-size:contain;vertical-align:-.125em;width:1em}.block-entityqueue--highlighted-event .more-link{bottom:-2rem;position:absolute}@media (min-width:768px){.block-entityqueue--highlighted-event .more-link{right:0;top:12px}}.block-entityqueue--highlighted-event .more-link:after{background-color:currentColor;content:"";display:inline-block;height:1em;margin-left:.5rem;-webkit-mask-image:url(../icons/arrow-right.svg);mask-image:url(../icons/arrow-right.svg);-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;-webkit-mask-size:contain;mask-size:contain;vertical-align:-.125em;width:1em}.block-entityqueue--highlighted-event article{align-items:center;background:#dadee0 url(../images/highlighted-event.jpg) no-repeat 50%;background-size:cover;border-radius:.5rem;color:#fff;display:flex;flex-flow:column;justify-content:center;padding:1.5rem;text-align:center}@media (min-width:992px){.block-entityqueue--highlighted-event article{padding:3rem}}.block-entityqueue--highlighted-event article header{margin-bottom:3rem;padding-bottom:3rem}.block-entityqueue--highlighted-event article header h3{border-bottom:4px solid #fff;color:#fff;font-size:1.25rem;font-weight:400;text-transform:uppercase}.block-entityqueue--highlighted-event article>h2{color:#fff;line-height:1.25;margin-bottom:.25rem}.block-entityqueue--highlighted-event article .field--name-field-event-date{font-size:1rem;font-weight:400}.block-entityqueue--highlighted-event article footer{margin-top:3rem;padding-top:3rem}.block-joinup-front-page-explore-block{margin-bottom:3rem;padding-bottom:3rem;padding-top:3rem;position:relative}.block-joinup-front-page-explore-block:before{background:#f5f6f7;bottom:0;content:"";margin-left:calc(50% - 50vw);position:absolute;top:0;width:100vw;z-index:-1}@media (min-width:768px){.block-joinup-front-page-explore-block:before{background:linear-gradient(0deg,#fff 8rem,#f5f6f7 0)}}.block-joinup-front-page-explore-block .explore-block-title{border-bottom:1px solid rgba(20,59,118,.1);font-size:1.25rem;font-weight:700;margin-bottom:1.5rem;padding-bottom:1.5rem;text-transform:uppercase}.block-joinup-front-page-explore-block .explore-block-title:before{background-color:#eba843;content:"";display:inline-block;height:1em;margin-right:.5rem;-webkit-mask-image:url(../icons/eye.svg);mask-image:url(../icons/eye.svg);-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;-webkit-mask-size:contain;mask-size:contain;vertical-align:-.125em;width:1em}.block-joinup-front-page-explore-block .nav-tabs{border:none;margin-bottom:1rem}@media (min-width:768px){.block-joinup-front-page-explore-block .nav-tabs{position:absolute;right:0;top:2.5rem}}.block-joinup-front-page-explore-block .nav-tabs .nav-link{background:none;border:none;color:#6d7173;margin:.5rem;padding:0 0 .4rem}@media (min-width:1200px){.block-joinup-front-page-explore-block .nav-tabs .nav-link{margin:1.5rem}}.block-joinup-front-page-explore-block .nav-tabs .nav-link.active{border-bottom:4px solid #000;color:#000}.block-joinup-front-page-explore-block .tab-content .tab-pane .see-more{display:block}.block-joinup-front-page-explore-block .tab-content .tab-pane .tab-data article{background-color:#fff;border-radius:.5rem;display:flex!important;flex-flow:column;height:100%;margin-right:1.5rem;padding:1.5rem}.block-joinup-front-page-explore-block .tab-content .tab-pane .tab-data article .layout{flex-grow:1}.block-joinup-front-page-explore-block .tab-content .tab-pane .tab-data article .layout .layout__region{display:flex;flex-direction:column;height:100%}.block-joinup-front-page-explore-block .tab-content .tab-pane .tab-data article h1{font-size:1.25rem;font-weight:500;line-height:1.5}.block-joinup-front-page-explore-block .tab-content .tab-pane .tab-data article h1 a{-webkit-line-clamp:2;-webkit-box-orient:vertical;color:#3d3f40;display:-webkit-box;overflow:hidden}.block-joinup-front-page-explore-block .tab-content .tab-pane .tab-data article .explore-item__description{-webkit-line-clamp:7;-webkit-box-orient:vertical;color:#6d7173;display:-webkit-box;flex-grow:1;margin-bottom:1.5rem;overflow:hidden}.block-joinup-front-page-explore-block .tab-content .tab-pane .tab-data article .date{color:#6d7173;font-size:.75rem}.block-joinup-front-page-explore-block .tab-content .tab-pane .tab-data article .date .field--name-created,.block-joinup-front-page-explore-block .tab-content .tab-pane .tab-data article .date .field--name-published-at{padding-top:.4rem}.block-joinup-front-page-explore-block .tab-content .tab-pane .tab-data article .read-more-wrapper{align-self:flex-end;margin-top:-1.8rem}.block-joinup-front-page-explore-block .tab-content .tab-pane .tab-data article .read-more{float:right}.block-joinup-front-page-explore-block .tab-content .tab-pane .tab-data article .read-more:hover{text-decoration:none}.glide__outer{margin-left:-1rem;overflow:hidden;padding:1rem;width:calc(100% + 2rem)}.glide__slides,.glide__track{overflow:visible}.glide__slide{box-shadow:0 .1rem .4rem .1rem rgba(0,0,0,.1);display:flex!important;height:auto!important}.glide__arrows{display:flex;float:left}.glide__arrow{background-color:#fff;border:none;height:40px;width:40px}.glide__arrow:hover{box-shadow:0 .1rem .4rem .1rem rgba(0,0,0,.1)}.glide__arrow--left{margin-right:1rem}.glide__arrow--left span.icon:before{-webkit-mask-image:url(../icons/chevron-left.svg);mask-image:url(../icons/chevron-left.svg)}.glide__arrow--left span.icon:before,.glide__arrow--right span.icon:before{background-color:#143b76;content:"";display:inline-block;height:1em;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;-webkit-mask-size:contain;mask-size:contain;vertical-align:-.125em;width:1em}.glide__arrow--right span.icon:before{-webkit-mask-image:url(../icons/chevron-right.svg);mask-image:url(../icons/chevron-right.svg)} /*# sourceMappingURL=homepage.min.css.map */ \ No newline at end of file diff --git a/web/themes/ventuno/includes/utility.inc b/web/themes/ventuno/includes/utility.inc index 4394656180eaef318baa3689819238faaceb41fd..7369d4fd2698abe69da960653c770b435e560cf5 100644 --- a/web/themes/ventuno/includes/utility.inc +++ b/web/themes/ventuno/includes/utility.inc @@ -70,7 +70,7 @@ function _ventuno_preprocess_tile(array &$variables, string $entity_type_id): vo // Bundle label and icon. $bundle_type = $entity->get($bundle_key)->entity; $variables['bundle']['label'] = ucfirst($bundle_type->getSingularLabel() ?? $bundle_type->label()); - $variables['bundle']['icon'] = _ventuno_get_default_icon_render_array($entity->getEntityTypeId(), $entity->bundle()); + $variables['bundle']['icon'] = _ventuno_get_default_icon($entity->getEntityTypeId(), $entity->bundle()); } /** @@ -133,7 +133,7 @@ function _ventuno_preprocess_search_result(array &$variables, string $entity_typ } /** - * Returns the default icon for the given bundle or the generic entity icon. + * Returns the default icon id for the given bundle or a generic icon id. * * @param string $entity_type_id * The entity type ID. @@ -143,7 +143,7 @@ function _ventuno_preprocess_search_result(array &$variables, string $entity_typ * @return string * The icon id. */ -function _ventuno_get_default_icon_render_array(string $entity_type_id, string $bundle): string { +function _ventuno_get_default_icon(string $entity_type_id, string $bundle): string { $mapping = [ 'node' => [ 'custom_page' => 'file-earmark-richtext', @@ -166,6 +166,50 @@ function _ventuno_get_default_icon_render_array(string $entity_type_id, string $ return $mapping[$entity_type_id][$bundle] ?? 'lightning-charge'; } +/** + * Returns icon as render array for the bundle or a generic icon render array. + * + * @todo ISAICP-7709 With tiles redesign, the search items won't need this so + * we can delete this function. + * + * @param string $entity_type_id + * The entity type ID. + * @param string $bundle + * The bundle. + * + * @return array + * The icon class render array. + */ +function _ventuno_get_default_icon_render_array(string $entity_type_id, string $bundle): array { + $mapping = [ + 'node' => [ + 'custom_page' => 'file-earmark-richtext', + 'discussion' => 'chat-left-text', + 'document' => 'file-earmark-text', + 'event' => 'calendar-event', + 'news' => 'newspaper', + 'tallinn_report' => 'journal-text', + 'video' => 'file-earmark-play', + ], + 'rdf_entity' => [ + 'collection' => 'folder2-open', + 'licence' => 'file-earmark-medical', + 'asset_distribution' => 'file-earmark-post', + 'asset_release' => 'file-earmark-zip', + 'solution' => 'clipboard2-check', + ], + ]; + + $class = $mapping[$entity_type_id][$bundle] ?? 'lightning-charge'; + return [ + '#type' => 'inline_template', + '#template' => '<svg class="bi img-fluid w-100 py-3 p-lg-3 text-white bg-secondary"><use xlink:href="' . base_path() . \Drupal::service('extension.list.theme')->getPath('ventuno') . '/assets/icons/icons.svg#{{ icon }}"></use></svg>', + '#context' => [ + 'icon' => $class, + ], + ]; +} + /** * Builds the permalink for the given route. * diff --git a/web/themes/ventuno/src/scss/pages/_homepage.scss b/web/themes/ventuno/src/scss/pages/_homepage.scss index d9ab5c1ba577e220b7cd54704325572d236efac9..01e40310bdbbcc4c318693f21bdf37d09055246f 100644 --- a/web/themes/ventuno/src/scss/pages/_homepage.scss +++ b/web/themes/ventuno/src/scss/pages/_homepage.scss @@ -57,6 +57,7 @@ color: $gray-700; } article { + h1, h2 { font-size: $font-size-base; font-weight: $font-weight-medium;