Skip to content

Display blog post metadata #441

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions app/Resources/views/admin/blog/show.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
{% block main %}
<h1>{{ post.title }}</h1>
<p class="post-metadata">
<i class="fa fa-calendar"></i> {{ post.publishedAt|localizeddate('long', 'medium', null, 'UTC') }}
<i class="fa fa-user"></i> {{ post.author.email }}
<span class="metadata"><i class="fa fa-calendar"></i> {{ post.publishedAt|localizeddate('long', 'medium', null, 'UTC') }}</span>
<span class="metadata"><i class="fa fa-user"></i> {{ post.author.email }}</span>
</p>

<div class="well">
Expand Down
5 changes: 5 additions & 0 deletions app/Resources/views/blog/index.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@
</a>
</h2>

<p class="post-metadata">
<span class="metadata"><i class="fa fa-calendar"></i> {{ post.publishedAt|localizeddate('long', 'medium', null, 'UTC') }}</span>
<span class="metadata"><i class="fa fa-user"></i> {{ post.author.email }}</span>
</p>

{{ post.summary|md2html }}
</article>
{% else %}
Expand Down
5 changes: 5 additions & 0 deletions app/Resources/views/blog/post_show.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@
{% block main %}
<h1>{{ post.title }}</h1>

<p class="post-metadata">
<span class="metadata"><i class="fa fa-calendar"></i> {{ post.publishedAt|localizeddate('long', 'medium', null, 'UTC') }}</span>
<span class="metadata"><i class="fa fa-user"></i> {{ post.author.email }}</span>
</p>

{{ post.content|md2html }}

<div id="post-add-comment" class="well">
Expand Down
16 changes: 16 additions & 0 deletions web/css/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,17 @@ body#login #login-users-help p .console {
padding: 10px
}

/* Common Blog page elements
------------------------------------------------------------------------- */
.post-metadata {
color: #b4bcc2;
font-size: 19px;
margin-bottom: 16px;
}
.post-metadata .metadata {
margin-right: 1.5em;
}

/* Page: 'Blog index'
------------------------------------------------------------------------- */
body#blog_index h1 {
Expand All @@ -217,6 +228,11 @@ body#blog_index article.post {
margin-bottom: 3em
}

body#blog_index .post-metadata {
font-size: 16px;
margin-bottom: 8px;
}

/* Page: 'Blog post show'
------------------------------------------------------------------------- */
body#blog_post_show h3 {
Expand Down