Add target attribute for navigation link (#3056)
This commit is contained in:
parent
f1ffad4b5e
commit
ceeda03132
3
.gitignore
vendored
3
.gitignore
vendored
@ -2,6 +2,9 @@
|
|||||||
*~
|
*~
|
||||||
*.sw[p_]
|
*.sw[p_]
|
||||||
|
|
||||||
|
# IntelliJ IDEA
|
||||||
|
*.idea
|
||||||
|
|
||||||
# Sublime Text
|
# Sublime Text
|
||||||
*.sublime-project
|
*.sublime-project
|
||||||
*.sublime-workspace
|
*.sublime-workspace
|
||||||
|
@ -14,7 +14,11 @@
|
|||||||
<ul class="visible-links">
|
<ul class="visible-links">
|
||||||
{%- for link in site.data.navigation.main -%}
|
{%- for link in site.data.navigation.main -%}
|
||||||
<li class="masthead__menu-item">
|
<li class="masthead__menu-item">
|
||||||
<a href="{{ link.url | relative_url }}"{% if link.description %} title="{{ link.description }}"{% endif %}>{{ link.title }}</a>
|
<a
|
||||||
|
href="{{ link.url | relative_url }}"
|
||||||
|
{% if link.description %} title="{{ link.description }}"{% endif %}
|
||||||
|
{% if link.target %} target="{{ link.target }}"{% endif %}
|
||||||
|
>{{ link.title }}</a>
|
||||||
</li>
|
</li>
|
||||||
{%- endfor -%}
|
{%- endfor -%}
|
||||||
</ul>
|
</ul>
|
||||||
|
@ -30,6 +30,7 @@ main:
|
|||||||
url: /collection-archive/
|
url: /collection-archive/
|
||||||
- title: "External Link"
|
- title: "External Link"
|
||||||
url: https://google.com
|
url: https://google.com
|
||||||
|
target: _blank
|
||||||
```
|
```
|
||||||
|
|
||||||
Which will give you a responsive masthead similar to this:
|
Which will give you a responsive masthead similar to this:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user