Commit Graph
11 Commits
Author SHA1 Message Date
George Cushen 8bba30b81a fix: unminified JavaScript (#2305)
Repeat prev commit action on the init script
2021-05-25 19:51:11 +01:00
George Cushen 1475a49114 fix: JS convert ESM back to iife 2021-03-06 21:45:15 +00:00
George Cushen d70e23ef55 refactor: build JS as ESM
Remove Bootstrap sourcemap ref as Hugo doesn't detect/publish it.
2021-03-04 19:00:51 +00:00
George Cushen ad6e481c0a feat: add options for page specific styling or integrations
Page's ID applied to body as `data-wc-page-id`. Can be accessed via CSS and JS to perform page-specific styling or integrations.

Also, introduces new page parameters, similar to widget params:
design.css_style
design.css_class

Close #1975
2021-02-25 16:08:09 +00:00
George Cushen f37581febe refactor: reflect renamed default branch
site.Params.edit_page.repo_branch will now also default to `main` if unset.
2021-02-19 09:04:29 +00:00
George Cushen aa1071adfc feat: support site.Params.marketing.google_optimize
Also:

- refactor Bootstrap JS out of wowchemy.js for easier maintenance
- refactor lengthy env checks to hugo.IsProduction
- refactor window.PlotlyConfig from inline JS to the init script
- no longer prevent loading GA if GTM provided, in case user wants both
2021-02-05 20:30:40 +00:00
George Cushen 25e0b0627f feat: support common queries in search dialog
Common queries can be added to `data/search_queries.yaml` (experimental feature).
Refactor Wowchemy keyboard shortcut parser.
Fix JS/CSS assets being minified/fingerprinted in dev env.

Close #2060
2020-12-30 22:46:46 +00:00
George Cushen 786b0341ee feat: migrate to ES6 modules + Hugo's JS build system
The latest Hugo version, v0.78, enables support for JS ES6 module build support within Hugo/Go modules.

Initial refactor to ES6 modules with imports/exports. Further refactoring todo.

Refactor to use Hugo's new approach to JS param injection.

Refactor theming code from JQuery to vanilla JS.

Add fix for browser deprecation of the MediaQueryList listener.

Requires Hugo 0.78+

See #1929
See #1930
See #1402
2020-11-15 16:12:52 +00:00
George Cushen f851142fb2 feat: push footer to window bottom for short pages
Also, for Card view, add image zoom on hover.
2020-10-28 22:37:13 +00:00
George Cushen c4ce9f5bd3 feat(menu): change palette icon to moon + add option to hide search
- a static moon icon is currently commonly used by popular sites such as Facebook and Reddit to represent a light/dark chooser
- fix automatic light/dark theming when the chooser is hidden with `show_day_night` set to `false`
- add boolean `show_search` option to `main_menu` in `params.toml` to hide search button from main (still accessible from the standard / keyboard shortcut)
2020-09-20 14:26:29 +01:00
George Cushen 86da39719c refactor: hugo-academic to wowchemy sub-module 2020-09-02 20:59:27 +01:00