Make header more efficient
When adding class for current page on navbar
This commit is contained in:
@@ -10,14 +10,13 @@
|
||||
<!-- Nav -->
|
||||
<nav id="menu">
|
||||
<ul class="links">
|
||||
<li><a href="/" {% if page.url == "/" or page.url == "/index.html" %} class="current-page-link" {% endif %}>Home</a></li>
|
||||
<li><a href="/" class="{% if page.url == '/' or page.url == '/index.html' %}current-page-link{% endif %}">Home</a></li>
|
||||
|
||||
{% assign all_pages = site.pages | concat: site.data.navigation | sort: "title" %}
|
||||
{% for project in all_pages %}
|
||||
{% assign project_url_end = project.url| slice: -4, 4 %}
|
||||
{% if project.url != "/" and project.url != "/index.html" and project.url != "/sitemap.xml" and project_url_end != ".css" %}
|
||||
<li><a href="{{ project.url | relative_url }}" {% if project.url == page.url %} class="current-page-link"
|
||||
{% endif %}>{{ project.title }}</a></li>
|
||||
<li><a href="{{ project.url | relative_url }}" class="{% if project.url == page.url %}current-page-link{% endif %}">{{ project.title }}</a></li>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</ul>
|
||||
|
||||
@@ -56,7 +56,7 @@
|
||||
<!-- Nav -->
|
||||
<nav id="menu">
|
||||
<ul class="links">
|
||||
<li><a href="/" >Home</a></li>
|
||||
<li><a href="/" class="">Home</a></li>
|
||||
|
||||
|
||||
|
||||
@@ -65,23 +65,22 @@
|
||||
|
||||
|
||||
|
||||
<li><a href="/young-reporter/" >BBC Young Reporter Article Generator</a></li>
|
||||
<li><a href="/young-reporter/" class="">BBC Young Reporter Article Generator</a></li>
|
||||
|
||||
|
||||
|
||||
|
||||
<li><a href="https://blackthunder.gq" >Black Thunder</a></li>
|
||||
<li><a href="https://blackthunder.gq" class="">Black Thunder</a></li>
|
||||
|
||||
|
||||
|
||||
|
||||
<li><a href="https://blog.mgrove.uk" >Blog</a></li>
|
||||
<li><a href="https://blog.mgrove.uk" class="">Blog</a></li>
|
||||
|
||||
|
||||
|
||||
|
||||
<li><a href="/comsci/" class="current-page-link"
|
||||
>Computer Science</a></li>
|
||||
<li><a href="/comsci/" class="current-page-link">Computer Science</a></li>
|
||||
|
||||
|
||||
|
||||
@@ -89,32 +88,32 @@
|
||||
|
||||
|
||||
|
||||
<li><a href="https://instagram.com/morganandmeganbichons" >Dogs</a></li>
|
||||
<li><a href="https://instagram.com/morganandmeganbichons" class="">Dogs</a></li>
|
||||
|
||||
|
||||
|
||||
|
||||
<li><a href="/luhn-algorithm/" >Luhn Algorithm</a></li>
|
||||
<li><a href="/luhn-algorithm/" class="">Luhn Algorithm</a></li>
|
||||
|
||||
|
||||
|
||||
|
||||
<li><a href="https://instagram.com/mgrove36.photos" >Photography Feed</a></li>
|
||||
<li><a href="https://instagram.com/mgrove36.photos" class="">Photography Feed</a></li>
|
||||
|
||||
|
||||
|
||||
|
||||
<li><a href="https://youngreporter.mgrove.uk" >Reading School BBC Young Reporter</a></li>
|
||||
<li><a href="https://youngreporter.mgrove.uk" class="">Reading School BBC Young Reporter</a></li>
|
||||
|
||||
|
||||
|
||||
|
||||
<li><a href="/site-theme/" >Site Theme</a></li>
|
||||
<li><a href="/site-theme/" class="">Site Theme</a></li>
|
||||
|
||||
|
||||
|
||||
|
||||
<li><a href="https://traqua.ml" >Traqua</a></li>
|
||||
<li><a href="https://traqua.ml" class="">Traqua</a></li>
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
@@ -65,22 +65,22 @@
|
||||
|
||||
|
||||
|
||||
<li><a href="/young-reporter/" >BBC Young Reporter Article Generator</a></li>
|
||||
<li><a href="/young-reporter/" class="">BBC Young Reporter Article Generator</a></li>
|
||||
|
||||
|
||||
|
||||
|
||||
<li><a href="https://blackthunder.gq" >Black Thunder</a></li>
|
||||
<li><a href="https://blackthunder.gq" class="">Black Thunder</a></li>
|
||||
|
||||
|
||||
|
||||
|
||||
<li><a href="https://blog.mgrove.uk" >Blog</a></li>
|
||||
<li><a href="https://blog.mgrove.uk" class="">Blog</a></li>
|
||||
|
||||
|
||||
|
||||
|
||||
<li><a href="/comsci/" >Computer Science</a></li>
|
||||
<li><a href="/comsci/" class="">Computer Science</a></li>
|
||||
|
||||
|
||||
|
||||
@@ -88,32 +88,32 @@
|
||||
|
||||
|
||||
|
||||
<li><a href="https://instagram.com/morganandmeganbichons" >Dogs</a></li>
|
||||
<li><a href="https://instagram.com/morganandmeganbichons" class="">Dogs</a></li>
|
||||
|
||||
|
||||
|
||||
|
||||
<li><a href="/luhn-algorithm/" >Luhn Algorithm</a></li>
|
||||
<li><a href="/luhn-algorithm/" class="">Luhn Algorithm</a></li>
|
||||
|
||||
|
||||
|
||||
|
||||
<li><a href="https://instagram.com/mgrove36.photos" >Photography Feed</a></li>
|
||||
<li><a href="https://instagram.com/mgrove36.photos" class="">Photography Feed</a></li>
|
||||
|
||||
|
||||
|
||||
|
||||
<li><a href="https://youngreporter.mgrove.uk" >Reading School BBC Young Reporter</a></li>
|
||||
<li><a href="https://youngreporter.mgrove.uk" class="">Reading School BBC Young Reporter</a></li>
|
||||
|
||||
|
||||
|
||||
|
||||
<li><a href="/site-theme/" >Site Theme</a></li>
|
||||
<li><a href="/site-theme/" class="">Site Theme</a></li>
|
||||
|
||||
|
||||
|
||||
|
||||
<li><a href="https://traqua.ml" >Traqua</a></li>
|
||||
<li><a href="https://traqua.ml" class="">Traqua</a></li>
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
@@ -56,7 +56,7 @@
|
||||
<!-- Nav -->
|
||||
<nav id="menu">
|
||||
<ul class="links">
|
||||
<li><a href="/" >Home</a></li>
|
||||
<li><a href="/" class="">Home</a></li>
|
||||
|
||||
|
||||
|
||||
@@ -65,22 +65,22 @@
|
||||
|
||||
|
||||
|
||||
<li><a href="/young-reporter/" >BBC Young Reporter Article Generator</a></li>
|
||||
<li><a href="/young-reporter/" class="">BBC Young Reporter Article Generator</a></li>
|
||||
|
||||
|
||||
|
||||
|
||||
<li><a href="https://blackthunder.gq" >Black Thunder</a></li>
|
||||
<li><a href="https://blackthunder.gq" class="">Black Thunder</a></li>
|
||||
|
||||
|
||||
|
||||
|
||||
<li><a href="https://blog.mgrove.uk" >Blog</a></li>
|
||||
<li><a href="https://blog.mgrove.uk" class="">Blog</a></li>
|
||||
|
||||
|
||||
|
||||
|
||||
<li><a href="/comsci/" >Computer Science</a></li>
|
||||
<li><a href="/comsci/" class="">Computer Science</a></li>
|
||||
|
||||
|
||||
|
||||
@@ -88,33 +88,32 @@
|
||||
|
||||
|
||||
|
||||
<li><a href="https://instagram.com/morganandmeganbichons" >Dogs</a></li>
|
||||
<li><a href="https://instagram.com/morganandmeganbichons" class="">Dogs</a></li>
|
||||
|
||||
|
||||
|
||||
|
||||
<li><a href="/luhn-algorithm/" class="current-page-link"
|
||||
>Luhn Algorithm</a></li>
|
||||
<li><a href="/luhn-algorithm/" class="current-page-link">Luhn Algorithm</a></li>
|
||||
|
||||
|
||||
|
||||
|
||||
<li><a href="https://instagram.com/mgrove36.photos" >Photography Feed</a></li>
|
||||
<li><a href="https://instagram.com/mgrove36.photos" class="">Photography Feed</a></li>
|
||||
|
||||
|
||||
|
||||
|
||||
<li><a href="https://youngreporter.mgrove.uk" >Reading School BBC Young Reporter</a></li>
|
||||
<li><a href="https://youngreporter.mgrove.uk" class="">Reading School BBC Young Reporter</a></li>
|
||||
|
||||
|
||||
|
||||
|
||||
<li><a href="/site-theme/" >Site Theme</a></li>
|
||||
<li><a href="/site-theme/" class="">Site Theme</a></li>
|
||||
|
||||
|
||||
|
||||
|
||||
<li><a href="https://traqua.ml" >Traqua</a></li>
|
||||
<li><a href="https://traqua.ml" class="">Traqua</a></li>
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
@@ -56,7 +56,7 @@
|
||||
<!-- Nav -->
|
||||
<nav id="menu">
|
||||
<ul class="links">
|
||||
<li><a href="/" >Home</a></li>
|
||||
<li><a href="/" class="">Home</a></li>
|
||||
|
||||
|
||||
|
||||
@@ -65,22 +65,22 @@
|
||||
|
||||
|
||||
|
||||
<li><a href="/young-reporter/" >BBC Young Reporter Article Generator</a></li>
|
||||
<li><a href="/young-reporter/" class="">BBC Young Reporter Article Generator</a></li>
|
||||
|
||||
|
||||
|
||||
|
||||
<li><a href="https://blackthunder.gq" >Black Thunder</a></li>
|
||||
<li><a href="https://blackthunder.gq" class="">Black Thunder</a></li>
|
||||
|
||||
|
||||
|
||||
|
||||
<li><a href="https://blog.mgrove.uk" >Blog</a></li>
|
||||
<li><a href="https://blog.mgrove.uk" class="">Blog</a></li>
|
||||
|
||||
|
||||
|
||||
|
||||
<li><a href="/comsci/" >Computer Science</a></li>
|
||||
<li><a href="/comsci/" class="">Computer Science</a></li>
|
||||
|
||||
|
||||
|
||||
@@ -88,33 +88,32 @@
|
||||
|
||||
|
||||
|
||||
<li><a href="https://instagram.com/morganandmeganbichons" >Dogs</a></li>
|
||||
<li><a href="https://instagram.com/morganandmeganbichons" class="">Dogs</a></li>
|
||||
|
||||
|
||||
|
||||
|
||||
<li><a href="/luhn-algorithm/" >Luhn Algorithm</a></li>
|
||||
<li><a href="/luhn-algorithm/" class="">Luhn Algorithm</a></li>
|
||||
|
||||
|
||||
|
||||
|
||||
<li><a href="https://instagram.com/mgrove36.photos" >Photography Feed</a></li>
|
||||
<li><a href="https://instagram.com/mgrove36.photos" class="">Photography Feed</a></li>
|
||||
|
||||
|
||||
|
||||
|
||||
<li><a href="https://youngreporter.mgrove.uk" >Reading School BBC Young Reporter</a></li>
|
||||
<li><a href="https://youngreporter.mgrove.uk" class="">Reading School BBC Young Reporter</a></li>
|
||||
|
||||
|
||||
|
||||
|
||||
<li><a href="/site-theme/" class="current-page-link"
|
||||
>Site Theme</a></li>
|
||||
<li><a href="/site-theme/" class="current-page-link">Site Theme</a></li>
|
||||
|
||||
|
||||
|
||||
|
||||
<li><a href="https://traqua.ml" >Traqua</a></li>
|
||||
<li><a href="https://traqua.ml" class="">Traqua</a></li>
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
@@ -56,7 +56,7 @@
|
||||
<!-- Nav -->
|
||||
<nav id="menu">
|
||||
<ul class="links">
|
||||
<li><a href="/" >Home</a></li>
|
||||
<li><a href="/" class="">Home</a></li>
|
||||
|
||||
|
||||
|
||||
@@ -65,23 +65,22 @@
|
||||
|
||||
|
||||
|
||||
<li><a href="/young-reporter/" class="current-page-link"
|
||||
>BBC Young Reporter Article Generator</a></li>
|
||||
<li><a href="/young-reporter/" class="current-page-link">BBC Young Reporter Article Generator</a></li>
|
||||
|
||||
|
||||
|
||||
|
||||
<li><a href="https://blackthunder.gq" >Black Thunder</a></li>
|
||||
<li><a href="https://blackthunder.gq" class="">Black Thunder</a></li>
|
||||
|
||||
|
||||
|
||||
|
||||
<li><a href="https://blog.mgrove.uk" >Blog</a></li>
|
||||
<li><a href="https://blog.mgrove.uk" class="">Blog</a></li>
|
||||
|
||||
|
||||
|
||||
|
||||
<li><a href="/comsci/" >Computer Science</a></li>
|
||||
<li><a href="/comsci/" class="">Computer Science</a></li>
|
||||
|
||||
|
||||
|
||||
@@ -89,32 +88,32 @@
|
||||
|
||||
|
||||
|
||||
<li><a href="https://instagram.com/morganandmeganbichons" >Dogs</a></li>
|
||||
<li><a href="https://instagram.com/morganandmeganbichons" class="">Dogs</a></li>
|
||||
|
||||
|
||||
|
||||
|
||||
<li><a href="/luhn-algorithm/" >Luhn Algorithm</a></li>
|
||||
<li><a href="/luhn-algorithm/" class="">Luhn Algorithm</a></li>
|
||||
|
||||
|
||||
|
||||
|
||||
<li><a href="https://instagram.com/mgrove36.photos" >Photography Feed</a></li>
|
||||
<li><a href="https://instagram.com/mgrove36.photos" class="">Photography Feed</a></li>
|
||||
|
||||
|
||||
|
||||
|
||||
<li><a href="https://youngreporter.mgrove.uk" >Reading School BBC Young Reporter</a></li>
|
||||
<li><a href="https://youngreporter.mgrove.uk" class="">Reading School BBC Young Reporter</a></li>
|
||||
|
||||
|
||||
|
||||
|
||||
<li><a href="/site-theme/" >Site Theme</a></li>
|
||||
<li><a href="/site-theme/" class="">Site Theme</a></li>
|
||||
|
||||
|
||||
|
||||
|
||||
<li><a href="https://traqua.ml" >Traqua</a></li>
|
||||
<li><a href="https://traqua.ml" class="">Traqua</a></li>
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
Reference in New Issue
Block a user