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

Added top link area in brand bar header #879

Open
wants to merge 1 commit into
base: 4.x
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
5 changes: 5 additions & 0 deletions src/components/brand-bar/BrandBar.stories.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ export default {
default: {
control: { type: 'text' },
},
top_link_content: {
control: { type: 'text' },
},
second_row_content: {
control: { type: 'text' },
},
Expand All @@ -32,6 +35,7 @@ export const Default = Template.bind({})
Default.args = {
narrow: false,
default: '',
top_link_content: '',
second_row_content: '',
}

Expand All @@ -43,6 +47,7 @@ const SiteTitleTemplate = (args) => ({
template: `
<uids-iowa-bar :narrow="args.narrow">
<h1 class="site-name">{{ args.default }}</h1>
<div class="top-link">{{ args.top_link_content }}</div>
</uids-iowa-bar>
`
})
Expand Down
1 change: 1 addition & 0 deletions src/components/brand-bar/BrandBar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ export default {
<uids-logo></uids-logo>
<!-- @slot Default slot shows content next to the logo. -->
<slot></slot>
<slot name="top_link_content"></slot>
</div>
<div class="iowa-bar__below" v-if="$slots.second_row_content">
<div class="iowa-bar__container">
Expand Down
21 changes: 21 additions & 0 deletions src/components/brand-bar/brand-bar.scss
Original file line number Diff line number Diff line change
Expand Up @@ -358,3 +358,24 @@
box-shadow: 0 0 10px rgba(0, 0, 0, 0.35);
}
}

// Top link

.top-link {
@include breakpoint(md) {
margin: 8px 8px 0 0;
position: relative;
align-self: center;
flex: auto;
display: flex;
justify-content: flex-end;
}
}

.site-name + .top-link {
background: #ffcd00;
padding: 0 1.25rem 0.75rem;
@include breakpoint(md) {
padding: 0;
}
}