aboutsummaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
authorJieiku2023-05-24 12:18:57 -0700
committerJieiku2023-05-24 12:18:57 -0700
commitb978e20c61e43e54972b4b287268de685a56f650 (patch)
treee47ef6d18ed048a2b0e831f13ed4f54cab275964 /templates
parentd86932ad935e5e50de05c4c7125a5930b1862c1d (diff)
downloadabridge-b978e20c61e43e54972b4b287268de685a56f650.tar.gz
abridge-b978e20c61e43e54972b4b287268de685a56f650.tar.bz2
abridge-b978e20c61e43e54972b4b287268de685a56f650.zip
SCSS Optimizations
Diffstat (limited to 'templates')
-rw-r--r--templates/base.html26
-rw-r--r--templates/macros/macros.html42
-rw-r--r--templates/macros/social.html50
3 files changed, 52 insertions, 66 deletions
diff --git a/templates/base.html b/templates/base.html
index 31db9bf..ebbd505 100644
--- a/templates/base.html
+++ b/templates/base.html
@@ -52,23 +52,18 @@
{%- endif -%}
</div>
<div>
- <ul>
{%- set js_switcher=config.extra.js_switcher | default(value=true) -%}
{%- if config.extra.menu or js_switcher %}
{%- if config.extra.menu %}
{%- for i in config.extra.menu -%}
- <li> <h2><a href="{{ get_url(path=i.url, lang=lang, trailing_slash=i.slash) }}{%- if i.slash and config.extra.uglyurls %}index.html{%- endif %}"{% if i.blank %} target="_blank"{% endif %}>
- {%- if lang != config.default_language -%}
- {{ trans(key=i.name | safe, lang=lang) }}
- {%- else -%}
- {{ i.name | safe }}
- {%- endif -%}
- </a></h2> </li>
+ <a href="{{ get_url(path=i.url, lang=lang, trailing_slash=i.slash) }}{%- if i.slash and config.extra.uglyurls %}index.html{%- endif %}"{% if i.blank %} target="_blank"{% endif %}>
+ {%- if lang != config.default_language %} {{ trans(key=i.name | safe, lang=lang) }} {% else %} {{ i.name | safe }} {% endif -%}
+ </a>
{%- endfor -%}
{%- endif -%}
{%- if js_switcher -%}
{%- set icon_adjust=config.extra.icon_adjust | default(value="svgs adjust") -%}
- <li class="js">{%- if icon_adjust -%}<i type="reset" id="mode" class="{{ icon_adjust }}"></i>{%- else -%}<i type="reset" id="mode" class="mode">&#9728;</i>{%- endif -%}</li>
+ {%- if icon_adjust -%}<i type="reset" id="mode" class="js {{ icon_adjust }}"></i>{%- else -%}<i type="reset" id="mode" class="js mode">&#9728;</i>{%- endif -%}
{%- endif -%}
{%- endif -%}
{%- set language_count = 1 -%}
@@ -76,7 +71,7 @@
{%- set_global language_count = language_count + 1 -%}
{%- endfor -%}
{%- if language_count > 1 %}
- <li class="js"><div class="dropdown" type="Button"> {%- if lang != config.default_language %}{{ trans(key="flag" | safe, lang=lang) }}{% else %}{{ config.extra.flag.en }}{% endif %}
+ <div class="dropdown" type="Button"> {%- if lang != config.default_language %}{{ trans(key="flag" | safe, lang=lang) }}{% else %}{{ config.extra.flag.en }}{% endif %}
{%- if current_url %}
<div class="dropdown-content">
{%- for lcode,flag in config.extra.flag -%}
@@ -90,9 +85,8 @@
{%- endfor -%}
</div>
{%- endif %}
- </div></li>
+ </div>
{%- endif -%}
- </ul>
</div>
{%- if config.build_search_index %}
{%- set icon_search=config.extra.icon_search | default(value="svgs search") %}
@@ -100,7 +94,7 @@
<form autocomplete=off class="js" name="goSearch" id="searchbox">
<div class="searchd">
<input id="searchinput" type="text" placeholder="{%- if lang != config.default_language %}{{ trans(key="Search" | safe, lang=lang) }}{% else %}Search{% endif %}" title="Search"{% if config.extra.search_library %}{% if config.extra.search_library == "stork" %} data-stork="stork" {% endif %}{% endif %} />
- <button type="submit" title="Search">{%- if icon_search -%}<i class="{{ icon_search }}"></i>{%- else -%}<span class="si">&#8981;</span>{%- endif -%}</button>
+ <button type="submit" title="Search" class="{%- if icon_search -%}{{ icon_search }}{%- else -%}si{%- endif -%}">{%- if not icon_search -%}&#8981;{%- endif -%}</button>
</div>
<div><div id="suggestions"{% if config.extra.search_library %}{% if config.extra.search_library == "stork" %} data-stork="stork-output" {% endif %}{% endif %}></div></div>
</form>
@@ -137,16 +131,14 @@
{#- Copyright END #}
{%- if config.extra.menu_footer %}
<nav>
- <ul>
{%- for i in config.extra.menu_footer -%}
{%- if i.url != "sitemap.xml" %}
{%- set furl=get_url(path=i.url, lang=lang, trailing_slash=i.slash) %}
{%- else %}
{%- set furl=get_url(path=i.url, trailing_slash=i.slash) %}
{%- endif %}
- <li{%- if config.extra.footer_size %} class="{{ config.extra.footer_size }}"{% endif %}> <a href="{{ furl }}{%- if i.slash and config.extra.uglyurls %}index.html{%- endif %}"{% if i.blank %} target="_blank"{% endif %}> {% if lang != config.default_language -%} {{ trans(key=i.name | safe, lang=lang) }} {%- else -%} {{ i.name | safe }} {% endif %} </a> </li>
- {%- endfor -%}
- </ul>
+ <a{%- if config.extra.footer_size %} class="{{ config.extra.footer_size }}"{% endif %} href="{{ furl | safe }}{%- if i.slash and config.extra.uglyurls %}index.html{%- endif %}"{% if i.blank %} target="_blank"{% endif %}> {% if lang != config.default_language -%} {{ trans(key=i.name | safe, lang=lang) }} {%- else -%} {{ i.name | safe }} {% endif %} </a>
+ {%- endfor %}
</nav>
{%- endif %}
{%- if config.extra.footer_credit | default(value=true) %}
diff --git a/templates/macros/macros.html b/templates/macros/macros.html
index e909b06..34ab651 100644
--- a/templates/macros/macros.html
+++ b/templates/macros/macros.html
@@ -157,79 +157,75 @@
{%- endif %}
{%- endif %}
<nav>
- <ul>
{%- set icon_first=config.extra.icon_first | default(value="svgs svgh angll") -%}
{%- set icon_prev=config.extra.icon_prev | default(value="svgs svgh angl") -%}
{%- set icon_next=config.extra.icon_next | default(value="svgs svgh angr") -%}
{%- set icon_last=config.extra.icon_last | default(value="svgs svgh angrr") -%}
{%- if paginator.previous -%}
- <li><a class="on outp" href="{{ paginator.first | safe }}{%- if config.extra.uglyurls %}index.html{%- endif %}" title="First Page">
+ <a class="on outp" href="{{ paginator.first | safe }}{%- if config.extra.uglyurls %}index.html{%- endif %}" title="First Page">
{%- if icon_first -%}<i class="{{ icon_first }}" alt="First Page"></i>
{%- else -%}&#10096;
{%- endif -%}
- </a></li>
+ </a>
{%- else -%}
- <li><span class="off outp">
+ <span class="off outp">
{%- if icon_first -%}<i class="{{ icon_first }}" alt="First Page"></i>
{%- else -%}&#10096;
{%- endif -%}
- </span></li>
+ </span>
{%- endif -%}
{%- if paginator.previous -%}
- <li><a class="on outp" href="{{ paginator.previous | safe }}{%- if config.extra.uglyurls %}index.html{%- endif %}" title="Previous Page">
+ <a class="on outp" href="{{ paginator.previous | safe }}{%- if config.extra.uglyurls %}index.html{%- endif %}" title="Previous Page">
{%- if icon_prev -%}<i class="{{ icon_prev }}" alt="Previous Page"></i>
{%- else -%}&#10092;
{%- endif -%}
- </a></li>
+ </a>
{%- else -%}
- <li><span class="off outp">
+ <span class="off outp">
{%- if icon_prev -%}<i class="{{ icon_prev }}" alt="Previous Page"></i>
{%- else -%}&#10092;
{%- endif -%}
- </span></li>
+ </span>
{%- endif -%}
{%- for i in range(start=start, end=end+1) -%}
- <li class="inp">
{%- if i == paginator.current_index -%}
- <a class="on cnav" href="#">{{i}}</a>
+ <a class="inp on cnav" href="#">{{i}}</a>
{%- elif i > 1 -%}
- <a class="on" href="{{ paginator.base_url | safe }}{{ i ~ '/' }}{%- if config.extra.uglyurls %}index.html{%- endif %}">{{i}}</a>
+ <a class="inp on" href="{{ paginator.base_url | safe }}{{ i ~ '/' }}{%- if config.extra.uglyurls %}index.html{%- endif %}">{{i}}</a>
{%- else -%}
- <a class="on" href="{{ paginator.first | safe }}{%- if config.extra.uglyurls %}index.html{%- endif %}">{{ i }}</a>
+ <a class="inp on" href="{{ paginator.first | safe }}{%- if config.extra.uglyurls %}index.html{%- endif %}">{{ i }}</a>
{%- endif -%}
- </li>
{%- endfor -%}
{%- if paginator.next -%}
- <li><a class="on outp" href="{{ paginator.next | safe }}{%- if config.extra.uglyurls %}index.html{%- endif %}" title="Next Page">
+ <a class="on outp" href="{{ paginator.next | safe }}{%- if config.extra.uglyurls %}index.html{%- endif %}" title="Next Page">
{%- if icon_next -%}<i class="{{ icon_next }}" alt="Next Page"></i>
{%- else -%}&#10093;
{%- endif -%}
- </a></li>
+ </a>
{%- else -%}
- <li><span class="off outp">
+ <span class="off outp">
{%- if icon_next -%}<i class="{{ icon_next }}" alt="Next Page"></i>
{%- else -%}&#10093;
{%- endif -%}
- </span></li>
+ </span>
{%- endif -%}
{%- if paginator.next -%}
- <li><a class="on outp" href="{{ paginator.last | safe }}{%- if config.extra.uglyurls %}index.html{%- endif %}" title="Last Page">
+ <a class="on outp" href="{{ paginator.last | safe }}{%- if config.extra.uglyurls %}index.html{%- endif %}" title="Last Page">
{%- if icon_last -%}<i class="{{ icon_last }}" alt="Last Page"></i>
{%- else -%}&#10097;
{%- endif -%}
- </a></li>
+ </a>
{%- else -%}
- <li><span class="off outp">
+ <span class="off outp">
{%- if icon_last -%}<i class="{{ icon_last }}" alt="Last Page"></i>
{%- else -%}&#10097;
{%- endif -%}
- </span></li>
+ </span>
{%- endif -%}
- </ul>
</nav>
{%- endif %}
{%- endmacro %}
diff --git a/templates/macros/social.html b/templates/macros/social.html
index 1c4b3fd..2a0835c 100644
--- a/templates/macros/social.html
+++ b/templates/macros/social.html
@@ -1,58 +1,56 @@
{%- macro social_links(config) %}
<nav>
- <ul>
{%- if config.generate_feed -%}{%- if config.extra.feed -%}
- <li><a href="{{ get_url(path=config.feed_filename, trailing_slash=false) | safe }}" target="_blank" title="Atom/RSS Feed"><i type="Button" class="svg rss" title="Atom/RSS Feed"></i></a></li>{% endif -%}{% endif -%}
+ <a href="{{ get_url(path=config.feed_filename, trailing_slash=false) | safe }}" target="_blank" title="Atom/RSS Feed"><i type="Button" class="svg rss" title="Atom/RSS Feed"></i></a>{% endif -%}{% endif -%}
{%- if config.extra.mail -%}
{%- if config.extra.mail_encode | default(value=true) -%}
{%- set base64_email = config.extra.mail -%}
- <li class="js"><a class="m-protected" href="#{{ base64_email | base64_encode }}" target="_blank" title="Mail"><i type="Button" class="svg mail" title="Mail"></i></a></li>
+ <a class="js m-protected" href="#{{ base64_email | base64_encode }}" target="_blank" title="Mail"><i type="Button" class="svg mail" title="Mail"></i></a>
{%- else -%}
- <li><a href="mailto:{{ config.extra.mail }}" target="_blank" title="Mail"><i type="Button" class="svg mail" title="Mail"></i></a></li>
+ <a href="mailto:{{ config.extra.mail }}" target="_blank" title="Mail"><i type="Button" class="svg mail" title="Mail"></i></a>
{%- endif -%}
{% endif -%}
{%- if config.extra.mastodon -%}
- <li><a href="{{ config.extra.mastodon | safe }}" target="_blank" title="Mastodon" rel="me"><i type="Button" class="svg mastodon" title="Mastodon"></i></a></li>{% endif -%}
+ <a href="{{ config.extra.mastodon | safe }}" target="_blank" title="Mastodon" rel="me"><i type="Button" class="svg mastodon" title="Mastodon"></i></a>{% endif -%}
{%- if config.extra.element -%}
- <li><a href="https://{{ config.extra.element }}/" target="_blank" title="Element"><i type="Button" class="svg element" title="Element"></i></a></li>{% endif -%}
+ <a href="https://{{ config.extra.element }}/" target="_blank" title="Element"><i type="Button" class="svg element" title="Element"></i></a>{% endif -%}
{%- if config.extra.matrix -%}
- <li><a href="https://{{ config.extra.matrix }}/" target="_blank" title="Matrix"><i type="Button" class="svg matrix" title="Matrix"></i></a></li>{% endif -%}
+ <a href="https://{{ config.extra.matrix }}/" target="_blank" title="Matrix"><i type="Button" class="svg matrix" title="Matrix"></i></a>{% endif -%}
{%- if config.extra.twitter -%}
- <li><a href="https://twitter.com/{{ config.extra.twitter }}/" target="_blank" title="Twitter"><i type="Button" class="svg twitter" title="Twitter"></i></a></li>{% endif -%}
+ <a href="https://twitter.com/{{ config.extra.twitter }}/" target="_blank" title="Twitter"><i type="Button" class="svg twitter" title="Twitter"></i></a>{% endif -%}
{%- if config.extra.facebook -%}
- <li><a href="https://www.facebook.com/{{ config.extra.facebook }}/" target="_blank" title="Facebook"><i type="Button" class="svg facebook" title="Facebook"></i></a></li>{% endif -%}
+ <a href="https://www.facebook.com/{{ config.extra.facebook }}/" target="_blank" title="Facebook"><i type="Button" class="svg facebook" title="Facebook"></i></a>{% endif -%}
{%- if config.extra.linkedin -%}
- <li><a href="https://www.linkedin.com/in/{{ config.extra.linkedin }}/" target="_blank" title="LinkedIn"><i type="Button" class="svg linkedin" title="LinkedIn"></i></a></li>{% endif -%}
+ <a href="https://www.linkedin.com/in/{{ config.extra.linkedin }}/" target="_blank" title="LinkedIn"><i type="Button" class="svg linkedin" title="LinkedIn"></i></a>{% endif -%}
{%- if config.extra.researchgate -%}
- <li><a href="https://www.researchgate.net/profile/{{ config.extra.researchgate }}/" target="_blank" title="ResearchGate"><i type="Button" class="svg researchgate" title="ResearchGate"></i></a></li>{% endif -%}
+ <a href="https://www.researchgate.net/profile/{{ config.extra.researchgate }}/" target="_blank" title="ResearchGate"><i type="Button" class="svg researchgate" title="ResearchGate"></i></a>{% endif -%}
{%- if config.extra.codeberg -%}
- <li><a href="https://codeberg.org/{{ config.extra.codeberg }}/" target="_blank" title="Codeberg"><i type="Button" class="svg codeberg" title="Codeberg"></i></a></li>{% endif -%}
+ <a href="https://codeberg.org/{{ config.extra.codeberg }}/" target="_blank" title="Codeberg"><i type="Button" class="svg codeberg" title="Codeberg"></i></a>{% endif -%}
{%- if config.extra.gitlab -%}
- <li><a href="https://gitlab.com/{{ config.extra.gitlab }}/" target="_blank" title="Gitlab"><i type="Button" class="svg gitlab" title="Gitlab"></i></a></li>{% endif -%}
+ <a href="https://gitlab.com/{{ config.extra.gitlab }}/" target="_blank" title="Gitlab"><i type="Button" class="svg gitlab" title="Gitlab"></i></a>{% endif -%}
{%- if config.extra.github -%}
- <li><a href="https://github.com/{{ config.extra.github }}/" target="_blank" title="Github"><i type="Button" class="svg github" title="Github"></i></a></li>{% endif -%}
+ <a href="https://github.com/{{ config.extra.github }}/" target="_blank" title="Github"><i type="Button" class="svg github" title="Github"></i></a>{% endif -%}
{%- if config.extra.bitbucket -%}
- <li><a href="https://bitbucket.org/{{ config.extra.bitbucket }}/" target="_blank" title="Bitbucket"><i type="Button" class="svg bitbucket" title="Bitbucket"></i></a></li>{% endif -%}
+ <a href="https://bitbucket.org/{{ config.extra.bitbucket }}/" target="_blank" title="Bitbucket"><i type="Button" class="svg bitbucket" title="Bitbucket"></i></a>{% endif -%}
{%- if config.extra.python -%}
- <li><a href="https://pypi.org/user/{{ config.extra.python }}/" target="_blank" title="Python"><i type="Button" class="svg python" title="Python"></i></a></li>{% endif -%}
+ <a href="https://pypi.org/user/{{ config.extra.python }}/" target="_blank" title="Python"><i type="Button" class="svg python" title="Python"></i></a>{% endif -%}
{%- if config.extra.docker -%}
- <li><a href="https://hub.docker.com/u/{{ config.extra.docker }}/" target="_blank" title="Docker"><i type="Button" class="svg docker" title="Docker"></i></a></li>{% endif -%}
+ <a href="https://hub.docker.com/u/{{ config.extra.docker }}/" target="_blank" title="Docker"><i type="Button" class="svg docker" title="Docker"></i></a>{% endif -%}
{%- if config.extra.stack -%}
- <li><a href="https://stackoverflow.com/users/{{ config.extra.stack }}/" target="_blank" title="Stack"><i type="Button" class="svg stack" title="Stack"></i></a></li>{% endif -%}
+ <a href="https://stackoverflow.com/users/{{ config.extra.stack }}/" target="_blank" title="Stack"><i type="Button" class="svg stack" title="Stack"></i></a>{% endif -%}
{%- if config.extra.instagram -%}
- <li><a href="https://www.instagram.com/{{ config.extra.instagram }}/" target="_blank" title="Instagram"><i type="Button" class="svg instagram" title="Instagram"></i></a></li>{% endif -%}
+ <a href="https://www.instagram.com/{{ config.extra.instagram }}/" target="_blank" title="Instagram"><i type="Button" class="svg instagram" title="Instagram"></i></a>{% endif -%}
{%- if config.extra.pinterest -%}
- <li><a href="https://www.pinterest.com/{{ config.extra.pinterest }}/" target="_blank" title="Pinterest"><i type="Button" class="svg pinterest" title="Pinterest"></i></a></li>{% endif -%}
+ <a href="https://www.pinterest.com/{{ config.extra.pinterest }}/" target="_blank" title="Pinterest"><i type="Button" class="svg pinterest" title="Pinterest"></i></a>{% endif -%}
{%- if config.extra.twitch -%}
- <li><a href="https://www.twitch.tv/{{ config.extra.twitch }}/" target="_blank" title="Twitch"><i type="Button" class="svg twitch" title="Twitch"></i></a></li>{% endif -%}
+ <a href="https://www.twitch.tv/{{ config.extra.twitch }}/" target="_blank" title="Twitch"><i type="Button" class="svg twitch" title="Twitch"></i></a>{% endif -%}
{%- if config.extra.discord -%}
- <li><a href="https://discord.com/{{ config.extra.discord }}/" target="_blank" title="Discord"><i type="Button" class="svg discord" title="Discord"></i></a></li>{% endif -%}
+ <a href="https://discord.com/{{ config.extra.discord }}/" target="_blank" title="Discord"><i type="Button" class="svg discord" title="Discord"></i></a>{% endif -%}
{%- if config.extra.youtube -%}
- <li><a href="https://www.youtube.com/{{ config.extra.youtube }}" target="_blank" title="YouTube"><i type="Button" class="svg youtube" title="YouTube"></i></a></li>{% endif -%}
+ <a href="https://www.youtube.com/{{ config.extra.youtube }}" target="_blank" title="YouTube"><i type="Button" class="svg youtube" title="YouTube"></i></a>{% endif -%}
{%- if config.extra.buymeacoffee -%}
- <li><a href="https://www.buymeacoffee.com/{{ config.extra.buymeacoffee }}/" target="_blank" title="Buy Me A Coffee"><i type="Button" class="svg buymeacoffee" title="Buy Me A Coffee"></i></a></li>{% endif -%}
+ <a href="https://www.buymeacoffee.com/{{ config.extra.buymeacoffee }}/" target="_blank" title="Buy Me A Coffee"><i type="Button" class="svg buymeacoffee" title="Buy Me A Coffee"></i></a>{% endif -%}
{%- if config.extra.github_sponsor -%}
- <li><a href="https://github.com/sponsors/{{ config.extra.github_sponsor }}/" target="_blank" title="GitHub Sponsor"><i type="Button" class="svg github-sponsor" title="GitHub Sponsor"></i></a></li>{% endif -%}
- </ul>
+ <a href="https://github.com/sponsors/{{ config.extra.github_sponsor }}/" target="_blank" title="GitHub Sponsor"><i type="Button" class="svg github-sponsor" title="GitHub Sponsor"></i></a>{% endif -%}
</nav>
{%- endmacro %}