Skip to content

Commit

Permalink
Merge pull request #241 from yalesites-org/develop
Browse files Browse the repository at this point in the history
Release
  • Loading branch information
vinmassaro authored Jun 20, 2024
2 parents 7ed6ad8 + 486d303 commit e346a06
Show file tree
Hide file tree
Showing 23 changed files with 260 additions and 15 deletions.
15 changes: 9 additions & 6 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,18 @@ jobs:
- name: Commit Compiled Component Library
uses: EndBug/add-and-commit@v9
with:
author_name: github-actions[bot]
author_email: github-actions[bot]@users.noreply.github.com
add: "node_modules/@yalesites-org/component-library-twig -f"
message: "build: commit compiled component library"
- name: Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
YALESITES_BUILD_TOKEN: ${{ secrets.YALESITES_BUILD_TOKEN }}
run: npm run semantic-release
- name: Remove Compiled Component Library
uses: EndBug/add-and-commit@v7
with:
remove: "--cached -r node_modules"
message: "build: removed compiled component library from git"
run: npx semantic-release
- name: Reset branch to prior commit
run: |
git config user.name 'github-actions[bot]'
git config user.email 'github-actions[bot]@users.noreply.github.com'
git reset --hard $GITHUB_SHA
git push --force
5 changes: 5 additions & 0 deletions atomic.libraries.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,11 @@ text-link:
node_modules/@yalesites-org/component-library-twig/dist/js/01-atoms/controls/text-link/yds-text-link.js:
{}

text:
js:
node_modules/@yalesites-org/component-library-twig/dist/js/01-atoms/typography/text/yds-text.js:
{}

text-copy-button:
js:
node_modules/@yalesites-org/component-library-twig/dist/js/01-atoms/controls/text-copy-button/yds-text-copy-button.js:
Expand Down
56 changes: 54 additions & 2 deletions css/admin-theme.css
Original file line number Diff line number Diff line change
Expand Up @@ -132,16 +132,68 @@ html.gin--dark-mode form.layout-builder-configure-block.glb-form {
// Offcanvas toolbar styles
*/
#drupal-off-canvas-wrapper {
--off-canvas-button-background-color: #555;

color: var(--gin-color-text) !important;
background-color: var(--gin-bg-layer) !important;
font-family: var(--gin-font);
}

#drupal-off-canvas-wrapper .ui-dialog-titlebar {
background-color: var(--gin-bg-layer2) !important;
color: var(--gin-color-text) !important;
}

/*
#drupal-off-canvas-wrapper .button--primary {
background-color: var(--color-blue-yale) !important;
}

#drupal-off-canvas-wrapper .button--primary:hover,
#drupal-off-canvas-wrapper .button--primary:focus,
#drupal-off-canvas-wrapper .button--primary:active {
color: var(--off-canvas-primary-button-text-color) !important;
background-color: var(--color-blue-royal) !important;
}

#drupal-off-canvas-wrapper .button--danger:hover {
background-color: var(--gin-color-danger) !important;
}

#drupal-off-canvas-wrapper a:not(.button) {
color: var(--menu-link-color) !important;
}

.gin--dark-mode #drupal-off-canvas-wrapper a:not(.button) {
color: var(--color-blue-light) !important;
}

/*
Moderation sidebar
*/

.moderation-sidebar-container .moderation-sidebar-revision-item {
border-bottom: 1px solid var(--color-text) !important;
margin: 1.5rem 0 !important;
}

.moderation-sidebar-container .moderation-sidebar-revision-item:last-of-type {
border-bottom: 0 !important;
}

.entity-moderation-form {
padding: 1rem;
margin: 1rem auto;
}

.entity-moderation-form input[type="submit"] {
margin-bottom: 0;
}

.moderation-sidebar-container .moderation-sidebar-revision-log {
border: 1px solid var(--color-text) !important;
}

/*
// Image crop vertical tabs override
*/

Expand All @@ -168,7 +220,7 @@ html.gin--dark-mode form.layout-builder-configure-block.glb-form {
color: var(--gin-color-text) !important;
}

/* In light mode, gin is displaying a mustard background with a black
/* In light mode, gin is displaying a mustard background with a black
foreground. This causes contrast issues. */
#drupal-off-canvas-wrapper
.ui-dialog-content
Expand Down
5 changes: 5 additions & 0 deletions css/ckeditor5.css
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,11 @@ div[contenteditable="true"] #drupal-off-canvas [data-drupal-ck-style-fence] .ck-
width: 100%;
}

/* Removes the border style in code blocks within ckeditor */
.ck-content pre code {
border: 0;
}

.glb-table .ck-content * {
padding: 0;
height: unset;
Expand Down
30 changes: 24 additions & 6 deletions package-lock.json

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

1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
"husky:pre-commit": "lint-staged",
"prepare": "husky install",
"prettier": "prettier ./ --ignore-unknown --list-different",
"semantic-release": "semantic-release",
"test": "echo \"Error: no test specified\" && exit 1"
},
"devDependencies": {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{% extends "@atomic/block/layout-builder/_layout-builder-block-template.twig" %}

{% block content %}

{% set facts_and_figures__group__bg_image = content.field_media.0 ? 'true' : 'false' %}

{% embed "@organisms/facts-and-figures-group/yds-facts-and-figures-group.twig" with {
facts_and_figures__group__heading: content.field_heading.0['#text'],
facts_and_figures__group__content: content.field_text.0['#text'],
facts_and_figures__group__alignment: content.field_style_alignment.0['#markup'],
facts_and_figures__group__grid_count: content.field_style_width.0['#markup'],
facts_and_figures__group__presentation_style: content.field_style_variation.0['#markup'],
facts_and_figured__group__width: 'site',
facts_and_figures__group__theme: content.field_style_color.0['#markup'],
}%}
{% block facts_and_figures__group__items %}
{{ content.field_facts_items }}
{% endblock %}

{% block facts_and_figures__group__image %}
{{ content.field_media }}
{% endblock %}
{% endembed %}

{% endblock %}
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
{% extends "@atomic/block/layout-builder/_layout-builder-block-template.twig" %}

{% block content %}
{% if parentNode == 'post' or parentNode == 'event' %}
{% set link_grid__width = "content" %}
{% else %}
{% set link_grid__width = "site" %}
{% endif %}

{# add checks for each link list #}
{% set link_grid__links_one = content.field_link_lists.0 %}
{% set link_grid__links_two = content.field_link_lists.1 %}
{% set link_grid__links_three = content.field_link_lists.2 %}
{% set link_grid__links_four = content.field_link_lists.3 %}

{% embed "@molecules/link-grid/yds-link-grid.twig" with {
link_grid__theme: content.field_style_color.0['#markup'],
link_grid__heading: content.field_heading.0,
}%}
{% block link_grid__links_one %}
{{content.field_link_lists.0}}
{% endblock %}
{% block link_grid__links_two %}
{{content.field_link_lists.1}}
{% endblock %}
{% block link_grid__links_three %}
{{content.field_link_lists.2}}
{% endblock %}
{% block link_grid__links_four %}
{{content.field_link_lists.3}}
{% endblock %}
{% endembed %}

{% endblock %}
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{% extends "@atomic/block/layout-builder/_layout-builder-block-template.twig" %}

{% block content %}
{{ attach_library('atomic/spotlights') }}

{% if content.field_media.0 %}
{% set quote_callout__quote_image = 'with-image' %}
{% endif %}

{% embed "@molecules/quote-callout/yds-quote-callout.twig" with {
quote_callout__quote: content.field_text,
quote_callout__attribution: content.field_caption.0,
quote_callout__style: content.field_style_variation.0['#markup'],
quote_callout__alignment: quote_callout__alignment,
quote_callout__quote_alignment: content.field_style_alignment.0['#markup'],
quote_callout__width: 'content',
quote_callout__accent_theme: content.field_style_color.0['#markup'],
} %}

{% block quote_callout__image %}
{{ content.field_media }}
{% endblock %}
{% endembed %}
{% endblock %}
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

{% block content %}

{{ attach_library('atomic/text') }}

{% if parentNode == 'post' or parentNode == 'event' %}
{% set text_field__width = "content" %}
{% set text_field__alignment = "center" %}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{% extends "@atomic/block/layout-builder/_layout-builder-block-template.twig" %}

{% block content %}
{% embed "@organisms/tiles/yds-tiles.twig" with {
tiles__alignment: content.field_style_alignment.0['#markup'],
tiles__grid_count: content.field_style_width.0['#markup'],
tiles__vertical_alignment: content.field_style_position.0['#markup'],
}%}
{% block tiles__items %}
{{ content.field_tiles }}
{% endblock %}
{% endembed %}
{% endblock %}
3 changes: 3 additions & 0 deletions templates/field/field--block-content--facts.html.twig
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{% for item in items %}
{{ item.content }}
{% endfor %}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{% for item in items %}
{{ item.content }}
{% endfor %}
3 changes: 3 additions & 0 deletions templates/field/field--block-content--field-tiles.html.twig
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{% for item in items %}
{{ item.content }}
{% endfor %}
3 changes: 3 additions & 0 deletions templates/field/field--block-content--link-grid.html.twig
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{% for item in items %}
{{ item.content }}
{% endfor %}
3 changes: 3 additions & 0 deletions templates/field/field--block-content--quote-callout.html.twig
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{% for item in items %}
{{ item.content }}
{% endfor %}
7 changes: 7 additions & 0 deletions templates/field/field--paragraph--link-list.html.twig
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{% for item in items %}
{% include "@molecules/link-grid/_yds-link-grid--links.twig" with {
link_grid__link__content: item.content['#title'],
link_grid__link__url: item.content['#url_title'],
}
%}
{% endfor %}
3 changes: 3 additions & 0 deletions templates/field/field--paragraph--tile.html.twig
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{% for item in items %}
{{item.content}}
{% endfor %}
7 changes: 7 additions & 0 deletions templates/layout/region--header.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,13 @@
{% set site_header__site_name_is_image = getHeaderSetting('site_name_image') %}
{% endif %}

{# set primary and utility nave variables equal to their drupal elements #}
{# this is necessary to pass the truthiness of the elements to the site-header organism #}
{# which will set {% set site_header__hamburger = 'yes' %} #}
{# and render the hamburger icon if the primary nav exists or the ulitity nav exists #}
{% set primary_nav__items = elements.main_navigation.content['#items'] %}
{% set utility_nav__items = elements.utility_navigation.content['#items'] %}

{% embed "@organisms/site-header/yds-site-header.twig" with {
site_name: site_name,
site_header__border_thickness: '8',
Expand Down
12 changes: 12 additions & 0 deletions templates/paragraphs/paragraph--facts-item.html.twig
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{# Get values from parent to pass here #}
{% set parent = paragraph._referringItem.parent.parent.entity %}

{% embed "@molecules/facts-and-figures/yds-facts-and-figures.twig" with {
facts_and_figures__stat: content.field_heading.0['#text'],
facts_and_figures__content: content.field_text.0,
facts_and_figures__alignment: parent.fields.field_style_alignment.0.value,
facts_and_figures__presentation_style: 'basic',
facts_and_figures__theme: 'none',
}
%}
{% endembed %}
1 change: 1 addition & 0 deletions templates/paragraphs/paragraph--link-list.html.twig
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{{content}}
18 changes: 18 additions & 0 deletions templates/paragraphs/paragraph--tile.html.twig
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{# Get values from parent to pass here #}
{% set parent = paragraph._referringItem.parent.parent.entity %}
{% set tile__item__bg_image = content.field_media.0 ? 'true' : 'false' %}

{% embed "@molecules/tile-item/yds-tile-item.twig" with {
tile__item__heading: content.field_heading.0['#text'],
tile__item__content: content.field_text.0,
tile__item__content_link: content.field_link.0['#url_title'],
tile__item__alignment: parent.fields.field_style_alignment.0.value,
tile__item__vertical_alignment: parent.fields.field_style_position.0.value,
tile__item__presentation_style: content.field_heading.0['#text'] ? 'heading' : 'text-only',
tile__item__theme: content.field_style_color.0['#markup'],
}
%}
{% block tile__item__image %}
{{ content.field_media }}
{% endblock %}
{% endembed %}
Loading

0 comments on commit e346a06

Please sign in to comment.