Skip to content

Commit

Permalink
allow for sticky columns
Browse files Browse the repository at this point in the history
  • Loading branch information
mart2070 committed Feb 5, 2025
1 parent 91849b7 commit c2491ee
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions tdx-enhanced.js
Original file line number Diff line number Diff line change
Expand Up @@ -397,6 +397,15 @@
}
}
}

//apply sticky columns
let stickyColumns = settings('get','stickyColumns')
if (stickyColumns) {
[...document.querySelectorAll(".desktop-column")].forEach(column=>{
column.style.position = "sticky"
column.style.top = "45px"
});
}
}

function invertHex(hex) {
Expand Down Expand Up @@ -1039,6 +1048,10 @@
<option value="default">Default</option>
<option value="1_100-66-33">100% / 66-33%</option>
</select>
<div>
<input type="checkbox" id="stickyColumns" name="stickyColumns" value="enabled" />
<label for="stickyColumns">Sticky Columns</label>
</div>
</div>
<div>
<h4>Link Behavior</h4>
Expand Down Expand Up @@ -1195,6 +1208,9 @@
if (form) {
let elements = form.elements
form[setting].value = value
if (form[setting].type=="checkbox") {
form[setting].checked = value=="enabled" ? true : false
}
}
}

Expand Down Expand Up @@ -1508,6 +1524,7 @@
#settingsForm .flex {
display: flex;
gap: 24px;
align-items: baseline;
}
#settingsForm .textBox {
Expand Down

0 comments on commit c2491ee

Please sign in to comment.