Create meta class for showing metadata in right margin

This commit is contained in:
str4d
2015-05-31 01:24:23 +00:00
parent b0a6ddd870
commit dfdb1aa7cc
4 changed files with 23 additions and 15 deletions

View File

@@ -1,15 +1,14 @@
{% extends "global/layout.html" %}
{%- from "global/macros" import render_categories with context -%}
{% block title %}{{ title }} - {{ _('Blog') }}{% endblock %}
{% block sidebar %}
<ul id="post-info" class="lastupdated">
{% block content %}
<div class="meta">
<ul id="post-info">
<li class="date">{{ _('Posted:') }} {{ meta.date }}</li>
<li class="author">{{ _('Author:') }} {{ meta.author }}</li>
<li class="category">{{ render_categories(meta.category)|safe }}</li>
</ul>
{% endblock %}
{% block content %}
</div>
{% autoescape false %}
{{ body }}
{% endautoescape %}

View File

@@ -55,18 +55,20 @@
<main role="main" class="inner">
<div class="fluid">
{% if self.content_nav() or self.sidebar() or self.lastupdated() or self.accuratefor() -%}
{% if self.content_nav() or self.sidebar() -%}
<aside class="sidebar">
{% if self.content_nav() -%}
<nav{% if self.lastupdated() or self.accuratefor() %} class="top"{% endif %}>
<nav{% if self.sidebar() %} class="top"{% endif %}>
{% block content_nav %}{% endblock %}
</nav>
{%- endif %}
{% block sidebar %}{% endblock %}
</aside>
{%- endif %}
{% if self.lastupdated() or self.accuratefor() -%}
<div class="lastupdated">
<div class="meta lastupdated">
<!--
{% block lastupdated %}{% endblock %}
{% block accuratefor %}{% endblock %}
@@ -86,8 +88,6 @@
{%- endif %}{% endif %}{% endif %}
</div>
{%- endif %}
</aside>
{%- endif %}
<article class="content-inner">
{% block content %}{% endblock %}

View File

@@ -203,13 +203,18 @@ div#content .sidebar nav ul {
padding-left: 0.5em;
}
div#content .lastupdated {
div#content .meta {
background-color: #ffffdd;
padding: 2px 4px;
border: 1px dashed;
padding: 0.5em 1em;
position: relative;
text-align: center;
}
div#content .lastupdated {
margin: 1em 2em;
}
div#content .content-inner {
padding: 1em 2em;
}

View File

@@ -250,9 +250,13 @@ div#content .inner .sidebar {
width: 250px;
}
div#content .lastupdated {
border-radius: 0 0 10px 0;
text-align: right;
div#content .inner .meta {
border: 1px dashed;
position: absolute;
left: 72%;
margin: 1em 0;
right: 2%;
text-align: left;
}
div#content .content-inner {