diff --git a/CHANGELOG.md b/CHANGELOG.md index 853f2795..705ffba0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,12 @@ ## 1.xx-dev Release date: ??.??.???? +## 1.61 +Release date: 13.04.2021 +* HUB-719 - Updating Theme page UI. +* HUB-730 - Updating related links position on Instructions for teaching. +* HUB-854 - Adding an Open API description for JSON:API and REST. +* HUB-720 - Updating Instruction content layout and visuals to better match Studies service guidelines. ## 1.60 Release date: 23.03.2021 diff --git a/composer.json b/composer.json index 84450f11..649a4556 100644 --- a/composer.json +++ b/composer.json @@ -83,7 +83,9 @@ "drupal/memcache": "^2.2", "drupal/entity_browser": "^2.5", "drupal/responsive_table_filter": "^1.2", - "drupal/jsonapi_image_styles": "^2.0@beta" + "drupal/jsonapi_image_styles": "^2.0@beta", + "drupal/openapi_jsonapi": "^3.0", + "drupal/openapi_rest": "^2.0@RC" }, "repositories": { "0": { @@ -162,6 +164,9 @@ "drupal/maxlength": { "2902083-2": "https://www.drupal.org/files/issues/translateable_help-2902083-2.patch" }, + "drupal/openapi_jsonapi": { + "#3079209: Hide POST, PUT, and DELETE endpoints when JSON:API is configured to be read-only.": "https://www.drupal.org/files/issues/2020-12-21/only_add_read_route-methods_when_read_only_is_enabled_in_jsonapi_3079209-10.patch" + }, "drupal/purge": { "2952277-38 minify cache tags header": "https://www.drupal.org/files/issues/2020-07-06/purge_cache_tags_minify-2952277-38.patch" }, diff --git a/composer.lock b/composer.lock index ed3cfebb..3308777d 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "7544f93dde9574d3f8874e25184e2fa1", + "content-hash": "c11b5a6e8c385dabf36f8626e03af5f2", "packages": [ { "name": "UH-StudentServices/uh_courses_embed", @@ -3927,6 +3927,195 @@ "source": "https://git.drupalcode.org/project/noreqnewpass" } }, + { + "name": "drupal/openapi", + "version": "2.0.0-rc3", + "source": { + "type": "git", + "url": "https://git.drupalcode.org/project/openapi.git", + "reference": "8.x-2.0-rc3" + }, + "dist": { + "type": "zip", + "url": "https://ftp.drupal.org/files/projects/openapi-8.x-2.0-rc3.zip", + "reference": "8.x-2.0-rc3", + "shasum": "146d53e8cc4f732fe27aaf702852813f91629349" + }, + "require": { + "drupal/core": "^8.7.0 || ^9" + }, + "require-dev": { + "vijaycs85/drupal-quality-checker": "^1.2" + }, + "type": "drupal-module", + "extra": { + "drupal": { + "version": "8.x-2.0-rc3", + "datestamp": "1587845666", + "security-coverage": { + "status": "not-covered", + "message": "RC releases are not covered by Drupal security advisories." + } + } + }, + "notification-url": "https://packages.drupal.org/8/downloads", + "license": [ + "GPL-2.0+" + ], + "authors": [ + { + "name": "e0ipso", + "homepage": "https://www.drupal.org/user/550110" + }, + { + "name": "mrjmd", + "homepage": "https://www.drupal.org/user/1800446" + }, + { + "name": "phenaproxima", + "homepage": "https://www.drupal.org/user/205645" + }, + { + "name": "richgerdes", + "homepage": "https://www.drupal.org/user/3437973" + }, + { + "name": "rogierbom", + "homepage": "https://www.drupal.org/user/1352176" + }, + { + "name": "tedbow", + "homepage": "https://www.drupal.org/user/240860" + } + ], + "description": "Creates OpenAPI specification for Drupal resources.", + "homepage": "https://www.drupal.org/project/openapi", + "keywords": [ + "Drupal" + ], + "support": { + "source": "http://cgit.drupalcode.org/openapi", + "issues": "http://drupal.org/project/issues/openapi" + } + }, + { + "name": "drupal/openapi_jsonapi", + "version": "3.0.1", + "source": { + "type": "git", + "url": "https://git.drupalcode.org/project/openapi_jsonapi.git", + "reference": "3.0.1" + }, + "dist": { + "type": "zip", + "url": "https://ftp.drupal.org/files/projects/openapi_jsonapi-3.0.1.zip", + "reference": "3.0.1", + "shasum": "4cc755df358ff9cbce55d261a091cef3829f46ab" + }, + "require": { + "drupal/core": "^8 || ^9", + "drupal/openapi": "^2", + "drupal/schemata": "^1", + "drupal/schemata_json_schema": "*" + }, + "type": "drupal-module", + "extra": { + "drupal": { + "version": "3.0.1", + "datestamp": "1603355389", + "security-coverage": { + "status": "covered", + "message": "Covered by Drupal's security advisory policy" + } + }, + "patches_applied": { + "#3079209: Hide POST, PUT, and DELETE endpoints when JSON:API is configured to be read-only.": "https://www.drupal.org/files/issues/2020-12-21/only_add_read_route-methods_when_read_only_is_enabled_in_jsonapi_3079209-10.patch" + } + }, + "notification-url": "https://packages.drupal.org/8/downloads", + "license": [ + "GPL-2.0-or-later" + ], + "authors": [ + { + "name": "Mateu Aguiló Bosch", + "homepage": "https://www.drupal.org/user/3616626", + "email": "mateu.aguilo.bosch@gmail.com" + }, + { + "name": "e0ipso", + "homepage": "https://www.drupal.org/user/550110" + }, + { + "name": "richgerdes", + "homepage": "https://www.drupal.org/user/3437973" + } + ], + "description": "OpenAPI support for the JSON:API module.", + "homepage": "https://www.drupal.org/project/openapi_jsonapi", + "support": { + "source": "https://git.drupalcode.org/project/openapi_jsonapi" + } + }, + { + "name": "drupal/openapi_rest", + "version": "2.0.0-rc2", + "source": { + "type": "git", + "url": "https://git.drupalcode.org/project/openapi_rest.git", + "reference": "8.x-2.0-rc2" + }, + "dist": { + "type": "zip", + "url": "https://ftp.drupal.org/files/projects/openapi_rest-8.x-2.0-rc2.zip", + "reference": "8.x-2.0-rc2", + "shasum": "900118dea679f0d9e2f2c92eb2744e6793494adb" + }, + "require": { + "drupal/core": "^8 || ^9", + "drupal/openapi": "^2.0", + "drupal/schemata": "*", + "drupal/schemata_json_schema": "*" + }, + "type": "drupal-module", + "extra": { + "drupal": { + "version": "8.x-2.0-rc2", + "datestamp": "1585779664", + "security-coverage": { + "status": "not-covered", + "message": "RC releases are not covered by Drupal security advisories." + } + } + }, + "notification-url": "https://packages.drupal.org/8/downloads", + "license": [ + "GPL-2.0-or-later" + ], + "authors": [ + { + "name": "API-First Initiative", + "homepage": "https://www.drupal.org/user/3616626" + }, + { + "name": "e0ipso", + "homepage": "https://www.drupal.org/user/550110" + }, + { + "name": "phenaproxima", + "homepage": "https://www.drupal.org/user/205645" + }, + { + "name": "richgerdes", + "homepage": "https://www.drupal.org/user/3437973" + } + ], + "description": "OpenAPI support for the REST module.", + "homepage": "https://www.drupal.org/project/openapi_rest", + "support": { + "source": "https://git.drupalcode.org/project/openapi_rest" + } + }, { "name": "drupal/paragraphs", "version": "1.11.0", @@ -4515,6 +4704,168 @@ "issues": "https://www.drupal.org/project/issues/scheduler" } }, + { + "name": "drupal/schemata", + "version": "1.0.0-beta2", + "source": { + "type": "git", + "url": "https://git.drupalcode.org/project/schemata.git", + "reference": "8.x-1.0-beta2" + }, + "dist": { + "type": "zip", + "url": "https://ftp.drupal.org/files/projects/schemata-8.x-1.0-beta2.zip", + "reference": "8.x-1.0-beta2", + "shasum": "c50bc45c370073224877a8c72e6d8d5b2ec732d3" + }, + "require": { + "drupal/core": "^8 || ^9" + }, + "require-dev": { + "drupal/coder": "^8.2", + "jakub-onderka/php-parallel-lint": "^0.9.2", + "league/json-guard": "^1.0", + "league/json-reference": "^1.0" + }, + "type": "drupal-module", + "extra": { + "drupal": { + "version": "8.x-1.0-beta2", + "datestamp": "1585777919", + "security-coverage": { + "status": "not-covered", + "message": "Beta releases are not covered by Drupal security advisories." + } + } + }, + "notification-url": "https://packages.drupal.org/8/downloads", + "scripts": { + "phpcs": [ + "phpcs --standard=tests/phpcs.xml" + ], + "phpcbf": [ + "phpcbf --standard=tests/phpcs.xml" + ], + "lint": [ + "parallel-lint -e php,module,install,profile,theme,inc --exclude vendor/ --blame ." + ], + "quality": [ + "@lint", + "@phpcs" + ] + }, + "license": [ + "GPL-2.0+" + ], + "authors": [ + { + "name": "Adam Ross", + "homepage": "https://www.drupal.org/user/346868", + "email": "grayside@gmail.com" + }, + { + "name": "HalfChem", + "homepage": "https://www.drupal.org/user/1608382" + }, + { + "name": "e0ipso", + "homepage": "https://www.drupal.org/user/550110" + }, + { + "name": "febbraro", + "homepage": "https://www.drupal.org/user/43670" + }, + { + "name": "jhedstrom", + "homepage": "https://www.drupal.org/user/208732" + }, + { + "name": "mpotter", + "homepage": "https://www.drupal.org/user/616192" + }, + { + "name": "richgerdes", + "homepage": "https://www.drupal.org/user/3437973" + }, + { + "name": "tekante", + "homepage": "https://www.drupal.org/user/640024" + } + ], + "description": "Facilitate generation of schema definitions of Drupal 8 data models.", + "homepage": "https://drupal.org/project/schemata", + "keywords": [ + "Drupal", + "json", + "schema" + ], + "support": { + "source": "https://cgit.drupalcode.org/schemata", + "issues": "https://drupal.org/project/issues/schemata" + } + }, + { + "name": "drupal/schemata_json_schema", + "version": "1.0.0-beta2", + "require": { + "drupal/core": "^8 || ^9", + "drupal/schemata": "*" + }, + "type": "metapackage", + "extra": { + "drupal": { + "version": "8.x-1.0-beta2", + "datestamp": "1585777919", + "security-coverage": { + "status": "not-covered", + "message": "Beta releases are not covered by Drupal security advisories." + } + } + }, + "notification-url": "https://packages.drupal.org/8/downloads", + "license": [ + "GPL-2.0-or-later" + ], + "authors": [ + { + "name": "Grayside", + "homepage": "https://www.drupal.org/user/346868" + }, + { + "name": "HalfChem", + "homepage": "https://www.drupal.org/user/1608382" + }, + { + "name": "e0ipso", + "homepage": "https://www.drupal.org/user/550110" + }, + { + "name": "febbraro", + "homepage": "https://www.drupal.org/user/43670" + }, + { + "name": "jhedstrom", + "homepage": "https://www.drupal.org/user/208732" + }, + { + "name": "mpotter", + "homepage": "https://www.drupal.org/user/616192" + }, + { + "name": "richgerdes", + "homepage": "https://www.drupal.org/user/3437973" + }, + { + "name": "tekante", + "homepage": "https://www.drupal.org/user/640024" + } + ], + "description": "Provides a data models for entity types and bundles in JSON schema format.", + "homepage": "https://www.drupal.org/project/schemata", + "support": { + "source": "https://git.drupalcode.org/project/schemata" + } + }, { "name": "drupal/search_api", "version": "1.15.0", @@ -12876,6 +13227,7 @@ "uh-studentservices/uh_courses_embed": 20, "drupal/maxlength": 20, "drupal/jsonapi_image_styles": 10, + "drupal/openapi_rest": 5, "drupal/upgrade_rector": 15 }, "prefer-stable": true, diff --git a/config/sync/block.block.contactblock.yml b/config/sync/block.block.contactblock.yml index c2f17516..7a467aa7 100644 --- a/config/sync/block.block.contactblock.yml +++ b/config/sync/block.block.contactblock.yml @@ -12,7 +12,7 @@ dependencies: id: contactblock theme: uhsg_theme region: after_content -weight: -9 +weight: -8 provider: null plugin: contact_block settings: diff --git a/config/sync/block.block.linktoinstructionsforstudents.yml b/config/sync/block.block.linktoinstructionsforstudents.yml new file mode 100644 index 00000000..8c97a369 --- /dev/null +++ b/config/sync/block.block.linktoinstructionsforstudents.yml @@ -0,0 +1,20 @@ +uuid: 39f21eb7-6b65-4759-8a08-280fe7e72b36 +langcode: en +status: true +dependencies: + module: + - uhsg_domain + theme: + - uhsg_theme +id: linktoinstructionsforstudents +theme: uhsg_theme +region: after_content +weight: -9 +provider: null +plugin: link_to_instructions_for_students +settings: + id: link_to_instructions_for_students + label: 'See also' + provider: uhsg_domain + label_display: visible +visibility: { } diff --git a/config/sync/block.block.newsperdegreeprogramme.yml b/config/sync/block.block.newsperdegreeprogramme.yml index 83ccb172..c2ce90e7 100644 --- a/config/sync/block.block.newsperdegreeprogramme.yml +++ b/config/sync/block.block.newsperdegreeprogramme.yml @@ -10,7 +10,7 @@ dependencies: id: newsperdegreeprogramme theme: uhsg_theme region: after_content -weight: -8 +weight: -7 provider: null plugin: news_per_degree_programme settings: diff --git a/config/sync/block.block.newsperdoctoralprogramme.yml b/config/sync/block.block.newsperdoctoralprogramme.yml index 4c5f4e87..dd16cc21 100644 --- a/config/sync/block.block.newsperdoctoralprogramme.yml +++ b/config/sync/block.block.newsperdoctoralprogramme.yml @@ -9,7 +9,7 @@ dependencies: id: newsperdoctoralprogramme theme: uhsg_theme region: after_content -weight: -7 +weight: -6 provider: null plugin: news_per_doctoral_programme settings: diff --git a/config/sync/core.entity_view_display.node.article.teaser.yml b/config/sync/core.entity_view_display.node.article.teaser.yml index a2027dc5..4946afd8 100644 --- a/config/sync/core.entity_view_display.node.article.teaser.yml +++ b/config/sync/core.entity_view_display.node.article.teaser.yml @@ -31,9 +31,13 @@ content: hidden: field_article_degree_programme: true field_article_domain: true + field_article_faculty: true field_article_paragraph: true field_article_related: true field_domain_source: true + field_keywords: true + field_other_education_provider: true field_user_group: true langcode: true links: true + search_api_excerpt: true diff --git a/config/sync/core.entity_view_display.node.theme.default.yml b/config/sync/core.entity_view_display.node.theme.default.yml index 615502b7..c9b995ce 100644 --- a/config/sync/core.entity_view_display.node.theme.default.yml +++ b/config/sync/core.entity_view_display.node.theme.default.yml @@ -32,7 +32,7 @@ content: region: content field_theme_articles: weight: 2 - label: hidden + label: above settings: view_mode: teaser link: false diff --git a/config/sync/core.extension.yml b/config/sync/core.extension.yml index fce7632a..8d7cba9a 100644 --- a/config/sync/core.extension.yml +++ b/config/sync/core.extension.yml @@ -51,6 +51,9 @@ module: migrate_tools: 0 node: 0 noreqnewpass: 0 + openapi: 0 + openapi_jsonapi: 0 + openapi_rest: 0 options: 0 paragraphs: 0 path: 0 @@ -69,6 +72,8 @@ module: restui: 0 samlauth: 0 scheduler: 0 + schemata: 0 + schemata_json_schema: 0 search_api: 0 search_api_autocomplete: 0 search_api_solr: 0 @@ -111,7 +116,7 @@ module: uhsg_sitemap: 0 uhsg_some_links: 0 uhsg_themes: 0 - uhsg_translations: 0 + uhsg_translations: 0 uhsg_user_sync: 0 user: 0 video_embed_field: 0 diff --git a/config/sync/language/fi/block.block.linktoinstructionsforstudents.yml b/config/sync/language/fi/block.block.linktoinstructionsforstudents.yml new file mode 100644 index 00000000..71a5ff26 --- /dev/null +++ b/config/sync/language/fi/block.block.linktoinstructionsforstudents.yml @@ -0,0 +1,2 @@ +settings: + label: 'Katso myös' diff --git a/config/sync/language/sv/block.block.linktoinstructionsforstudents.yml b/config/sync/language/sv/block.block.linktoinstructionsforstudents.yml new file mode 100644 index 00000000..6acf54ae --- /dev/null +++ b/config/sync/language/sv/block.block.linktoinstructionsforstudents.yml @@ -0,0 +1,2 @@ +settings: + label: 'Se även' diff --git a/modules/uhsg_active_degree_programme/uhsg_active_degree_programme.info.yml b/modules/uhsg_active_degree_programme/uhsg_active_degree_programme.info.yml index c087ab54..b2a3efe9 100644 --- a/modules/uhsg_active_degree_programme/uhsg_active_degree_programme.info.yml +++ b/modules/uhsg_active_degree_programme/uhsg_active_degree_programme.info.yml @@ -2,7 +2,7 @@ name: Active degree programme type: module description: Keeps track of the active degree programme. core: 8.x -version: 1.60 +version: 1.61 core_version_requirement: ^8 || ^9 package: Student Guide dependencies: diff --git a/modules/uhsg_article/uhsg_article.info.yml b/modules/uhsg_article/uhsg_article.info.yml index 516bb24e..e55afa26 100644 --- a/modules/uhsg_article/uhsg_article.info.yml +++ b/modules/uhsg_article/uhsg_article.info.yml @@ -2,6 +2,6 @@ name: Article type: module description: Provides article paragraphs. core: 8.x -version: 1.60 +version: 1.61 core_version_requirement: ^8 || ^9 package: Student Guide diff --git a/modules/uhsg_avatar/uhsg_avatar.info.yml b/modules/uhsg_avatar/uhsg_avatar.info.yml index 521c07a4..d85b75ae 100644 --- a/modules/uhsg_avatar/uhsg_avatar.info.yml +++ b/modules/uhsg_avatar/uhsg_avatar.info.yml @@ -2,6 +2,6 @@ name: Avatar type: module description: Fetches avatar. core: 8.x -version: 1.60 +version: 1.61 core_version_requirement: ^8 || ^9 package: Student Guide diff --git a/modules/uhsg_breadcrumb/uhsg_breadcrumb.info.yml b/modules/uhsg_breadcrumb/uhsg_breadcrumb.info.yml index 74b47933..f23d6339 100644 --- a/modules/uhsg_breadcrumb/uhsg_breadcrumb.info.yml +++ b/modules/uhsg_breadcrumb/uhsg_breadcrumb.info.yml @@ -2,7 +2,7 @@ name: UHSG Breadcrumb type: module description: Builds a breadcrumb. core: 8.x -version: 1.60 +version: 1.61 core_version_requirement: ^8 || ^9 package: Student Guide dependencies: diff --git a/modules/uhsg_chat/uhsg_chat.info.yml b/modules/uhsg_chat/uhsg_chat.info.yml index 5453af84..3074c781 100644 --- a/modules/uhsg_chat/uhsg_chat.info.yml +++ b/modules/uhsg_chat/uhsg_chat.info.yml @@ -2,6 +2,6 @@ name: Chat type: module description: Embed chat widgets Smartsupp and Giosg. core: 8.x -version: 1.60 +version: 1.61 core_version_requirement: ^8 || ^9 package: Student Guide diff --git a/modules/uhsg_cookie_consent/uhsg_cookie_consent.info.yml b/modules/uhsg_cookie_consent/uhsg_cookie_consent.info.yml index 7fee3a74..0ede035f 100644 --- a/modules/uhsg_cookie_consent/uhsg_cookie_consent.info.yml +++ b/modules/uhsg_cookie_consent/uhsg_cookie_consent.info.yml @@ -2,7 +2,7 @@ name: HY Cookie Consent type: module description: This module aims at making the website compliant with the new EU cookie regulation. core: 8.x -version: 1.60 +version: 1.61 core_version_requirement: ^8 || ^9 package: Student Guide dependencies: diff --git a/modules/uhsg_degree_programme/uhsg_degree_programme.info.yml b/modules/uhsg_degree_programme/uhsg_degree_programme.info.yml index 24d6cffd..dce51049 100644 --- a/modules/uhsg_degree_programme/uhsg_degree_programme.info.yml +++ b/modules/uhsg_degree_programme/uhsg_degree_programme.info.yml @@ -2,7 +2,7 @@ name: Degree programme type: module description: Provides some improvements and utility features for degree programmes. core: 8.x -version: 1.60 +version: 1.61 core_version_requirement: ^8 || ^9 package: Student Guide dependencies: diff --git a/modules/uhsg_degree_programme_filtering/uhsg_degree_programme_filtering.info.yml b/modules/uhsg_degree_programme_filtering/uhsg_degree_programme_filtering.info.yml index 240326c1..dc2f4891 100644 --- a/modules/uhsg_degree_programme_filtering/uhsg_degree_programme_filtering.info.yml +++ b/modules/uhsg_degree_programme_filtering/uhsg_degree_programme_filtering.info.yml @@ -2,7 +2,7 @@ name: Degree Programme Filtering type: module description: Filters certain content by degree programmes. core: 8.x -version: 1.60 +version: 1.61 core_version_requirement: ^8 || ^9 package: Student Guide dependencies: diff --git a/modules/uhsg_domain/uhsg_domain.info.yml b/modules/uhsg_domain/uhsg_domain.info.yml index 6fd5ccc7..3d788e92 100644 --- a/modules/uhsg_domain/uhsg_domain.info.yml +++ b/modules/uhsg_domain/uhsg_domain.info.yml @@ -2,7 +2,7 @@ name: UHSG Domain type: module description: Provides support for creating guide content for student and teaching domains. core: 8.x -version: 1.60 +version: 1.61 core_version_requirement: ^8 || ^9 package: Student Guide dependencies: diff --git a/modules/uhsg_edit/uhsg_edit.info.yml b/modules/uhsg_edit/uhsg_edit.info.yml index fd8fe03b..8f2d50cb 100644 --- a/modules/uhsg_edit/uhsg_edit.info.yml +++ b/modules/uhsg_edit/uhsg_edit.info.yml @@ -2,7 +2,7 @@ name: Edit addons type: module description: Adds customizations to node edit view. core: 8.x -version: 1.60 +version: 1.61 core_version_requirement: ^8 || ^9 package: Student Guide dependencies: diff --git a/modules/uhsg_eduviewer/uhsg_eduviewer.info.yml b/modules/uhsg_eduviewer/uhsg_eduviewer.info.yml index 73d8e5fe..5443469e 100644 --- a/modules/uhsg_eduviewer/uhsg_eduviewer.info.yml +++ b/modules/uhsg_eduviewer/uhsg_eduviewer.info.yml @@ -2,7 +2,7 @@ name: Eduviewer type: module description: Embed Eduviewer as a paragraph. core: 8.x -version: 1.60 +version: 1.61 core_version_requirement: ^8 || ^9 package: Student Guide dependencies: diff --git a/modules/uhsg_feedback/uhsg_feedback.info.yml b/modules/uhsg_feedback/uhsg_feedback.info.yml index fc02a8f1..2b88c030 100644 --- a/modules/uhsg_feedback/uhsg_feedback.info.yml +++ b/modules/uhsg_feedback/uhsg_feedback.info.yml @@ -2,7 +2,7 @@ name: Feedback type: module description: Alters the feedback email content. core: 8.x -version: 1.60 +version: 1.61 core_version_requirement: ^8 || ^9 package: Student Guide dependencies: diff --git a/modules/uhsg_migrate/uhsg_migrate.info.yml b/modules/uhsg_migrate/uhsg_migrate.info.yml index c23d609d..96bc1a00 100644 --- a/modules/uhsg_migrate/uhsg_migrate.info.yml +++ b/modules/uhsg_migrate/uhsg_migrate.info.yml @@ -2,7 +2,7 @@ name: Student Guide Migrate type: module descipriton: Specifies migrations that is done for student guide. core: 8.x -version: 1.60 +version: 1.61 core_version_requirement: ^8 || ^9 package: Migration dependencies: diff --git a/modules/uhsg_news/uhsg_news.info.yml b/modules/uhsg_news/uhsg_news.info.yml index d3eaf48c..337d3de8 100644 --- a/modules/uhsg_news/uhsg_news.info.yml +++ b/modules/uhsg_news/uhsg_news.info.yml @@ -2,7 +2,7 @@ name: News type: module description: Provides advanced properties for news like filtered listings and emailing. core: 8.x -version: 1.60 +version: 1.61 core_version_requirement: ^8 || ^9 package: Student Guide dependencies: diff --git a/modules/uhsg_obar/uhsg_obar.info.yml b/modules/uhsg_obar/uhsg_obar.info.yml index 0bb947a5..8f6f5b83 100644 --- a/modules/uhsg_obar/uhsg_obar.info.yml +++ b/modules/uhsg_obar/uhsg_obar.info.yml @@ -2,7 +2,7 @@ name: Obar type: module description: Mounts Obar header and footer. core: 8.x -version: 1.60 +version: 1.61 core_version_requirement: ^8 || ^9 package: Student Guide dependencies: diff --git a/modules/uhsg_office_hours/uhsg_office_hours.info.yml b/modules/uhsg_office_hours/uhsg_office_hours.info.yml index 3331f376..5b634c6c 100644 --- a/modules/uhsg_office_hours/uhsg_office_hours.info.yml +++ b/modules/uhsg_office_hours/uhsg_office_hours.info.yml @@ -2,7 +2,7 @@ name: Office hours type: module description: Provides office hours relates services. core: 8.x -version: 1.60 +version: 1.61 core_version_requirement: ^8 || ^9 package: Student Guide dependencies: diff --git a/modules/uhsg_oprek/uhsg_oprek.info.yml b/modules/uhsg_oprek/uhsg_oprek.info.yml index 9e1ce4fd..0be76391 100644 --- a/modules/uhsg_oprek/uhsg_oprek.info.yml +++ b/modules/uhsg_oprek/uhsg_oprek.info.yml @@ -2,6 +2,6 @@ name: Oprek Service description: Utility module for getting information from "oprek". type: module core: 8.x -version: 1.60 +version: 1.61 core_version_requirement: ^8 || ^9 package: Student Guide diff --git a/modules/uhsg_other_education_provider/uhsg_other_education_provider.info.yml b/modules/uhsg_other_education_provider/uhsg_other_education_provider.info.yml index 23f4c68e..d606cce7 100644 --- a/modules/uhsg_other_education_provider/uhsg_other_education_provider.info.yml +++ b/modules/uhsg_other_education_provider/uhsg_other_education_provider.info.yml @@ -2,7 +2,7 @@ name: Other education provider type: module description: Keeps track of the other education provider. core: 8.x -version: 1.60 +version: 1.61 core_version_requirement: ^8 || ^9 package: Student Guide dependencies: diff --git a/modules/uhsg_other_education_provider_filtering/uhsg_other_education_provider_filtering.info.yml b/modules/uhsg_other_education_provider_filtering/uhsg_other_education_provider_filtering.info.yml index 9c88f975..e87c8c1d 100644 --- a/modules/uhsg_other_education_provider_filtering/uhsg_other_education_provider_filtering.info.yml +++ b/modules/uhsg_other_education_provider_filtering/uhsg_other_education_provider_filtering.info.yml @@ -2,7 +2,7 @@ name: Other education provider filtering type: module description: Filters certain content by other education provider. core: 8.x -version: 1.60 +version: 1.61 core_version_requirement: ^8 || ^9 package: Student Guide dependencies: diff --git a/modules/uhsg_redirect_to_login/uhsg_redirect_to_login.info.yml b/modules/uhsg_redirect_to_login/uhsg_redirect_to_login.info.yml index aa3237ae..d78f6a83 100644 --- a/modules/uhsg_redirect_to_login/uhsg_redirect_to_login.info.yml +++ b/modules/uhsg_redirect_to_login/uhsg_redirect_to_login.info.yml @@ -2,7 +2,7 @@ name: Redirect to login type: module description: Redirects to login when visitors has cookie indicating that it should be logged in. core: 8.x -version: 1.60 +version: 1.61 core_version_requirement: ^8 || ^9 package: Student Guide dependencies: diff --git a/modules/uhsg_rest/uhsg_rest.info.yml b/modules/uhsg_rest/uhsg_rest.info.yml index c70c24e5..962430d2 100644 --- a/modules/uhsg_rest/uhsg_rest.info.yml +++ b/modules/uhsg_rest/uhsg_rest.info.yml @@ -2,6 +2,6 @@ name: REST type: module description: Exposes Guide entities as RESTful web API. core: 8.x -version: 1.60 +version: 1.61 core_version_requirement: ^8 || ^9 package: Student Guide diff --git a/modules/uhsg_role_auto_assign/uhsg_role_auto_assign.info.yml b/modules/uhsg_role_auto_assign/uhsg_role_auto_assign.info.yml index d81cb449..f7acb455 100644 --- a/modules/uhsg_role_auto_assign/uhsg_role_auto_assign.info.yml +++ b/modules/uhsg_role_auto_assign/uhsg_role_auto_assign.info.yml @@ -2,7 +2,7 @@ name: Automatic Role Assign type: module description: This will automatically assign roles for users during the login based on SAML2 attributes. core: 8.x -version: 1.60 +version: 1.61 core_version_requirement: ^8 || ^9 packages: Student Guide dependencies: diff --git a/modules/uhsg_samlauth/uhsg_samlauth.info.yml b/modules/uhsg_samlauth/uhsg_samlauth.info.yml index 19bc6408..0ba04544 100644 --- a/modules/uhsg_samlauth/uhsg_samlauth.info.yml +++ b/modules/uhsg_samlauth/uhsg_samlauth.info.yml @@ -2,7 +2,7 @@ name: SAML2 Authentication for Guide type: module description: Adds additional logic on top of the original SAML2 Authentication module. core: 8.x -version: 1.60 +version: 1.61 core_version_requirement: ^8 || ^9 package: Student Guide dependencies: diff --git a/modules/uhsg_search/uhsg_search.info.yml b/modules/uhsg_search/uhsg_search.info.yml index bff7becd..7c576bd4 100644 --- a/modules/uhsg_search/uhsg_search.info.yml +++ b/modules/uhsg_search/uhsg_search.info.yml @@ -2,6 +2,6 @@ name: Search type: module description: Provides search functionality and customisations. core: 8.x -version: 1.60 +version: 1.61 core_version_requirement: ^8 || ^9 package: Student Guide diff --git a/modules/uhsg_service_provider_details/uhsg_service_provider_details.info.yml b/modules/uhsg_service_provider_details/uhsg_service_provider_details.info.yml index 5503c12d..7adc6ee1 100644 --- a/modules/uhsg_service_provider_details/uhsg_service_provider_details.info.yml +++ b/modules/uhsg_service_provider_details/uhsg_service_provider_details.info.yml @@ -3,6 +3,6 @@ type: module description: 'Provides information about service provider, that can be used for presenting common contact details.' package: Student Guide core: 8.x -version: 1.60 +version: 1.61 core_version_requirement: ^8 || ^9 configure: system.site diff --git a/modules/uhsg_sitemap/uhsg_sitemap.info.yml b/modules/uhsg_sitemap/uhsg_sitemap.info.yml index 9c265712..3d337fee 100644 --- a/modules/uhsg_sitemap/uhsg_sitemap.info.yml +++ b/modules/uhsg_sitemap/uhsg_sitemap.info.yml @@ -3,7 +3,7 @@ type: module description: Extends sitemap generation core: 8.x core_version_requirement: ^8 || ^9 -version: 1.60 +version: 1.61 core_version_requirement: ^8 || ^9 package: Student Guide dependencies: diff --git a/modules/uhsg_some_links/uhsg_some_links.info.yml b/modules/uhsg_some_links/uhsg_some_links.info.yml index ef25e178..d2865122 100644 --- a/modules/uhsg_some_links/uhsg_some_links.info.yml +++ b/modules/uhsg_some_links/uhsg_some_links.info.yml @@ -2,6 +2,6 @@ name: Some links type: module description: Provides Some links as entities, displayed as icons. core: 8.x -version: 1.60 +version: 1.61 core_version_requirement: ^8 || ^9 package: Student Guide diff --git a/modules/uhsg_themes/src/Plugin/Block/ThemesReferencingInstructions.php b/modules/uhsg_themes/src/Plugin/Block/ThemesReferencingInstructions.php index 9e9e9921..3d17c2d5 100644 --- a/modules/uhsg_themes/src/Plugin/Block/ThemesReferencingInstructions.php +++ b/modules/uhsg_themes/src/Plugin/Block/ThemesReferencingInstructions.php @@ -168,7 +168,7 @@ private function buildRenderableArray($themes) { '#theme' => 'item_list', '#type' => 'ul', '#items' => $links, - '#title' => t('Themes'), + '#title' => t('The instruction belongs to the following themes'), ]; } diff --git a/modules/uhsg_themes/uhsg_themes.info.yml b/modules/uhsg_themes/uhsg_themes.info.yml index 534ef5d2..c2bb41ba 100644 --- a/modules/uhsg_themes/uhsg_themes.info.yml +++ b/modules/uhsg_themes/uhsg_themes.info.yml @@ -2,6 +2,6 @@ name: Theme type: module description: Provides functionality for theme content type. core: 8.x -version: 1.60 +version: 1.61 core_version_requirement: ^8 || ^9 package: Student Guide diff --git a/modules/uhsg_translations/uhsg_translations.install b/modules/uhsg_translations/uhsg_translations.install index fa945589..05ffa1c2 100644 --- a/modules/uhsg_translations/uhsg_translations.install +++ b/modules/uhsg_translations/uhsg_translations.install @@ -9,40 +9,23 @@ * Implements hook_install(). */ function uhsg_translations_install() { - _uhsg_translations_8000(); -// _uhsg_translations_8001(); <-- add new translations like this! + _uhsg_translations_8001(); } /** * Adding interface translations. */ -function uhsg_translations_update_8000() { - _uhsg_translations_8000(); -} - - -/** - * Helper function 8000. - */ -function _uhsg_translations_8000() { - $translation_helper = \Drupal::service('uhsg_translations.translation_helper'); - - // Finnish and swedish translations (this can be considered an example) - $translation_helper->addTranslation('News', 'fi', 'Uutinen'); - $translation_helper->addTranslation('News', 'sv', 'Nyhet'); +function uhsg_translations_update_8001() { + _uhsg_translations_8001(); } /** * Helper function 8001. - * Add new translations with 2 new functions: - * - uhsg_translations_8xxx() - * - _uhsg_translations_8xxx() */ - /* function _uhsg_translations_8001() { $translation_helper = \Drupal::service('uhsg_translations.translation_helper'); - // Ajax throbber. - $translation_helper->addTranslation('Please wait...', 'fi', 'Odota...'); + // Theme link heading. + $translation_helper->addTranslation('The instruction belongs to the following themes', 'fi', 'Ohje kuuluu seuraaviin teemoihin'); + $translation_helper->addTranslation('The instruction belongs to the following themes', 'sv', 'Instruktionen hör till följande teman'); } -*/ diff --git a/modules/uhsg_user_sync/uhsg_user_sync.info.yml b/modules/uhsg_user_sync/uhsg_user_sync.info.yml index 2665cc08..190ba911 100644 --- a/modules/uhsg_user_sync/uhsg_user_sync.info.yml +++ b/modules/uhsg_user_sync/uhsg_user_sync.info.yml @@ -2,7 +2,7 @@ name: User Sync description: Synchronises user fields from SAML2 attributes type: module core: 8.x -version: 1.60 +version: 1.61 core_version_requirement: ^8 || ^9 package: Student Guide dependencies: diff --git a/student_guide.info.yml b/student_guide.info.yml index 64779332..4893f610 100644 --- a/student_guide.info.yml +++ b/student_guide.info.yml @@ -1,7 +1,7 @@ name: Student Guide type: profile description: 'Build a student guide site.' -version: 1.60 +version: 1.61 core: 8.x core_version_requirement: ^8 || ^9 dependencies: diff --git a/themes/uhsg_theme/css/style.css b/themes/uhsg_theme/css/style.css index 72504d22..d166845a 100644 --- a/themes/uhsg_theme/css/style.css +++ b/themes/uhsg_theme/css/style.css @@ -8529,6 +8529,124 @@ input[type="text"].search-form-large__input { } /* STUDENT GUIDE THEMING */ +/** + * New grid width calculations are derived from these premises: + * - FULL = 12*GRID + 11*GUTTER + * - SIDE_COL = 4*GRID + 3*GUTTER + * - MAIN_COL = (8*GRID + 7*GUTTER) - 16px + * - SIDE_COL_NARROW_SIDE = 3*GRID + 2*GUTTER + * - MAIN_COL_NARROW_SIDE = (9*GRID + 8*GUTTER) - 16px + */ +/* + section: 3.7 + title: Buttons + description: +*/ +/* + section: 3.7.1 + title: Button + template: 3_7_1-button + description: +*/ +input[type="submit"], .button--small, .accordion__title, +.button--accordion, +.button--action-before, +.button--action, .button--anchor, .button--expand, .button--icon, .button--outline, .accordion--dark .accordion__title, .cc_btn, +.button { + background-color: #0479A4; +} + +input.theme-transparent[type="submit"], .theme-transparent.button--small, .theme-transparent.accordion__title, +.theme-transparent.button--accordion, +.theme-transparent.button--action-before, +.theme-transparent.button--action, .theme-transparent.button--anchor, .theme-transparent.button--expand, .theme-transparent.button--icon, .theme-transparent.button--outline, .theme-transparent.cc_btn, input.theme-transparent-alt[type="submit"], .theme-transparent-alt.button--small, .theme-transparent-alt.accordion__title, +.theme-transparent-alt.button--accordion, +.theme-transparent-alt.button--action-before, +.theme-transparent-alt.button--action, .theme-transparent-alt.button--anchor, .theme-transparent-alt.button--expand, .theme-transparent-alt.button--icon, .theme-transparent-alt.button--outline, .theme-transparent-alt.cc_btn, +.button.theme-transparent, +.button.theme-transparent-alt { + color: #0479A4; +} + +input.theme-transparent:hover[type="submit"], .theme-transparent.button--small:hover, .theme-transparent.accordion__title:hover, +.theme-transparent.button--accordion:hover, +.theme-transparent.button--action-before:hover, +.theme-transparent.button--action:hover, .theme-transparent.button--anchor:hover, .theme-transparent.button--expand:hover, .theme-transparent.button--icon:hover, .theme-transparent.button--outline:hover, .theme-transparent.cc_btn:hover, input.theme-transparent-alt:hover[type="submit"], .theme-transparent-alt.button--small:hover, .theme-transparent-alt.accordion__title:hover, +.theme-transparent-alt.button--accordion:hover, +.theme-transparent-alt.button--action-before:hover, +.theme-transparent-alt.button--action:hover, .theme-transparent-alt.button--anchor:hover, .theme-transparent-alt.button--expand:hover, .theme-transparent-alt.button--icon:hover, .theme-transparent-alt.button--outline:hover, .theme-transparent-alt.cc_btn:hover, +.button.theme-transparent:hover, +.button.theme-transparent-alt:hover { + background-color: #0479A4; +} + +/* + section: 3.7.3 + title: Button action + template: 3_7_3-button--action + description: +*/ + +.button--action-before:after, +.button--action:after { + background-color: #0479A4; +} + + +.button--action-before:focus:after, +.button--action-before:hover:after, +.button--action:focus:after, +.button--action:hover:after { + background: #005379; +} + + +.button--action-before:active:after, +.button--action:active:after { + background: #003146; +} + + +.theme-transparent.button--action-before:after, +.theme-transparent-alt.button--action-before:after, +.button--action.theme-transparent:after, +.button--action.theme-transparent-alt:after { + color: #0479A4; +} + + +.theme-transparent.button--action-before:hover, +.theme-transparent.button--action-before:hover:after, +.theme-transparent-alt.button--action-before:hover, +.theme-transparent-alt.button--action-before:hover:after, +.button--action.theme-transparent:hover, +.button--action.theme-transparent:hover:after, +.button--action.theme-transparent-alt:hover, +.button--action.theme-transparent-alt:hover:after { + background-color: transparent; +} + +/* + section: 3.7.8 + title: Button group (small buttons) + template: 3_7_8-button-group--small + description: +*/ +/* + section: 3.7.9 + title: Button outline + template: 3_7_9-button-outline + description: +*/ +.button--outline { + border-color: #0479A4; + color: #0479A4; +} + +.button--outline:hover { + background-color: #0479A4; +} + .container { margin: 0 auto; max-width: 80em; @@ -8676,23 +8794,42 @@ input[type="text"].search-form-large__input { display: flex; } .col-right { - -ms-flex-preferred-size: 33.33333%; - flex-basis: 33.33333%; - margin-left: 4em; + -ms-flex-preferred-size: calc((100% / 3) - 64px / 3); + flex-basis: calc((100% / 3) - 64px / 3); + -ms-flex-negative: 0; + flex-shrink: 0; + margin-left: 48px; + } + .col-container--narrow-side .col-right { + -ms-flex-preferred-size: calc(100%/4 - 96px / 4); + flex-basis: calc(100%/4 - 96px / 4); } .col-left { - -ms-flex-preferred-size: 33.33333%; - flex-basis: 33.33333%; - margin-right: 4em; + -ms-flex-preferred-size: calc((100% / 3) - 64px / 3); + flex-basis: calc((100% / 3) - 64px / 3); + -ms-flex-negative: 0; + flex-shrink: 0; + margin-right: 48px; + } + .col-container--narrow-side .col-left { + -ms-flex-preferred-size: calc(100%/4 - 96px / 4); + flex-basis: calc(100%/4 - 96px / 4); } .col-main { - -ms-flex-preferred-size: 66.66667%; - flex-basis: 66.66667%; - -webkit-box-flex: 2; - -ms-flex-positive: 2; - flex-grow: 2; + -ms-flex-preferred-size: calc((100% * 2 / 3) - 32px / 3 - 16px); + flex-basis: calc((100% * 2 / 3) - 32px / 3 - 16px); + -webkit-box-flex: 1; + -ms-flex-positive: 1; + flex-grow: 1; min-width: 0; } + .col-container--narrow-side .col-main { + -ms-flex-preferred-size: calc(75% - 32px / 4 - 16px); + flex-basis: calc(75% - 32px / 4 - 16px); + } + .col--max-narrow-width { + max-width: 17.5em; + } } .l-footer__subregion { @@ -8708,6 +8845,12 @@ input[type="text"].search-form-large__input { } } +.l-subregion-wrapper--sectioned { + background-color: #F8F8F8; + padding-top: 0; + padding-bottom: 1em; +} + .l-subregion { max-width: 80em; padding-left: 1em; @@ -8807,6 +8950,17 @@ li.avatar.avatar--default img { padding: 12px; } +.page-node-type-theme .block-link-to-instructions-for-students, +.page-node-type-article .block-link-to-instructions-for-students { + margin-top: 2em; +} + +@media (min-width: 48em) { + .page-node-type-article .block-link-to-instructions-for-students .col-main { + margin-left: calc(100%/4 - 96px / 4 + 48px); + } +} + .box-story--no-label.theme-plain { padding: 2.8em 1.5em 1.5em 1.5em; } @@ -8825,6 +8979,48 @@ li.avatar.avatar--default img { outline-offset: 3px; } +.box-story--banner { + background: #FFF; + padding: 1em 3em 1em 1em; +} + +@media (min-width: 48em) { + .box-story--banner { + padding: 1em 5em 1em 3em; + } +} + +.box-story--banner:not(:last-child) { + margin-bottom: 1em; +} + +.box-story--banner .box-story__title > a { + color: #0479A4; +} + +.box-story--banner .box-story__title > a:after { + display: inline-block; + font-family: "hy-icons"; + font-style: normal; + font-weight: normal; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; + vertical-align: bottom; + content: ""; + position: absolute; + right: 1em; + top: 50%; + -webkit-transform: translateY(-50%); + -ms-transform: translateY(-50%); + transform: translateY(-50%); +} + +@media (min-width: 48em) { + .box-story--banner .box-story__title > a:after { + right: 1.5em; + } +} + .box-story__title, .box-story__content { overflow: visible; @@ -8845,6 +9041,17 @@ li.avatar.avatar--default img { content: ""; } +.article-related .box-story--banner .box-story__title > a:after { + display: inline-block; + font-family: "hy-icons"; + font-style: normal; + font-weight: normal; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; + vertical-align: bottom; + content: ""; +} + .box-story__link-wrapper:focus { outline: currentColor thin dashed; outline-offset: 3px; @@ -8854,6 +9061,12 @@ li.avatar.avatar--default img { padding-top: 1.5em; } +@media (min-width: 48em) { + .page-node-type-article #block-breadcrumbs { + margin-left: calc(100%/4 - 96px / 4 + 48px); + } +} + .breadcrumbs { font-size: 0.875rem; } @@ -8870,7 +9083,7 @@ li.avatar.avatar--default img { .breadcrumbs__item a { text-transform: none; - color: #0479a5; + color: #0479A4; font-weight: 500; letter-spacing: 0; } @@ -8884,7 +9097,7 @@ li.avatar.avatar--default img { background-position: center; background-repeat: no-repeat; background-size: contain; - background-image: url('data:image/svg+xml,%3Csvg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 1000" fill="%230479A5" stroke="%230479A5" stroke-width="1"%3E%3Cpath d="M345.3,998.7c-30.3,0-55.4-25.2-55.4-55.6c0-30.4,25.1-55.6,55.4-55.6h479.9l0-509.9L500,114.2L174.8,377.6%0Av565.5c0,30.4-25.1,55.6-55.4,55.6c-30.3,0-55.4-25.2-55.4-55.6l0-567.6c0-31.5,14.6-61.9,38.7-81.9L434.1,25%0Ac37.7-30.4,93-30.4,130.7,0l332.5,268.6c25.1,19.9,38.7,49.3,38.7,81.9v568.7c0,29.4-25.1,54.6-55.4,54.6L345.3,998.7z" /%3E%3C/svg%3E'); + background-image: url('data:image/svg+xml,%3Csvg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 1000" fill="%230479A4" stroke="%230479A4" stroke-width="1"%3E%3Cpath d="M345.3,998.7c-30.3,0-55.4-25.2-55.4-55.6c0-30.4,25.1-55.6,55.4-55.6h479.9l0-509.9L500,114.2L174.8,377.6%0Av565.5c0,30.4-25.1,55.6-55.4,55.6c-30.3,0-55.4-25.2-55.4-55.6l0-567.6c0-31.5,14.6-61.9,38.7-81.9L434.1,25%0Ac37.7-30.4,93-30.4,130.7,0l332.5,268.6c25.1,19.9,38.7,49.3,38.7,81.9v568.7c0,29.4-25.1,54.6-55.4,54.6L345.3,998.7z" /%3E%3C/svg%3E'); } .breadcrumbs--home-icon-first .breadcrumbs__item:first-child a span { @@ -9516,6 +9729,28 @@ input[type="submit"].button--reset + i { background: #000; } +/* + section: 9.1.1 + title: Index + template: 9_1_1-index + description: Index of content +*/ +@media (min-width: 48em) { + .index { + -webkit-columns: 1; + -moz-columns: 1; + columns: 1; + } +} + +@media (min-width: 60em) { + .index { + -webkit-columns: 2; + -moz-columns: 2; + columns: 2; + } +} + @media (min-width: 48em) { .links { margin-right: -6px; @@ -10315,29 +10550,29 @@ ul.pager > li a:focus { } .horizontal-tabs .horizontal-tab-button { - border-top-color: #0479a5; + border-top-color: #0479A4; } .horizontal-tabs .horizontal-tab-button > a { - background: #0479a5; + background: #0479A4; } .horizontal-tabs .horizontal-tab-button.selected { - border-top-color: #0479a5; + border-top-color: #0479A4; } .horizontal-tabs .horizontal-tab-button.selected a { - -webkit-box-shadow: inset 0 3px 0 #0479a5; - box-shadow: inset 0 3px 0 #0479a5; - color: #0479a5; + -webkit-box-shadow: inset 0 3px 0 #0479A4; + box-shadow: inset 0 3px 0 #0479A4; + color: #0479A4; } .horizontal-tabs .horizontal-tab-button.selected:hover { - color: #0479a5; + color: #0479A4; } .horizontal-tabs .horizontal-tab-button.selected:hover > a { - color: #0479a5; + color: #0479A4; } .horizontal-tabs .horizontal-tab-button > .tabs-trigger { @@ -10352,13 +10587,13 @@ ul.pager > li a:focus { } .horizontal-tabs .horizontal-tab-button > .tabs-trigger.is-selected { - border-top-color: #0479a5; + border-top-color: #0479A4; border-bottom-color: transparent; z-index: 2; background-color: #FFF; - -webkit-box-shadow: inset 0 3px 0 #0479a5; - box-shadow: inset 0 3px 0 #0479a5; - color: #0479a5; + -webkit-box-shadow: inset 0 3px 0 #0479A4; + box-shadow: inset 0 3px 0 #0479A4; + color: #0479A4; } .horizontal-tabs .tabs-panel.is-hidden { @@ -10420,18 +10655,31 @@ ul.pager > li a:focus { } .tag-list__item { + color: #555555; display: inline; padding-right: 0; margin-right: 1em; vertical-align: initial; } +.tag-list__item a { + color: #555555; +} + .tag-list__item:after { display: inline-block; position: static; margin-left: 1em; } +.box-story__meta-item .tag-list__item { + color: inherit; +} + +.box-story__meta-item .tag-list__item a { + color: inherit; +} + /* Styleguide override: section: 6.11.1 @@ -10603,6 +10851,14 @@ ul.pager > li a:focus { opacity: 0.25; } +.theme__content-section { + margin: 2em 0 3em 0; +} + +.theme__content-section.clearfix :last-child { + margin-bottom: 0; +} + .tooltip { cursor: help; } diff --git a/themes/uhsg_theme/sass/components/_block-link-to-instructions-for-students.scss b/themes/uhsg_theme/sass/components/_block-link-to-instructions-for-students.scss new file mode 100644 index 00000000..cf42807e --- /dev/null +++ b/themes/uhsg_theme/sass/components/_block-link-to-instructions-for-students.scss @@ -0,0 +1,14 @@ +.block-link-to-instructions-for-students { + .page-node-type-theme &, + .page-node-type-article & { + margin-top: 2em; + } + + .col-main { + .page-node-type-article & { + @include breakpoint($small) { + margin-left: $align-to-main-narrow-margin; + } + } + } +} diff --git a/themes/uhsg_theme/sass/components/_box_story.scss b/themes/uhsg_theme/sass/components/_box_story.scss index 6a952150..b3421d7b 100644 --- a/themes/uhsg_theme/sass/components/_box_story.scss +++ b/themes/uhsg_theme/sass/components/_box_story.scss @@ -17,6 +17,39 @@ } } +.box-story--banner { + background: $white; + padding: 1em 3em 1em 1em; + + @include breakpoint($small) { + padding: 1em 5em 1em 3em; + } + + &:not(:last-child) { + margin-bottom: 1em; + } +} + +.box-story__title { + .box-story--banner & { + > a { + color: $blue-a11y; + + &:after { + @include icon($icon-arrow-right); + position: absolute; + right: 1em; + top: 50%; + transform: translateY(-50%); + + @include breakpoint($small) { + right: 1.5em; + } + } + } + } +} + // Set title and content overflow to visible to avoid clipping focus styles. .box-story__title, .box-story__content{ @@ -35,6 +68,12 @@ @include icon($icon-external-link); } } + + .box-story--banner { + .box-story__title > a:after { + @include icon($icon-external-link); + } + } } .box-story__link-wrapper { diff --git a/themes/uhsg_theme/sass/components/_breadcrumbs.scss b/themes/uhsg_theme/sass/components/_breadcrumbs.scss index 2798df29..f6f2670c 100644 --- a/themes/uhsg_theme/sass/components/_breadcrumbs.scss +++ b/themes/uhsg_theme/sass/components/_breadcrumbs.scss @@ -1,5 +1,11 @@ #block-breadcrumbs { padding-top: 1.5em; + + .page-node-type-article & { + @include breakpoint($small) { + margin-left: $align-to-main-narrow-margin; + } + } } .breadcrumbs { diff --git a/themes/uhsg_theme/sass/components/_index.scss b/themes/uhsg_theme/sass/components/_index.scss new file mode 100644 index 00000000..63850dc3 --- /dev/null +++ b/themes/uhsg_theme/sass/components/_index.scss @@ -0,0 +1,15 @@ +/* + section: 9.1.1 + title: Index + template: 9_1_1-index + description: Index of content +*/ +.index { + @include breakpoint($small) { + columns: 1; + } + + @include breakpoint($medium) { + columns: 2; + } +} diff --git a/themes/uhsg_theme/sass/components/_tag-list.scss b/themes/uhsg_theme/sass/components/_tag-list.scss index 02d7e057..b9665332 100644 --- a/themes/uhsg_theme/sass/components/_tag-list.scss +++ b/themes/uhsg_theme/sass/components/_tag-list.scss @@ -4,13 +4,27 @@ } .tag-list__item { + color: $lightgray; display: inline; padding-right: 0; margin-right: 1em; vertical-align: initial; + + a { + color: $lightgray; + } + &:after { display: inline-block; position: static; margin-left: 1em; } + + .box-story__meta-item & { + color: inherit; + + a { + color: inherit; + } + } } diff --git a/themes/uhsg_theme/sass/components/_theme.scss b/themes/uhsg_theme/sass/components/_theme.scss index a800ae82..becf324e 100644 --- a/themes/uhsg_theme/sass/components/_theme.scss +++ b/themes/uhsg_theme/sass/components/_theme.scss @@ -107,4 +107,12 @@ } } -//268x268 +.theme__content-section { + margin: 2em 0 3em 0; + + &.clearfix { + :last-child { + margin-bottom: 0; + } + } +} diff --git a/themes/uhsg_theme/sass/layout/_layout.scss b/themes/uhsg_theme/sass/layout/_layout.scss index 1675a3f6..751443ba 100644 --- a/themes/uhsg_theme/sass/layout/_layout.scss +++ b/themes/uhsg_theme/sass/layout/_layout.scss @@ -91,17 +91,34 @@ display: flex; } .col-right { - flex-basis: (100% / 3); - margin-left: 4em; - } + flex-basis: $side-column-width; + flex-shrink: 0; + margin-left: $column-gutter; + .col-container--narrow-side & { + flex-basis: $side-column-narrow-width; + } + } .col-left { - flex-basis: (100% / 3); - margin-right: 4em; + flex-basis: $side-column-width; + flex-shrink: 0; + margin-right: $column-gutter; + + .col-container--narrow-side & { + flex-basis: $side-column-narrow-width; + } } .col-main { - flex-basis: (100% / 3) * 2; - flex-grow: 2; + flex-basis: $main-column-width; + flex-grow: 1; min-width: 0; + + .col-container--narrow-side & { + flex-basis: $main-column-narrow-width; + } + } + + .col--max-narrow-width { + max-width: 17.5em; } } diff --git a/themes/uhsg_theme/sass/layout/common/_l-subregion.scss b/themes/uhsg_theme/sass/layout/common/_l-subregion.scss index 1253fd76..2f530d00 100644 --- a/themes/uhsg_theme/sass/layout/common/_l-subregion.scss +++ b/themes/uhsg_theme/sass/layout/common/_l-subregion.scss @@ -1,3 +1,9 @@ +.l-subregion-wrapper--sectioned { + background-color: $lightsilver; + padding-top: 0; + padding-bottom: 1em; +} + .l-subregion { max-width: $bp-large + (2 * $page-gutter); padding-left: $page-gutter-mobile; diff --git a/themes/uhsg_theme/sass/objects/_button.scss b/themes/uhsg_theme/sass/objects/_button.scss new file mode 100644 index 00000000..d5630678 --- /dev/null +++ b/themes/uhsg_theme/sass/objects/_button.scss @@ -0,0 +1,82 @@ +/* + section: 3.7 + title: Buttons + description: +*/ + +/* + section: 3.7.1 + title: Button + template: 3_7_1-button + description: +*/ +%button, +.button { + background-color: $blue-a11y; + + &.theme-transparent, + &.theme-transparent-alt { + color: $blue-a11y; + + &:hover { + background-color: $blue-a11y; + } + } +} + +/* + section: 3.7.3 + title: Button action + template: 3_7_3-button--action + description: +*/ +%button--action, +.button--action { + // Icon + background + &:after { + background-color: $blue-a11y; + } + + &:focus:after, + &:hover:after { + background: $darkblue; + } + + &:active:after { + background: $darkblue--active; + } + + &.theme-transparent, + &.theme-transparent-alt { + &:after { + color: $blue-a11y; + } + + &:hover, + &:hover:after { + background-color: transparent; + } + } +} + +/* + section: 3.7.8 + title: Button group (small buttons) + template: 3_7_8-button-group--small + description: +*/ + +/* + section: 3.7.9 + title: Button outline + template: 3_7_9-button-outline + description: +*/ +.button--outline { + border-color: $blue-a11y; + color: $blue-a11y; + + &:hover { + background-color: $blue-a11y; + } +} diff --git a/themes/uhsg_theme/sass/style.scss b/themes/uhsg_theme/sass/style.scss index 65cdfd9f..823e7450 100644 --- a/themes/uhsg_theme/sass/style.scss +++ b/themes/uhsg_theme/sass/style.scss @@ -41,6 +41,7 @@ @import "variables/**/*"; @import "functions/**/*"; @import "mixins/**/*"; +@import "objects/**/*"; @import "layout/**/*"; @import "components/**/*"; @import "common-elements/**/*"; diff --git a/themes/uhsg_theme/sass/variables/_variables.scss b/themes/uhsg_theme/sass/variables/_variables.scss index 71a811d4..ab94f6dc 100644 --- a/themes/uhsg_theme/sass/variables/_variables.scss +++ b/themes/uhsg_theme/sass/variables/_variables.scss @@ -1,14 +1,34 @@ +// Layout. $grid-gutter: 1em; - $page-gutter: 2em; $page-gutter-mobile: 1em; +/** + * New grid width calculations are derived from these premises: + * - FULL = 12*GRID + 11*GUTTER + * - SIDE_COL = 4*GRID + 3*GUTTER + * - MAIN_COL = (8*GRID + 7*GUTTER) - 16px + * - SIDE_COL_NARROW_SIDE = 3*GRID + 2*GUTTER + * - MAIN_COL_NARROW_SIDE = (9*GRID + 8*GUTTER) - 16px + */ +$new-grid-gutter: 32px; +$column-extra-gutter: 16px; +$column-gutter: $new-grid-gutter + $column-extra-gutter; +$side-column-width: calc((100% / 3) - #{2 * $new-grid-gutter} / 3); +$main-column-width: calc((100% * 2 / 3) - #{$new-grid-gutter} / 3 - #{$column-extra-gutter}); +$align-to-main-margin: calc((100% / 3) - #{2 * $new-grid-gutter} / 3 + #{$column-gutter}); +$side-column-narrow-width: calc(#{100% / 4} - #{3 * $new-grid-gutter} / 4); +$main-column-narrow-width: calc(#{100% * 3 / 4} - #{$new-grid-gutter} / 4 - #{$column-extra-gutter}); +$align-to-main-narrow-margin: calc(#{100% / 4} - #{3 * $new-grid-gutter} / 4 + #{$column-gutter}); + +// Breakpoints. $bp-xsmall: 30em; $xsmall: $bp-xsmall; +// Colors. $green: #4FB151; $purple: #7b46a3; -$blue-a11y: #0479a5; +$blue-a11y: #0479A4; $color-link: #0e688b; $color-link-hover: #005379; $avatarbg: rgba($purple, .45); diff --git a/themes/uhsg_theme/templates/block/block--link-to-instructions-for-students.html.twig b/themes/uhsg_theme/templates/block/block--link-to-instructions-for-students.html.twig new file mode 100644 index 00000000..67f3c231 --- /dev/null +++ b/themes/uhsg_theme/templates/block/block--link-to-instructions-for-students.html.twig @@ -0,0 +1,50 @@ +{# +/** + * @file + * Theme override to display a block. + * + * Available variables: + * - plugin_id: The ID of the block implementation. + * - label: The configured label of the block if visible. + * - configuration: A list of the block's configuration values. + * - label: The configured label for the block. + * - label_display: The display settings for the label. + * - provider: The module or other provider that provided this block plugin. + * - Block plugin specific settings will also be stored here. + * - content: The content of this block. + * - attributes: array of HTML attributes populated by modules, intended to + * be added to the main container tag of this template. + * - id: A valid HTML ID and guaranteed unique. + * - title_attributes: Same as attributes, except applied to the main title + * tag that appears in the template. + * - title_prefix: Additional output populated by modules, intended to be + * displayed in front of the main title tag that appears in the template. + * - title_suffix: Additional output populated by modules, intended to be + * displayed after the main title tag that appears in the template. + * + * @see template_preprocess_block() + */ +#} +{% + set classes = [ + 'block', + 'block-' ~ configuration.provider|clean_class, + 'block-' ~ plugin_id|clean_class, + 'container', + 'tube' + ] +%} + +
+
+ {{ title_prefix }} + {% if label %} + {{ label }} + {% endif %} + {{ title_suffix }} + {% block content %} + {{ content }} + {% endblock %} +
+
+ diff --git a/themes/uhsg_theme/templates/fields/field--field-article-paragraph.html.twig b/themes/uhsg_theme/templates/fields/field--field-article-paragraph.html.twig index 3fc0f6d7..891dd2b3 100644 --- a/themes/uhsg_theme/templates/fields/field--field-article-paragraph.html.twig +++ b/themes/uhsg_theme/templates/fields/field--field-article-paragraph.html.twig @@ -3,15 +3,18 @@ {% block header %} {% if table_of_contents %} {{ attach_library('uhsg_theme/anchor') }} -

{{ 'On this page'|t }}

-
- {% for item in table_of_contents %} - - {% endfor %} +
+
+
+

{{ 'On this page'|t }}

+ {% for item in table_of_contents %} + + {% endfor %} +
{% endif %} {% endblock %} diff --git a/themes/uhsg_theme/templates/fields/field--field-theme-articles.html.twig b/themes/uhsg_theme/templates/fields/field--field-theme-articles.html.twig new file mode 100644 index 00000000..cd96102e --- /dev/null +++ b/themes/uhsg_theme/templates/fields/field--field-theme-articles.html.twig @@ -0,0 +1,61 @@ +{# +/** + * @file + * Theme override for a field. + * + * To override output, copy the "field.html.twig" from the templates directory + * to your theme's directory and customize it, just like customizing other + * Drupal templates such as page.html.twig or node.html.twig. + * + * Instead of overriding the theming for all fields, you can also just override + * theming for a subset of fields using + * @link themeable Theme hook suggestions. @endlink For example, + * here are some theme hook suggestions that can be used for a field_foo field + * on an article node type: + * - field--node--field-foo--article.html.twig + * - field--node--field-foo.html.twig + * - field--node--article.html.twig + * - field--field-foo.html.twig + * - field--text-with-summary.html.twig + * - field.html.twig + * + * Available variables: + * - attributes: HTML attributes for the containing element. + * - label_hidden: Whether to show the field label or not. + * - title_attributes: HTML attributes for the title. + * - label: The label for the field. + * - multiple: TRUE if a field can contain multiple items. + * - items: List of all the field items. Each item contains: + * - attributes: List of HTML attributes for each item. + * - content: The field item's content. + * - entity_type: The entity type to which the field belongs. + * - field_name: The name of the field. + * - field_type: The type of the field. + * - label_display: The display settings for the label. + * + * @see template_preprocess_field() + */ +#} +{% + set classes = [ + element['#bundle']|clean_class ~ '__' ~ label|clean_class + ] +%} + +{% block header %} +{% endblock %} + +{% block content %} + + {% if not label_hidden and items is not empty %} + {{ label }} + {% if description %} +

{{ description }}

+ {% endif %} + {% endif %} + + {% for item in items %} + {{ item.content }} + {% endfor %} +
+{% endblock %} diff --git a/themes/uhsg_theme/templates/fields/field--node--field-article-related.html.twig b/themes/uhsg_theme/templates/fields/field--node--field-article-related.html.twig new file mode 100644 index 00000000..cd96102e --- /dev/null +++ b/themes/uhsg_theme/templates/fields/field--node--field-article-related.html.twig @@ -0,0 +1,61 @@ +{# +/** + * @file + * Theme override for a field. + * + * To override output, copy the "field.html.twig" from the templates directory + * to your theme's directory and customize it, just like customizing other + * Drupal templates such as page.html.twig or node.html.twig. + * + * Instead of overriding the theming for all fields, you can also just override + * theming for a subset of fields using + * @link themeable Theme hook suggestions. @endlink For example, + * here are some theme hook suggestions that can be used for a field_foo field + * on an article node type: + * - field--node--field-foo--article.html.twig + * - field--node--field-foo.html.twig + * - field--node--article.html.twig + * - field--field-foo.html.twig + * - field--text-with-summary.html.twig + * - field.html.twig + * + * Available variables: + * - attributes: HTML attributes for the containing element. + * - label_hidden: Whether to show the field label or not. + * - title_attributes: HTML attributes for the title. + * - label: The label for the field. + * - multiple: TRUE if a field can contain multiple items. + * - items: List of all the field items. Each item contains: + * - attributes: List of HTML attributes for each item. + * - content: The field item's content. + * - entity_type: The entity type to which the field belongs. + * - field_name: The name of the field. + * - field_type: The type of the field. + * - label_display: The display settings for the label. + * + * @see template_preprocess_field() + */ +#} +{% + set classes = [ + element['#bundle']|clean_class ~ '__' ~ label|clean_class + ] +%} + +{% block header %} +{% endblock %} + +{% block content %} + + {% if not label_hidden and items is not empty %} + {{ label }} + {% if description %} +

{{ description }}

+ {% endif %} + {% endif %} + + {% for item in items %} + {{ item.content }} + {% endfor %} + +{% endblock %} diff --git a/themes/uhsg_theme/templates/fields/field--node--field-theme-faq.html.twig b/themes/uhsg_theme/templates/fields/field--node--field-theme-faq.html.twig index 68d82b9b..cd96102e 100644 --- a/themes/uhsg_theme/templates/fields/field--node--field-theme-faq.html.twig +++ b/themes/uhsg_theme/templates/fields/field--node--field-theme-faq.html.twig @@ -46,13 +46,14 @@ {% endblock %} {% block content %} - {% if not label_hidden and items is not empty %} - {{ label }} - {% if description %} -

{{ description }}

- {% endif %} - {% endif %} + {% if not label_hidden and items is not empty %} + {{ label }} + {% if description %} +

{{ description }}

+ {% endif %} + {% endif %} + {% for item in items %} {{ item.content }} {% endfor %} diff --git a/themes/uhsg_theme/templates/fields/field--node--field-theme-related.html.twig b/themes/uhsg_theme/templates/fields/field--node--field-theme-related.html.twig new file mode 100644 index 00000000..cd96102e --- /dev/null +++ b/themes/uhsg_theme/templates/fields/field--node--field-theme-related.html.twig @@ -0,0 +1,61 @@ +{# +/** + * @file + * Theme override for a field. + * + * To override output, copy the "field.html.twig" from the templates directory + * to your theme's directory and customize it, just like customizing other + * Drupal templates such as page.html.twig or node.html.twig. + * + * Instead of overriding the theming for all fields, you can also just override + * theming for a subset of fields using + * @link themeable Theme hook suggestions. @endlink For example, + * here are some theme hook suggestions that can be used for a field_foo field + * on an article node type: + * - field--node--field-foo--article.html.twig + * - field--node--field-foo.html.twig + * - field--node--article.html.twig + * - field--field-foo.html.twig + * - field--text-with-summary.html.twig + * - field.html.twig + * + * Available variables: + * - attributes: HTML attributes for the containing element. + * - label_hidden: Whether to show the field label or not. + * - title_attributes: HTML attributes for the title. + * - label: The label for the field. + * - multiple: TRUE if a field can contain multiple items. + * - items: List of all the field items. Each item contains: + * - attributes: List of HTML attributes for each item. + * - content: The field item's content. + * - entity_type: The entity type to which the field belongs. + * - field_name: The name of the field. + * - field_type: The type of the field. + * - label_display: The display settings for the label. + * + * @see template_preprocess_field() + */ +#} +{% + set classes = [ + element['#bundle']|clean_class ~ '__' ~ label|clean_class + ] +%} + +{% block header %} +{% endblock %} + +{% block content %} + + {% if not label_hidden and items is not empty %} + {{ label }} + {% if description %} +

{{ description }}

+ {% endif %} + {% endif %} + + {% for item in items %} + {{ item.content }} + {% endfor %} + +{% endblock %} diff --git a/themes/uhsg_theme/templates/node/node--article--full.html.twig b/themes/uhsg_theme/templates/node/node--article--full.html.twig index f2583762..da974584 100644 --- a/themes/uhsg_theme/templates/node/node--article--full.html.twig +++ b/themes/uhsg_theme/templates/node/node--article--full.html.twig @@ -81,8 +81,7 @@ set container_classes = [ 'container', 'tube', - 'article__content', - 'col-container' + 'article__content' ] %} @@ -98,23 +97,36 @@
-
-

{{ label }}

- {{ degree_programme_switcher }} - {{ other_education_provider_switcher }} - {{ content|without('field_article_paragraph', 'field_article_related') }} +
+
+
+

{{ label }}

+
- {% if (link_to_instructions_for_students or themes) %} -
- {{ link_to_instructions_for_students }} +
+
{{ themes }}
- {% endif %} +
+ {{ degree_programme_switcher }} + {{ other_education_provider_switcher }} + {{ content|without('field_article_paragraph', 'field_article_related') }} +
+
+ {{ content.field_article_paragraph }} - {% if content.field_article_related %} - - {{ content.field_article_related }} + + {% if content.field_article_related['#items'] %} +
+
+
+
+
+ {{ content.field_article_related }} +
+
+
{% endif %}
diff --git a/themes/uhsg_theme/templates/node/node--article--teaser.html.twig b/themes/uhsg_theme/templates/node/node--article--teaser.html.twig new file mode 100644 index 00000000..9df3dfd7 --- /dev/null +++ b/themes/uhsg_theme/templates/node/node--article--teaser.html.twig @@ -0,0 +1,89 @@ +{# +/** + * @file + * Theme override to display a node. + * + * Available variables: + * - node: The node entity with limited access to object properties and methods. + * Only method names starting with "get", "has", or "is" and a few common + * methods such as "id", "label", and "bundle" are available. For example: + * - node.getCreatedTime() will return the node creation timestamp. + * - node.hasField('field_example') returns TRUE if the node bundle includes + * field_example. (This does not indicate the presence of a value in this + * field.) + * - node.isPublished() will return whether the node is published or not. + * Calling other methods, such as node.delete(), will result in an exception. + * See \Drupal\node\Entity\Node for a full list of public properties and + * methods for the node object. + * - label: The title of the node. + * - content: All node items. Use {{ content }} to print them all, + * or print a subset such as {{ content.field_example }}. Use + * {{ content|without('field_example') }} to temporarily suppress the printing + * of a given child element. + * - author_picture: The node author user entity, rendered using the "compact" + * view mode. + * - metadata: Metadata for this node. + * - date: Themed creation date field. + * - author_name: Themed author name field. + * - url: Direct URL of the current node. + * - display_submitted: Whether submission information should be displayed. + * - attributes: HTML attributes for the containing element. + * The attributes.class element may contain one or more of the following + * classes: + * - node: The current template type (also known as a "theming hook"). + * - node--type-[type]: The current node type. For example, if the node is an + * "Article" it would result in "node--type-article". Note that the machine + * name will often be in a short form of the human readable label. + * - node--view-mode-[view_mode]: The View Mode of the node; for example, a + * teaser would result in: "node--view-mode-teaser", and + * full: "node--view-mode-full". + * The following are controlled through the node publishing options. + * - node--promoted: Appears on nodes promoted to the front page. + * - node--sticky: Appears on nodes ordered above other non-sticky nodes in + * teaser listings. + * - node--unpublished: Appears on unpublished nodes visible only to site + * admins. + * - title_attributes: Same as attributes, except applied to the main title + * tag that appears in the template. + * - content_attributes: Same as attributes, except applied to the main + * content tag that appears in the template. + * - author_attributes: Same as attributes, except applied to the author of + * the node tag that appears in the template. + * - title_prefix: Additional output populated by modules, intended to be + * displayed in front of the main title tag that appears in the template. + * - title_suffix: Additional output populated by modules, intended to be + * displayed after the main title tag that appears in the template. + * - view_mode: View mode; for example, "teaser" or "full". + * - teaser: Flag for the teaser state. Will be true if view_mode is 'teaser'. + * - page: Flag for the full page state. Will be true if view_mode is 'full'. + * - readmore: Flag for more state. Will be true if the teaser content of the + * node cannot hold the main body content. + * - logged_in: Flag for authenticated user status. Will be true when the + * current user is a logged-in member. + * - is_admin: Flag for admin user status. Will be true when the current user + * is an administrator. + * + * @see template_preprocess_node() + * + * @todo Remove the id attribute (or make it a class), because if that gets + * rendered twice on a page this is invalid CSS for example: two lists + * in different view modes. + */ +#} +{% + set node_classes = [ + node.bundle|clean_class, + view_mode ? node.bundle|clean_class ~ '--' ~ view_mode|clean_class, + 'box-story', + 'box-story--banner' + ] +%} + +{% set body %} + {{ content.body }} +{% endset %} + + diff --git a/themes/uhsg_theme/templates/node/node--theme--full.html.twig b/themes/uhsg_theme/templates/node/node--theme--full.html.twig index 712e2885..3418f64e 100644 --- a/themes/uhsg_theme/templates/node/node--theme--full.html.twig +++ b/themes/uhsg_theme/templates/node/node--theme--full.html.twig @@ -84,16 +84,6 @@ ] %} -{% set related_content = create_attribute() %} - -{% - set related_content_classes = [ - 'container', - 'tube', - 'article-related' - ] -%} -
@@ -101,29 +91,13 @@

{{ label }}

{{ degree_programme_switcher }} {{ other_education_provider_switcher }} - {{ content|without('field_theme_articles', 'field_theme_faq', 'field_theme_section', 'field_theme_related') }}
- {% if link_to_instructions_for_students %} -
- {{ link_to_instructions_for_students }} -
- {% endif %} - {{ content.field_theme_articles }} - {{ content.field_theme_section }} - - {% if content.field_theme_faq %} -
-
- {{ content.field_theme_faq }} -
-
- {% endif %} - - {% if content.field_theme_related %} - - {{ content.field_theme_related }} + +
+
+ {{ content }}
- {% endif %} +
diff --git a/themes/uhsg_theme/templates/node/node--theme--teaser.html.twig b/themes/uhsg_theme/templates/node/node--theme--teaser.html.twig new file mode 100644 index 00000000..9df3dfd7 --- /dev/null +++ b/themes/uhsg_theme/templates/node/node--theme--teaser.html.twig @@ -0,0 +1,89 @@ +{# +/** + * @file + * Theme override to display a node. + * + * Available variables: + * - node: The node entity with limited access to object properties and methods. + * Only method names starting with "get", "has", or "is" and a few common + * methods such as "id", "label", and "bundle" are available. For example: + * - node.getCreatedTime() will return the node creation timestamp. + * - node.hasField('field_example') returns TRUE if the node bundle includes + * field_example. (This does not indicate the presence of a value in this + * field.) + * - node.isPublished() will return whether the node is published or not. + * Calling other methods, such as node.delete(), will result in an exception. + * See \Drupal\node\Entity\Node for a full list of public properties and + * methods for the node object. + * - label: The title of the node. + * - content: All node items. Use {{ content }} to print them all, + * or print a subset such as {{ content.field_example }}. Use + * {{ content|without('field_example') }} to temporarily suppress the printing + * of a given child element. + * - author_picture: The node author user entity, rendered using the "compact" + * view mode. + * - metadata: Metadata for this node. + * - date: Themed creation date field. + * - author_name: Themed author name field. + * - url: Direct URL of the current node. + * - display_submitted: Whether submission information should be displayed. + * - attributes: HTML attributes for the containing element. + * The attributes.class element may contain one or more of the following + * classes: + * - node: The current template type (also known as a "theming hook"). + * - node--type-[type]: The current node type. For example, if the node is an + * "Article" it would result in "node--type-article". Note that the machine + * name will often be in a short form of the human readable label. + * - node--view-mode-[view_mode]: The View Mode of the node; for example, a + * teaser would result in: "node--view-mode-teaser", and + * full: "node--view-mode-full". + * The following are controlled through the node publishing options. + * - node--promoted: Appears on nodes promoted to the front page. + * - node--sticky: Appears on nodes ordered above other non-sticky nodes in + * teaser listings. + * - node--unpublished: Appears on unpublished nodes visible only to site + * admins. + * - title_attributes: Same as attributes, except applied to the main title + * tag that appears in the template. + * - content_attributes: Same as attributes, except applied to the main + * content tag that appears in the template. + * - author_attributes: Same as attributes, except applied to the author of + * the node tag that appears in the template. + * - title_prefix: Additional output populated by modules, intended to be + * displayed in front of the main title tag that appears in the template. + * - title_suffix: Additional output populated by modules, intended to be + * displayed after the main title tag that appears in the template. + * - view_mode: View mode; for example, "teaser" or "full". + * - teaser: Flag for the teaser state. Will be true if view_mode is 'teaser'. + * - page: Flag for the full page state. Will be true if view_mode is 'full'. + * - readmore: Flag for more state. Will be true if the teaser content of the + * node cannot hold the main body content. + * - logged_in: Flag for authenticated user status. Will be true when the + * current user is a logged-in member. + * - is_admin: Flag for admin user status. Will be true when the current user + * is an administrator. + * + * @see template_preprocess_node() + * + * @todo Remove the id attribute (or make it a class), because if that gets + * rendered twice on a page this is invalid CSS for example: two lists + * in different view modes. + */ +#} +{% + set node_classes = [ + node.bundle|clean_class, + view_mode ? node.bundle|clean_class ~ '--' ~ view_mode|clean_class, + 'box-story', + 'box-story--banner' + ] +%} + +{% set body %} + {{ content.body }} +{% endset %} + + diff --git a/themes/uhsg_theme/templates/paragraphs/paragraph--eduviewer.html.twig b/themes/uhsg_theme/templates/paragraphs/paragraph--eduviewer.html.twig index 36e20b6b..dd9b6548 100644 --- a/themes/uhsg_theme/templates/paragraphs/paragraph--eduviewer.html.twig +++ b/themes/uhsg_theme/templates/paragraphs/paragraph--eduviewer.html.twig @@ -39,11 +39,10 @@ {% if eduviewer is not empty %}
-
-
-

{{ content.field_paragraph_title }}

-
+
+
+

{{ content.field_paragraph_title }}

{{ eduviewer }}
diff --git a/themes/uhsg_theme/templates/paragraphs/paragraph--office-hours.html.twig b/themes/uhsg_theme/templates/paragraphs/paragraph--office-hours.html.twig index b28b013d..5fed5c8c 100644 --- a/themes/uhsg_theme/templates/paragraphs/paragraph--office-hours.html.twig +++ b/themes/uhsg_theme/templates/paragraphs/paragraph--office-hours.html.twig @@ -47,7 +47,7 @@
{% for item in office_hours['degree_programme'] %}
-
+

{{ item.name }}

@@ -71,13 +71,12 @@
{% for item in office_hours['general'] %}
-
-
- {% if item[0]['language'] is not empty %} -

{{ attribute(item[0]['language'].name, language) }}

- {% endif %} -
+
+
+ {% if item[0]['language'] is not empty %} +

{{ attribute(item[0]['language'].name, language) }}

+ {% endif %} {% for child_item in item %}

{{ child_item.name }}

{{ child_item.hours|nl2br }}

diff --git a/themes/uhsg_theme/templates/paragraphs/paragraph--paragraph.html.twig b/themes/uhsg_theme/templates/paragraphs/paragraph--paragraph.html.twig index cba39d72..c6a12334 100644 --- a/themes/uhsg_theme/templates/paragraphs/paragraph--paragraph.html.twig +++ b/themes/uhsg_theme/templates/paragraphs/paragraph--paragraph.html.twig @@ -37,18 +37,25 @@ */ #}
-
-
-

{{ content.field_paragraph_title }}

- {{ content.field_paragraph_degree_programme }} - {{ content.field_paragraph_faculty }} - {{ content.field_paragraph_other_education }} - {{ content.field_paragraph_image }} - {{ content.field_paragraph_video }} - {{ content.field_paragraph_links }} +
+
+
+
+

{{ content.field_paragraph_title }}

+
-
- {{ content.field_paragraph_body }} +
+
+ {{ content.field_paragraph_degree_programme }} + {{ content.field_paragraph_faculty }} + {{ content.field_paragraph_other_education }} + {{ content.field_paragraph_image }} + {{ content.field_paragraph_video }} + {{ content.field_paragraph_links }} +
+
+ {{ content.field_paragraph_body }} +
diff --git a/themes/uhsg_theme/templates/paragraphs/paragraph--theme-section.html.twig b/themes/uhsg_theme/templates/paragraphs/paragraph--theme-section.html.twig index 9b5a905b..2f9015e2 100644 --- a/themes/uhsg_theme/templates/paragraphs/paragraph--theme-section.html.twig +++ b/themes/uhsg_theme/templates/paragraphs/paragraph--theme-section.html.twig @@ -36,9 +36,7 @@ * @ingroup themeable */ #} -
-
-

{{ content.field_theme_section_title }}

- {{ content|without('field_theme_section_title') }} -
+
+

{{ content.field_theme_section_title }}

+ {{ content|without('field_theme_section_title') }}
diff --git a/themes/uhsg_theme/uhsg_theme.info.yml b/themes/uhsg_theme/uhsg_theme.info.yml index a6709f89..a1b4bfc3 100644 --- a/themes/uhsg_theme/uhsg_theme.info.yml +++ b/themes/uhsg_theme/uhsg_theme.info.yml @@ -4,7 +4,7 @@ description: University of Helsinki Student Guide theme package: Other core: 8.x core_version_requirement: ^8 || ^9 -version: 1.60 +version: 1.61 libraries: - uhsg_theme/global-styling - uhsg_theme/siteimprove diff --git a/themes/uhsg_theme/uhsg_theme.theme b/themes/uhsg_theme/uhsg_theme.theme index c1b8fa87..9868bcee 100644 --- a/themes/uhsg_theme/uhsg_theme.theme +++ b/themes/uhsg_theme/uhsg_theme.theme @@ -180,23 +180,28 @@ function uhsg_theme_preprocess_field(array &$variables, $hook) { } break; - case 'field_theme_articles': - $variables['attributes']['class'][] = 'grid-container tube--large'; - break; - case 'field_article_related': - $variables['attributes']['class'][] = 'grid-container tube--large'; + $variables['attributes']['class'][] = 'tube--large article-related'; $variables['description'] = t('You will find related content for students on the Instructions for Students Service.'); break; + case 'field_theme_articles': + case 'field_theme_faq': + $variables['attributes']['class'][] = 'theme__content-section'; + break; + case 'field_theme_related': - $variables['attributes']['class'][] = 'grid-container tube--large'; + $variables['attributes']['class'][] = 'theme__content-section article-related'; $variables['description'] = t('You will find related content for students on the Instructions for Students Service.'); break; case 'body': case 'field_paragraph_body': $variables['attributes']['class'][] = 'textarea'; + + if ($variables['element']['#bundle'] === 'theme') { + $variables['attributes']['class'][] = 'theme__content-section'; + } break; case 'field_accordion_title': @@ -205,21 +210,17 @@ function uhsg_theme_preprocess_field(array &$variables, $hook) { case 'field_content_block_text': $variables['attributes']['class'][] = 'box-subtitle__ingress is-center-mobile'; - $variables['attributes']['class'][] = 'is-center-mobile'; break; case 'field_news_degree_programme': $variables['created'] = $variables['element']['#object']->getCreatedTime(); $variables['view_mode'] = $variables['element']['#view_mode']; + case 'field_theme_section_title': $variables['attributes']['class'][] = 'is-center-mobile'; break; - case 'field_theme_section_instructions': - $variables['attributes']['class'][] = 'grid-container tube'; - break; - case 'field_article_paragraph': uhsg_theme_collect_table_of_contents($variables); break; @@ -283,7 +284,6 @@ function uhsg_theme_preprocess_views_view(&$variables) { } _uhsg_theme_add_front_page_text_blocks($variables, $is_student_domain); - _uhsg_theme_add_link_to_instructions_for_students($variables); break; case 'news_by_active_degree_programme': @@ -451,9 +451,6 @@ function uhsg_theme_preprocess_node(&$variables) { $themes_block = \Drupal::service('plugin.manager.block')->createInstance('themes_referencing_instructions', []); $variables['themes'] = $themes_block->build(); } - if (in_array($bundle, ['article', 'theme']) && $variables['page']) { - _uhsg_theme_add_link_to_instructions_for_students($variables); - } if ($variables['page']) { $variables['degree_programme_switcher'] = _uhsg_theme_get_degree_programme_switcher(); @@ -463,13 +460,6 @@ function uhsg_theme_preprocess_node(&$variables) { } } -function _uhsg_theme_add_link_to_instructions_for_students(&$variables) { - $link_to_instructions_for_students_block = \Drupal::service('plugin.manager.block')->createInstance('link_to_instructions_for_students', []); - if ($link_to_instructions_for_students_block->access(\Drupal::currentUser()) instanceof AccessResultAllowed) { - $variables['link_to_instructions_for_students'] = $link_to_instructions_for_students_block->build(); - } -} - /** * Implements template_preprocess_html(). * Add touch icons to head.