aboutsummaryrefslogtreecommitdiff
path: root/templates/macros
diff options
context:
space:
mode:
authorJieiku2022-05-31 02:54:13 -0700
committerJieiku2022-05-31 02:54:13 -0700
commit0c213684ead5d3c4a14a17d2e06a6a31188b6a55 (patch)
treee29fd8d7b1f6d54d680440a50cc41bd8762b2dd3 /templates/macros
parent64a9b12ea4262ed8bb49367902af5ec803f13444 (diff)
downloadabridge-0c213684ead5d3c4a14a17d2e06a6a31188b6a55.tar.gz
abridge-0c213684ead5d3c4a14a17d2e06a6a31188b6a55.tar.bz2
abridge-0c213684ead5d3c4a14a17d2e06a6a31188b6a55.zip
Add UglyUrls for Local Build, Restructure SCSS
Diffstat (limited to 'templates/macros')
-rw-r--r--templates/macros/macros.html20
-rw-r--r--templates/macros/page.html2
2 files changed, 11 insertions, 11 deletions
diff --git a/templates/macros/macros.html b/templates/macros/macros.html
index 16a4e12..8003420 100644
--- a/templates/macros/macros.html
+++ b/templates/macros/macros.html
@@ -1,16 +1,16 @@
{%- macro title(page) %}
- <h1><a href="{{ page.permalink | safe }}">{{ page.title }}</a></h1>
+ <h1><a href="{{ page.permalink | safe }}{%- if config.extra.uglyurls %}index.html{%- endif %}">{{ page.title }}</a></h1>
<span>{{ page.date | date(format="%B %d, %Y") }}
{%- if page.taxonomies.authors and config.taxonomies %} by
{%- for author in page.taxonomies.authors %}
{%- if author_flag %} and {% endif %}
- <a href="{{ get_taxonomy_url(kind='authors', name=author) | safe }}">{{ author }}</a>
+ <a href="{{ get_taxonomy_url(kind='authors', name=author) | safe }}{%- if config.extra.uglyurls %}index.html{%- endif %}">{{ author }}</a>
{%- set_global author_flag = true %}
{%- endfor %}
{%- elif config.extra.author and config.extra.author_show %} by {{ config.extra.author }}
{%- endif %}
-{%- if page.taxonomies.categories %} [{% for cat in page.taxonomies.categories %}<a href="{{ get_taxonomy_url(kind="categories", name=cat) | safe }}">{{ cat }}</a>{% endfor %}]{% endif %}
-{%- if page.taxonomies.tags %} {%- for tag in page.taxonomies.tags %} #<a href="{{ get_taxonomy_url(kind="tags", name=tag) | safe }}">{{ tag }}</a> {% endfor -%}{%- endif %}
+{%- if page.taxonomies.categories %} [{% for cat in page.taxonomies.categories %}<a href="{{ get_taxonomy_url(kind='categories', name=cat) | safe }}{%- if config.extra.uglyurls %}index.html{%- endif %}">{{ cat }}</a>{% endfor %}]{% endif %}
+{%- if page.taxonomies.tags %} {%- for tag in page.taxonomies.tags %} #<a href="{{ get_taxonomy_url(kind='tags', name=tag) | safe }}{%- if config.extra.uglyurls %}index.html{%- endif %}">{{ tag }}</a> {% endfor -%}{%- endif %}
{%- if config.extra.readtime %} - {{ page.reading_time }} {{ config.extra.readtime_string | default(value="min") }} {% endif %}</span>
{%- endmacro title %}
@@ -51,21 +51,21 @@
{%- endif %}
<nav>
<ul>
- {% if paginator.previous %}<li><a href="{{ paginator.first | safe }}">&#124; &#60;</a></li>{% else %}<li><span class="off">&#124; &#60;</span></li>{% endif %}
- {% if paginator.previous %}<li><a href="{{ paginator.previous | safe }}">&#60;</a></li>{% else %}<li><span class="off">&#60;</span></li>{% endif %}
+ {% if paginator.previous %}<li><a href="{{ paginator.first | safe }}{%- if config.extra.uglyurls %}index.html{%- endif %}">&#124; &#60;</a></li>{% else %}<li><span class="off">&#124; &#60;</span></li>{% endif %}
+ {% if paginator.previous %}<li><a href="{{ paginator.previous | safe }}{%- if config.extra.uglyurls %}index.html{%- endif %}">&#60;</a></li>{% else %}<li><span class="off">&#60;</span></li>{% endif %}
{%- for i in range(start=start, end=end+1) %}
<li>
{%- if i == paginator.current_index -%}
<a class="cnav" href="#">{{i}}</a>
{%- elif i > 1 -%}
- <a href="{{ paginator.base_url | safe }}{{ i ~ '/' }}">{{i}}</a>
+ <a href="{{ paginator.base_url | safe }}{{ i ~ '/' }}{%- if config.extra.uglyurls %}index.html{%- endif %}">{{i}}</a>
{%- else -%}
- <a href="{{ paginator.first | safe }}">{{ i }}</a>
+ <a href="{{ paginator.first | safe }}{%- if config.extra.uglyurls %}index.html{%- endif %}">{{ i }}</a>
{%- endif -%}
</li>
{%- endfor %}
- {% if paginator.next %}<li><a href="{{ paginator.next | safe }}">&#62;</a></li>{% else %}<li><span class="off">&#62;</span></li>{% endif %}
- {% if paginator.next %}<li><a href="{{ paginator.last | safe }}">&#62; &#124;</a></li>{% else %}<li><span class="off">&#62; &#124;</span></li>{% endif %}
+ {% if paginator.next %}<li><a href="{{ paginator.next | safe }}{%- if config.extra.uglyurls %}index.html{%- endif %}">&#62;</a></li>{% else %}<li><span class="off">&#62;</span></li>{% endif %}
+ {% if paginator.next %}<li><a href="{{ paginator.last | safe }}{%- if config.extra.uglyurls %}index.html{%- endif %}">&#62; &#124;</a></li>{% else %}<li><span class="off">&#62; &#124;</span></li>{% endif %}
</ul>
</nav>
{%- endif %}
diff --git a/templates/macros/page.html b/templates/macros/page.html
index d5ef918..9c5b156 100644
--- a/templates/macros/page.html
+++ b/templates/macros/page.html
@@ -1,5 +1,5 @@
{%- macro page_listing(page) %}
<div class="toc-item">
- <a href="{{ page.permalink | safe}}" title="{{ page.title }}">{{ page.title }}</a>
+ <a href="{{ page.permalink | safe}}{%- if config.extra.uglyurls %}index.html{%- endif %}" title="{{ page.title }}">{{ page.title }}</a>
</div>
{%- endmacro page_listing %}