Skip to content

Commit

Permalink
Add info on inwards-drifting bikes
Browse files Browse the repository at this point in the history
  • Loading branch information
bbrk24 committed Mar 17, 2024
1 parent 9241b6d commit 4d7682a
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 9 deletions.
9 changes: 5 additions & 4 deletions index.css
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,6 @@ menu {
}
}

.info {
text-decoration: dotted underline;
}

:root {
--meter-length: 0;
}
Expand Down Expand Up @@ -82,6 +78,11 @@ menu:empty {
margin: 0.25em 0;
}

.info::before {
content: "\00fe0e\002139";
text-decoration: dotted underline;
}

#rivals {
margin-top: 0.5em;
min-height: 2.5em;
Expand Down
3 changes: 3 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,9 @@
<option value="yes">Only</option>
<option value="no">Ignored</option>
</select>
<span class="info"
title="Some bikes shift their center of gravity inwards while drifting, making them handle very differently. Select &quot;Only&quot; to only see these bikes, or &quot;Ignored&quot; to omit these bikes."
></span>
<br />
<button type="button" id="limit-characters">Limit characters</button>
<button type="button" id="limit-karts">Limit karts</button>
Expand Down
11 changes: 6 additions & 5 deletions src/index.civet
Original file line number Diff line number Diff line change
Expand Up @@ -177,13 +177,8 @@ rivalsDiv := document.createElement 'div'
rivalInfoString := 'When playing as P1 in a Grand Prix, these characters are guaranteed to be COM characters and should be better than other COMs, unless they are chosen by other players. Not all characters have rivals.'

document.createElement 'sup'
||> .textContent = '\ufe0e\u2139'
||> .className = 'info'
||> .title = rivalInfoString
||> .addEventListener
'click'
-> alert rivalInfoString
{ +passive }
||> rivalsDiv.appendChild
rivalsDiv.append ': '

Expand Down Expand Up @@ -327,3 +322,9 @@ document.querySelector 'button[type="reset"]'
limitedData = structuredClone data
menu.innerHTML = ''
currMenu = undefined

document.querySelectorAll '.info'
.forEach .addEventListener
'click'
-> alert @title
{ +passive }

0 comments on commit 4d7682a

Please sign in to comment.