Fixes data type inconsistency between `isDarkTheme` (int) in `academic.js` and
`isSiteThemeDark` (bool) in `site_js.html` that might prevent proper initialization of Mermaid diagrams.
See #1745Fixes#1742
Rather than a 3-way icon-based toggle through light, dark, and automatic modes, present the user with a dropdown list of modes displayed in full textual representation.
Adds language pack options for translating `theme_light`, `theme_dark`, and `theme_auto`.
See #1596
Fixes:
- There is no easy way for a user to reset their day/night preference back to automatic (currently, they must use their web browser to clear the local storage data for the site)
- When changing the theme variation is disabled by admin (by setting `day_night` to `false` in `params.toml`), the operating system's day/night preference is still applied
- If the admin removes the option to change the theme variation, the preference for a user who already visited the site is still read from the localstorage and applied. For example, this could result in the user seeing a theme variation with poor contrast that was not intended to be shown as the site's theme was optimized for the other variation.
Fix#1385Fix#1526Fix#1534
As of a recent update, gallery and figure images are lazy loaded. However, lazy loading without initial sizes defined can lead to inaccurate anchor scrolling and active link highlighting as the anchor offset changes after an uncached image occurring before the anchor is lazily loaded.
See https://github.com/gcushen/hugo-academic/issues/1199#issuecomment-577293818Fix#1199
Attempt improvement by moving the scroll to anchor logic to the end of window load and adding 1 to elementOffset in case of navbar border.
Appears to solve any issues that could arise (such as when clicking Courses and then Publications, but Projects being highlighted instead) in local testing.
See https://github.com/gcushen/hugo-academic/issues/1199#issuecomment-577293818
See #1199
- On mobile, position toggle on left and logo in centre (adopt standard)
- Show Search, Day/Night, and Language icons in mobile menu bar
- Add option to align menu items to left, centre, or right
- Add option to remove logo image/text from menu
- Complete navbar SCSS redesign, making use of Bootstrap vars
- Add automatic menu dropdowns on mouseover (for desktop)
Also,
- Apply live day/night update on system prefs change (no need for refresh)
- Add Mermaid security level on init - a req. for latest Mermaid version
BREAKING CHANGES:
menu_align_right option removed from params.toml
main_menu option added to params.toml
Close#1418
- Upgrade MathJax from v2 to v3
- Updated Highlight, Leaflet, Fancybox, Mermaid, FontAwesome
- Fixed multilingual icon paths in Web App Manifest
- View Demo script now binds to all network I/F to enable testing on
other physical devices like smart phones
BREAKING CHANGES:
Removed `plugins_css` from `params.toml`.
Override `custom.scss` to add custom styling.
Close#1400
Guidance for using math going forward:
- add `markup: mmark` to front matter
- no longer need to escape inline or block math in body
Also, fix Mmark task lists by removing bullet points.
Block math in body can now be wrapped in "<div>$$...$$</div>" tags
Inline math in body can now be wrapping in "`$...$`" backticks
Diagrams can now be created without shortcodes: "```mermaid ... ```"
Fixes some edge cases caused due to responsive navbar height and dynamic
Portfolio widget height, as well as case where offset was non-integer,
requiring float to be rounded up.
Fix#1199
To use, add `diagram: true` to a page's YAML front matter and create a
diagram from text in the body of the Markdown file using Mermaid syntax:
https://mermaidjs.github.ioClose#1111
Also,
- Fix ScrollSpy link scrolling/highlighting not working on widget pages
except the home page
- Add `docs_section_pager = true` to `params.toml`.
- Add more demo tutorial pages and content to showcase the improved
navbar highlighting for child pages and the table of contents feature.
- Bump version in prep. for release
Close#991
Remove Bootstrap from Header and assets.toml
Remove Bootstrap JS CDN version in footer and assets.toml
Add latest Bootstrap v4 SASS files locally
Include Bootstrap JS locally
Convert Academic's CSS to SASS (mainly SASS variables + Go templating)
Convert Academic's theming system to integrate with SASS
Parse SASS in header using Hugo and convert to CSS
Minify and md5 fingerprint bundled CSS
Fix Slider widget (reuses .wg-hero but animation and `clear` removed)
Add Bootstrap files to repo so that Node is not required
See #680
* Search icon added to navbar if search enabled in config
* New search dialog added which overlays current page when searching
* The docs search box now opens the new search dialog instead of
displaying results within the docs page itself
Close#784
BREAKING CHANGE:
Search widget is deprecated and `content/home/search.md` should be
removed
Remove fingerprinting from MathJax config JS to shorten its generated
filename. Reduces chance of JS filenames becoming too long for user's OS
to handle due to long Sha512 asset fingerprinting.
Minifies and fingerprints Academic's own JS for faster loading and to
prevent old versions getting cached by web browser.
Refactors Algolia search JS into its own file.
Close#768
See #794