feat: add vote ratio bar
This commit is contained in:
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>
|
||||||
Reference in new issue
Block a user