Skip to content

Commit

Permalink
Adjust help/dark mode toggle positioning
Browse files Browse the repository at this point in the history
Make sure the dark mode toggle and help button scroll out of view
instead of being fixed. This prevents annoying overlap at certain screen
widths.
  • Loading branch information
danrahn committed Jan 15, 2024
1 parent 94112a5 commit 19f6673
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 13 deletions.
15 changes: 10 additions & 5 deletions Client/Style/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -430,9 +430,15 @@ input:focus-visible {
border-color:var(--theme-focus-color);
}

#topRightControls {
position: relative;
top: 30px;
}

#helpContainer {
position: absolute;
top: 30px;
top: 0;
right: 0;
}

#helpBtn {
Expand All @@ -446,8 +452,7 @@ input:focus-visible {

#toggleContainer {
position: absolute;
top: 30px;
right: 60px;
right: 30px;
}

#darkModeToggle {
Expand Down Expand Up @@ -713,7 +718,7 @@ input:focus-visible {
height: 10px;
}

#helpContainer {
#topRightControls {
right: 30px;
}
}
Expand All @@ -733,7 +738,7 @@ input:focus-visible {

/* The help button runs into the same issues as the theme toggle.
* We don't want to hide it though, so just adjust its right margin to give it more room. */
#helpContainer {
#topRightControls {
right: 10px;
}
}
18 changes: 10 additions & 8 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,16 @@
<body>

<div id="plexFrame">
<div id="helpContainer" title="Show Help" tabindex="0">
<svg id="helpBtn"></svg>
</div>
<div id="toggleContainer" title="Toggle Dark Mode" tabindex="0">
<label id="darkModeToggle" for="darkModeCheckbox">
<input type="checkbox" name="darkModeCheckbox" id="darkModeCheckbox" title="Toggle Dark Mode">
<span class="toggle"></span>
</label>
<div id="topRightControls">
<div id="helpContainer" title="Show Help" tabindex="0">
<svg id="helpBtn"></svg>
</div>
<div id="toggleContainer" title="Toggle Dark Mode" tabindex="0">
<label id="darkModeToggle" for="darkModeCheckbox">
<input type="checkbox" name="darkModeCheckbox" id="darkModeCheckbox" title="Toggle Dark Mode">
<span class="toggle"></span>
</label>
</div>
</div>
<div id="intro">
<h1 id="siteTitle">Marker Editor <i id="settings" class="hidden" title="Settings" tabIndex="0"><svg></svg></i></h1>
Expand Down

0 comments on commit 19f6673

Please sign in to comment.