Skip to content

Commit

Permalink
Format templates
Browse files Browse the repository at this point in the history
  • Loading branch information
Siecje committed Feb 4, 2024
1 parent e6b6a7e commit ae16673
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 15 deletions.
2 changes: 1 addition & 1 deletion htmd/example_site/pages/about.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<meta property="og:description" content="This is the about page.">
{# static/about.png is an example and does not exist #}
{#
<meta property="og:image" content="{{ url_for('static', filename='about.png', _external=True )}}">
<meta property="og:image" content="{{ url_for('static', filename='about.png', _external=True) }}">
#}
{% endblock meta_tags %}

Expand Down
8 changes: 4 additions & 4 deletions htmd/example_site/templates/_layout.html
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,10 @@
<nav role="navigation">
<ul>
{% block menu %}
<li {{'class=active' if active == 'home' }}><a href="{{ url_for('index') }}">Home</a></li>
<li {{'class=active' if active == 'posts' }}><a href="{{ url_for('all_posts') }}">Posts</a></li>
<li {{'class=active' if active == 'tags' }}><a href="{{ url_for('all_tags') }}">Tags</a></li>
<li {{'class=active' if active == 'about' }}><a href="{{ url_for('pages.page', path='about') }}">About</a></li>
<li {{ 'class=active' if active == 'home' }}><a href="{{ url_for('index') }}">Home</a></li>
<li {{ 'class=active' if active == 'posts' }}><a href="{{ url_for('all_posts') }}">Posts</a></li>
<li {{ 'class=active' if active == 'tags' }}><a href="{{ url_for('all_tags') }}">Tags</a></li>
<li {{ 'class=active' if active == 'about' }}><a href="{{ url_for('pages.page', path='about') }}">About</a></li>
{% endblock menu %}
</ul>
</nav>
Expand Down
2 changes: 1 addition & 1 deletion htmd/example_site/templates/_list.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ <h3 class="post-subtitle">
</a>
<p class="post-meta">Posted
{% if SHOW_AUTHOR %}
by <a href="{{ url_for('author', author=post.author or DEFAULT_AUTHOR)}}">{{ post.author }}</a>
by <a href="{{ url_for('author', author=post.author or DEFAULT_AUTHOR) }}">{{ post.author }}</a>
{% endif %}
on {{ post.published }}.
</p>
Expand Down
2 changes: 1 addition & 1 deletion htmd/example_site/templates/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<meta property="og:description" content="{{ SITE_DESCRIPTION }}">
{% endif %}
{% if SITE_LOGO %}
<meta property="og:image" content="{{ url_for('static', filename=SITE_LOGO, _external=True )}}">
<meta property="og:image" content="{{ url_for('static', filename=SITE_LOGO, _external=True) }}">
{% endif %}
{% endblock meta_tags %}

Expand Down
2 changes: 1 addition & 1 deletion htmd/example_site/templates/month.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

{% block content %}
<article>
<h1>Posts from {{ month_string }} {{year}}</h1>
<h1>Posts from {{ month_string }} {{ year }}</h1>
<hr class="small">
{% for post in posts %}
{% with show_text=False %}
Expand Down
14 changes: 7 additions & 7 deletions htmd/example_site/templates/post.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,18 @@
<meta name="description" content="{{ post.description }}">
{% endif %}
{% if post.tags %}
<meta name="keywords" content="{{ post.tags}}">
<meta name="keywords" content="{{ post.tags }}">
{% endif %}

{# Open Graph Tags #}
<meta property="og:type" content="article">
{% if 'draft' not in post.meta %}
<meta property="og:url" content="{{ url_for('post', year=post.meta['published'].year, month=post.meta['published'].strftime('%m'), day=post.meta['published'].strftime('%d'), path=post.path, _external=True) }}">
{% endif %}
<meta property="og:title" content="{{post.title}}">
<meta property="og:description" content="{{post.description}}">
<meta property="og:title" content="{{ post.title }}">
<meta property="og:description" content="{{ post.description }}">
{% if post.image or SITE_LOGO %}
<meta property="og:image" content="{{ url_for('static', filename=post.image or SITE_LOGO, _external=True )}}">
<meta property="og:image" content="{{ url_for('static', filename=post.image or SITE_LOGO, _external=True) }}">
{% endif %}

{% if post.facebook_url or DEFAULT_AUTHOR_FACEBOOK %}
Expand All @@ -28,7 +28,7 @@

{# Twitter Specific Tags #}
{% if post.twitter_username or DEFAULT_AUTHOR_TWITTER %}
<meta name="twitter:creator" content="{{post.twitter_username or DEFAULT_AUTHOR_TWITTER}}">
<meta name="twitter:creator" content="{{ post.twitter_username or DEFAULT_AUTHOR_TWITTER }}">
{% endif %}
{% endblock meta_tags %}

Expand All @@ -40,14 +40,14 @@ <h1>{{ post.title }}</h1>
<h2 class="subheading">{{ post.subtitle }}</h2>
{% endif %}
{% if SHOW_AUTHOR %}
<span class="meta">Posted by <a href="{{ url_for('author', author = post.author or DEFAULT_AUTHOR)}}">{{ post.author}} </a> on {{ post.date }}</span>
<span class="meta">Posted by <a href="{{ url_for('author', author = post.author or DEFAULT_AUTHOR) }}">{{ post.author }} </a> on {{ post.date }}</span>
{% endif %}
{{ post.html|safe }}

<hr class="small">
<p><strong>Tags</strong></p>
{% for tag in post.meta.get('tags') %}
<a class="tag" href="{{ url_for('tag', tag=tag) }}">{{tag}}</a>
<a class="tag" href="{{ url_for('tag', tag=tag) }}">{{ tag }}</a>
{% endfor %}
</article>
{% endblock content %}

0 comments on commit ae16673

Please sign in to comment.