test flexbox images in toots - will this work in RSS?

This commit is contained in:
Wouter Groeneveld 2021-03-14 20:10:45 +01:00
parent 03f6013801
commit 998b29a8d5
4 changed files with 36 additions and 4 deletions

View File

@ -6,4 +6,14 @@ date: "2021-03-14T17:41:53"
---
Enjoyed an afternoon of oldskool Diablo II on the Europebattle servers. We did a few Mephisto runs, managed to hit Hell, and I re-converetd my druid into a windy one. Good times!
<ul class="flex">
<li>
<a class="lbox" href="https://chat.brainbaking.com/media/6f8b72ca-9bfb-460b-9609-c4298a8cab2b/EuropeBattle%202021-03-14%2016-20-36-87.jpg">
<img src="https://chat.brainbaking.com/media/6f8b72ca-9bfb-460b-9609-c4298a8cab2b/EuropeBattle%202021-03-14%2016-20-36-87.jpg">
</a>
</li>
<li>
<img src="https://chat.brainbaking.com/media/3dbcb044-2acc-4ace-a4f6-37ce94c3f2b1/EuropeBattle%202021-03-14%2015-35-01-56.jpg">
</li>
</ul>

View File

@ -59,7 +59,10 @@ document.addEventListener("DOMContentLoaded",function() {
(function makeTootClickable() {
[...document.querySelectorAll('.toot')].forEach(toot => {
toot.addEventListener('click', function() {
window.location.href = this.querySelector('.permalink').href
const permalink = this.querySelector('.permalink')?.href
if(permalink) {
window.location.href = permalink
}
})
})
})();

View File

@ -1,3 +1,21 @@
ul.flex
display: flex
flex-wrap: wrap
list-style: none
margin: 0
padding: 0
li
width: 50%
flex-grow: 1
img
max-height: 100%
min-width: 100%
object-fit: cover
vertical-align: bottom
article img
display: block
margin-left: auto
@ -25,6 +43,9 @@ figure
margin-bottom: 1.5em !important
margin-left: 0
margin-right: 0
a
img
cursor: zoom-in
img
margin-bottom: 0 !important
img[src*='#left']

View File

@ -7,8 +7,6 @@
box-shadow: rgba(100, 100, 111, 0.2) 0px 7px 29px 0px
&:hover
transition: 250ms linear
transform: scale(1.1)
border-color: var(--accent)
.notes