From 13672d6b5214218e7ff766be18f40ae44e5bb29b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=ABl=20Pittet?= Date: Wed, 30 Aug 2023 18:17:58 -0700 Subject: [PATCH 1/4] Update documentation for starterkit, IE support dropping, and npm instead of yarn --- README.md | 48 +++++++++++++++++++++++++++++------------------- 1 file changed, 29 insertions(+), 19 deletions(-) diff --git a/README.md b/README.md index 99e3bb1..65dda7d 100755 --- a/README.md +++ b/README.md @@ -1,49 +1,59 @@ UBC CLF 7.0.4 DRUPAL THEME (aka Galactus) ======================================= -A responsive UBC CLF (Common Look and Feel) theme for Drupal 8. Created by the +A responsive UBC CLF (Common Look and Feel) theme for Drupal 8+. Created by the UBC IT Web Services Department. -Galactus is a *base theme* for Drupal 8, providing UBC-branded units with the -basic structure of the UBC CLF ([Common Look and Feel](http://clf.ubc.ca)). If -you need to modify the theme to suit your needs, we recommend using the -[Drupal 8 CLF theme](https://github.com/ubc-web-services/clf) as a child theme -to extend this one instead. +Galactus is a *theme* for Drupal 8+, providing UBC-branded units with the +basic structure of the UBC CLF ([Common Look and Feel](http://clf.ubc.ca)). -# Composer Builds +If you need to modify the theme to suit your needs, we recommend forking it as a [Starterkit](https://www.drupal.org/docs/core-modules-and-themes/core-themes/starterkit-theme) extend this one instead. + + +# Composer Install If you're using composer, add the project with: -``` +```bash composer require ubc-web-services/galactus ``` -# IE8 Support -Drupal 8 does not support Internet Explorer versions earlier than version 9 due -to jQuery version incompatibilities. If IE8 support is required, Drupal 7 should -be used instead, along with the CLF base theme -([Megatron](https://github.com/ubc-web-services/megatron)). +# Starterkit Fork +A starterkit fork will duplicate all the files from Galactus to your new theme to modify to your needs. +See the [Starterkit Documentation](https://www.drupal.org/docs/develop/theming-drupal/defining-a-theme-with-an-infoyml-file) for more details. + +Considering it's a galactus fork we recommend prefixing the fork with `galactus_` although you can name it any name that doesn't conflict with another project installed on your Drupal site. +```bash +php core/scripts/drupal generate-theme --starterkit galactus --path themes/custom galactus_PROJECT +``` + +# Internet Explorer Support +Drupal 8+ does not support Internet Explorer versions earlier than version 9 due +to jQuery version incompatibilities. +See this [Change Record](https://www.drupal.org/node/1569578) for more details. + +Drupal 10+ has removed Internet Explorer support all together. See this [Change Record](https://www.drupal.org/node/3199540) for more details. # Contribution -CSS changes need to be made with SASS through node-sass. +CSS changes need to be made with SASS through `sass` node package. -Ensure that you have `yarn` installed. +Ensure that you have `npm` installed. ``` -https://yarnpkg.com/lang/en/docs/install/ +https://nodejs.org/en/download ``` Install the node packages with this command: ``` -yarn install +npm install ``` You can build your CSS changes with this command: ``` -yarn run build-css +npm run build:css ``` OR You can watch changes to your SASS files with this command: ``` -yarn run watch-css +npm run watch:css ``` From aa34283912117c0f1c083a05e4ef7940eb0fd142 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=ABl=20Pittet?= Date: Wed, 30 Aug 2023 23:14:32 -0700 Subject: [PATCH 2/4] ensure there is a custom direcotry in readme --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 65dda7d..4c725f4 100755 --- a/README.md +++ b/README.md @@ -22,6 +22,7 @@ See the [Starterkit Documentation](https://www.drupal.org/docs/develop/theming-d Considering it's a galactus fork we recommend prefixing the fork with `galactus_` although you can name it any name that doesn't conflict with another project installed on your Drupal site. ```bash +mkdir -p themes/custom php core/scripts/drupal generate-theme --starterkit galactus --path themes/custom galactus_PROJECT ``` From 3a56e60674bedf6590a6d625fe198fbd8d0195d7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=ABl=20Pittet?= Date: Wed, 30 Aug 2023 23:15:02 -0700 Subject: [PATCH 3/4] Rewrite a few more other places for starterkit --- src/StarterKit.php | 69 +++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 68 insertions(+), 1 deletion(-) diff --git a/src/StarterKit.php b/src/StarterKit.php index 9f367d2..33139ab 100644 --- a/src/StarterKit.php +++ b/src/StarterKit.php @@ -1,6 +1,6 @@ Date: Thu, 31 Aug 2023 10:39:17 -0700 Subject: [PATCH 4/4] Fixes issue #59: Main menu links are expanded even when their children are not accessible by current user. --- templates/navigation/menu--main.html.twig | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/templates/navigation/menu--main.html.twig b/templates/navigation/menu--main.html.twig index e780d7e..a373bcc 100755 --- a/templates/navigation/menu--main.html.twig +++ b/templates/navigation/menu--main.html.twig @@ -41,7 +41,9 @@
{{ link(item.title, item.url, item.attributes.addClass('btn')) }} - + {% if item.below %} + + {% endif %} {% else %} {{ link(item.title, item.url, {'class': ['navbar-link']}) }}