feat: add vote ratio bar

This commit is contained in:
James Xylight committed 2025-08-01 11:54:52 -07:00
1 parent d6d1a9fe1f
commit cf918f77fd
2 files changed
+16 -6

No files matched your search

@@ -101,14 +101,19 @@
</div> </div>
<style> <style>
.vote-ratio {
z-index: 0;
}
.vote-ratio::before { .vote-ratio::before {
content: ''; content: '';
position: absolute; position: absolute;
height: 1px; height: 100%;
width: 100%; width: 100%;
opacity: 10%;
z-index: -10;
left: 0; left: 0;
bottom: 0px; bottom: 0px;
z-index: 10;
background: linear-gradient( background: linear-gradient(
to right, to right,
var(--color-indigo-500) calc(var(--vote-ratio) - 5%), var(--color-indigo-500) calc(var(--vote-ratio) - 5%),
@@ -144,18 +144,23 @@
{/if} {/if}
<style> <style>
.vote-ratio {
z-index: 0;
}
.vote-ratio::before { .vote-ratio::before {
content: ''; content: '';
position: absolute; position: absolute;
height: 1px; height: 100%;
opacity: 10%;
width: 100%; width: 100%;
left: 0; left: 0;
bottom: 0px; bottom: 0px;
z-index: 10; z-index: -10;
background: linear-gradient( background: linear-gradient(
to right, to right,
var(--color-indigo-500) calc(var(--vote-ratio) - 5%), var(--color-indigo-500) calc(var(--vote-ratio) - 4%),
var(--color-red-500) calc(var(--vote-ratio) + 5%) var(--color-red-500) calc(var(--vote-ratio) + 4%)
); );
} }
</style> </style>