Skip to content

Commit

Permalink
Add explicit height to images, make image credit colour darker to imp…
Browse files Browse the repository at this point in the history
…rove contrast
  • Loading branch information
SamuelmdLow committed Oct 2, 2024
1 parent 7df5191 commit 5ff05ef
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
{% image featured_image_object.image width-1500 format-webp as featured_image %}
<img
class="article-attachment"
width="{{ featured_image_object.width }}"
height="{{ featured_image_object.height }}"
data-id="{{ featured_image_object.image.id }}"
data-caption="{{ featured_image_object.caption }}"
data-url="{{ featured_image.url }}"
Expand Down
2 changes: 1 addition & 1 deletion images/templates/images/stream_blocks/image_block.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<div class="image-attachment attachment {{ self.style }} {{ self.width }} {% if self.click_to_enlarge %}setup-modal image-modal{% endif %}" >
{% image self.image width-1000 format-webp as image %}
{% image self.image original as ogImage %}
<img class="article-attachment" decoding="async" data-id="{{ image.id }}" data-caption="{{ self.caption }}" data-credit="{{ self.credit }}" data-url="{{ image.url }}" src="{{ image.url }}" alt="{% if self.alt_text %}{{ self.alt_text }}{% else %}{{self.caption}}{% endif %}" />
<img class="article-attachment" width="{{image.width}}" height="{{image.height}}" decoding="async" data-id="{{ image.id }}" data-caption="{{ self.caption }}" data-credit="{{ self.credit }}" data-url="{{ image.url }}" src="{{ image.url }}" alt="{% if self.alt_text %}{{ self.alt_text }}{% else %}{{self.caption}}{% endif %}" />

{% if self.click_to_enlarge %}
<button class="open-modal" aria-label="Enlarge image"></button>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<h3 class="issueText">{{ self.date }}</h3>
{% if self.show_image and self.image %}
{% image self.image width-700 format-webp as mag %}
<img class="issue_img" src="{{mag.url}}" loading='lazy' alt="{{self.date}} Issue">
<img class="issue_img" src="{{mag.url}}" width="{{mag.width}}" height="{{mag.height}}" loading='lazy' alt="{{self.date}} Issue">
{% endif %}
</a>
</li>
2 changes: 1 addition & 1 deletion ubyssey/static_src/src/styles/modules/_core.scss
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,7 @@ div.image-inner {
span.credit {
margin-left: 0.5em;
font-style: italic;
color: #969696;
color: #888;
white-space: pre;
}

Expand Down
1 change: 1 addition & 0 deletions ubyssey/static_src/src/styles/modules/article/_embeds.scss
Original file line number Diff line number Diff line change
Expand Up @@ -379,6 +379,7 @@ div.article-content {
.image-attachment {
img {
width: 100%;
height: auto;
}

a {
Expand Down

0 comments on commit 5ff05ef

Please sign in to comment.