Hide cw pictures behind a summary/details (#483)

* Hide cw pictures behind a summary/details
* refactor md_to_html a bit and add cw support
* use random id for cw checkbox
This commit is contained in:
fdb-hiroshima
2019-04-06 19:20:33 +02:00
committed by GitHub
parent eabe73ddc0
commit 12c2078c89
11 changed files with 239 additions and 63 deletions
+33
View File
@@ -322,3 +322,36 @@ main .article-meta {
right: 0px;
bottom: 0px;
}
// content warning
.cw-container {
position: relative;
display: inline-block;
}
.cw-text {
display: none;
}
input[type="checkbox"].cw-checkbox {
display: none;
}
input:checked ~ .cw-container:before {
content: " ";
position: absolute;
height: 100%;
width: 100%;
background: rgba(0, 0, 0, 1);
}
input:checked ~ .cw-container > .cw-text {
display: inline;
position: absolute;
color: white;
width: 100%;
text-align: center;
top: 50%;
transform: translateY(-50%);
}