Author casing (#5)

* added trailing slash to Home link - to properly handle root urls

* updated Home link on author page

* updated Home link on misc. pages

* switched from capitalize to title in order to properly capitalize two word names

* reverted URL changes to keep seperate from casing logic changes

* updated metatag logic to remove extraneous metatags on articles

* removed other changes. only author casing in this PR
This commit is contained in:
Monica Powell 2017-06-03 01:18:35 -04:00 committed by Arul
parent 49fc5bfe2f
commit be2c4c6ff5
12 changed files with 24 additions and 23 deletions

View file

@ -10,11 +10,11 @@
<nav id="navigation"> <nav id="navigation">
{% if SITE_LOGO %} {% if SITE_LOGO %}
<span class="blog-logo"> <span class="blog-logo">
<a href="{{ SITEURL }}/"><img src="{{SITE_LOGO}}" alt="Blog Logo" /></a> <a href="{{ SITEURL }}"><img src="{{SITE_LOGO}}" alt="Blog Logo" /></a>
</span> </span>
{% else %} {% else %}
<span id="home-button" class="nav-button"> <span id="home-button" class="nav-button">
<a class="home-button" href="{{ SITEURL }}/" title="Home"><i class="ic ic-arrow-left"></i> Home</a> <a class="home-button" href="{{ SITEURL }}" title="Home"><i class="ic ic-arrow-left"></i> Home</a>
</span> </span>
{% endif %} {% endif %}
<span id="menu-button" class="nav-button"> <span id="menu-button" class="nav-button">

View file

@ -59,11 +59,11 @@
<nav id="navigation"> <nav id="navigation">
{% if SITE_LOGO %} {% if SITE_LOGO %}
<span class="blog-logo"> <span class="blog-logo">
<a href="{{ SITEURL }}/"><img src="{{SITE_LOGO}}" alt="Blog Logo" /></a> <a href="{{ SITEURL }}"><img src="{{SITE_LOGO}}" alt="Blog Logo" /></a>
</span> </span>
{% else %} {% else %}
<span id="home-button" class="nav-button"> <span id="home-button" class="nav-button">
<a class="home-button" href="{{ SITEURL }}/" title="Home"><i class="ic ic-arrow-left"></i> Home</a> <a class="home-button" href="{{ SITEURL }}" title="Home"><i class="ic ic-arrow-left"></i> Home</a>
</span> </span>
{% endif %} {% endif %}
<span id="menu-button" class="nav-button"> <span id="menu-button" class="nav-button">
@ -77,7 +77,7 @@
{% endif %} {% endif %}
<span class="post-meta"> <span class="post-meta">
{% for author in article.authors %} {% for author in article.authors %}
<a href="{{ SITEURL }}/{{ author.url }}">{{ author|capitalize }}</a> <a href="{{ SITEURL }}/{{ author.url }}">{{ author|title }}</a>
{% endfor %} {% endfor %}
| <time datetime="{{ article.locale_date }}">{{ article.locale_date }}</time> | <time datetime="{{ article.locale_date }}">{{ article.locale_date }}</time>
</span> </span>
@ -133,11 +133,11 @@
<aside class="post-author"> <aside class="post-author">
{% if AUTHORS_BIO[author.name.lower()].image %} {% if AUTHORS_BIO[author.name.lower()].image %}
<figure class="post-author-avatar"> <figure class="post-author-avatar">
<img src="{{AUTHORS_BIO[author.name.lower()].image}}" alt="{{author.name | capitalize}}" /> <img src="{{AUTHORS_BIO[author.name.lower()].image}}" alt="{{author.name | title}}" />
</figure> </figure>
{% endif %} {% endif %}
<div class="post-author-bio"> <div class="post-author-bio">
<h4 class="post-author-name"><a href="{{ SITEURL }}/{{author.url}}">{{author.name | capitalize}}</a></h4> <h4 class="post-author-name"><a href="{{ SITEURL }}/{{author.url}}">{{author.name | title}}</a></h4>
{% if AUTHORS_BIO[author.name.lower()].bio %} {% if AUTHORS_BIO[author.name.lower()].bio %}
<p class="post-author-about">{{AUTHORS_BIO[author.name.lower()].bio}}</p> <p class="post-author-about">{{AUTHORS_BIO[author.name.lower()].bio}}</p>
{% endif %} {% endif %}

View file

@ -19,11 +19,11 @@
<nav id="navigation"> <nav id="navigation">
{% if SITE_LOGO %} {% if SITE_LOGO %}
<span class="blog-logo"> <span class="blog-logo">
<a href="{{ SITEURL }}/"><img src="{{SITE_LOGO}}" alt="Blog Logo" /></a> <a href="{{ SITEURL }}"><img src="{{SITE_LOGO}}" alt="Blog Logo" /></a>
</span> </span>
{% else %} {% else %}
<span id="home-button" class="nav-button"> <span id="home-button" class="nav-button">
<a class="home-button" href="{{ SITEURL }}/" title="Home"><i class="ic ic-arrow-left"></i> Home</a> <a class="home-button" href="{{ SITEURL }}" title="Home"><i class="ic ic-arrow-left"></i> Home</a>
</span> </span>
{% endif %} {% endif %}
<span id="menu-button" class="nav-button"> <span id="menu-button" class="nav-button">
@ -46,11 +46,11 @@
<aside class="post-author"> <aside class="post-author">
{% if AUTHORS_BIO[author.name.lower()].image %} {% if AUTHORS_BIO[author.name.lower()].image %}
<figure class="post-author-avatar"> <figure class="post-author-avatar">
<img src="{{AUTHORS_BIO[author.name.lower()].image}}" alt="{{author.name | capitalize}}" /> <img src="{{AUTHORS_BIO[author.name.lower()].image}}" alt="{{author.name | title}}" />
</figure> </figure>
{% endif %} {% endif %}
<div class="post-author-bio"> <div class="post-author-bio">
<h4 class="post-author-name"><a href="{{ SITEURL }}/{{author.url}}">{{author.name | capitalize}}</a></h4> <h4 class="post-author-name"><a href="{{ SITEURL }}/{{author.url}}">{{author.name | title}}</a></h4>
{% if AUTHORS_BIO[author.name.lower()].bio %} {% if AUTHORS_BIO[author.name.lower()].bio %}
<p class="post-author-about">{{AUTHORS_BIO[author.name.lower()].bio}}</p> <p class="post-author-about">{{AUTHORS_BIO[author.name.lower()].bio}}</p>
{% endif %} {% endif %}

View file

@ -14,14 +14,14 @@
</span> </span>
{% else %} {% else %}
<span id="home-button" class="nav-button"> <span id="home-button" class="nav-button">
<a class="home-button" href="{{ SITEURL }}/" title="Home"><i class="ic ic-arrow-left"></i> Home</a> <a class="home-button" href="{{ SITEURL }}" title="Home"><i class="ic ic-arrow-left"></i> Home</a>
</span> </span>
{% endif %} {% endif %}
<span id="menu-button" class="nav-button"> <span id="menu-button" class="nav-button">
<a class="menu-button"><i class="ic ic-menu"></i> Menu</a> <a class="menu-button"><i class="ic ic-menu"></i> Menu</a>
</span> </span>
</nav> </nav>
<h1 class="post-title">Articles by {{ author|capitalize }}</h1> <h1 class="post-title">Articles by {{ author|title }}</h1>
{% if HEADER_COVER %} {% if HEADER_COVER %}
<div class="blog-cover cover" style="background-image: url('{{ HEADER_COVER }}')"> <div class="blog-cover cover" style="background-image: url('{{ HEADER_COVER }}')">
{% elif HEADER_COLOR %} {% elif HEADER_COLOR %}

View file

@ -80,6 +80,7 @@
<script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script> <script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
<![endif]--> <![endif]-->
{% endblock head %} {% endblock head %}
</head> </head>
<!-- TODO : Body class --> <!-- TODO : Body class -->
<body class="home-template"> <body class="home-template">
@ -93,7 +94,7 @@
{% block content %}{% endblock content %} {% block content %}{% endblock content %}
<!-- TODO : Body class --> <!-- TODO : Body class -->
<div id="body-class" style="display: none;" class="{{body_class}}"></div> <div id="body-class" style="display: none;" class="{{body_class}}"></div>
<footer id="footer"> <footer id="footer">
<div class="inner"> <div class="inner">
<section class="credits"> <section class="credits">
@ -105,7 +106,7 @@
</section> </section>
<script type="text/javascript" src="{{ SITEURL }}/{{ THEME_STATIC_DIR }}/js/script.js"></script> <script type="text/javascript" src="{{ SITEURL }}/{{ THEME_STATIC_DIR }}/js/script.js"></script>
{% if JS_OVERRIDE %} {% if JS_OVERRIDE %}
<!-- Script specified by the user --> <!-- Script specified by the user -->
{% for js in JS_OVERRIDE %} {% for js in JS_OVERRIDE %}

View file

@ -10,11 +10,11 @@
<nav id="navigation"> <nav id="navigation">
{% if SITE_LOGO %} {% if SITE_LOGO %}
<span class="blog-logo"> <span class="blog-logo">
<a href="{{ SITEURL }}/"><img src="{{SITE_LOGO}}" alt="Blog Logo" /></a> <a href="{{ SITEURL }}"><img src="{{SITE_LOGO}}" alt="Blog Logo" /></a>
</span> </span>
{% else %} {% else %}
<span id="home-button" class="nav-button"> <span id="home-button" class="nav-button">
<a class="home-button" href="{{ SITEURL }}/" title="Home"><i class="ic ic-arrow-left"></i> Home</a> <a class="home-button" href="{{ SITEURL }}" title="Home"><i class="ic ic-arrow-left"></i> Home</a>
</span> </span>
{% endif %} {% endif %}
<span id="menu-button" class="nav-button"> <span id="menu-button" class="nav-button">

View file

@ -14,7 +14,7 @@
</span> </span>
{% else %} {% else %}
<span id="home-button" class="nav-button"> <span id="home-button" class="nav-button">
<a class="home-button" href="{{ SITEURL }}/" title="Home"><i class="ic ic-arrow-left"></i> Home</a> <a class="home-button" href="{{ SITEURL }}" title="Home"><i class="ic ic-arrow-left"></i> Home</a>
</span> </span>
{% endif %} {% endif %}
<span id="menu-button" class="nav-button"> <span id="menu-button" class="nav-button">

View file

@ -31,7 +31,7 @@
</span> </span>
{% else %} {% else %}
<span id="home-button" class="nav-button"> <span id="home-button" class="nav-button">
<a class="home-button" href="{{ SITEURL }}/" title="Home"><i class="ic ic-arrow-left"></i> Home</a> <a class="home-button" href="{{ SITEURL }}" title="Home"><i class="ic ic-arrow-left"></i> Home</a>
</span> </span>
{% endif %} {% endif %}
<span id="menu-button" class="nav-button"> <span id="menu-button" class="nav-button">

View file

@ -10,7 +10,7 @@
</h2> </h2>
<span class="post-meta"> <span class="post-meta">
{% for author in article.authors %} {% for author in article.authors %}
<a href="{{ SITEURL }}/{{ author.url }}">{{ author|capitalize }}</a> <a href="{{ SITEURL }}/{{ author.url }}">{{ author|title }}</a>
{% endfor %} {% endfor %}
| <time datetime="{{ article.locale_date }}">{{ article.locale_date }}</time> | <time datetime="{{ article.locale_date }}">{{ article.locale_date }}</time>
</span> </span>

View file

@ -14,7 +14,7 @@
</span> </span>
{% else %} {% else %}
<span id="home-button" class="nav-button"> <span id="home-button" class="nav-button">
<a class="home-button" href="{{ SITEURL }}/" title="Home"><i class="ic ic-arrow-left"></i> Home</a> <a class="home-button" href="{{ SITEURL }}" title="Home"><i class="ic ic-arrow-left"></i> Home</a>
</span> </span>
{% endif %} {% endif %}
<span id="menu-button" class="nav-button"> <span id="menu-button" class="nav-button">

View file

@ -13,7 +13,7 @@
</span> </span>
{% else %} {% else %}
<span id="home-button" class="nav-button"> <span id="home-button" class="nav-button">
<a class="home-button" href="{{ SITEURL }}/" title="Home"><i class="ic ic-arrow-left"></i> Home</a> <a class="home-button" href="{{ SITEURL }}" title="Home"><i class="ic ic-arrow-left"></i> Home</a>
</span> </span>
{% endif %} {% endif %}
<span id="menu-button" class="nav-button"> <span id="menu-button" class="nav-button">

View file

@ -14,7 +14,7 @@
</span> </span>
{% else %} {% else %}
<span id="home-button" class="nav-button"> <span id="home-button" class="nav-button">
<a class="home-button" href="{{ SITEURL }}/" title="Home"><i class="ic ic-arrow-left"></i> Home</a> <a class="home-button" href="{{ SITEURL }}" title="Home"><i class="ic ic-arrow-left"></i> Home</a>
</span> </span>
{% endif %} {% endif %}
<span id="menu-button" class="nav-button"> <span id="menu-button" class="nav-button">