Skip to content

Commit 2114442

Browse files
authored
Merge pull request #16 from dasc-lab/style/redesign_publications
Style/redesign publications
2 parents 14f9ed0 + 81c2eeb commit 2114442

File tree

6 files changed

+103
-10
lines changed

6 files changed

+103
-10
lines changed

layouts/papers/list.html

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,13 @@ <h1>{{ .Title }}</h1>
88
{{ range .Pages.ByPublishDate.Reverse.GroupByDate "2006" }}
99
<div class="py-3">
1010
<h3> {{ .Key }} </h3>
11+
<ul>
1112
{{ range .Pages }}
12-
{{ partial "paper-card" . }}
13+
<li>
14+
{{ partial "small-paper-list-item" . }}
15+
</li>
1316
{{ end }}
17+
</ul>
1418
</div>
1519
{{ end }}
1620

layouts/papers/single.html

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,22 +2,31 @@
22

33
<p class="d-none"> Rendered from /layouts/papers/single.html </p>
44

5+
<div class="my-3">
6+
<h2>{{ .Title }}</h2>
7+
</div>
8+
59
{{ partial "paper-card" . }}
610

711
<div class="my-3">
812
<h3>Abstract</h3>
913
<p>{{ .Params.abstract}}</p>
1014
</div>
1115

16+
1217
{{ .Content }}
1318

19+
1420
{{ if .Params.bib }}
1521
<div class="my-3">
16-
<pre>
17-
<code>
22+
<h3> Bib</h3>
23+
<div class="card">
24+
<div class="card-body">
25+
<pre>
1826
{{ .Params.bib }}
19-
</code>
20-
</pre>
27+
</pre>
28+
</div>
29+
</div>
2130
</div>
2231
{{ end }}
2332

layouts/partials/.style.html.swp

12 KB
Binary file not shown.

layouts/partials/paper-card.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
<!-- Badge for venue -->
3838
<div> <p>{{ .Params.venue }} </p></div>
3939

40-
<div>
40+
<div class="blue-links">
4141
{{ if .Params.pdf }}
4242
<a href="{{ .Params.pdf }}" target="_blank">pdf</a> /
4343
{{ end }}
Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
<div class="row align-items-top mt-3">
2+
<a class="no-underline" href="{{ .RelPermalink }}"><b>{{ .Title }}</b></a>
3+
4+
<!-- AUTHOR LIST -->
5+
<div class="author-list">
6+
{{ range .Params.authors }}
7+
<!-- construct url to search for -->
8+
{{ $url := printf "/people/%s" . }}
9+
10+
<!-- check if the url exists -->
11+
{{ $authorPage := $.Site.GetPage $url }}
12+
13+
<!-- if it does, create a link, else just print the name -->
14+
<span class="author-list-item">
15+
{{ if $authorPage }}
16+
<a class="author-list-link" href="{{ $url }}">{{ $authorPage.Title }}</a>
17+
{{ else }}
18+
{{ . }}
19+
{{ end }}
20+
</span>
21+
{{ end }}
22+
</div>
23+
24+
<!-- Badge for venue -->
25+
<div class="blue-links">
26+
{{.Params.venue }}
27+
<br>
28+
<span>
29+
{{ if .Params.abstract }}
30+
<a data-bs-toggle="collapse" href="#collapse-abstract-{{ .Key }}" role="button">abstract</a> /
31+
{{ end }}
32+
{{ if .Params.pdf }}
33+
<a href="{{ .Params.pdf }}" target="_blank">pdf</a> /
34+
{{ end }}
35+
{{ if .Params.video }}
36+
<a href="{{ .Params.video }}" target="_blank">video</a> /
37+
{{ end }}
38+
{{ if .Params.code }}
39+
<a href="{{ .Params.code }}" target="_blank">code</a> /
40+
{{ end }}
41+
{{ if .Params.poster }}
42+
<a href="{{ .Params.poster }}" target="_blank">poster</a> /
43+
{{ end }}
44+
{{ if .Params.slides }}
45+
<a href="{{ .Params.slides }}" target="_blank">slides</a> /
46+
{{ end }}
47+
{{ if .Params.link }}
48+
<a href="{{ .Params.link }}" target="_blank">link</a> /
49+
{{ end }}
50+
{{ if .Params.arxiv }}
51+
<a href="{{ .Params.arxiv}}">arxiv</a> /
52+
{{ end }}
53+
{{ if .Params.bib }}
54+
<a data-bs-toggle="collapse" href="#collapse-bib-{{ .Key }}" role="button">bib</a> /
55+
{{ end }}
56+
</span>
57+
</div>
58+
{{ if .Params.abstract }}
59+
<div class="collapse my-3" id="collapse-abstract-{{ .Key }}">
60+
<div class="card card-body">
61+
{{ .Params.abstract }}
62+
</div>
63+
</div>
64+
{{ end }}
65+
{{ if .Params.bib }}
66+
<div class="collapse my-3" id="collapse-bib-{{ .Key }}">
67+
<div class="card card-body">
68+
<pre>{{ .Params.bib }}</pre>
69+
</div>
70+
</div>
71+
{{ end }}
72+
73+
74+
</div>

layouts/partials/style.html

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,17 @@
2020
}
2121
2222
a {
23-
/* color: inherit; */
24-
color: var(--bs-link-color-rgb);
23+
color: var(--bs-body-color-rgb);
2524
text-decoration: underline;
2625
text-decoration-color: rgba(var(--bs-body-color-rgb),var(--bs-link-opacity,0.5));
2726
text-underline-offset: 0.25em;
2827
}
2928
29+
pre {
30+
white-space: pre-wrap; /* Enables wrapping */
31+
word-wrap: break-word; /* Breaks long words */
32+
}
33+
3034
/* authors list */
3135
3236
.author-list>*:not(:last-child)::after {
@@ -43,8 +47,10 @@
4347
text-decoration: none;
4448
}
4549

46-
47-
50+
/* make links in divs with class="blue-links" blue */
51+
.blue-links a {
52+
color: var(--bs-link-color);
53+
}
4854

4955
.no-underline {
5056
text-decoration: none;

0 commit comments

Comments
 (0)