Skip to content

Commit 63445d6

Browse files
committed
Restyled Publications
1 parent d89059b commit 63445d6

File tree

3 files changed

+101
-59
lines changed

3 files changed

+101
-59
lines changed

_config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ scholar:
124124
repository: /publications
125125
repository_file_delimiter: "."
126126
sort_by: year
127-
order: ascending
127+
order: descending
128128
group_by: year
129129

130130
source: ./_bibliography

_layouts/bibtemplate - Kopie.html

Lines changed: 99 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -1,65 +1,112 @@
11
---
2-
32
---
3+
<div class="publication-entry">
4+
{{ reference }}
45

6+
<div class="publication-buttons">
7+
{% if entry.abstract %}
8+
<button onclick="toggleElement('abstract-{{entry.key}}')" class="pub-button abstract-btn">
9+
Abstract
10+
</button>
11+
{% endif %}
512

6-
<div class="text-justify"><small>{{reference}}</small></div>
7-
<button class="button0" onclick="toggleBibtex{{entry.key}}()">Bibtex</button>
8-
{% if entry.abstract %}
9-
<button class="button3" onclick="showText{{entry.key}}()">Abstract</button>
10-
{% endif %}
13+
{% if entry.bibtex %}
14+
<button onclick="toggleElement('bibtex-{{entry.key}}')" class="pub-button bibtex-btn">
15+
BibTeX
16+
</button>
17+
{% endif %}
1118

19+
{% if entry.link %}
20+
<a href="{{ entry.link }}" class="pub-button link-btn">
21+
Link
22+
</a>
23+
{% endif %}
1224

13-
{% if entry.doi %}
14-
<a href="{{ entry.doi | prepend: 'http://doi.org/' }}"><input class="button1" type="button" value="doi" /></a>
15-
{% endif %}
16-
17-
{% if entry.preprint %}
18-
<a href="{{ entry.preprint }}"><input class="button2" type="button" value="preprint" /></a>
19-
{% endif %}
20-
21-
{% if entry.link %}
22-
<a href="{{ entry.link }}"><input class="button4" type="button" value="link" /></a>
23-
{% endif %}
24-
25-
{% if entry.code %}
26-
<a href="{{ entry.code }}"><input class="button3" type="button" value="code" /></a>
27-
{% endif %}
28-
<div id="a{{entry.key}}" style="display: none;">
29-
<pre>{{entry.bibtex}}</pre>
30-
</div>
25+
{% if entry.code %}
26+
<a href="{{ entry.code }}" class="pub-button code-btn">
27+
Code
28+
</a>
29+
{% endif %}
30+
</div>
3131

32-
<div id="b{{entry.key}}" style="display: none;">
33-
<div id="boxcolor">
34-
<h4><b>Abstract</b></h4>
35-
<small>{{entry.abstract}}</small>
32+
{% if entry.abstract %}
33+
<div id="abstract-{{entry.key}}" class="abstract-box" style="display: none;">
34+
<h4>Abstract</h4>
35+
<p>{{entry.abstract}}</p>
3636
</div>
37+
{% endif %}
38+
39+
{% if entry.bibtex %}
40+
<div id="bibtex-{{entry.key}}" class="bibtex-box" style="display: none;">
41+
<pre>{{entry.bibtex}}</pre>
42+
</div>
43+
{% endif %}
3744
</div>
3845

39-
<script>
40-
function toggleBibtex{{entry.key}}(parameter) {
41-
var x= document.getElementById('a{{entry.key}}');
42-
if (x.style.display === 'none') {
43-
x.style.display = 'block';
44-
} else {
45-
x.style.display = 'none';
46-
}
46+
<style>
47+
.publication-entry {
48+
margin-bottom: 1.5em;
49+
padding: 1em;
50+
border-left: 3px solid #1F416F;
4751
}
48-
function showText{{entry.key}}(parameter) {
49-
var x= document.getElementById('b{{entry.key}}');
50-
if (x.style.display === 'none') {
51-
x.style.display = 'block';
52-
} else {
53-
x.style.display = 'none';
54-
}
52+
53+
.publication-buttons {
54+
margin: 0.5em 0;
5555
}
5656

57-
</script>
58-
<style>
59-
#boxcolor {
60-
background-color: #f9f9f9 ;
61-
border-radius:1%;
62-
padding: 10px;
63-
}
64-
65-
</style>
57+
.pub-button {
58+
display: inline-block;
59+
padding: 0.3em 0.8em;
60+
margin-right: 0.5em;
61+
border: 1px solid #1F416F;
62+
border-radius: 3px;
63+
background: transparent;
64+
color: #1F416F;
65+
font-size: 0.9em;
66+
cursor: pointer;
67+
text-decoration: none;
68+
transition: all 0.2s ease;
69+
}
70+
71+
.pub-button:hover {
72+
background: #1F416F;
73+
color: white;
74+
}
75+
76+
.abstract-box, .bibtex-box {
77+
margin-top: 1em;
78+
padding: 1em;
79+
background: #f5f5f5;
80+
border-radius: 4px;
81+
transition: all 0.3s ease;
82+
}
83+
84+
.abstract-box h4 {
85+
margin-top: 0;
86+
color: #1F416F;
87+
}
88+
89+
.bibtex-box pre {
90+
margin: 0;
91+
padding: 1em;
92+
background: #fff;
93+
border-radius: 3px;
94+
font-size: 0.9em;
95+
}
96+
</style>
97+
98+
<script>
99+
function toggleElement(id) {
100+
const element = document.getElementById(id);
101+
const isHidden = element.style.display === 'none';
102+
103+
element.style.display = isHidden ? 'block' : 'none';
104+
element.style.opacity = '0';
105+
106+
if (isHidden) {
107+
setTimeout(() => {
108+
element.style.opacity = '1';
109+
}, 10);
110+
}
111+
}
112+
</script>

_pages/Publications.md

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,6 @@ classes: wide
55
---
66

77
<style>
8-
.centeralign {
9-
text-align: center;
10-
color:#1F416F;
11-
font-weight: bold;
12-
}
138
.centeralign2 {
149
color:#1F416F;
1510
font-weight: bold;
@@ -34,5 +29,5 @@ classes: wide
3429

3530
<h6 class="centeralign2">Published</h6>
3631
{% for y in page.years %}
37-
{% bibliography -f references --order descending %}
32+
{% bibliography -f references %}
3833
{% endfor %}

0 commit comments

Comments
 (0)