Commit Graph
73 Commits
Author SHA1 Message Date
George Cushen c3faa9439d fix: color of back to top arrow in dark mode
Fix #1560
2020-03-06 21:07:12 +00:00
George Cushen 2dec2f91dc fix: encapsulate font-families in quotes
Fixes issue with using font names containing a space followed by a number such as `Exo 2`.

Fix #1548
2020-03-06 19:24:55 +00:00
George 4f2daafe51 fix: inconsistent breakpoints for body margin-top and navbar height
Breakpoints for dynamic navbar height and corresponding body margin-top offset differed slightly.

Fix #1577
2020-03-05 20:04:46 +00:00
George Cushen 5e62b09331 fix: day/night mode and enable reverting to the default auto day/night mode
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 #1385
Fix #1526
Fix #1534
2020-02-09 00:10:45 +00:00
George Cushen 55228b7ade fix: lazy loading causing inaccurate anchor scrolling + link highlighting
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-577293818
Fix #1199
2020-01-23 23:44:08 +00:00
George Cushen 4a7f4dc088 fix: improve active link highlighting for edge cases
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
2020-01-23 22:36:42 +00:00
George Cushen d9e553a96b style: upgrade Bootstrap from 4.3.1 to 4.4.1 2020-01-23 22:15:37 +00:00
George Cushen 350beb358b fix: only allow auto day/night when day_night enabled
Fix #1526
2020-01-20 11:19:55 +00:00
George Cushen 1a3efac296 feat: add support for displaying square avatars
Also, make About widget avatar responsive, appearing larger on large devices.

BREAKING CHANGE:
`gravatar` option moved under new `[avatar]` section in `params.toml`.
`shape` option added under new `[avatar]` section in `params.toml`.

Close #1509
2020-01-12 14:27:27 +00:00
George Cushen ce75013228 feat: automatically generate website icons
See #1439
2019-12-28 23:48:40 +00:00
George Cushen 42defb4684 fix: highlight active ToC item for Goldmark (Hugo v0.60)
Equivalent to previous workaround for Hugo's Blackfriday ToC in ea2a98a2c3

See ea2a98a2c3
2019-12-09 18:29:06 +00:00
George Cushen ea2a98a2c3 feat: add support for Hugo v0.60 - remove Blackfriday TOC workaround 2019-12-07 20:37:26 +00:00
George Cushen 6d97e95942 feat: add support for Hugo v0.60 2019-12-07 19:58:43 +00:00
George Cushen 981704c0d8 fix: navbar logo is too big on Firefox
Fix #1449
2019-12-07 16:22:17 +00:00
George Cushen 197b5d1f06 fix: off-centre logo on mobile
Fix #1436
Close #1437
2019-11-24 14:16:21 +00:00
George Cushen 037d75f6da fix: race condition between HighlightJS and Mermaid
In some cases, the race condition could prevent Mermaid diagrams from being rendered.

Fix #1434
See #1298
2019-11-21 21:41:58 +00:00
George Cushen d7749fdaa8 fix: theme's menu_text_active stopped working
Fix #1430
2019-11-18 23:11:01 +00:00
George Cushen 51c0d87e54 fix: dropdowns broken in main menu
Also fixed dropdown style.

In order to fix, temporarily disabled horizontal scrolling of menu item overflow.

Fix 766c559
Fix #1425
2019-11-18 00:55:31 +00:00
George Cushen 766c559e50 feat: improve mobile-first menu
- 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
2019-11-16 15:42:31 +00:00
George Cushen f30d3252a7 refactor: rename sass folder to scss 2019-10-19 20:53:42 +01:00
George Cushen ede8cef959 feat: update vendor assets & refactor custom CSS path
- 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
2019-10-19 20:33:56 +01:00
George Cushen ec8b60f71f feat: move social share buttons below content
Also, add page_footer.html to help make page footers more consistent.

Close #1383
2019-10-12 17:23:08 +01:00
George Cushen 44f9170f07 fix: in-page anchor scrolling on mobile 2019-10-05 18:39:33 +01:00
George Cushen 18ae2268f3 feat: add bg size, position, and parallax options to Widget Pages
#  Options are `cover` (default), `contain`, or `actual` size.
image_size = "actual"
# Options include `left`, `center` (default), or `right`.
image_position = "right"
# Use a fun parallax-like fixed background effect? true/false
image_parallax = true

See #1377
2019-10-02 21:18:34 +01:00
George Cushen 6d0c021011 feat: improve search for diacritics + Chinese/Korean/Japanese languages
Close #1361
2019-09-28 15:25:26 +01:00
George Cushen 829995656e fix: console error when clicking back_to_top button
Note: bug did not affect functionality, still scrolled to top.

Fix #1352
2019-09-22 14:34:24 +01:00
George Cushen 2192b11d04 style: center figure captions
Since figures are now centered.
2019-09-14 19:41:11 +01:00
George Cushen eacadc7935 feat(search): show talk and publication abstracts in results
Instead of their page bodies which are often empty.

Close #1253
2019-09-11 15:39:04 +01:00
George Cushen aa13a4d28c feat(themes): implement new font sizing system
Specify `font_size` as s, m, or l in `params.toml`.
Font size is now a site setting rather than theme setting.

Also:

Be less strict on user input of theme and font set names - allow lower
or upper case as well as spaces.
Fall back to Minimal theme and font set on user input error.
Keep category icon on same line as category links, otherwise context
lost.
Change search-header position in modal now that it overlays entire page
*including* navbar.
2019-08-30 13:40:45 +03:00
George Cushen 15e7aa01c3 style: fix aside to appear same as alert 2019-07-30 23:33:05 +01:00
George Cushen a6504816bb style: fix Bootstrap light theme overriding dark .text-muted 2019-07-21 20:00:41 +01:00
George Cushen c8832e3881 feat: revert Blackfriday math workaround
Also see 255b5e8462
2019-07-20 19:44:30 +01:00
George Cushen 255b5e8462 feat: revert Blackfriday math workaround + improve Mmark support
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.
2019-07-20 19:43:13 +01:00
George Cushen 42932824ba fix: Mmark aside style should match that of Alert shortcode
See #1214
2019-07-20 19:18:02 +01:00
George Cushen 5b4d11825e demo: fix typo 2019-07-18 00:55:24 +01:00
George Cushen 0cffd47aca fix: improve handling of math and diagrams
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 ... ```"
2019-07-18 00:45:14 +01:00
George Cushen a8c4f887e5 fix: navbar active link highlighting and scrolling
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
2019-07-11 20:54:52 +01:00
Alessandro Bahgat d9e3e9fcfa fix: 8ddf0ca406 (#1193)
8ddf0ca406 introduced a spurious token
that breaks scrolling back to top
2019-07-09 19:35:07 +01:00
Mingyu Derek MA 8ddf0ca406 feat: automatically turn on night mode if visitor prefers dark themes (#1041) 2019-07-07 21:10:11 +01:00
George Cushen 263926cc45 fix: opening lightbox or search modal causes navbar to move
Edge case caused by page having scrollbar and initial state of lightbox
or search modal not having a scrollbar.

Fix #1177

See https://github.com/fancyapps/fancybox/issues/360
See http://fancyapps.com/fancybox/3/docs/#faq
2019-07-04 21:30:34 +01:00
George Cushen da24df810d fix(js): Chinese TOC links not scrolling to ID on click
Fix #1178
2019-07-02 21:29:33 +01:00
George Cushen 80b3eb6ac4 feat: add placement option for featured images
Placement options: 1 = Full column width, 2 = Out-set, 3 = Screen-width.
Defaults to 1, full column width.
Deprecates the split title/image style that was shown on XL displays.

Close #1175
2019-07-01 18:45:38 +01:00
momchil-anachkov e4f0e80dfb fix: browser back button after searching does not behave properly
Switch URL updating strategy from pushState to replaceState in order to avoid pushing all search queries to the browser history

Fix #1166
2019-07-01 11:27:05 +01:00
George Cushen 94cee73155 style(theme): replace Playfair and Cupcake with new Rose theme
Also:
- Make nav links normal font weight
- Make XL container wider
- Update Google Fonts URL
- Explicitly add Twitter Image metadata
2019-06-27 01:26:23 +01:00
momchil-anachkov 9a18bf2211 fix(search): after dialog closes, results reappear on refresh (#1161) 2019-06-26 16:46:47 +01:00
George Cushen 83d7751855 style(shortcode): show zoom-in cursor when hovering lightbox image 2019-06-20 10:42:51 +01:00
Russell J. Hewett f2ba31b0ec style(shortcode): enable lightbox to be used with non-gallery images (#1145) 2019-06-19 22:09:59 +01:00
George Cushen 4fed5675e9 fix(style): code font-family no longer loaded from font theme
$sta-font-mono was referenced as literal during CSS->SCSS conversion.

Fix #1139
2019-06-15 14:45:35 +01:00
George Cushen 63953ab3d4 style: improve consistency if Hugo --minify used 2019-06-02 23:19:57 +01:00
George Cushen 07d94380f2 feat(docs): highlight active page section in right sidebar TOC
Fix #1099
2019-06-02 18:54:18 +01:00