Skip to content

Commit

Permalink
Merge branch 'author-metadata' into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
amandafrench committed Feb 7, 2025
2 parents f49b788 + 5dbd671 commit da2b902
Show file tree
Hide file tree
Showing 19 changed files with 235 additions and 57 deletions.
17 changes: 17 additions & 0 deletions content/authors/adam-buttrick/_index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
+++
title = "Adam Buttrick"
draft = false
layout = "author"
orcid = "https://orcid.org/0000-0003-1507-1031"
affiliation = "Crossref"
affiliation2 = "California Digital Library"
affiliation2start = "2024-05-23"
ror = "https://ror.org/02twcfp32"
ror2 = "https://ror.org/03yrm5c26"
link = ""
bio = ""
avatar = ""
jobtitle = ""
+++


17 changes: 17 additions & 0 deletions content/authors/amanda-french/_index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
+++
title = "Amanda French"
draft = false
layout = "author"
orcid = "https://orcid.org/0000-0002-4325-1809"
affiliation = "Crossref"
affiliation2 = ""
affiliation2start = ""
ror = "https://ror.org/02twcfp32"
ror2 = ""
link = ""
bio = ""
avatar = ""
jobtitle = ""
+++


12 changes: 12 additions & 0 deletions content/authors/datacite/_index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
+++
title = "DataCite"
draft = false
layout = "author"
orcid = ""
affiliation = ""
ror = "https://ror.org/04wxnsj81"
link = ""
bio = ""
avatar = ""
jobtitle = ""
+++
15 changes: 15 additions & 0 deletions content/authors/maria-gould/_index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
+++
title = "Maria Gould"
draft = false
layout = "author"
orcid = "https://orcid.org/0000-0002-2916-3423"
affiliation = "California Digital Library"
affiliation2 = "DataCite"
affiliation2start = "2024-01-23"
ror = "https://ror.org/03yrm5c26"
ror2 = "https://ror.org/04wxnsj81"
link = ""
bio = ""
avatar = ""
jobtitle = ""
+++
12 changes: 12 additions & 0 deletions content/authors/ror-core-team/_index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
+++
title = "ROR Core Team"
draft = false
layout = "author"
orcid = ""
affiliation = ""
ror = ""
link = "https://ror.org/about/#core-team"
bio = ""
avatar = ""
jobtitle = ""
+++
2 changes: 1 addition & 1 deletion content/blog/2023-09-14-beta-test.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ banner = "/img/banners/ROR_Banner-green.png"
thumb = "/img/ror-v2.png"
images = ['img/ror-v2.png']
authors = ["Liz Krznarich", "Amanda French"]
description = "After nearly a year of planning and community input, we are thrilled to release a beta version of ROR's first major schema and API update, which is open to the public for testing through **October 16, 2023.**"
description = "After nearly a year of planning and community input, we are thrilled to release a beta version of ROR's first major schema and API update, which is open to the public for testing through October 16, 2023."
+++

{{< callout color="green" icon="no-icon" >}}
Expand Down
9 changes: 0 additions & 9 deletions data/authors/authors.yaml

This file was deleted.

14 changes: 14 additions & 0 deletions static/img/ror-icon-rgb.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
13 changes: 13 additions & 0 deletions themes/hugo-ror/archetypes/authors.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
+++
title = "{{ title (replace .ContentBaseName "-" " ") }}"
draft = false
layout = "author"
orcid = ""
affiliation = ""
ror = ""
link = ""
bio = ""
avatar = ""
jobtitle = ""
+++

2 changes: 1 addition & 1 deletion themes/hugo-ror/archetypes/blog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
+++
title = "{{replace .TranslationBaseName "-" " "}}"
title = "{{title (replace .TranslationBaseName "-" " ")}}"
date = "{{.Date}}"
draft = false
tags = ["", ""]
Expand Down
2 changes: 1 addition & 1 deletion themes/hugo-ror/archetypes/default.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
+++
title = "{{replace .TranslationBaseName "-" " "}}"
title = "{{title (replace .TranslationBaseName "-" " ")}}"
date = "{{.Date}}"
author = "Research Organization Registry (ROR)"
draft = false
Expand Down
2 changes: 1 addition & 1 deletion themes/hugo-ror/archetypes/events.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
+++
title = "{{ replace .TranslationBaseName "-" " " | title }}"
title = "{{ title (replace .TranslationBaseName "-" " ")}}"
date = "{{ .Date }}"
draft = "false"
style = "card-plain"
Expand Down
40 changes: 40 additions & 0 deletions themes/hugo-ror/assets/sass/partials/_hugo-ror.scss
Original file line number Diff line number Diff line change
Expand Up @@ -7022,6 +7022,12 @@ font-size: 2.75rem;
}
}

/* jumbotron */

.jumbotron {
padding: .75em 0 .75em 0;
}


/* header anchor links */

Expand Down Expand Up @@ -7146,3 +7152,37 @@ margin-bottom: 1em;
border: 1px solid gray;
}

/* blog authors with metadata on single posts */

.blogauthors {
display: inline;
flex-wrap: wrap;
float: left;
max-width: 75%;
font-family:AH-Bold;
line-height: 1.75em;
padding: 0;
margin: 0;
}

.iconlink:hover {
opacity: 70%;
text-decoration:none;
}

.blogdate {
display: inline;
float: right;
font-family:AH-Bold;
}

.fa-arrow-up-right-from-square {
color: grey;
}


/* author page */

.medium-text {
font-size:medium;
}
69 changes: 48 additions & 21 deletions themes/hugo-ror/layouts/_default/author.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,32 +16,59 @@

<div class="section container">
<div class="row">
<div class="col-md-12">
<section>
<p>Hi I'm the author template</p>

<div class="col-md-9">


<section>
<h2>{{ .Title }}</h2>

{{ if .Params.orcid }}
<p>ORCID: {{ .Params.orcid }}</p>
{{ end }}

{{ if .Params.affiliation }}
<p>Affiliation: {{ .Params.affiliation }}{{ if .Params.ror }} -
{{ .Params.ror }}{{ end }}</p>
{{ end }}
<p>{{ if .Params.orcid }}<a href="{{ .Params.orcid }}" class="iconlink"><img src="/img/ORCID-iD_icon_vector.svg"></a>{{ end }}
{{ if .Params.affiliation2start }}<a href="{{ .Params.ror2 }}" class="iconlink"><img src="/img/ror-icon-rgb.svg"></a>
{{ else if .Params.ror }}<a href="{{ .Params.ror }}" class="iconlink"><img src="/img/ror-icon-rgb.svg"></a>{{ end }}
{{ if .Params.link }}<a href="{{ .Params.link }}" class="iconlink"> <i class="fa-solid fa-arrow-up-right-from-square"></i></a>{{ end }}</p>


{{ .Content }}
{{ range .Data.Terms.ByCount }}
<h3><a href="{{ .Page.RelPermalink }}">{{ .Page.LinkTitle }}</a> ({{ .Count }})</h3>
<ul>
{{ range .WeightedPages }}
<li><a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a></li>
{{ end }}
</ul>
{{ end }}


</section>

<section>


<hr />

<h3>{{ .Title }}'s posts</h3>

{{ $authorposts := where .Data.Pages "Type" "blog" }}
{{ range $authorposts }}

<section class="post">
<div class="shortcode-row">
<div class="col-md-12">
<div class="medium-text">
<div class="col-md-3">
{{ .Date.Format "Jan 02, 2006" }}
</div>
<div class="col-md-9">
<a href="{{ .Permalink }}">{{ .Title }}</a>
</div>
</div>
</div>
</div>
</section>
{{ end }}

</section>

</div>

<div class="col-md-3">

<!-- *** MENUS AND WIDGETS *** -->

{{ partial "sidebar.html" . }}

<!-- *** MENUS AND FILTERS END *** -->

</div>
</div>
Expand Down
4 changes: 3 additions & 1 deletion themes/hugo-ror/layouts/_default/index.atom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,9 @@
{{- range .GetTerms "authors" }}
<author>
<name>{{ .Page.Title }}</name>
{{ with .Page.Params.orcid }}<uri>{{ . }}</uri>{{ end }}
{{ if .Page.Params.orcid }}<uri>{{ .Page.Params.orcid }}</uri>
{{ else if .Page.Params.ror }}<uri>{{ .Page.Params.ror }}</uri>
{{ else if .Page.Params.link }}<uri>{{ .Page.Params.link }}</uri>{{ end }}
</author>
{{- end }}
<content type="html" xml:base="{{ .Site.BaseURL }}" {{ with .Site.LanguageCode }}xml:lang="{{.}}"{{end}}>
Expand Down
2 changes: 1 addition & 1 deletion themes/hugo-ror/layouts/_default/taxonomy.html
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ <h3><a href="{{ .Page.RelPermalink }}">{{ .Page.LinkTitle }}</a> ({{ .Count }})<
{{ end }}
</ul>
{{ end }}
</sectiom>
</section>

</div>
</div>
Expand Down
1 change: 1 addition & 0 deletions themes/hugo-ror/layouts/blog/single.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
<div class="col-md-9" id="blog-post">

{{ partial "author-metadata.html" . }}
<hr />

<div id="post-content">
{{ .Content }}
Expand Down
53 changes: 36 additions & 17 deletions themes/hugo-ror/layouts/partials/author-metadata.html
Original file line number Diff line number Diff line change
@@ -1,17 +1,36 @@
<p class="author">

{{ if .Params.authors }}

{{ $authors := .Params.authors }}

By {{ delimit $authors ", " " and " }}

{{ else if .Params.author }}
By {{ .Params.author }}

{{ else }}
By {{ .Site.Params.author.name }}
{{ end }}

| {{ .Date.Format "January 2, 2006" }}
</p>
<div class="clearfix">

{{- $blogdate := time.AsTime .Date }}

<span class="blogauthors">
By
{{- range $index, $author := .GetTerms "authors" }}
{{- if gt $index 0 }}, {{- end }}

<a href="/authors/{{ .Page.Title | urlize }}">{{ .Page.Title }}</a>

{{- with .Page.Params.orcid }}<a href="{{ . }}" class="iconlink"> <img src="/img/ORCID-iD_icon_vector.svg"></a>{{- end }}

{{- if .Page.Params.affiliation2start }}
{{- $affdate := time.AsTime .Page.Params.affiliation2start }}
{{- if $blogdate.After $affdate }}
{{- with .Page.Params.ror2 }}<a href="{{- . }}" class="iconlink"> <img src="/img/ror-icon-rgb.svg"></a>{{- end }}
{{- else }}
{{- if $blogdate.Before $affdate }}
{{- with .Page.Params.ror }}<a href="{{- . }}" class="iconlink"> <img src="/img/ror-icon-rgb.svg"></a>{{- end }}
{{- end }}
{{- end }}

{{- else if .Page.Params.ror }}
<a href="{{- .Page.Params.ror }}" class="iconlink"> <img src="/img/ror-icon-rgb.svg"></a>
{{- end }}

{{- with .Page.Params.link }}<a href="{{- . }}" class="iconlink"> <i class="fa-solid fa-arrow-up-right-from-square"></i></a>{{- end }}

{{- end -}}

</span>

<span class="blogdate">{{- .Date.Format "January 2, 2006" }}</span>

</div>
6 changes: 2 additions & 4 deletions themes/hugo-ror/layouts/partials/authors-date.html
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
<p class="author">

{{ if .Params.authors }}

{{ $authors := .Params.authors }}

By {{ delimit $authors ", " " and " }}

By {{ delimit .Params.authors ", " " and " }}

{{ else if .Params.author }}
By {{ .Params.author }}
Expand Down

0 comments on commit da2b902

Please sign in to comment.