Skip to content

Commit

Permalink
♻️ refactor: improve spacing and indentation
Browse files Browse the repository at this point in the history
  • Loading branch information
welpo committed Mar 5, 2023
1 parent 4b18391 commit dceceff
Show file tree
Hide file tree
Showing 11 changed files with 35 additions and 16 deletions.
2 changes: 2 additions & 0 deletions templates/404.html
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
{% extends "page.html" %}

{% block main_content %}

<main class="centered-header">
{{ macros_page_header::page_header(title="404")}}
<span>not found</span>
</main>

{% endblock main_content %}
5 changes: 4 additions & 1 deletion templates/archive.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
{% extends "base.html" %} {% block main_content %}
{% extends "base.html" %}

{% block main_content %}

{{ macros_page_header::page_header(title=section.title) }}

Expand Down Expand Up @@ -27,4 +29,5 @@ <h2 class="listing-title">{{ year }}</h2>
</li>
</ul>
</div>

{% endblock main_content %}
2 changes: 2 additions & 0 deletions templates/macros/cards_posts.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{% macro cards_posts(pages) %}

<div class="cards">
{%- for page in pages %}
<div class="card">
Expand Down Expand Up @@ -38,4 +39,5 @@ <h1 class="card-title">

{% endfor -%}
</div>

{% endmacro cards_posts %}
2 changes: 2 additions & 0 deletions templates/macros/content.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{% macro content(page) %}

{% set separator = config.extra.separator | default(value="•") %}

<main>
Expand Down Expand Up @@ -81,4 +82,5 @@ <h3>Table of Contents</h3>

</article>
</main>

{% endmacro content %}
2 changes: 2 additions & 0 deletions templates/macros/page_desc.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{% macro page_desc(desc, page) %}

<div id="banner-container-home">
<div id="home-banner-text">
<div class="home-banner-header">{{ desc.title }}</div>
Expand All @@ -10,4 +11,5 @@
<img alt="the owner" class="banner-home-img" src={{ desc.img | replace(from="$BASE_URL", to=config.base_url) | safe}} />
</div>
</div>

{% endmacro %}
2 changes: 2 additions & 0 deletions templates/macros/page_header.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
{% macro page_header(title) %}

<div class="title-container section-title bottom-divider">
{{ title }}
</div>

{% endmacro page_header %}
2 changes: 2 additions & 0 deletions templates/macros/paginate.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{% macro paginate() %}

{% if paginator %}
<ul class="pagination">
{% if paginator.previous %}
Expand Down Expand Up @@ -26,4 +27,5 @@
{% endif %}
</ul>
{% endif %}

{% endmacro paginate %}
2 changes: 2 additions & 0 deletions templates/page.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
{% extends "base.html" %}

{% block main_content %}

{{ macros_content::content(page=page)}}

{% endblock main_content %}
18 changes: 9 additions & 9 deletions templates/partials/footer.html
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
<footer>
<section>
<nav class="socials nav-navs">
{%- if config.extra.socials %}
{% for social in config.extra.socials %}
<a rel="noopener noreferrer" target="_blank" class="nav-links no-hover-padding social" href={{ social.url | safe | replace(from="$BASE_URL", to=config.base_url) }}>
<img alt={{ social.name }} title={{ social.name }} src="{{config.base_url}}/social_icons/{{ social.icon }}.svg">
</a>
{% endfor %}
{% endif %}
</nav>
<nav class="socials nav-navs">
{%- if config.extra.socials %}
{% for social in config.extra.socials %}
<a rel="noopener noreferrer" target="_blank" class="nav-links no-hover-padding social" href={{ social.url | safe | replace(from="$BASE_URL", to=config.base_url) }}>
<img alt={{ social.name }} title={{ social.name }} src="{{config.base_url}}/social_icons/{{ social.icon }}.svg">
</a>
{% endfor %}
{% endif %}
</nav>
</section>
<script src="{{ get_url(path='js/main.js', trailing_slash=false) | safe }}"/></script>
</footer>
12 changes: 6 additions & 6 deletions templates/partials/header.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

{# Favicon #}
{% if config.extra.favicon %}
<link rel="icon" type="image/png" href={{ config.extra.favicon }} />
<link rel="icon" type="image/png" href={{ config.extra.favicon }} />
{% endif %}

{# RSS #}
Expand All @@ -17,16 +17,16 @@
<link rel="stylesheet" type="text/css" media="screen" href={{ get_url(path="main.css" ) }} />

{% if config.extra.stylesheets %}
{% for stylesheet in config.extra.stylesheets %}
<link rel="stylesheet" href="{{ get_url(path=stylesheet) }}">
{% endfor %}
{% for stylesheet in config.extra.stylesheets %}
<link rel="stylesheet" href="{{ get_url(path=stylesheet) }}">
{% endfor %}
{% endif %}

<meta name="description" content="{{ config.description }}">
{% if is_404 %}
<meta name="robots" content="noindex, follow">
<meta name="robots" content="noindex, follow">
{% else %}
<meta name="robots" content="index, nofollow">
<meta name="robots" content="index, nofollow">
{% endif %}

<meta property="og:title" content="{{ config.title }}">
Expand Down
2 changes: 2 additions & 0 deletions templates/section.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{% extends "base.html" %}

{% block main_content %}

{% if section.extra.section_path -%}
{% set extra_section = get_section(path=section.extra.section_path) %}
{% endif -%}
Expand All @@ -27,4 +28,5 @@
{% if paginator %}
{{ macros_paginate::paginate() }}
{% endif %}

{% endblock main_content %}

0 comments on commit dceceff

Please sign in to comment.