Change changelog notification to small nag bar

This commit is contained in:
Oliver Blanthorn 2018-06-17 18:35:48 +01:00
parent 125759b483
commit 9818f8d0cb
No known key found for this signature in database
GPG key ID: 2BB8C36BB504BFF3
2 changed files with 11 additions and 3 deletions

View file

@ -17,7 +17,7 @@ sed "/REPLACE_ME_WITH_THE_CHANGE_LOG_USING_SED/,$ d" "$newtabtemp" > "$newtab"
# Note: If you're going to change this HTML, make sure you don't break the JS in src/newtab.ts
echo """
<input type="checkbox" id="spoilerbutton" />
<label for="spoilerbutton" onclick="">Changelog</label>
<label for="spoilerbutton" onclick=""><div id="nagbar-changelog">New features!</div>Changelog</label>
<div id="changelog" class="spoiler">
""" >> "$newtab"
$(npm bin)/marked ../../CHANGELOG.md >> "$newtab"

View file

@ -26,11 +26,19 @@ input[id^="spoiler"] + label {
cursor: pointer;
transition: all 0.6s;
}
input[id^="spoiler"]:checked + label,
input[id^="spoiler"].seen + label {
input[id^="spoiler"]:checked + label {
color: #333;
background: #ccc;
}
input[id^="spoiler"]:checked + label > #nagbar-changelog,
input[id^="spoiler"].seen + label > #nagbar-changelog {
display: none;
}
#nagbar-changelog {
font-size: 8pt;
background: red;
line-height: 1.4;
}
input[id^="spoiler"] ~ .spoiler {
height: 0;
overflow: hidden;