Improved post view on small layout

- post notes no longer disappear
- post image is larger
- sidebar stacks into columns
- things from sidebar are centered
This commit is contained in:
rr- 2015-07-19 19:06:35 +02:00
parent 1969f0e3fa
commit 37eabe1556
2 changed files with 188 additions and 182 deletions

View file

@ -22,12 +22,9 @@
line-height: 1.33em; line-height: 1.33em;
} }
#post-view-wrapper #sidebar h1 { #post-view-wrapper #sidebar .box {
margin-top: 1.5em; margin-bottom: 1.5em;
} text-align: left;
#post-view-wrapper #sidebar h1:first-of-type {
margin-top: 0;
} }
@media all and (min-width: 62.5em) { @media all and (min-width: 62.5em) {
@ -59,10 +56,16 @@
#post-view-wrapper #sidebar { #post-view-wrapper #sidebar {
order: 2; order: 2;
margin-bottom: 1em; margin-bottom: 1em;
text-align: center;
}
#post-view-wrapper #sidebar .box {
display: inline-block;
width: 15em;
vertical-align: top;
} }
#post-view-wrapper #post-view { #post-view-wrapper #post-view {
margin: 0 auto; margin: 0 auto;
max-width: 100%; width: 100%;
order: 1; order: 1;
} }
} }
@ -131,7 +134,6 @@
display: flex; display: flex;
justify-content: space-around; justify-content: space-around;
margin-bottom: 2em; margin-bottom: 2em;
max-width: 30em;
} }
#sidebar .essential li { #sidebar .essential li {
display: block; display: block;

View file

@ -81,6 +81,7 @@ if (forceHttpInPermalinks > 0) {
<% } %> <% } %>
</ul> </ul>
<div class="box">
<h1>Tags (<%= _.size(post.tags) %>)</h1> <h1>Tags (<%= _.size(post.tags) %>)</h1>
<ul class="tags"> <ul class="tags">
<% _.each(post.tags, function(tag) { %> <% _.each(post.tags, function(tag) { %>
@ -96,9 +97,10 @@ if (forceHttpInPermalinks > 0) {
</li> </li>
<% }) %> <% }) %>
</ul> </ul>
</div>
<div class="box">
<h1>Details</h1> <h1>Details</h1>
<div class="author-box"> <div class="author-box">
<% if (post.user.name) { %> <% if (post.user.name) { %>
<a href="#/user/<%= post.user.name %>"> <a href="#/user/<%= post.user.name %>">
@ -124,7 +126,6 @@ if (forceHttpInPermalinks > 0) {
</div> </div>
<ul class="other-info"> <ul class="other-info">
<li> <li>
Rating: Rating:
<span class="safety-<%= post.safety %>"> <span class="safety-<%= post.safety %>">
@ -196,8 +197,10 @@ if (forceHttpInPermalinks > 0) {
<% }) %> <% }) %>
</ul> </ul>
<% } %> <% } %>
</div>
<% if (_.any(post.relations)) { %> <% if (_.any(post.relations)) { %>
<div class="box">
<h1>Related posts</h1> <h1>Related posts</h1>
<ul class="related"> <ul class="related">
<% _.each(post.relations, function(relatedPost) { %> <% _.each(post.relations, function(relatedPost) { %>
@ -208,11 +211,12 @@ if (forceHttpInPermalinks > 0) {
</li> </li>
<% }) %> <% }) %>
</ul> </ul>
</div>
<% } %> <% } %>
<% if (_.any(privileges) || _.any(editPrivileges) || post.contentType === 'image') { %> <% if (_.any(privileges) || _.any(editPrivileges) || post.contentType === 'image') { %>
<div class="box">
<h1>Options</h1> <h1>Options</h1>
<ul class="operations"> <ul class="operations">
<% if (_.any(editPrivileges)) { %> <% if (_.any(editPrivileges)) { %>
<li> <li>
@ -276,8 +280,8 @@ if (forceHttpInPermalinks > 0) {
<a data-fit-mode="original" href="#">original</a> <a data-fit-mode="original" href="#">original</a>
</li> </li>
</ul> </ul>
</div>
<% } %> <% } %>
</div> </div>
<div id="post-view"> <div id="post-view">