mirror of
https://github.com/gcushen/hugo-academic.git
synced 2025-07-26 19:15:16 +02:00
feat: improvements to author list
- Re-refactor code to use Hugo's `GetTerms` function now that Hugo fixed the unordered bug - GetTerms may provide better support for names with unicode or spaces - Use Bootstrap's bundled PopoverJS for *instant* and more legible author note tooltips. - Make author notes more intuitive and mobile friendly - use FA icon with left padding to discern touches. - Add support for highlighting multiple author names (e.g. team members) BREAKING CHANGE: To highlight an author name, add `highlight_name: true` to the author's profile. Close #1750 Fix #1861 Close #1864
This commit is contained in:
parent
42793fe7f0
commit
0583f02f70
7 changed files with 7049 additions and 14 deletions
|
@ -60,6 +60,9 @@ social:
|
|||
# Enter email to display Gravatar (if Gravatar enabled in Config)
|
||||
email: ""
|
||||
|
||||
# Highlight the author in author lists? (true/false)
|
||||
highlight_name: false
|
||||
|
||||
# Organizational groups that you belong to (for People widget)
|
||||
# Set this to `[]` or comment out if you are not using People widget.
|
||||
user_groups:
|
||||
|
|
7033
wowchemy/assets/js/_vendor/bootstrap.bundle.js
vendored
Normal file
7033
wowchemy/assets/js/_vendor/bootstrap.bundle.js
vendored
Normal file
File diff suppressed because it is too large
Load diff
7
wowchemy/assets/js/_vendor/bootstrap.min.js
vendored
7
wowchemy/assets/js/_vendor/bootstrap.min.js
vendored
File diff suppressed because one or more lines are too long
|
@ -757,6 +757,9 @@
|
|||
}
|
||||
});
|
||||
|
||||
// Init. author notes (tooltips).
|
||||
$('[data-toggle="tooltip"]').tooltip();
|
||||
|
||||
});
|
||||
|
||||
// Normalize Bootstrap carousel slide heights.
|
||||
|
|
|
@ -114,8 +114,11 @@ article .article-metadata {
|
|||
|
||||
.article-metadata .author-notes {
|
||||
cursor: help;
|
||||
vertical-align: super;
|
||||
font-size: 0.7em;
|
||||
padding-left: 3px;
|
||||
}
|
||||
|
||||
.article-metadata .author-highlighted {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.article-categories {
|
||||
|
|
|
@ -7,16 +7,16 @@
|
|||
{{- $profile_page := site.GetPage (printf "/%s/%s" $taxonomy .) -}}
|
||||
{{- $name := $profile_page.Title | default $name_raw -}}
|
||||
{{- if gt $index 0 }}, {{ end -}}
|
||||
<span {{ if site.Params.highlight_superuser | and (eq $profile_page.Params.superuser true) }}class="font-weight-bold"{{end}}>
|
||||
{{- if and $profile_page $link_authors -}}
|
||||
<a href="{{$profile_page.RelPermalink}}">{{$name}}</a>
|
||||
<span {{ if $highlight_name }}class="author-highlighted"{{end}}>
|
||||
{{- if $link_authors -}}
|
||||
<a href="{{.RelPermalink}}">{{.LinkTitle}}</a>
|
||||
{{- else -}}
|
||||
{{$name}}
|
||||
{{- end -}}
|
||||
</span>
|
||||
{{- if isset $.Params "author_notes" -}}
|
||||
{{- with (index $.Params.author_notes $index) -}}
|
||||
<span title="{{.}}" class="author-notes">(?)</span>
|
||||
<i class="author-notes fas fa-info-circle" data-toggle="tooltip" title="{{.}}"></i>
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
|
|
@ -152,7 +152,7 @@
|
|||
{{ $js_academic := resources.Get "js/wowchemy.js" }}
|
||||
{{ $js_academic_search := resources.Get "js/wowchemy-search.js" }}
|
||||
{{ $js_algolia_search := resources.Get "js/algolia-search.js" }}
|
||||
{{ $js_bootstrap := resources.Get "js/_vendor/bootstrap.min.js" }}
|
||||
{{ $js_bootstrap := resources.Get "js/_vendor/bootstrap.bundle.js" }}
|
||||
{{ $js_bundle := slice $js_bootstrap $js_linebreak $js_academic }}
|
||||
{{ if eq site.Params.search.engine 1 }}
|
||||
{{ $js_bundle = $js_bundle | append $js_academic_search }}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue