This repository has been archived by the owner on Mar 31, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 70
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #206 from fourkitchens/SVG-method-switch
SVG sprite method change
- Loading branch information
Showing
13 changed files
with
95 additions
and
55 deletions.
There are no files selected for viewing
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
{# | ||
/** | ||
* Available variables: | ||
* - icon_base_class - base class name | ||
* - icon_modifiers - modifiers for icons (array) | ||
* - icon_blockname - blockname prepended to the base classname | ||
* - icon_name - the name of the icon | ||
*/ | ||
#} | ||
{% set icon_base_class = icon_base_class|default('icon') %} | ||
{% set icon_url = '' %} | ||
|
||
{# Drupal #} | ||
{# {% if attributes or theme_hook_original %} | ||
{% set icon_url = '/themes/custom/YOURTHEME/dist/img/sprite/' %} | ||
{{ attach_library('emulsify/sprite') }} | ||
{% else %} #} | ||
{% set icon_url = '/dist/img/sprite/' %} | ||
{# {% endif %} #} | ||
|
||
<svg {{ bem(icon_base_class, (icon_modifiers), icon_blockname, (icon_js_class)) }}> | ||
<use xlink:href="{{ icon_url }}sprite.svg#{{ icon_name }}"></use> | ||
</svg> |
14 changes: 0 additions & 14 deletions
14
components/_patterns/01-atoms/04-images/icons/_icon_sprite.scss
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,14 @@ | ||
<div class="icons-demo" id="icons"> | ||
|
||
{% for item in items %} | ||
<div><span class="sprite-{{ item.value }} sprite-icon"></span><p>{{ item.name }}</p></div> | ||
<div> | ||
{% include "@atoms/04-images/icons/_icon.twig" with { | ||
icon_name: item.value, | ||
} %} | ||
<p>{{ item.value }}</p> | ||
</div> | ||
{% endfor %} | ||
|
||
</div> | ||
|
||
<br> | ||
|
||
<h3 class="h3">Inline icon examples</h3> | ||
|
||
<p class="icon-inline-menu">Menu</p> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
items: | ||
1: | ||
name: "Menu" | ||
value: "menu" | ||
name: "Bars" | ||
value: "bars" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 5 additions & 5 deletions
10
components/_patterns/02-molecules/menus/main-menu/main-menu.twig
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes