Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update header and footer to new 2024 Illinois brand standards #1011

Open
wants to merge 22 commits into
base: 4.x
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
38ffad7
adding il-header css and js to theme
nhjohnstone Aug 6, 2024
65b3beb
adding il-header tag to page templates
nhjohnstone Aug 6, 2024
5105e2e
region header adding new il header code and update to main navigation
nhjohnstone Aug 6, 2024
6649b5f
adding il-footer css and js to theme
nhjohnstone Aug 7, 2024
6e0b94c
adding il-footer tag to page templates
nhjohnstone Aug 7, 2024
be92151
adding il-footer code to region footer
nhjohnstone Aug 7, 2024
14a9069
fixing site name and adding action links in footer
nhjohnstone Aug 8, 2024
49cb6ab
added nav section if statement for main menu
nhjohnstone Aug 21, 2024
65e588a
updating toolkit so it works with the new header and footer
nhjohnstone Aug 26, 2024
5e14bed
fixing site header so there is no underline
nhjohnstone Aug 26, 2024
98cae69
updating the footer to match the campus version
nhjohnstone Aug 27, 2024
23743be
footer block name back to original name
nhjohnstone Aug 28, 2024
c1e7ab4
making footer links display as grid to match toolkit version 2
nhjohnstone Aug 28, 2024
4fbfc5f
adding il-header tag to all page templates
nhjohnstone Aug 28, 2024
048f4c2
adding il-footer tag to all page templates
nhjohnstone Aug 28, 2024
7b9f7e5
adding blocking=render to script tags on html.html.twig
nhjohnstone Sep 18, 2024
5ad88c8
removing async from script tag to fix navigation displaying incorrect…
nhjohnstone Sep 18, 2024
095f841
added header and footer scripts to libraries.yml
nhjohnstone Sep 19, 2024
4493338
adding important to z-index on il-header
nhjohnstone Nov 20, 2024
c691c43
header nav make links with another section underneath wrap
nhjohnstone Nov 22, 2024
8dbd78c
Added underline to header on footer columns
nhjohnstone Dec 6, 2024
8753312
Update block.block.illinois_framework_theme_main_menu.yml
trubach Dec 12, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ plugin: 'system_menu_block:main'
settings:
id: 'system_menu_block:main'
label: 'Main navigation'
provider: system
label_display: '0'
provider: system
level: 1
depth: 0
depth: 2
expand_all_items: true
visibility: { }
3 changes: 3 additions & 0 deletions illinois_framework_theme.info.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ libraries-override:
libraries:
- illinois_framework_theme/global-styling
- illinois_framework_theme/web-components
- illinois_framework_theme/brand-styles
- illinois_framework_theme/il-header
- illinois_framework_theme/il-footer

# Regions
regions:
Expand Down
39 changes: 37 additions & 2 deletions illinois_framework_theme.libraries.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,20 @@ web-components:
header: true
css:
theme:
https://cdn.toolkit.illinois.edu/2.16/toolkit.css:
https://contrib.webtheme.illinois.edu/toolkit-lite-v2/toolkit.css:
type: external
minified: true
js:
https://cdn.toolkit.illinois.edu/2.16/toolkit.js:
https://contrib.webtheme.illinois.edu/toolkit-lite-v2/toolkit.js:
type: external
minified: true
brand-styles:
header: true
css:
theme:
https://cdn.brand.illinois.edu/illinois.css:
type: external
minified: true
ils-contentslider:
header: true
css:
Expand All @@ -40,6 +47,34 @@ ils-contentslider:
https://contrib.webtheme.illinois.edu/ils-contentslider/contentslider.min.js:
type: external
minified: true
il-header:
header: true
css:
theme:
https://cdn.brand.illinois.edu/components/il-header.css:
type: external
minified: true
js:
https://cdn.brand.illinois.edu/components/il-header.mjs:
type: external
minified: true
attributes:
type: module
blocking: render
il-footer:
header: true
css:
theme:
https://cdn.brand.illinois.edu/components/il-footer.css:
type: external
minified: true
js:
https://cdn.brand.illinois.edu/components/il-footer.mjs:
type: external
minified: true
attributes:
type: module
blocking: render
content-adjust:
js:
js/content.js: {}
Expand Down
41 changes: 37 additions & 4 deletions scss/illinois-framework/_region.footer.scss
Original file line number Diff line number Diff line change
@@ -1,10 +1,43 @@
il-footer {

&[slot="parent"] {
.footer-menus {
display: grid;
grid-template-columns: 1fr;
grid-gap: 0;
@include media-breakpoint-up(lg) {
grid-template-columns: repeat(2,1fr);
grid-gap: 60px;
}
nav {
@include media-breakpoint-up(lg) {
margin-bottom: 1rem;
}
}

p {
font-size: initial;
line-height: initial;
h2 {
font: 600 1.25rem/1.5 var(--il-font-sans);
margin-bottom: .75rem;
font-weight: 700;
border-bottom: 1px solid var(--il-blue);
padding-bottom: .75rem;
}
.col-md {
@include media-breakpoint-up(lg) {
padding-left: 0;
}
}
.navbar-nav {
.nav-item {
.nav-link {
font: 400 18px/30px var(--il-font-sans);;
padding: .2rem 0;
}
}
}
}
}
il-footer *[slot=actions] a {
@include media-breakpoint-down(lg) {
margin: 0 .5rem .5rem 0 !important;
}
}
16 changes: 14 additions & 2 deletions scss/illinois-framework/_region.header.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,16 @@
.region-header {
il-header {
position: relative;
z-index: 101;
z-index: 101 !important;
}
il-header a[slot="site-name"], il-header a[slot="primary-unit"] {
text-decoration: none;
color: var(--il-blue);
&:hover,
&:focus {
text-decoration: underline;
color: var(--il-altgeld);
}
}
il-header-nav-section-with-link > a[slot="link"] {
white-space: wrap !important;
}
13 changes: 12 additions & 1 deletion scss/web-components/_web-components.footer.scss
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,23 @@
}
}
.il-footer-navigation {
padding-top: 0 !important;
h2, h3, h4 {
color: white;
color: var(--il-blue);
border-bottom: none !important;
}
a {
color: var(--il-blue);
&:visited {
color: var(--il-blue);
}
}
}
.il-footer-contact {
p {
color: white;
}
}
.site.section {
gap: 0 !important;
}
8 changes: 6 additions & 2 deletions templates/layout/page--404.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,9 @@
*/
#}
<div class="layout-container">
{{ page.header }}
<il-header>
{{ page.header }}
</il-header>
{{ page.breadcrumb }}
{{ page.highlighted }}
{{ page.help }}
Expand Down Expand Up @@ -82,6 +84,8 @@
{{ page.content }}
</div>
{% endif %}
{{ page.footer }}
<il-footer>
{{ page.footer }}
</il-footer>
</div>{# /.layout-container #}

8 changes: 6 additions & 2 deletions templates/layout/page--content-page.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,9 @@
{% endif %}

<div class="layout-container">
{{ page.header }}
<il-header>
{{ page.header }}
</il-header>
{{ page.breadcrumb }}
{{ page.highlighted }}
{{ page.help }}
Expand Down Expand Up @@ -111,5 +113,7 @@
{{ page.content }}
{% endif %}

{{ page.footer }}
<il-footer>
{{ page.footer }}
</il-footer>
</div>{# /.layout-container #}
10 changes: 7 additions & 3 deletions templates/layout/page--news.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,9 @@
*/
#}
<div class="layout-container">
{{ page.header }}
<il-header>
{{ page.header }}
</il-header>
{{ page.breadcrumb }}
{{ page.highlighted }}
{{ page.help }}
Expand All @@ -62,6 +64,8 @@
</div>
{{ attach_library('illinois_framework_theme/content-adjust') }}
</div>
{{ page.footer }}
</div>{# /.layout-container #}
<il-footer>
{{ page.footer }}
</il-footer>
</div>{# /.layout-container #}

8 changes: 6 additions & 2 deletions templates/layout/page--search.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,9 @@
*/
#}
<div class="layout-container">
{{ page.header }}
<il-header>
{{ page.header }}
</il-header>
{{ page.breadcrumb }}
{{ page.highlighted }}
{{ page.help }}
Expand All @@ -58,5 +60,7 @@
</div>
</div>
</main>
{{ page.footer }}
<il-footer>
{{ page.footer }}
</il-footer>
</div>{# /.layout-container #}
8 changes: 6 additions & 2 deletions templates/layout/page--spotlight.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,9 @@


<div class="layout-container">
{{ page.header }}
<il-header>
{{ page.header }}
</il-header>
{{ page.breadcrumb }}
{{ page.highlighted }}
{{ page.help }}
Expand All @@ -84,6 +86,8 @@
</div>
</main>

{{ page.footer }}
<il-footer>
{{ page.footer }}
</il-footer>
</div>{# /.layout-container #}

9 changes: 6 additions & 3 deletions templates/layout/page.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,9 @@
*/
#}
<div class="layout-container">
{{ page.header }}
<il-header>
{{ page.header }}
</il-header>
{{ page.breadcrumb }}
{{ page.highlighted }}
{{ page.help }}
Expand All @@ -64,6 +66,7 @@
</div>
</div>
</main>

{{ page.footer }}
<il-footer>
{{ page.footer }}
</il-footer>
</div>{# /.layout-container #}
60 changes: 34 additions & 26 deletions templates/navigation/menu--main--nav-main.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -24,34 +24,42 @@
We call a macro which calls itself to render the full tree.
@see http://twig.sensiolabs.org/doc/tags/macro.html
#}
{{ menus.menu_links(items, attributes, 0) }}
{% macro menu_links(items, attributes, menu_level) %}
{% import _self as menus %}
{#
We call a macro which calls itself to render the full tree.
@see http://twig.sensiolabs.org/doc/tags/macro.html
#}
{{ menus.build_menu(items, attributes, 0) }}

{% macro build_menu(items, attributes, menu_level) %}
{% import _self as menus %}
{% if items %}
{% for item in items %}
{% set item_length = items|length %}
{% if menu_level == 0 and item.below %}
<il-nav-section {% if item_length >= 5 and loop.index > (item_length - 2) %}right="true"{% endif %}>
{# Check if there's <nolink> in the top-level menu link and remove the href if there is no link #}
{% if item.url.toString is not empty -%}
<a href={{ item.url }} slot="label">{{ item.title }}</a>
{% else %}
<a role="button" slot="label" tabindex="0">{{ item.title }}</a>
{% endif -%}
<ul class="il-subnav">
{% for item in item.below %}
<li>
<a href="{{ item.url }}">{{ item.title }}</a>
</li>
{% endfor %}
</ul>
</il-nav-section>
{% else %}
<il-nav-link>
<a href="{{ item.url }}" target="_self">{{ item.title }}</a>
</il-nav-link>
{% endif %}
{% endfor %}
<ul>
{% for item in items %}
{{ menus.add_link(item, attributes, menu_level) }}
{% endfor %}
</ul>
{% endif %}
{% endmacro %}

{% macro add_link(item, attributes, menu_level) %}
{% import _self as menus %}
<li>
{% if item.below and item.url.toString is not empty %}
<il-header-nav-section-with-link>
<a slot="link" href="{{ item.url }}">{{ item.title }}</a>
{{ menus.build_menu(item.below, attributes, menu_level + 1) }}
</il-header-nav-section-with-link>
{% elseif item.below %}
<il-header-nav-section>
<span slot="label">{{ item.title }}</span>
{{ menus.build_menu(item.below, attributes, menu_level + 1) }}
</il-header-nav-section>
{% elseif item.url.toString is not empty -%}
<a href="{{ item.url }}">{{ item.title }}</a>
{% else %}
<span slot="label">{{ item.title }}</span>
{% endif -%}
</li>
{% endmacro %}

Loading