mirror of
https://github.com/Sped0n/bridget.git
synced 2026-04-14 10:09:31 -07:00
feat: embed threshold and index val of navbar into html/inline js (#241)
* feat: refactor image retrieval logic and improve variable initialization - Add a new file `layouts/partials/function/getImageSlice.html` - Initialize variables `$context`, `$Path`, and `$params` - Set `$Path` based on the result of the `partial/function/currentMenuItem.html` partial - Retrieve the page `$gallery` based on `$Path` - Return all resources of type `image` from `$gallery` * refactor: adapt getImageSlice function to `single.json` * feat: refactor navigation UI components to use static go template * feat: update navigation functionality and threshold rendering
This commit is contained in:
@@ -36,11 +36,6 @@ const indexDispNums = Array.from(
|
||||
*/
|
||||
|
||||
export function initNav(): void {
|
||||
const s = state.get()
|
||||
// init threshold text
|
||||
updateThresholdText(expand(s.threshold))
|
||||
// init index text
|
||||
updateIndexText(expand(s.index + 1), expand(s.length))
|
||||
// add watcher for updating nav text
|
||||
state.addWatcher((o) => {
|
||||
updateIndexText(expand(o.index + 1), expand(o.length))
|
||||
|
||||
Reference in New Issue
Block a user