Skip to content
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.

Commit

Permalink
8.5.0
Browse files Browse the repository at this point in the history
- Merge branch '8.x-4.x' into 8.x-5.x (c518e21)
- D8CORE-3473 Fix the mobile menu search attributes (#214) (f1c1abc)
- D8CORE-2944: Using flex for the alignment (#213) (ad7722c)
- Update components namespace for latest components version (#211) (89e32c9)
- D8CORE-3495: adding a margin-top for the title (#210) (8e445c8)
- Merge branch '8.x-4.x' into 8.x-5.x (b5429ac)
  • Loading branch information
pookmish authored Mar 5, 2021
2 parents ab1ef5f + a8a4b1c commit d997d41
Show file tree
Hide file tree
Showing 14 changed files with 81 additions and 30 deletions.
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
# Stanford Basic Theme

8.x-5.0
--------------------------------------------------------------------------------
_Release Date: 2021-03-05_

- Merge branch '8.x-4.x' into 8.x-5.x (c518e21)
- D8CORE-3473 Fix the mobile menu search attributes (#214) (f1c1abc)
- D8CORE-2944: Using flex for the alignment (#213) (ad7722c)
- Update components namespace for latest components version (#211) (89e32c9)
- D8CORE-3495: adding a margin-top for the title (#210) (8e445c8)
- Merge branch '8.x-4.x' into 8.x-5.x (b5429ac)

8.x-4.15
--------------------------------------------------------------------------------
_Release Date: 2021-02-08_
Expand Down
6 changes: 6 additions & 0 deletions UPGRADE.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@ INTRODUCTION
------------
This document describes how to update your theme when the theme changes.

8.x-4.x -> 8.x-5.x
----------------

For Drupal 9, the new base theme is `stable9` instead of `stable`. The site must enable `stable9` when upgrading the
theme to 8.x-5.x versions. Unfortunately there is no way to provide an update hook in a theme.

8.x-4.13 -> 8.x-4.14
----------------

Expand Down
21 changes: 11 additions & 10 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
{
"name": "su-sws/stanford_basic",
"description": "Stanford Basic Branding Theme.",
"type": "drupal-custom-theme",
"homepage": "https://github.com/SU-SWS/stanford_basic",
"authors": [],
"license": "GPL-2.0-or-later",
"minimum-stability": "dev",
"require": {
"drupal/core": "^8.8 || ^9.0"
}
"name": "su-sws/stanford_basic",
"description": "Stanford Basic Branding Theme.",
"type": "drupal-custom-theme",
"homepage": "https://github.com/SU-SWS/stanford_basic",
"authors": [],
"license": "GPL-2.0-or-later",
"minimum-stability": "dev",
"require": {
"drupal/core": "^9.0",
"drupal/components": "^2.0"
}
}
2 changes: 1 addition & 1 deletion dist/css/components.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/js/behaviors.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

22 changes: 14 additions & 8 deletions src/js/stanford_basic.behavior.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,20 @@ export default {

// Check for search box and move the second block to the mobile navigation.
// Hide it and then only show for mobile sites.
var $search = $('.su-masthead .su-site-search', context).length;
if ($search) {
var $ms = $('.su-masthead .su-site-search', context);
$($ms.clone())
.prependTo('.su-masthead .su-multi-menu > ul', context)
.wrap('<li class="su-mobile-site-search"></li>')
.attr('id', 'block-stanford-basic-search-mobile')
.find('[id]').each(() => {$(this).attr('id', $(this).attr('id') + '-mobile');});
const $search = $('.su-masthead .su-site-search', context);
if ($search.length) {
const $clonedSearch = $search.clone();
// Adjust the parent id attribute.
$clonedSearch.attr('id', 'block-stanford-basic-search-mobile');
// Adjust all the children id attributes and fix any labels.
$clonedSearch.find('[id]').each((i, element) => {
const idAttribute = $(element).attr('id');
$clonedSearch.find(`[for="${idAttribute}"]`).attr('for', `${idAttribute}-mobile`);
$(element).attr('id', `${idAttribute}-mobile`);
});

$clonedSearch.prependTo('.su-masthead .su-multi-menu > ul', context)
.wrap('<li class="su-mobile-site-search"></li>');
}

// Add an outline class to the page-content region if local tasks are
Expand Down
2 changes: 2 additions & 0 deletions src/scss/components/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@
'lockup/index',
'masthead/index',
'multi-menu/index',
'paragraphs/paragraph--people',
'paragraphs/paragraph--events',
'secondary-nav/index',
'stanford-page/index',
'wysiwyg/index';
Expand Down
15 changes: 15 additions & 0 deletions src/scss/components/paragraphs/_paragraph--events.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
@charset 'UTF-8';

.stanford-events {
&.cards {
.views-view-grid {
> .flex-container {
justify-content: left;

> div:not(:last-of-type) {
@include responsive-spacing('padding-right', 1);
}
}
}
}
}
8 changes: 8 additions & 0 deletions src/scss/components/paragraphs/_paragraph--people.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
@charset 'UTF-8';

// Aligning the people cards
.stanford-people-grid {
.flex-container {
justify-content: left;
}
}
3 changes: 2 additions & 1 deletion src/scss/components/stanford-page/_page-title.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
//
// Custom Styles For Stanford Page Content Type.
//
.node-stanford-page-title {
.node-stanford-page-title,
.block--page-title {
@include modular-spacing('margin-top', 6);
}
2 changes: 1 addition & 1 deletion src/scss/theme/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@
'../config/index',
'../utilities/index';

@import "menu/index";
@import 'menu/index';
13 changes: 7 additions & 6 deletions stanford_basic.info.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ name: 'Stanford Basic'
type: theme
description: 'Stanford Basic Branding Theme.'
package: Stanford
version: 8.x-4.15
core_version_requirement: '^8.8 || ^9'
'base theme': stable
version: 8.x-5.0
core_version_requirement: ^9
'base theme': stable9
regions:
page_top: 'Page top'
header: Header
Expand All @@ -17,9 +17,10 @@ regions:
features:
- favicon
- logo
component-libraries:
basic: { paths: [ templates ] }
basic-dist: { paths: [ dist/templates ] }
components:
namespaces:
basic: templates
basic-dist: dist/templates
libraries:
- stanford_basic/basic
ckeditor_stylesheets:
Expand Down
2 changes: 1 addition & 1 deletion templates/core/field.html.twig
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{% extends "@stable/field/field.html.twig" %}
{% extends "@stable9/field/field.html.twig" %}

{# Create classes array #}
{% set classes = [] %}
Expand Down
2 changes: 1 addition & 1 deletion templates/navigation/toolbar.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@
*/
#}
{% set toolbar_attributes = toolbar_attributes.removeAttribute('role') %}
{% extends '@stable/navigation/toolbar.html.twig' %}
{% extends '@stable9/navigation/toolbar.html.twig' %}

0 comments on commit d997d41

Please sign in to comment.