Style <progress>

Signed-off-by: Skylar "The Cobra" Widulski <cobra@vern.cc>
This commit is contained in:
Skylar "The Cobra" Widulski 2023-12-02 01:15:16 -05:00
parent 1223c31ea8
commit cf934ad6d1
Signed by untrusted user: cobra
GPG Key ID: 4FD8F812083FF6F9
2 changed files with 42 additions and 19 deletions

View File

@ -25,13 +25,13 @@
global $langs; global $langs;
$sum = shell_exec('cd /var/www/website; $(($(diff 2>/dev/null -y --suppress-common-lines en/ '.$tl.'/ | grep "|" | wc -l)+$(diff 2>/dev/null -y --suppress-common-lines en/ '.$tl.'/ | grep "^Only in en/" | awk '."'".'{print $NF}'."'".' | while read -r line; do wc -l < en/"$line";printf "+"; done)0))'); $sum = shell_exec('cd /var/www/website; $(($(diff 2>/dev/null -y --suppress-common-lines en/ '.$tl.'/ | grep "|" | wc -l)+$(diff 2>/dev/null -y --suppress-common-lines en/ '.$tl.'/ | grep "^Only in en/" | awk '."'".'{print $NF}'."'".' | while read -r line; do wc -l < en/"$line";printf "+"; done)0))');
return "<li>" . $langs[$tl][0] . "(" . $langs[$tl][1] . ", <code>" . $tl . "</code>)" . "</li>\n<br>\n<progress max=$const value=" . $sum . ">" . intdiv(($sum * 100), $const) . "%</progress><br><br>"; return "<li>" . $langs[$tl][0] . " (" . $langs[$tl][1] . ", <code>/" . $tl . "/</code>)" . "</li>\n<br>\n<progress max=$const value=" . $sum . ">" . intdiv(($sum * 100), $const) . "%</progress><br><br>";
} }
?> ?>
<!--#include file="nav.php" --> <!--#include file="nav.php" -->
<div class=h><h1 id=translations>Translations</h1> <a aria-hidden=true href=#translations>#translations</a></div> <div class=h><h1 id=translations>Translations</h1> <a aria-hidden=true href=#translations>#translations</a></div>
<ul> <ul>
<li><?php echo style('pt-BR'); ?><li> <?php echo style('pt-BR'); ?>
</ul> </ul>
<!--#include file="footer.cgi" --> <!--#include file="footer.cgi" -->
</body> </body>

View File

@ -55,13 +55,13 @@ h3 { font-size:1.1em; }
color:#ff6c6b; color:#ff6c6b;
size:75%; size:75%;
} }
.h a[aria-hidden] { display:none; } .h a[aria-hidden] { display:none; }
pre { pre {
tab-size:4; tab-size:4;
background: #20232a; background: #20232a;
color: #969ba6; color: #969ba6;
border: 1px solid lightgrey; border: 1px solid lightgrey;
padding: 5px; padding: 5px;
tab-size:4; tab-size:4;
} }
.red { color:#ff6c6b; } .red { color:#ff6c6b; }
@ -74,6 +74,29 @@ input[type=submit] {
color: #282c34; color: #282c34;
border-radius:10px; border-radius:10px;
} }
progress {
height: 30px;
width: 70%;
border-radius: 15px;
border: 1px solid transparent;
background: #bbc2cf;
color: #ff6c6b;
}
progress::-moz-progress-bar {
color: transparent;
background: #bbc2cf;
accent-color: currentColor;
}
progress::-webkit-progress-bar {
background: #bbc2cf;
}
progress::-webkit-progress-value {
background: currentColor;
}
input[type=checkbox] { color: #282c34; background-color: #bbc2cf; } input[type=checkbox] { color: #282c34; background-color: #bbc2cf; }
ul[userlist] { list-style:none; } ul[userlist] { list-style:none; }
ul[userlist] li[online]::before { ul[userlist] li[online]::before {
@ -88,23 +111,23 @@ ul[userlist] li[online$=true]::before { color:#98be65; }
textarea { background-color: #282c34; color: #bbc2cf; } textarea { background-color: #282c34; color: #bbc2cf; }
input { background-color: #282c34; color: #bbc2cf; } input { background-color: #282c34; color: #bbc2cf; }
#TOC { #TOC {
border: 1px solid; border: 1px solid;
position: relative; position: relative;
} }
#TOC:before { #TOC:before {
border-bottom: 1px solid; border-bottom: 1px solid;
content: 'Table of Contents'; content: 'Table of Contents';
display: block; display: block;
font-weight: bold; font-weight: bold;
padding: 5px; padding: 5px;
position: relative; position: relative;
} }
.date { .date {
//color: grey; //color: grey;
display: block; display: block;
font-family: monospace; font-family: monospace;
margin-top: 1em; margin-top: 1em;
overflow: hidden; overflow: hidden;
white-space: nowrap; white-space: nowrap;
width: 16ch; width: 16ch;
} }