Change blog post style

This commit is contained in:
cuom1999 2022-08-27 21:45:28 -05:00
parent 793bcee491
commit cef059ea9d
2 changed files with 34 additions and 5 deletions

View file

@ -206,6 +206,14 @@
background-color: #f3f3f3;
}
.post-full {
.post-title {
font-weight: bold;
margin-bottom: 10px;
font-family: serif;
}
}
@media (max-width: 799px) {
.left-sidebar-header {
display: none;
@ -230,6 +238,9 @@
padding-left: 5%;
padding-right: 5%;
}
.post-title {
font-size: 2em;
}
}
@media (min-width: 800px) {
.left-sidebar-item {
@ -281,4 +292,18 @@
border-right: 1.4px solid lightgray;
border-radius: 8px;
}
}
.post-full {
width: 80%;
margin-left: auto;
margin-right: auto;
.content-description {
font-size: 18px;
}
.post-title {
font-size: 2.5em;
}
}
}

View file

@ -8,14 +8,15 @@
{% include "comments/media-css.html" %}
{% endblock %}
{% block header %}
{% if post.is_editable_by(request.user) %}
<div class="title-line-action">[<a href="{{ url('admin:judge_blogpost_change', post.id) }}">{{ _('Edit') }}</a>]</div>
{% endif %}
{% block title_row %}
{% endblock %}
{% block title_ruler %}
{% endblock %}
{% block body %}
<div class="post-full">
<div class="post-title">{{ title }}</div>
<div class="time">
{% with authors=post.authors.all() %}
{% if authors %}
@ -25,6 +26,9 @@
<span class="post-time">
{% trans time=post.publish_on|date(_("N j, Y, g:i a")) %} posted on {{ time }}{% endtrans %}
</span>
{% if post.is_editable_by(request.user) %}
<span> [<a href="{{ url('admin:judge_blogpost_change', post.id) }}">{{ _('Edit') }}</a>]</span>
{% endif %}
</div>
<div class="body content-description">
{% cache 86400 'post_content' post.id MATH_ENGINE %}