Commit Graph
176 Commits
Author SHA1 Message Date
George Cushen d9ff93a1c2 feat: make media library dir configurable
Move default media library from static/img/ to static/media/ as it can now contain audio, video, and other kinds of media in addition to images.

BREAKING CHANGE:
Either rename your site's static/img/ to static/media/ (and update any references to this folder in your Markdown files);

Or, add `media_dir = "img"` to `params.toml` to continue using the legacy location.
2020-07-29 18:54:28 +01:00
George Cushen 486c70c216 feat: add Netlify form options to Contact widget
Help reduce spam
2020-06-30 19:53:06 +01:00
George Cushen 3cb96be5c6 feat: rename custom icon pack from svg to custom
# To use custom SVG icons.
# Place custom SVG icon in `assets/images/icon-pack/`, creating folders if necessary.
[[feature]]
  icon = "beach-sunset"
  icon_pack = "custom"
  name = "Surfing"
  description = "90%"

See #1692
2020-05-14 23:46:31 +01:00
George Cushen a357b09682 feat: enable emoji and custom SVG icons in Featurette widget
# To use emoji icons.
[[feature]]
  icon = "😄"
  icon_pack = "emoji"
  name = "Emojiness"
  description = "100%"

# To use custom SVG icons.
# Place custom SVG icon in `assets/images/icon-pack/`, creating folders if necessary.
[[feature]]
  icon = "beach-sunset"
  icon_pack = "svg"
  name = "Surfing"
  description = "90%"

Close #1149
Close #1692
2020-05-14 23:42:44 +01:00
George Cushen f78feefee9 feat: add support for non-ASCII tags, authors, and categories
For example, now Chinese can be used in the names of tags, authors, and categories.

Previously, this was blocked due to bugs in Hugo.

As of Hugo v0.65, new functionality for taxonomies was introduced. The Hugo taxonomy feature powers authors, categories, and tags in Academic.

BREAKING CHANGE:
Requires Hugo v0.65+
2020-04-24 20:32:58 +01:00
George Cushen 601620c7a6 feat: make taxonomy URLs singular
- make taxonomy URLs singular, consistent with other Academic pages (workaround Hugo attempting to publish taxonomy URLs with plural names). This requires the breaking change below.
- Fix extra space/lines appearing in the author cards underneath page content as reported at https://spectrum.chat/academic/help/publication-widget-adds-additional-lines-at-bottom-of-the-page~315f77d8-7cc8-44a9-a431-5b64b7556c53

BREAKING CHANGE:
Rename `name` to `title` in author profiles within `author/` folder.
2020-04-15 01:17:56 +01:00
George Cushen ebfb1d9fff feat: support alt-text for featured images
An optional `alt_text` parameter can be added when specifying a featured `image` in a page's front matter.

Alt text is used to describe the image when the page is read via a screen reader.

This commit also changes profile photo alt text from "avatar" to the person's name in alignment with major CMS and social sites.

Close #1592
2020-03-14 01:05:25 +00:00
George Cushen 90aca0659c feat: filter by author in Pages and Featured widgets
To use, just set an `author` filter to a username in instances of the Pages or Featured widget:

```
[content.filters]
    tag = ""
    category = ""
    publication_type = ""
    author = "admin"
```

Close #1422
2020-03-06 19:51:04 +00:00
George 337a554a25 feat(widget): add option to link to archive from Feature widget (#1557)
To add a "See all" link underneath featured content, set `link_to_archive = true` under the `[content]` section in the front matter of the Featured widget.
2020-03-05 20:37:58 +00:00
George Cushen 94e6169320 fix: revert "fix: workaround Hugo GetPage/urlize bug with non-ASCII usernames"
This reverts commit 03af4df1

Ensure `removePathAccents = true` in `config.toml` to workaround the Hugo bug: https://github.com/gohugoio/hugo/issues/5687

Fix #1575
Fix #1563
2020-03-05 19:54:20 +00:00
George Cushen 242479c5ed feat: add support for displaying square avatars
Simplify generated avatar resources and commit.

See #1509
2020-01-12 14:35:59 +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
Slashdoom 6c86640af4 fix(widget): tag cloud max size calculation (#1497)
Calculate max value first since the list is mutable to Hugo's `Reverse` function - i.e. Hugo's `Reverse` function currently appears to operate in-place.
2019-12-28 20:44:44 +00:00
George Cushen 03af4df12a fix: workaround Hugo GetPage/urlize bug with non-ASCII usernames
Attempt to use anchorize rather than urlize for fetching user profiles for users with non-ASCII usernames. Apparently `anchorize` does not perform URL encoding unlike `urlize`, so may be better suited for use with `GetPage`.

See https://github.com/gohugoio/hugo/issues/5687
2019-12-15 16:16:09 +00:00
Russell J. Hewett 4e893ca29e fix(widget): Portfolio responsive breakpoint (#1462)
Make Portfolio responsive breakpoint consistent with other widgets.

Likely this specific code was missed in the migration from Bootstrap 3 to 4.
2019-12-09 16:33:43 +00:00
George Cushen e6eb27deee feat: enable semantic address format to be localised
For example, US sites can use the US address format and Chinese sites can use the Chinese address format.

A default address_format can be set in params.toml, which can be overriden on a per page basis using a parameter of the same name in a page's front matter. Optionally, multilingual sites may wish to add a default format for each site in languages.toml.

BREAKING CHANGES
- list_delimiter removed from params.toml
- address_format added to params.toml
- [address_formats] added to params.toml

Close #1344
2019-11-16 17:55:17 +00:00
George Cushen 5abeaaac7e fix(widget): allow spaces in filters in Pages and Featured widgets
Fix #1388
2019-10-19 21:15:18 +01:00
Bertrand Thierry 02b4ce0e68 fix: no users appear in People widget
Bug caused by search/replace during last People widget update in #1323 .

Also:
- Fix closing div placement
- Hide group if empty

Fix #1360
Close #1372
2019-10-01 19:19:47 +01:00
George Cushen 47427cc527 fix: People widget
Fixes 4b72dba09d
2019-09-24 22:13:04 +01:00
Christophe Bedetti 4b72dba09d feat: add optional social icons to People widget
BREAKING CHANGES

The `user_groups` field has been moved under the new `[content]` front matter section.

See #1345
2019-09-24 22:07:24 +01:00
George Cushen d486867326 fix: don't show address in Contact if it's slice of empty strings
An alternative is to comment out the `address` in Params if it's unused.
2019-09-14 21:51:33 +01:00
George Cushen bd2e4ec418 feat: add JSONLD schema for organizations
Forms part of the transition from Microdata to JSON-LD.

BREAKING CHANGES

Upgrades to your `params.toml` file are required:

- Address field has been split into semantic parts
- Latitude and longitude have moved under `coordinates` option
- Map settings have moved under `[map]` section
- Office hours can now be specified more simply, as a list
- Added optional `list_delimiter` option for formatting addresses

See #413
2019-09-11 13:18:49 +01:00
George Cushen c4b40faefa refactor: strip out Microdata from layouts
Forms part of the transition from Microdata to JSON-LD.

See #413
2019-09-09 22:28:12 +01:00
George Cushen d8fa0b9523 refactor: strip out Microdata from About widget
Forms part of the transition from Microdata to JSON-LD.

See #413
2019-09-09 14:59:19 +01:00
George Cushen c2650cc239 feat(widget): Tag Cloud: add taxonomy and font size options
Enables the widget to be used for categories etc. and not only tags.

Also fix tag ordering by title rather than by count (d0ec05a).

Fix #1267
Fix d0ec05a
2019-08-03 13:53:30 +01:00
George Cushen d0ec05a65b feat: add max count option to Tags widget
Choose how many tags you would like to display.
2019-08-01 20:09:04 +01:00
George Cushen 026bb47c72 feat(widget): add Compact view to Portfolio + refactor Portfolio
Also:
- Refactor List view to be consistent with the standard List views.
  - This involved adding support for Project type and external links to
    the standard
  - Now, Portfolio's List and Compact views are just wrappers around the
    standard List and Compact views.
- Fix summary in Showcase view not falling back to use Content.

Fix #1165
2019-07-22 00:36:07 +01:00
Alessandro Bahgat c56020be63 fix: improve HTML5 validation: remove nested <p>s
Blackfriday automatically wraps Markdown `Content` text in `<p>` tags.
No need to wrap in additional `<p>` tags (which is also invalid HTML).

See #1197
2019-07-11 21:57:10 +01:00
Joel Scheuner adfc2803be fix: CTA icon in Slider widget only works with fas icon pack (#1189) 2019-07-07 20:13:45 +01:00
George Cushen 63953ab3d4 style: improve consistency if Hugo --minify used 2019-06-02 23:19:57 +01:00
George Cushen 9b3e1baa46 feat: re-add Slider widget's height option
Although Slider height is now automatically normalised, it can be useful
to override the height when using the Slider as an image gallery.

Close #1086
2019-05-18 20:42:17 +01:00
George Cushen 507523aeb9 fix(widget): Hugo 0.55 broke display of taxonomy term names (e.g. tags)
Prior to this update, Hugo began displaying urlized tags like
`deep-learning` rather than `Deep Learning` in the Tag Cloud widget and
the list_tags/categories shortcodes.

Fix #1072
2019-05-07 22:55:02 +01:00
George Cushen 32e6009edb fix(widget): People widget broke due to renaming of author -> authors 2019-05-06 15:57:23 +01:00
George Cushen 88e0459e68 fix: Hugo 0.54+ breaks links to user profiles with non-ASCII usernames
* check if the Hugo generated author profile URL is valid
  * works around the Hugo bug, preventing invalid links
* rename `author` folder to `authors`
  * no need to GetPage authors/x and then GetPage author/x to check if
    user account was created
  * can just rename the folder and use `if .File` instead
  * more aligned with how Hugo's taxonomy system was designed
* refactor all author code

BREAKING CHANGE: rename `author` folder to `authors`

Fix #1064
2019-05-05 14:13:49 +01:00
George Cushen 92200d6327 refactor: convert CSS to SCSS
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
2019-04-24 23:56:41 +01:00
George Cushen 6373e9b87d fix(widget): Slider text color should be light on dark background
Recent changes to Hero widget added support for both light and dark
options for background and text (previously it only supported dark
backgrounds and light text).

Slider continues to only support dark style (dark bg and light text).
However, since it inherits some styling from Hero, it began displaying
dark background and dark text. This fix re-applies dark mode to the
Slider widget.
2019-04-19 14:10:06 +01:00
Dongdong Tian 00aada46d2 fix: people widget
Fix v4.2.2
Fix #1037
2019-04-19 00:33:07 +01:00
George Cushen 585bdf643b fix: add support for Hugo v0.55
Requires Hugo v0.55.2+.
Does not work with Hugo v0.55.0 due to bugs fixed in v0.55.2.

Fix #1017
2019-04-17 19:26:51 +01:00
George Cushen 7467e65799 fix(widget): Hero text color when text_color_light = false 2019-04-07 20:01:12 +01:00
George Cushen c27134a5c7 fix(widget): tag and category filters not working in Pages and Featured
Fix #989
2019-03-23 20:09:27 +00:00
George Cushen 177dd391d3 style(widget): improve appearance of Experience & Accomplishments
New mobile first approach improves style of widgets on small devices.

Close #860
2019-03-03 20:15:20 +00:00
Guansong Wang e2274c6b35 fix: "See More" link in Pages widget not appearing
After the "Offset and Limit" section, `$query` would have length of `$items_count`, which makes `$count` always equal to `$items_count`. The later "if" condition for adding the "see all posts" link will never be met.

The fix is to record the length of `$query` into `$count` before any offset and limit.

See #963
2019-03-01 21:01:16 +00:00
George Cushen de28ca4241 fix: citation view in Featured widget (#961) 2019-02-28 20:40:12 +00:00
Yaozhu Sun f47640ebc9 fix: citation view in Pages widget (#961) 2019-02-28 20:37:45 +00:00
George Cushen f01260371b fix: ed8f04e Pages and Featured widgets
Fix #721
2019-02-28 20:33:09 +00:00
Bertrand Thierry ed8f04ea2f feat(widget): enable splitting Talks section into past and upcoming talks
See #721
2019-02-27 22:06:39 +00:00
George Cushen a622c8d19f refactor(talk): rename date options in front matter
date, time_start, time_end renamed to publishDate, date, date_end,
respectively.

BREAKING CHANGES: Rename above 3 options in front matter of all talks.

Also, refactor the 404 page so that it just lists the latest 10 pages
overall. This is a more flexible approach than separately listing the
latest pages for only a few different types of content.

See #721
2019-02-27 21:48:16 +00:00
George Cushen 2de0d5da7f feat(widget): replace Projects and Custom with Portfolio and Blank
Essentially, the Projects and Custom widgets have been renamed and their
front matter upgraded to be consistent with the new Pages and Featured
widgets.

Also, refactor the demo, changing the section order and converting the
Teaching section to a Demos section which can be used to walk the user
thought the available demos.

See #918
2019-02-27 20:58:00 +00:00
George Cushen 2e146eed9c feat: consolidate Featured Talks/Pubs widgets into Featured widget
See #918
2019-02-24 19:45:02 +00:00
George Cushen 9985bc5e89 feat: consolidate Recent Posts/Talks/Pubs widgets into Pages widget
BREAKING CHANGES: See issue below

See #918
2019-02-24 01:06:53 +00:00