Skip to content

Commit eb5e2cf

Browse files
committed
Remove dark mode toggle
1 parent 0fa3d93 commit eb5e2cf

File tree

5 files changed

+0
-119
lines changed

5 files changed

+0
-119
lines changed

_includes/head/custom.html

Lines changed: 0 additions & 110 deletions
Original file line numberDiff line numberDiff line change
@@ -16,116 +16,6 @@
1616
{% if page.openAccessPdf.url %}
1717
<meta property="og:url" content="{{ page.openAccessPdf.url }}">{% endif %}
1818

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 %}
12919

13020
<!-- particles.js -->
13121
<script src="https://cdn.jsdelivr.net/particles.js/2.0.0/particles.min.js"></script>

_includes/masthead.html

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,6 @@
1616
</a>
1717
<ul class="visible-links">
1818

19-
<!-- Added a toggle for light/dark mode: -->
20-
{% if site.dark_theme_css %}
21-
<li class="masthead__menu-item">
22-
<a name="dark-mode-selection-button" onclick="changeTheme()"><i class="fas fa-fw fa-sun"></i></a>
23-
</li>
24-
{% endif %}
2519

2620
{%- for link in site.data.navigation.main -%}
2721

_research_directions/poli-sci/ideology-and-polarization.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ layout: splash
44
category: poli-sci
55
order: 3
66
header:
7-
overlay_filter: linear-gradient(rgba(255, 0, 0, 0.5), rgba(0, 0, 255, 1))
87
overlay_image: /assets/images/research_directions/poli-sci/ideology_and_polarization.png
98
one-liner: How can we measure and understand political conflict?
109
excerpt: From echo chamber to public square, online environments are full of political discussion and conflict. We aim to measure and understand the evolving discourse, and ultimately, how it shapes our beliefs.

_research_directions/poli-sci/information-integrity.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ layout: splash
44
category: poli-sci
55
order: 1
66
header:
7-
overlay_filter: linear-gradient(rgba(255, 255, 255, 0.1), rgba(0, 0, 0, 0.5))
87
overlay_image: /assets/images/research_directions/poli-sci/information-integrity.png
98
one-liner: How can we find reliable insights amid a deluge of conflicting information?
109
excerpt: The information landscape is increasingly flooded with uncertain and conflicting information. We aim to create understanding and tools that will empower all of us in navigating this landscape and finding the trustworthy insights every person wants.

_research_directions/poli-sci/social-simulations.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ layout: splash
44
category: poli-sci
55
order: 2
66
header:
7-
overlay_filter: linear-gradient(rgba(255, 255, 255, 0.5), rgba(0, 0, 0, 0.9))
87
overlay_image: /assets/images/research_directions/poli-sci/social_simulation.png
98
one-liner: How can we prototype effective defenses to attacks on information integrity in an ethical and efficient way?
109
excerpt: We use and develop state-of-the-art approaches to human social system simulation to simulate attacks on information integrity in critical social phenomena and to prototype effective defenses against them.

0 commit comments

Comments
 (0)