Skip to content

Commit 05ae5f2

Browse files
committedApr 9, 2025
Improved styling of blog images
1 parent 12cdc3a commit 05ae5f2

File tree

3 files changed

+13
-1
lines changed

3 files changed

+13
-1
lines changed
 

‎djangoproject/scss/_style.scss

+10
Original file line numberDiff line numberDiff line change
@@ -3610,3 +3610,13 @@ ul.corporate-members li {
36103610
}
36113611
}
36123612
}
3613+
3614+
.blog {
3615+
.blog-entry-body {
3616+
img {
3617+
max-width: 100%;
3618+
display: block;
3619+
margin: auto;
3620+
}
3621+
}
3622+
}

‎djangoproject/templates/base_weblog.html

+2
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@
1515
<link rel="alternate" type="application/rss+xml" title="RSS" href="{% url 'weblog-feed' %}" />
1616
{% endblock %}
1717

18+
{% block body_class %}blog{% endblock %}
19+
1820
{% block content-related %}
1921
<div role="complementary">
2022
<h2 class="visuallyhidden" id="aside-header">{% translate "Additional Information" %}</h2>

‎djangoproject/templates/blog/entry_detail.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,5 @@ <h1>{{ object.headline|safe }}</h1>
1616
Posted by <strong>{{ author }}</strong> on {{ pub_date }}
1717
{% endblocktranslate %}
1818
</span>
19-
{{ object.body_html|safe }}
19+
<div class="blog-entry-body">{{ object.body_html|safe }}</div>
2020
{% endblock %}

0 commit comments

Comments
 (0)