Browse Source

layouts: Cleanup

Jakub Valenta 1 year ago
parent
commit
e0f4e4c3d8
3 changed files with 8 additions and 70 deletions
  1. 1 14
      _layouts/page.html
  2. 0 15
      _layouts/post-new.html
  3. 7 41
      _layouts/post.html

+ 1 - 14
_layouts/page.html

@@ -2,23 +2,10 @@
 layout: default
 ---
 <article itemscope itemtype="http://schema.org/BlogPosting">
-
   <header class="article-header">
-    <h2>
-      <!--
-      <a href="{{ page.url | prepend: site.baseurl }}"
-         rel="bookmark"
-         title="link to this page"
-         itemprop="name">
-        {{ page.title }}
-      </a>
-      -->
-      {{ page.title }}
-    </h2>
+    <h2>{{ page.title }}</h2>
   </header>
-
   <div itemprop="articleBody" class="article-body article-section">
     {{ content }}
   </div>
-
 </article>

+ 0 - 15
_layouts/post-new.html

@@ -1,15 +0,0 @@
----
-layout: default
----
-<article class="post" itemscope itemtype="http://schema.org/BlogPosting">
-
-  <header class="post-header">
-    <h1 class="post-title" itemprop="name headline">{{ page.title }}</h1>
-    <p class="post-meta"><time datetime="{{ page.date | date_to_xmlschema }}" itemprop="datePublished">{{ page.date | date: "%b %-d, %Y" }}</time>{% if page.author %} • <span itemprop="author" itemscope itemtype="http://schema.org/Person"><span itemprop="name">{{ page.author }}</span></span>{% endif %}</p>
-  </header>
-
-  <div class="post-content" itemprop="articleBody">
-    {{ content }}
-  </div>
-
-</article>

+ 7 - 41
_layouts/post.html

@@ -1,49 +1,15 @@
 ---
 layout: default
 ---
-<article itemscope itemtype="http://schema.org/BlogPosting">
+<article class="post" itemscope itemtype="http://schema.org/BlogPosting">
 
-    <header class="article-header">
-        <time datetime="{{ post.date | date: '%Y-%m-%d' }}">
-            {{ page.date | date: "%b %-d, %Y" }}
-        </time>
-        <h2>
-            <a href="{{ page.url | prepend: site.baseurl }}"
-                rel="bookmark"
-                title="link to this post"
-                itemprop="name">
-                {{ page.title }}
-            </a>
-        </h2>
-        <meta itemprop="datePublished"
-            content="{{ post.date | date: '%Y-%m-%d' }}">
-        <meta itemprop="author"
-            content="{{ post.author }}">
-    </header>
+  <header class="post-header">
+    <h1 class="post-title" itemprop="name headline">{{ page.title }}</h1>
+    <p class="post-meta"><time datetime="{{ page.date | date_to_xmlschema }}" itemprop="datePublished">{{ page.date | date: "%b %-d, %Y" }}</time>{% if page.author %} • <span itemprop="author" itemscope itemtype="http://schema.org/Person"><span itemprop="name">{{ page.author }}</span></span>{% endif %}</p>
+  </header>
 
-    <div itemprop="articleBody" class="article-body article-section">
+  <div class="post-content" itemprop="articleBody">
     {{ content }}
-    </div>
-
-    <nav>
-        <ul>
-        {% if page.previous %}
-        <li class="page-prev">
-            <a href="{{ page.previous.url | prepend: site.baseurl }}"
-                title="Read the previous post">
-                « {{ page.previous.title }}
-            </a>
-        </li>
-        {% endif %}
-        {% if page.next %}
-        <li class="page-next">
-            <a href="{{ page.next.url | prepend: site.baseurl }}"
-                title="Read the next post">
-                {{ page.next.title }} »
-            </a>
-        </li>
-        {% endif %}
-        </ul>
-    </nav>
+  </div>
 
 </article>