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

266: Update scss file to reference logo.twig and update twig file to … #267

Merged
merged 3 commits into from
Nov 7, 2018
Merged
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: 4 additions & 1 deletion core/css/decanter.css

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

9 changes: 8 additions & 1 deletion core/scss/components/logo/_logo.scss
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,17 @@
// For displaying the Stanford University logo using custom font and glyphs.
// Can be used with the generic logo twig template.
//
// Markup: <a href="/" class="logo">Stanford<br>University</a>
// Markup: ../templates/components/logo/logo.twig
//
// Style guide: Components.Logo
//
.su-logo {
@include logo;
color: $color-cardinal-red;

&:hover,
&:active,
&:focus {
color: $color-cardinal-red;
}
}
4 changes: 4 additions & 0 deletions core/templates/components/logo/logo.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"href": "https://www.stanford.edu",
"logo_text": "Stanford<br>University"
}
18 changes: 15 additions & 3 deletions core/templates/components/logo/logo.twig
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
<a{{ attributes }} class="su-logo {{ modifier_class }}" href="{{ href|default('https://www.stanford.edu') }}" >
<img src="{{ src|default("../../img/[email protected]") }}" alt="{{ alt|default("Stanford University") }}" />
</a>
{#
/**
* @file
* Logo Component
*
* The Stanford wordmark logo rendered with the custom Stanford ligature font.
*
* Available variables:
* - attributes: For additional HTML attributes not already provided.
* - modifier_class: Additional CSS classes to change look and behaviour.
* - href: The URL that the logo links to.
* - logo_text: The text for the ligature logo - either Stanford<br>University or Stanford.
*/
#}
<a{{ attributes }} class="su-logo {{ modifier_class }}" href="{{ href|default('https://www.stanford.edu') }}">{{ logo_text|default('Stanford<br>University')|raw }}</a>