Skip to content

Commit

Permalink
Display vote count in icon preview
Browse files Browse the repository at this point in the history
  • Loading branch information
OctoNezd committed Mar 26, 2024
1 parent bda3d46 commit 0413670
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/features/iconRegulator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,13 @@ class IconSizePreview extends SettingOption {
super("", "");
// @ts-ignore
this.element = document.createElement("div");
this.element.classList.add("iconSizeDemo");
this.element.innerHTML = `
<p class="ol-set-title ol-setting">Preview: </p>
<ul class="flat-list buttons">
<li class="ol-vote-container">
<a class="ol-upvote" href="javascript:void(0)">arrow_circle_up</a
><a class="ol-downvote" href="javascript:void(0)">arrow_circle_down</a>
><p class="ol-votecount">42</p><a class="ol-downvote" href="javascript:void(0)">arrow_circle_down</a>
</li>
<li class="first">
<a
Expand Down
3 changes: 3 additions & 0 deletions src/features/posts/css/votes.scss
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,9 @@
font-size: 125%;
}
html:not(.votesNearButtons) {
.iconSizeDemo .ol-votecount {
display: none;
}
.ol-votecount::after {
content: " votes ";
}
Expand Down

0 comments on commit 0413670

Please sign in to comment.