|
16 | 16 | {% if page.openAccessPdf.url %} |
17 | 17 | <meta property="og:url" content="{{ page.openAccessPdf.url }}">{% endif %} |
18 | 18 |
|
19 | | -{% if site.dark_theme_css %} |
20 | | -<!-- Dark Mode --> |
21 | | -<link rel="stylesheet" href="{{ '/assets/css/main.css' | relative_url }}" id="theme-css"> |
22 | | -<link rel="stylesheet alternate" href="{{ site.dark_theme_css | relative_url }}" id="theme-css-dark"> |
23 | | - |
24 | | -<script type="text/javascript"> |
25 | | - const updateNodesRel = theme => { |
26 | | - console.log("hit") |
27 | | - const node_light = document.getElementById('theme-css'); |
28 | | - const node_dark = document.getElementById('theme-css-dark'); |
29 | | - const lightImages = document.querySelectorAll('.theme-image.light-image'); |
30 | | - const darkImages = document.querySelectorAll('.theme-image.dark-image'); |
31 | | - |
32 | | - if (theme === "dark") { |
33 | | - node_light.setAttribute('rel', 'stylesheet alternate'); |
34 | | - node_dark.setAttribute('rel', 'stylesheet'); |
35 | | - lightImages.forEach(img => img.style.display = 'none'); |
36 | | - darkImages.forEach(img => img.style.display = 'block'); |
37 | | - } |
38 | | - else { |
39 | | - node_light.setAttribute('rel', 'stylesheet'); |
40 | | - node_dark.setAttribute('rel', 'stylesheet alternate'); |
41 | | - lightImages.forEach(img => img.style.display = 'block'); |
42 | | - darkImages.forEach(img => img.style.display = 'none'); |
43 | | - } |
44 | | - } |
45 | | - |
46 | | - const changeTheme = () => { |
47 | | - let theme = sessionStorage.getItem('theme'); |
48 | | - |
49 | | - // Change the theme to the other option |
50 | | - if (theme === "light") { |
51 | | - theme = "dark"; |
52 | | - } else { |
53 | | - theme = "light"; |
54 | | - } |
55 | | - |
56 | | - // Update the stored session and the nodes' rel attribute |
57 | | - sessionStorage.setItem('theme', theme); |
58 | | - updateNodesRel(theme); |
59 | | - |
60 | | - return false; |
61 | | - } |
62 | | - |
63 | | - // check if we have the theme saved |
64 | | - // if not, we check whether theme-css is set as alternate or not. |
65 | | - if (sessionStorage.getItem('theme') === null) { |
66 | | - |
67 | | - const node_light = document.getElementById('theme-css'); |
68 | | - |
69 | | - sessionStorage.setItem('theme', "light"); |
70 | | - if (node_light.getAttribute('re') === 'stylesheet alternate') { |
71 | | - sessionStorage.setItem('theme', "dark"); |
72 | | - } |
73 | | - |
74 | | - } |
75 | | - |
76 | | - const theme = sessionStorage.getItem('theme'); |
77 | | - |
78 | | - updateNodesRel(theme); |
79 | | - |
80 | | -</script> |
81 | | - |
82 | | -<script type="text/javascript"> |
83 | | - document.addEventListener('DOMContentLoaded', function () { |
84 | | - // Get the current URL path |
85 | | - const path = window.location.pathname; |
86 | | - const pathSegments = path.split('/').filter(segment => segment); |
87 | | - |
88 | | - // Update breadcrumb positions dynamically |
89 | | - const breadcrumbItems = document.querySelectorAll('.breadcrumb-item'); |
90 | | - breadcrumbItems.forEach((item, index) => { |
91 | | - const position = item.querySelector('[itemprop="position"]'); |
92 | | - if (position) { |
93 | | - position.content = (index + 1).toString(); |
94 | | - } |
95 | | - }); |
96 | | - }); |
97 | | -</script> |
98 | | - |
99 | | -<!-- Custom CSS for publication and profile pages --> |
100 | | -<style> |
101 | | - .publication-meta { |
102 | | - margin-bottom: 2em; |
103 | | - padding: 1em; |
104 | | - background: #f8f9fa; |
105 | | - border-radius: 4px; |
106 | | - } |
107 | | - |
108 | | - .profile-header { |
109 | | - display: flex; |
110 | | - align-items: center; |
111 | | - gap: 2em; |
112 | | - margin-bottom: 2em; |
113 | | - } |
114 | | - |
115 | | - .profile-header img { |
116 | | - border-radius: 50%; |
117 | | - max-width: 200px; |
118 | | - } |
119 | | - |
120 | | - @media (max-width: 768px) { |
121 | | - .profile-header { |
122 | | - flex-direction: column; |
123 | | - text-align: center; |
124 | | - } |
125 | | - } |
126 | | -</style> |
127 | | - |
128 | | -{% endif %} |
129 | 19 |
|
130 | 20 | <!-- particles.js --> |
131 | 21 | <script src="https://cdn.jsdelivr.net/particles.js/2.0.0/particles.min.js"></script> |
|
0 commit comments