Skip to content

Commit 39cdce6

Browse files
Merge pull request #7 from AtlasAnalyticsLab/fix/header-projects-dropdown-fix-2026-02-06
Fix/header projects dropdown fix 2026 02 06
2 parents 87201d4 + 72f54a9 commit 39cdce6

File tree

7 files changed

+74
-22
lines changed

7 files changed

+74
-22
lines changed

DEVELOPMENT.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -564,9 +564,9 @@ front matter...
564564
- **Impact:** Site-wide - all generated URLs depend on this
565565
- **Priority:** 🔴 CRITICAL
566566

567-
2. **`robots.txt`** (line 76)
567+
2. **`robots.txt`** (line 1)
568568
```
569-
Sitemap: https://atlasanalyticslab.github.io/sitemap.xml
569+
Sitemap: {{ site.url }}{{ site.baseurl }}/sitemap.xml
570570
```
571571
- **Purpose:** Tells search engines where to find the sitemap
572572
- **Impact:** SEO - affects how search engines crawl the site

Gemfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,3 +30,4 @@ gem "jekyll", "4.4.1"
3030

3131
gem "jekyll-scholar", group: :jekyll_plugins
3232
gem "webrick", "~> 1.9"
33+
gem "wdm", ">= 0.1.0" if Gem.win_platform?

_includes/header.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,13 +39,13 @@
3939
<li class="nav-item"><a class="nav-link" href="{{ site.url }}{{ site.baseurl }}/openings">Openings</a></li>
4040
<li class="nav-item"><a class="nav-link" href="{{ site.url }}{{ site.baseurl }}/publications/">Publications</a></li>
4141
<li class="nav-item dropdown">
42-
<a class="nav-link dropdown-toggle dropdown-toggle-no-caret" href="#" id="projectsDropdown" role="button"
43-
data-bs-toggle="dropdown" aria-expanded="false">
42+
<button class="nav-link projects-dropdown-toggle" id="projectsDropdown" type="button"
43+
data-bs-toggle="dropdown" aria-expanded="false">
4444
Projects
45-
</a>
45+
</button>
4646
<ul class="dropdown-menu dropdown-menu-end" aria-labelledby="projectsDropdown">
4747
<li>
48-
<a class="dropdown-item" href="https://atlasanalyticslab.github.io/AtlasPatch/" target="_blank"
48+
<a class="dropdown-item project-link-atlaspatch" href="https://atlasanalyticslab.github.io/AtlasPatch/" target="_blank"
4949
rel="noopener noreferrer">
5050
AtlasPatch
5151
</a>

css/main.scss

Lines changed: 27 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,6 @@ p.byline {
100100
background-color: var(--atlas-navbar-bg);
101101
backdrop-filter: blur(12px);
102102
border-bottom: 1px solid var(--atlas-border-color);
103-
min-height: var(--atlas-nav-height);
104103
transition: background-color 0.3s ease, border-color 0.3s ease;
105104
}
106105

@@ -125,8 +124,33 @@ p.byline {
125124
color: var(--atlas-link-color);
126125
}
127126

128-
.navbar .dropdown-toggle-no-caret::after {
129-
display: none;
127+
.navbar,
128+
.navbar .container-fluid,
129+
.navbar .navbar-collapse,
130+
.navbar .navbar-nav,
131+
.navbar .dropdown {
132+
overflow: visible;
133+
}
134+
135+
.navbar .projects-dropdown-toggle {
136+
background: transparent;
137+
border: 0;
138+
padding: var(--bs-nav-link-padding-y) var(--bs-nav-link-padding-x);
139+
}
140+
141+
.navbar .dropdown-menu {
142+
z-index: 2000;
143+
}
144+
145+
.navbar .dropdown-item.project-link-atlaspatch {
146+
font-family: system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
147+
font-weight: 700;
148+
color: #5b5bff;
149+
}
150+
151+
.navbar .dropdown-item.project-link-atlaspatch:hover,
152+
.navbar .dropdown-item.project-link-atlaspatch:focus {
153+
color: #5b5bff;
130154
}
131155

132156
.navbar .navbar-toggler {

js/theme-toggle.js

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -40,20 +40,14 @@
4040
}
4141

4242
const measuredHeight = Math.round(navbar.getBoundingClientRect().height);
43-
const collapseExpanded = navCollapse && navCollapse.classList.contains('show');
44-
// Treat the collapse as expanded while Bootstrap is mid-transition to avoid measuring intermediate heights.
45-
const isTransitioning = navCollapse && navCollapse.classList.contains('collapsing');
46-
const treatAsExpanded = collapseExpanded || isTransitioning;
43+
const collapseVisible =
44+
navCollapse && (navCollapse.classList.contains('show') || navCollapse.classList.contains('collapsing'));
4745

48-
if (options.forceBase && !treatAsExpanded && measuredHeight > 0) {
49-
baseNavHeight = measuredHeight;
50-
} else if (treatAsExpanded && baseNavHeight === null && measuredHeight > 0) {
46+
if ((options.forceBase || !collapseVisible) && measuredHeight > 0) {
5147
baseNavHeight = measuredHeight;
5248
}
5349

54-
const targetHeight = treatAsExpanded
55-
? Math.max(measuredHeight, baseNavHeight || measuredHeight)
56-
: baseNavHeight || measuredHeight;
50+
const targetHeight = baseNavHeight || measuredHeight;
5751

5852
if (targetHeight > 0) {
5953
html.style.setProperty('--atlas-nav-height', `${targetHeight}px`);

robots.txt

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
---
2+
layout: null
3+
permalink: /robots.txt
4+
---
15
# robots.txt - Crawler Access Control
26
#
37
# Purpose:
@@ -60,17 +64,18 @@ Crawl-delay: 10
6064
Disallow: /images/
6165
Disallow: /assets/
6266
Disallow: /_site/
63-
Disallow: /css/
64-
Disallow: /js/
6567

6668
# Allow access to main pages
6769
Allow: /$
70+
Allow: /allnews
71+
Allow: /allnews.html
6872
Allow: /team
6973
Allow: /publications
7074
Allow: /contact
7175
Allow: /funding
7276
Allow: /gallery
7377
Allow: /openings
78+
Allow: /sitemap.xml
7479

7580
# Sitemap location (helps good crawlers index efficiently)
76-
Sitemap: https://atlasanalyticslab.github.io/sitemap.xml
81+
Sitemap: {{ site.url }}{{ site.baseurl }}/sitemap.xml

sitemap.xml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
---
2+
layout: null
3+
permalink: /sitemap.xml
4+
---
5+
<?xml version="1.0" encoding="UTF-8"?>
6+
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
7+
{% for page in site.pages %}
8+
{% if page.url == nil %}
9+
{% continue %}
10+
{% endif %}
11+
12+
{% if page.exclude_from_sitemap == true %}
13+
{% continue %}
14+
{% endif %}
15+
16+
{% if page.url == "/404.html" or page.url == "/sitemap.xml" or page.url == "/robots.txt" %}
17+
{% continue %}
18+
{% endif %}
19+
20+
{% if page.url contains ".css" or page.url contains ".js" or page.url contains ".xml" or page.url contains ".txt" %}
21+
{% continue %}
22+
{% endif %}
23+
24+
<url>
25+
<loc>{{ site.url }}{{ site.baseurl }}{{ page.url | replace: "index.html", "" }}</loc>
26+
</url>
27+
{% endfor %}
28+
</urlset>

0 commit comments

Comments
 (0)