1
1
---
2
-
3
2
---
3
+ < div class ="publication-entry ">
4
+ {{ reference }}
4
5
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 %}
5
12
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 %}
11
18
19
+ {% if entry.link %}
20
+ < a href ="{{ entry.link }} " class ="pub-button link-btn ">
21
+ Link
22
+ </ a >
23
+ {% endif %}
12
24
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 >
31
31
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 >
36
36
</ 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 %}
37
44
</ div >
38
45
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 ;
47
51
}
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 ;
55
55
}
56
56
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 >
0 commit comments