"animation" for contrast change

This commit is contained in:
Peter Molnar 2018-06-17 20:24:35 +00:00
parent f14c834960
commit 50e0db94c6
3 changed files with 9 additions and 12 deletions

View file

@ -6,9 +6,8 @@
</style> </style>
<script> <script>
function toggleStylesheet(trigger){ function toggleStylesheet(trigger){
var curr = document.querySelector('#light').getAttribute("media");
var setto = 'all'; var setto = 'all';
if (curr == 'all') { if (document.querySelector('#light').getAttribute("media") == 'all') {
setto = 'none'; setto = 'none';
} }
document.querySelector('#light').setAttribute("media", setto); document.querySelector('#light').setAttribute("media", setto);

View file

@ -271,6 +271,10 @@ code {
padding: 0; padding: 0;
} }
.contrast.active {
transform: rotate(180deg);
}
.contrast a { .contrast a {
color: #ccc; color: #ccc;
} }
@ -409,7 +413,6 @@ figure figcaption {
margin-right: 1em; margin-right: 1em;
} }
.content-footer img { .content-footer img {
width: 1em; width: 1em;
} }
@ -433,24 +436,16 @@ body script {
margin: 0; margin: 0;
} }
/*
.h-feed .h-entry {
margin-left: 1em;
}
*/
.h-feed h2, .h-feed h2,
.h-entry.singular .e-content h2 { .h-entry.singular .e-content h2 {
border-bottom: 2px solid #999; border-bottom: 2px solid #999;
} }
.h-feed h3, .h-feed h3,
.h-entry.singular .e-content h3 { .h-entry.singular .e-content h3 {
border-bottom: 1px dotted #777; border-bottom: 1px dotted #777;
} }
.h-feed > h1 { .h-feed > h1 {
display: none; display: none;
} }
@ -485,7 +480,6 @@ body script {
.follow { .follow {
display: block; display: block;
text-align: right; text-align: right;
} }
.donation ul { .donation ul {

View file

@ -39,3 +39,7 @@ pre {
.h-entry.singular h1 a { .h-entry.singular h1 a {
color: #111; color: #111;
} }
.contrast svg {
transform: rotate(180deg);
}