Commit Graph
88 Commits
Author SHA1 Message Date
George Cushen 0994df7177 feat: allow SVG as Hero image 2021-04-18 20:41:34 +01:00
George Cushen 171648c808 fix: style mb 2021-04-16 21:57:38 +01:00
George Cushen 153cf5b780 feat(widget): show brand logo in Experience + Accomplishments
To use, add SVG brand logo in lowercase to your `assets/media/icons/brands/` folder

BREAKING CHANGE:

Rename `assets/media/icon-pack/` to `assets/media/icons/`

Close #2259
Close #1781
2021-04-13 20:07:59 +01:00
George Cushen cf32fde824 refactor: yarn format 2021-03-08 21:25:18 +00:00
George Cushen bd11c2663b fix: Mermaid diagrams not rendered on race condition
Appears to be race condition when using Mermaid's automatic rendering with `startOnLoad: true` option.

Workaround by manually rendering diagrams.
2021-03-08 21:19:19 +00:00
George Cushen ae4d671d4c feat(style): wider XL container 2021-03-05 17:47:29 +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 98294a9f1d refactor: simplify Figure style 2021-03-04 17:42:29 +00:00
George Cushen 0c48d88d80 feat: add support for Figure image theme and max_width
New options:

`theme="light"` inverts image when browsing in dark mode
`theme="dark"` inverts image when browsing in light mode
`max_width="300px"` sets an image max width

Also, improves use of Figure in `{{%` Markdown shortcodes (e.g. Callout) by further stripping HTML indentation.
2021-02-22 20:11:22 +00:00
George Cushen 1d58e5e819 feat: rename assets/images/ to assets/media/ and auto detect sharing image
The file uploader in Wowchemy CMS has also been updated to reflect the change.

BREAKING CHANGES:
- rename assets/images/ to assets/media/
- move default social sharing image (if any) to assets/media/sharing.*
2021-02-20 17:28:11 +00:00
George Cushen 05c772f389 fix: responsive Figure aspect ratio in Safari
See https://discord.com/channels/722225264733716590/742863504515793149/812308038174244904
See https://stackoverflow.com/a/61196907
2021-02-19 13:35:16 +00:00
George Cushen 3ae036b9c3 feat(style): update Bootstrap from 4.5 to 4.6
Get fixes and minor improvements
2021-02-19 10:01:40 +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 68595a20ae feat(shortcode): revert to img SVGs
Cacheable, zoomable, and lazily loaded.

Also, prevents conflicts if admin attempts to include multiple inline SVGs which unintentionally reuse each other's components.
2021-02-17 22:21:39 +00:00
George Cushen 0fd5d2a250 feat(style): center figure SVGs 2021-02-17 21:15:12 +00:00
George Cushen 7b235ea453 feat: rewritten Figure shortcode supporting multi-resolutions
New shortcode supports
- enable re-usable *optimized* image assets from new primary media library location at `assets/images/`
- new behavior: load image from page dir falling back to media library at `assets/images/` and then to remote URI.
- multi-res support. leading to increased perf.
- custom ID for cross-refs
- efficient, vanilla (non-jQuery), MIT licensed image zooming
- FancyBox now only loaded for Gallery shortcode
- themeable SVG support
- native lazy loading

Experimental, may change.

BREAKING CHANGE:
Move any figure images (i.e. not the `sharing.*` image) from `static/media/` to `assets/images/`

See #2164
2021-02-14 22:59:12 +00:00
George Cushen c36f3b7878 feat: auto scroll active book menu and ToC links into view
Also, fix ScrollSpy highlighting previous ToC link for some Book anchors.

Close #1964
2021-02-10 08:25:28 +00:00
George Cushen 211d8b330b feat: add support for emoji lists
With new `emoji_list` shortcode. For example:

```
{{% emoji_list %}}
- 🔥 sdf
  - 🔥 sdf
- 🔥 sdf
{{% /emoji_list %}}
```
2021-02-10 07:55:09 +00:00
George Cushen 60d36e66d2 refactor: rename options for maps, search, and comments
Use provider names rather than integers.

BREAKING CHANGE:

- Rename `site.Params.comments.engine` to `site.Params.comments.provider`
- Rename `site.Params.search.engine` to `site.Params.search.provider`
- Rename `site.Params.map.engine` to `site.Params.map.provider`
- Use provider name (string) rather than integer
- For built-in search, provider is "wowchemy"
- For leaflet maps, the provider is "mapnik" or "mapbox"
2021-02-09 21:19:42 +00:00
George Cushen 50d3d41e9e feat: dispatch wcThemeChange event to support themeable user plugins
See https://discord.com/channels/722225264733716590/742863504515793149/807370581611511858
2021-02-05 22:48:25 +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 5072eddcc1 feat: add Wowchemy CMS module 2021-02-03 20:32:25 +00:00
George Cushen 3b32a8188f feat(style): dynamically theme SVGs
And refactor HL shortcode to use semantic <mark>
2021-02-02 23:45:20 +00:00
George Cushen cbf15cd470 fix(slides): enable menu by default 2021-01-20 01:34:24 +00:00
koutbo6 de6860b8b3 feat(slides): upgrade reveal.js from v3.8.0 to v4.1.0 (#2018) 2021-01-19 23:22:34 +00:00
George Cushen 273405e59b refactor: modularise styles + fix more style lint issues 2021-01-14 21:01:41 +00:00
George Cushen ac4b4e3157 fix: style lint issues 2021-01-13 21:27:12 +00:00
George Cushen 362cb1510b feat: add CSS postprocessing support
Enabled with env `WC_POST_CSS="true"`
2021-01-10 17:23:17 +00:00
George Cushen a4bc42feb6 refactor: lint JS
Follows on from d18b2c9def
2021-01-09 19:53:11 +00:00
George Cushen e233094d2c Revert "refactor: format code"
This reverts commit 067b2a7f

Github Action didn't pick up ignored file list.
2021-01-09 19:51:56 +00:00
gcushen 067b2a7f09 refactor: format code 2021-01-09 19:38:09 +00:00
George Cushen d18b2c9def refactor: lint JS and SCSS
Add JS and style linters.
All JS linted and refactored.
TODO: Further SCSS refactoring required - temporary "no-descending-specificity" rule added.
2021-01-09 18:13:47 +00:00
George Cushen 79b48a3730 refactor(style): run code formatter 2021-01-08 23:58:43 +00:00
George Cushen 3d8b76f092 refactor(js): run code formatter 2021-01-08 23:29:50 +00:00
George Cushen 7b3aff07a7 feat: migrate to latest web best practices
Improve accessibility, informed by Google Lighthouse insights.

Part 3
2021-01-08 18:50:55 +00:00
George Cushen 68b9925c93 fix(js): no Popper tooltips when search disabled
Fix #2084
2021-01-06 23:32:22 +00:00
George Cushen 4b9ee3021c feat: migrate to latest web best practices
Informed by Google Lighthouse insights.

The demo of the light Academic template now achieves 100% Accessibility, 100% Best Practices, and 100% SEO scores.

Hero image can now be moved from the media library to the widget page folder, e.g. `home/`, to become responsively sized.
2021-01-06 21:55:05 +00:00
George Cushen fe24b613d5 fix(scss): shortcut overflow with some font packs
Fix 7c3ee80
2021-01-05 22:55:57 +00:00
George Cushen 7c3ee805f7 feat: change behavior of sidebar search to open modal
Scope: the built-in search engine.

Provides one consistent interface for searching and thus surfacing common search queries to the user and in future typeahead.

Also, display the search keyboard shortcut and improve accessibility in Book TOC menu.
2021-01-05 22:37:27 +00:00
Tony Lam 6bcba757cd feat(js): migrate Google Maps options to be compatible with latest API
Google have deprecated and changed options in the API.

See https://developers.google.com/maps/documentation/javascript/reference/map
See #2075
2021-01-05 19:09:58 +00:00
George Cushen ccd2ab1ce2 fix(js): case of theme variation flicker
The set of conditions that can cause a flicker in this case are `day_night: true` (allow visitor to change theme mode) with a dark theme (`light: false`) and a user device which prefers dark themes.

Fix #2080
2021-01-05 18:54:35 +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
Christian Olsen 14a72fa460 feat: add support for breadcrumb navigation (#2009)
Adds support for breadcrumb navigation on Book pages.

Consider this feature experimental for now as it may still change. Add the following to bottom of `params.toml` to use:

```
[breadcrumb]
  page_types = {book = true}
```

Future work: prefix link title with page icon when set in order to be consistent with Book menu links (https://github.com/wowchemy/wowchemy-hugo-modules/pull/2009#discussion_r549530364)
2020-12-30 18:16:47 +00:00
George Cushen 219b05cbd2 refactor: support any event type
Informed by user demand to support all event types rather than just talks.

Brings consistency to further align Academic and Research Group templates.

BREAKING CHANGE:

Rename `talk` folder to `event`
Remove `type` set to `talk` in any event front matter (if applicable)
To keep existing `/talk/` URLs, set the following in `config.toml`:

```
[permalinks]
  events = "/talk/:slug/"
```
2020-12-28 23:18:01 +00:00
George Cushen ed047ad576 fix(css): hide any .article-style Y-overflow
Close #2051
2020-12-28 16:56:44 +00:00
George Cushen e47738df59 feat: add Earth theme pack 2020-12-21 15:32:45 +00:00
George Cushen ce5b08f719 fix(css): scroll wide tables
Caused by a previous commit which added word-break to `article-style`.

Fix #2044
2020-12-21 14:41:54 +00:00
George Cushen 817e89f73b feat(css): allow gradient section BGs in color theme packs 2020-12-21 01:00:35 +00:00
George Cushen 0eb331a7f6 fix(js): theming flash
Fix case of potential theming flash when `day_night` disabled.

Fix 6c434e6de2
2020-12-21 00:59:06 +00:00
George Cushen 6c434e6de2 refactor: fixMermaid() to dedicated vanilla JS module
Refactored from JQuery.
Module can now also be imported for use in Reveal v4 PR.

Also fix Theme Chooser due to 5b7f5da refactor.

See #2018
Fix 5b7f5da
2020-12-20 00:45:21 +00:00