Skip to content

Commit

Permalink
Merge pull request #960 from RedHatInsights/enhancements/pug-grouping
Browse files Browse the repository at this point in the history
update pug to be more modular
  • Loading branch information
Hyperkid123 authored Sep 15, 2020
2 parents b26241a + 06cd438 commit faf964b
Show file tree
Hide file tree
Showing 11 changed files with 38 additions and 42 deletions.
24 changes: 2 additions & 22 deletions src/pug/header.pug
Original file line number Diff line number Diff line change
@@ -1,23 +1,3 @@
header.pf-c-page__header(role='banner')
.pf-c-page__header-brand.ins-c-page__header-brand--loading
.pf-c-page__header-brand-toggle
button.pf-c-button.pf-m-plain(aria-label='Toggle primary navigation' widget-type='InsightsNavToggle' type='button')
img(src='apps/chrome/assets/images/primary-nav-hamburger-toggle.svg')
a.pf-c-page__header-brand-link(href='#')
img(src='apps/chrome/assets/images/logo.svg' alt='cloud.redhat.com logo')
.pf-c-page__header-tools(widget-type='InsightsToolbar')
.pf-c-page__header-tools-group.pf-m-icons
button.pf-c-button.pf-m-plain(aria-label='Settings' widget-type='SettingsButton' type='button')
img(src='apps/chrome/assets/images/settings-button.svg')
button.pf-c-button.pf-m-plain(aria-label='Overflow FAQ' widget-type='InsightsFAQ' type='button')
img(src='apps/chrome/assets/images/faq-button.svg')
.pf-c-page__header-tools-group
.pf-c-dropdown.pf-u-hidden-on-lg(aria-label='Overflow actions' widget-type='InsightsOverflowActions')
button.pf-c-dropdown__toggle.pf-m-plain(aria-label='Actions' type='button' aria-expanded='false' aria-haspopup='true')
img(src='apps/chrome/assets/images/overflow-actions-sm.svg')
.pf-m-user.pf-m-user-skeleton
.pf-c-dropdown(aria-label='Overflow actions' widget-type='InsightsOverflowActions')
.pf-c-dropdown__toggle.pf-m-plain(aria-expanded='false')
.ins-c-skeleton.ins-c-skeleton__lg.ins-m-dark  
img.pf-c-dropdown__toggle-icon(src='apps/chrome/assets/images/overflow-actions-lg.svg')
img.pf-c-avatar(src='apps/chrome/assets/images/img_avatar.svg' alt='Avatar Image')
include templates/brand-block.pug
include templates/tools-block.pug
22 changes: 2 additions & 20 deletions src/pug/landing-header.pug
Original file line number Diff line number Diff line change
@@ -1,21 +1,3 @@
header.pf-c-page__header(role='banner')
.pf-c-page__header-brand.ins-c-page__header-brand--loading
.pf-c-page__header-brand-toggle(hidden)
a.pf-c-page__header-brand-link(href='#')
img(src='apps/chrome/assets/images/logo.svg' alt='cloud.redhat.com logo')
.pf-c-page__header-tools(widget-type='InsightsToolbar')
.pf-c-page__header-tools-group.pf-m-icons
button.pf-c-button.pf-m-plain(aria-label='Settings' widget-type='SettingsButton' type='button')
img(src='apps/chrome/assets/images/settings-button.svg')
button.pf-c-button.pf-m-plain(aria-label='Overflow FAQ' widget-type='InsightsFAQ' type='button')
img(src='apps/chrome/assets/images/faq-button.svg')
.pf-c-page__header-tools-group
.pf-c-dropdown.pf-u-hidden-on-lg(aria-label='Overflow actions' widget-type='InsightsOverflowActions')
button.pf-c-dropdown__toggle.pf-m-plain(aria-label='Actions' type='button' aria-expanded='false' aria-haspopup='true')
img(src='apps/chrome/assets/images/overflow-actions-sm.svg')
.pf-m-user.pf-m-user-skeleton
.pf-c-dropdown(aria-label='Overflow actions' widget-type='InsightsOverflowActions')
.pf-c-dropdown__toggle.pf-m-plain(aria-expanded='false')
.ins-c-skeleton.ins-c-skeleton__lg.ins-m-dark  
img.pf-c-dropdown__toggle-icon(src='apps/chrome/assets/images/overflow-actions-lg.svg')
img.pf-c-avatar(src='apps/chrome/assets/images/img_avatar.svg' alt='Avatar Image')
include templates/brand-noHamburger-block.pug
include templates/tools-block.pug
1 change: 1 addition & 0 deletions src/pug/slices/hamburger-hidden.pug
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.pf-c-page__header-brand-toggle(hidden)
3 changes: 3 additions & 0 deletions src/pug/slices/hamburger.pug
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.pf-c-page__header-brand-toggle
button.pf-c-button.pf-m-plain(aria-label='Toggle primary navigation' widget-type='InsightsNavToggle' type='button')
img(src='apps/chrome/assets/images/primary-nav-hamburger-toggle.svg')
2 changes: 2 additions & 0 deletions src/pug/slices/logo.pug
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
a.pf-c-page__header-brand-link(href='#')
img(src='apps/chrome/assets/images/logo.svg' alt='cloud.redhat.com logo')
3 changes: 3 additions & 0 deletions src/pug/slices/mobileKebab.pug
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.pf-c-dropdown.pf-u-hidden-on-lg(aria-label='Overflow actions' widget-type='InsightsOverflowActions')
button.pf-c-dropdown__toggle.pf-m-plain(aria-label='Actions' type='button' aria-expanded='false' aria-haspopup='true')
img(src='apps/chrome/assets/images/overflow-actions-sm.svg')
5 changes: 5 additions & 0 deletions src/pug/slices/tools.pug
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
.pf-c-page__header-tools-group.pf-m-icons
button.pf-c-button.pf-m-plain(aria-label='Settings' widget-type='SettingsButton' type='button')
img(src='apps/chrome/assets/images/settings-button.svg')
button.pf-c-button.pf-m-plain(aria-label='Overflow FAQ' widget-type='InsightsFAQ' type='button')
img(src='apps/chrome/assets/images/faq-button.svg')
9 changes: 9 additions & 0 deletions src/pug/slices/userDropdown.pug
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
.pf-m-user.pf-m-user-skeleton
.pf-c-dropdown(aria-label='Overflow actions' widget-type='InsightsOverflowActions')
button.pf-c-dropdown__toggle.pf-m-plain(aria-expanded='false')
span.pf-c-dropdown__toggle-image
img.pf-c-avatar(src='apps/chrome/assets/images/img_avatar.svg' alt='Avatar Image')
span.pf-c-dropdown__toggle-text
.ins-c-skeleton.ins-c-skeleton__lg.ins-m-dark  
span.pf-c-dropdown__toggle-icon
img.pf-c-dropdown__toggle-icon(src='apps/chrome/assets/images/overflow-actions-lg.svg')
3 changes: 3 additions & 0 deletions src/pug/templates/brand-block.pug
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.pf-c-page__header-brand.ins-c-page__header-brand--loading
include ../slices/hamburger.pug
include ../slices/logo.pug
3 changes: 3 additions & 0 deletions src/pug/templates/brand-noHamburger-block.pug
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.pf-c-page__header-brand.ins-c-page__header-brand--loading
include ../slices/hamburger-hidden.pug
include ../slices/logo.pug
5 changes: 5 additions & 0 deletions src/pug/templates/tools-block.pug
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
.pf-c-page__header-tools(widget-type='InsightsToolbar')
include ../slices/tools.pug
.pf-c-page__header-tools-group
include ../slices/mobileKebab.pug
include ../slices/userDropdown.pug

0 comments on commit faf964b

Please sign in to comment.