Skip to content

Commit

Permalink
feat: update sass
Browse files Browse the repository at this point in the history
  • Loading branch information
atsuyaw committed Oct 23, 2024
1 parent af57011 commit 3ab327d
Show file tree
Hide file tree
Showing 4 changed files with 61 additions and 8 deletions.
1 change: 0 additions & 1 deletion content/page/papers.ja.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,3 @@ menu: "topnav"

{{< researchmapApi >}}

<!--{{< paperList data="papers" >}}-->
6 changes: 3 additions & 3 deletions layouts/partials/papers.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<div>
<div class="rm">
{{ with index . "paper_title" }}
{{ if .ja }}<h5 class="pubTitle">{{ .ja }}</h5>
{{ else }}<h5 class="pubTitle">{{ .en }}</h5>{{ end }}
Expand All @@ -25,11 +25,11 @@
<p class="pubDate">{{ index . "publication_date" }}</p>

{{ range .identifiers.doi }}
<p class="doi">doi: <a href="https://doi.org/{{ . }}"><span class="doiID">{{ . }}</span></a></p>
<p class="seeAlso"><span class="label">doi</span> <a href="https://doi.org/{{ . }}"><code class="doiID">{{ . }}</code></a></p>
{{ end }}
{{ with index . "see_also" }}
{{ range $k, $v := where (where . "label" "ne" "doi") "is_downloadable" true }}
<p>{{ .label }} <a href="{{ $k := index . "@id" }}">{{ $k }}</a></p>
<p class="seeAlso"><span class="label">{{ .label }}</span> <a href="{{ $k := index . "@id" }}">{{ $k }}</a></p>
{{ end }}
{{ end }}
</div>
Expand Down
8 changes: 4 additions & 4 deletions layouts/shortcodes/researchmapApi.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,16 @@
{{ with $data := .Content | transform.Unmarshal }}
{{ with index . "items" }}
{{ with where . "published_paper_type" "scientific_journal" }}
<ol reversed>
<ol class="rmol" reversed>
{{ range sort . "publication_date" "desc" }}
<li>{{ partial "papers" . }}</li>
<li class="rmli">{{ partial "papers" . }}</li>
{{ end }}
</ol>
{{ end }}
{{ with where . "published_paper_type" "ne" "scientific_journal" }}
<ol>
<ol class="rmol" reversed>
{{ range sort . "publication_date" "desc" }}
<li>{{ partial "papers" . }}</li>
<li class="rmli">{{ partial "papers" . }}</li>
{{ end }}
</ol>
{{ end }}
Expand Down
54 changes: 54 additions & 0 deletions static/sass/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,57 @@
.tooltip:hover .tooltip-text {
visibility: visible;
}

.rmli {
clear: both;
margin-bottom:3ex;
& .rm {
max-width:93%;
margin-left: 3rem;
& .pubDetail {
margin: 0;
}
& .pubTitle {
margin-bottom: .5rem;
font-weight: bold;
}
& .authors {
margin-bottom: .5rem;
}
& .vol {
font-weight: bold;
}
& .pubName {
font-style: italic;
margin-bottom: .5rem;
}
& .pubDate {
margin-bottom: .5rem;
}
& .doi {
margin-bottom: .5rem;
}
& .seeAlso {
margin-bottom: 1rem;
& .label {
display: inline-block;
text-align: center;
background: #333;
color: #aaa;
margin-right: .5rem;
padding: .1rem;
border-radius: .5rem;
min-width: 5rem;
font-size: 80%;
float: left;
}
& .doiID {
background: transparent;
color: text;
border: 0;
padding: 0;
margin: 0;
}
}
}
}

0 comments on commit 3ab327d

Please sign in to comment.