mirror of
https://github.com/yuzu-emu/yuzu-emu.github.io.git
synced 2025-06-16 23:31:26 +00:00
Add message shortcode (#40)
This commit is contained in:
parent
3eff161bf7
commit
4f8630dc28
|
@ -1 +1 @@
|
||||||
Subproject commit 72ea06b00ee28d21e379c96ebf6c570dde379ee0
|
Subproject commit 7a0f53400f6c363b26f5fb3f56b333c497ca31f7
|
|
@ -10,4 +10,14 @@ document.addEventListener("DOMContentLoaded", function() {
|
||||||
document.querySelectorAll('.moment-timeago').forEach(x => {
|
document.querySelectorAll('.moment-timeago').forEach(x => {
|
||||||
x.innerHTML = moment(x.innerHTML).fromNow()
|
x.innerHTML = moment(x.innerHTML).fromNow()
|
||||||
})
|
})
|
||||||
|
|
||||||
|
// .is-dropdown
|
||||||
|
document.querySelectorAll('.is-dropdown').forEach(x => {
|
||||||
|
x.addEventListener('click', function(event) {
|
||||||
|
event.stopPropagation()
|
||||||
|
x.parentElement.querySelectorAll(".is-dropdown-target").forEach(child => {
|
||||||
|
child.classList.toggle('is-active')
|
||||||
|
})
|
||||||
|
});
|
||||||
|
})
|
||||||
})
|
})
|
|
@ -54,3 +54,34 @@ a:hover {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Fixes the backgrounds + colors of messages with headers
|
||||||
|
.message {
|
||||||
|
background: $dark !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.message-header {
|
||||||
|
color: $dark;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Fixes multiple <p> elements in messages in content blocks
|
||||||
|
.message-header p:not(:last-child) {
|
||||||
|
margin-bottom: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Adds dropdown support for messsages
|
||||||
|
.message-header.is-dropdown {
|
||||||
|
cursor: pointer;
|
||||||
|
-webkit-user-select: none;
|
||||||
|
-moz-user-select: none;
|
||||||
|
-ms-user-select: none;
|
||||||
|
user-select: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.message-body.is-dropdown-target {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.message-body.is-dropdown-target.is-active {
|
||||||
|
display: block !important;
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in a new issue