Skip to content

Commit

Permalink
Minor raw html tidying
Browse files Browse the repository at this point in the history
  • Loading branch information
JakeSteam committed Dec 1, 2024
1 parent 8424ebf commit cf5e582
Show file tree
Hide file tree
Showing 6 changed files with 45 additions and 62 deletions.
50 changes: 19 additions & 31 deletions _includes/custom/paginator.html
Original file line number Diff line number Diff line change
Expand Up @@ -35,16 +35,16 @@

{% if total_pages > 1 %}
<div class="pagination justify-content-center">
<!-- Previous Page. -->
{% if paginator.previous_page %}
{% if paginator.previous_page -%}
<!-- Previous Page. -->
<span class="page-item blog_previous">
<a class="page-link"
href="{{ paginator.previous_page_path }}"
rel="prev">&laquo; Previous</a>
</span>
{% endif %}
{%- endif -%}

{% if total_pages > link_max %}
{%- if total_pages > link_max -%}
<!-- First Page. -->
{% if lower_offset > 1 %}
<span class="page-item first">
Expand All @@ -59,59 +59,47 @@
<span class="page-link">...</span>
</span>
{% endif %}
{% endif %}
{%- endif -%}

<!-- Page numbers. -->
{% for page in (1..total_pages) %}

{%- for page in (1..total_pages) -%}
{% capture spaceless %}
{% assign page_current_flag = false %}

{% if total_pages > link_max %}

{% if page_current <= limit_lower %}
{% if page <= min_lower %}
{% assign page_current_flag = true %}
{% endif %}

{% elsif page_current >= limit_upper %}
{% if page > max_upper %}
{% assign page_current_flag = true %}
{% endif %}

{% else %}

{% if (page >= lower_offset) and (page <= upper_offset) %}
{% assign page_current_flag = true %}
{% endif %}

{% endif %}

{% else %}

{% assign page_current_flag = true %}
{% endif %}
{% endcapture %}

<!-- Show Pager. -->
{% if page_current_flag == true %}
<span class="page-item {% if page == page_current %} active{% endif %}">
{% if page == page_current %}

{% if page_current_flag == true -%}
<span class="page-item {% if page == page_current %}active{% endif %}">
{%- if page == page_current %}
<span class="page-link">
{{ page }}
</span>
{% elsif page == 1 %}
<a class="page-link"
href="/"
>1</a>
{% else %}
<a class="page-link"
href="{{ site.paginate_path | relative_url | replace: ':num', page }}"
>{{ page }}</a>
{% endif %}
{%- elsif page == 1 %}
<a class="page-link" href="/">1</a>
{%- else %}
<a class="page-link" href="{{ site.paginate_path | relative_url | replace: ':num', page }}">
{{ page }}
</a>
{%- endif %}
</span>
{% endif %}
{% endfor %}
{%- endif -%}
{%- endfor -%}

{% if total_pages > link_max %}
<!-- Late (More Pages) Indicator. -->
Expand Down
20 changes: 10 additions & 10 deletions _includes/custom/webp.html
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
{% assign path = include.path %}
{% assign alt = include.alt | default: "article" %}
{%- assign path = include.path -%}
{%- assign alt = include.alt | default: "article" -%}

{% assign image_parts = path | split: '.' %}
{% assign extension_length = image_parts | last | size | plus: 1 %}
{% assign base_path_length = path | size | minus: extension_length %}
{% assign base_path = path | slice: 0, base_path_length %}
{%- assign image_parts = path | split: '.' -%}
{%- assign extension_length = image_parts | last | size | plus: 1 -%}
{%- assign base_path_length = path | size | minus: extension_length -%}
{%- assign base_path = path | slice: 0, base_path_length -%}

{% assign webp_path = base_path | append: '.webp' %}
{% assign webp_exists = site.static_files | where: "path", webp_path | first %}
{%- assign webp_path = base_path | append: '.webp' -%}
{%- assign webp_exists = site.static_files | where: "path", webp_path | first -%}

<picture class="bg-img">
{% if webp_exists %}
<source type="image/webp" srcset="{{ webp_path }}" >
<source type="image/webp" srcset="{{ webp_path }}">
{% endif %}
<img src="{{ path }}" alt="Preview image of {{ alt | escape }}" />
<img src="{{ path }}" alt="Preview image of {{ alt | escape }}">
</picture>
1 change: 0 additions & 1 deletion _includes/footer.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<footer class="site-footer h-card">
<data class="u-url" href="{{ "/" | relative_url }}"></data>

<div class="wrapper">
<h2 class="footer-heading">{{ site.title }}</h2>
Expand Down
33 changes: 15 additions & 18 deletions _includes/head.html
Original file line number Diff line number Diff line change
@@ -1,46 +1,43 @@
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
{%- seo -%}
{%- if page.last_modified_at -%}
<meta property="article:modified_time" content="{{ page.last_modified_at | date_to_xmlschema }}" />
<meta property="article:modified_time" content="{{ page.last_modified_at | date_to_xmlschema }}">
{%- endif -%}

{% if site.theme_version %}
<link rel="stylesheet" href="/assets/css/style.css?v={{ site.theme_version }}" />
<link rel="stylesheet" href="/assets/css/style.css?v={{ site.theme_version }}">
{% else %}
{% assign current_year = "now" | date: "%Y" %}
{% assign current_week = "now" | date: "%V" %}
{% assign year_week_string = current_year | append: "-" | append: current_week %}
<link rel="stylesheet" href="/assets/css/style.css?v={{ site.remote_theme | split: '@' | last | replace: 'JakeSteam/minimaJake', year_week_string}}" />
<link rel="stylesheet" href="/assets/css/style.css?v={{ site.remote_theme | split: '@' | last | replace: 'JakeSteam/minimaJake', year_week_string}}">
{% endif %}
<link
rel="apple-touch-icon"
sizes="180x180"
href="/assets/images/icon/apple-touch-icon.png"
/>
>
<link
rel="icon"
type="image/png"
sizes="32x32"
href="/assets/images/icon/favicon-32x32.png"
/>
>
<link
rel="icon"
type="image/png"
sizes="16x16"
href="/assets/images/icon/favicon-16x16.png"
/>
<link rel="manifest" href="/assets/images/icon/site.webmanifest" />
<link rel="shortcut icon" href="/assets/images/icon/favicon.ico" />
<meta name="msapplication-TileColor" content="#da532c" />
<meta
name="msapplication-config"
content="/assets/images/icon/browserconfig.xml"
/>
<meta name="theme-color" content="#ffffff" />
<link rel="manifest" href="/assets/images/icon/site.webmanifest" />
>
<link rel="manifest" href="/assets/images/icon/site.webmanifest">
<link rel="shortcut icon" href="/assets/images/icon/favicon.ico">
<meta name="msapplication-TileColor" content="#da532c">
<meta name="msapplication-config" content="/assets/images/icon/browserconfig.xml">
<meta name="theme-color" content="#ffffff">
<link rel="manifest" href="/assets/images/icon/site.webmanifest">
{%- feed_meta -%} {%- if jekyll.environment == 'production' and
site.google_analytics -%} {%- include google-analytics.html -%} {%- endif -%}
{% if site.open_external_links_in_new_tab != false %}
Expand Down
2 changes: 1 addition & 1 deletion _includes/header.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

{%- if titles_size > 0 -%}
<nav class="site-nav">
<input type="checkbox" id="nav-trigger" class="nav-trigger" />
<input type="checkbox" id="nav-trigger" class="nav-trigger">
<label for="nav-trigger">
<span class="menu-icon">
<svg viewBox="0 0 18 15" width="18px" height="15px">
Expand Down
1 change: 0 additions & 1 deletion _layouts/post.html
Original file line number Diff line number Diff line change
Expand Up @@ -69,5 +69,4 @@ <h1 class="post-title p-name" itemprop="name headline">{{ page.title | escape }}
</script>
{% endif %}

<a class="u-url" href="{{ page.url | relative_url }}" hidden></a>
</article>

0 comments on commit cf5e582

Please sign in to comment.