Skip to content
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

news: Make images embedded in posts responsive #93

Closed
wants to merge 1 commit 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
2 changes: 1 addition & 1 deletion pages/news.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<div class="content">
<h1>{% trans "News and Announcements" %}</h1>

<div class="fullwidth">
<div class="fullwidth news">
{# Show most recent news post #}
{% with post=posts|first %}
<h2><a href="{% url post.path %}">{{ post.title }}</a></h2>
Expand Down
11 changes: 11 additions & 0 deletions static/css/mixxx.css
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,17 @@ img.responsive
max-width: 100%;
}

.news img
{
/* Center the image horizontally */
display:block;
margin-left:auto;
margin-right:auto;

/* Automatically downscale image to fit in parent container */
max-width: 100%;
}

a:hover, #hamburger_menu a:hover
{
/* text-decoration: underline; */
Expand Down
2 changes: 1 addition & 1 deletion templates/post.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
{% block body %}
<div class="content">
<h1>{{ title }}</h1>
<div class="fullwidth">
<div class="fullwidth news">
{# Post content #}
<p style="font-size: small;">
Posted on <time pubdate="pubdate">{{ date|date:"Y-m-d" }}</time>
Expand Down