Remove icon ligatures from HTML to fix search indexing

This commit is contained in:
squidfunk 2017-01-11 23:49:36 +01:00
parent b32084bf8b
commit 1a32e9b7e3
11 changed files with 42 additions and 36 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -37,7 +37,7 @@
{% include "partials/fonts.html" %}
{% endblock %}
{% block styles %}
<link rel="stylesheet" href="{{ base_url }}/assets/stylesheets/application-0bf20c7a55.css">
<link rel="stylesheet" href="{{ base_url }}/assets/stylesheets/application-ff220fd69d.css">
{% if config.extra.palette %}
<link rel="stylesheet" href="{{ base_url }}/assets/stylesheets/application-02ce7adcc2.palette.css">
{% endif %}

View File

@ -6,7 +6,7 @@
{% if page.previous_page %}
<a href="{{ page.previous_page.url }}" title="{{ page.previous_page.title }}" class="md-flex md-footer-nav__link md-footer-nav__link--prev" rel="prev">
<div class="md-flex__cell md-flex__cell--shrink">
<i class="md-icon md-footer-nav__icon">arrow_back</i>
<i class="md-icon md-icon--arrow-back md-footer-nav__icon"></i>
</div>
<div class="md-flex__cell md-flex__cell--stretch md-footer-nav__title">
<span class="md-flex__ellipsis">
@ -29,7 +29,7 @@
</span>
</div>
<div class="md-flex__cell md-flex__cell--shrink">
<i class="md-icon md-footer-nav__icon">arrow_forward</i>
<i class="md-icon md-icon--arrow-forward md-footer-nav__icon"></i>
</div>
</a>
{% endif %}

View File

@ -2,18 +2,14 @@
<nav class="md-header-nav md-grid">
<div class="md-flex">
<div class="md-flex__cell md-flex__cell--shrink">
<a href="{{ nav.homepage.url }}" title="{{ config.site_name }}" class="md-icon md-header-nav__icon md-header-nav__icon--home">
<a href="{{ nav.homepage.url }}" title="{{ config.site_name }}" class="md-icon {% if not config.extra.logo %} md-icon--home {% endif %} md-header-nav__icon">
{% if config.extra.logo %}
<img src="{{ base_url }}/{{ config.extra.logo }}" width="24" height="24">
{% else %}
school
{% endif %}
</a>
</div>
<div class="md-flex__cell md-flex__cell--shrink">
<label class="md-icon md-header-nav__icon md-header-nav__icon--menu" for="drawer">
menu
</label>
<label class="md-icon md-icon--menu md-header-nav__icon" for="drawer"></label>
</div>
<div class="md-flex__cell md-flex__cell--stretch">
<span class="md-flex__ellipsis md-header-nav__title">
@ -31,9 +27,7 @@
</div>
<div class="md-flex__cell md-flex__cell--shrink">
{% block search_box %}
<label class="md-icon md-header-nav__icon md-header-nav__icon--search" for="search">
search
</label>
<label class="md-icon md-icon--search md-header-nav__icon" for="search"></label>
{% include "partials/search.html" %}
{% endblock %}
</div>

View File

@ -1,10 +1,8 @@
<nav class="md-nav md-nav--primary">
<label class="md-nav__title md-nav__title--site" for="drawer">
<i class="md-icon md-nav__icon">
<i class="md-icon {% if not config.extra.logo %} md-icon--home {% endif %} md-nav__icon">
{% if config.extra.logo %}
<img src="{{ base_url }}/{{ config.extra.logo }}">
{% else %}
school
{% endif %}
</i>
{{ config.site_name }}

View File

@ -50,4 +50,17 @@
// Representational classes
.md-icon {
@extend %md-icon;
// Build representational classes
@each $ligature, $name in (
"arrow_back": "arrow-back",
"arrow_forward": "arrow-forward",
"menu": "menu",
"search": "search",
"school": "home"
) {
&--#{$name}::before {
content: $ligature;
}
}
}

View File

@ -62,7 +62,7 @@
}
// Hide search icon, if JavaScript is not available.
.no-js &--search {
.no-js & .md-icon--search {
display: none;
}
@ -70,7 +70,7 @@
@include break-from-device(tablet landscape) {
// Search icon
&--search {
&.md-icon--search {
display: none;
}
}
@ -79,7 +79,7 @@
@include break-to-device(tablet) {
// Home icon
&--home {
&.md-icon--home {
display: none;
}
}
@ -88,7 +88,7 @@
@include break-from-device(screen) {
// Menu icon
&--menu {
&.md-icon--menu {
display: none;
}
}

View File

@ -37,7 +37,8 @@
class="md-flex md-footer-nav__link md-footer-nav__link--prev"
rel="prev">
<div class="md-flex__cell md-flex__cell--shrink">
<i class="md-icon md-footer-nav__icon">arrow_back</i>
<i class="md-icon md-icon--arrow-back
md-footer-nav__icon"></i>
</div>
<div class="md-flex__cell md-flex__cell--stretch
md-footer-nav__title">
@ -66,7 +67,8 @@
</span>
</div>
<div class="md-flex__cell md-flex__cell--shrink">
<i class="md-icon md-footer-nav__icon">arrow_forward</i>
<i class="md-icon md-icon--arrow-forward
md-footer-nav__icon"></i>
</div>
</a>
{% endif %}

View File

@ -30,22 +30,21 @@
<!-- Link to home -->
<div class="md-flex__cell md-flex__cell--shrink">
<a href="{{ nav.homepage.url }}" title="{{ config.site_name }}"
class="md-icon md-header-nav__icon md-header-nav__icon--home">
class="md-icon
{% if not config.extra.logo %}
md-icon--home
{% endif %} md-header-nav__icon">
{% if config.extra.logo %}
<img src="{{ base_url }}/{{ config.extra.logo }}"
width="24" height="24" />
{% else %}
school
{% endif %}
</a>
</div>
<!-- Button to toggle drawer -->
<div class="md-flex__cell md-flex__cell--shrink">
<label class="md-icon md-header-nav__icon md-header-nav__icon--menu"
for="drawer">
menu
</label>
<label class="md-icon md-icon--menu md-header-nav__icon"
for="drawer"></label>
</div>
<!-- Header title -->
@ -67,10 +66,8 @@
<!-- Button to open search dialogue -->
<div class="md-flex__cell md-flex__cell--shrink">
{% block search_box %}
<label class="md-icon md-header-nav__icon
md-header-nav__icon--search" for="search">
search
</label>
<label class="md-icon md-icon--search md-header-nav__icon"
for="search"></label>
<!-- Search interface -->
{% include "partials/search.html" %}

View File

@ -23,11 +23,13 @@
<!-- Main navigation -->
<nav class="md-nav md-nav--primary">
<label class="md-nav__title md-nav__title--site" for="drawer">
<i class="md-icon md-nav__icon">
<i class="md-icon
{% if not config.extra.logo %}
md-icon--home
{% endif %}
md-nav__icon">
{% if config.extra.logo %}
<img src="{{ base_url }}/{{ config.extra.logo }}" />
{% else %}
school
{% endif %}
</i>
{{ config.site_name }}