Add dropdown menu styles and constrain image width

Add CSS for the projects dropdown menu (desktop and mobile) and
limit images in main content to max-width: 100%.
This commit is contained in:
Sylvestre Ledru
2026-04-01 08:29:55 +02:00
parent e0c93eed2d
commit 5b81796838
+66
View File
@@ -155,6 +155,54 @@ header a:hover:not(.home) {
gap: 1rem;
}
.dropdown {
position: relative;
}
.dropdown-toggle {
cursor: default;
color: var(--fg-color);
border-bottom: 2px solid transparent;
padding-bottom: 0.1em;
}
.dropdown:hover .dropdown-toggle {
border-bottom: 2px solid var(--link-text-color);
}
.dropdown-menu {
display: none;
position: absolute;
top: calc(100% + 0.75rem);
left: 50%;
transform: translateX(-50%);
background-color: var(--bg-color);
border: 1px solid var(--header-border-color);
border-radius: 0.3em;
padding: 0.4em 0;
z-index: 100;
min-width: 10rem;
flex-direction: column;
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}
.dropdown:hover .dropdown-menu {
display: flex;
}
.dropdown-menu a {
padding: 0.4em 1.2em;
color: var(--fg-color);
border-bottom: none !important;
white-space: nowrap;
}
.dropdown-menu a:hover {
color: var(--link-text-color);
background-color: var(--highlight-bg-color);
border-bottom: none !important;
}
header .icon {
display: flex;
align-items: center;
@@ -199,6 +247,19 @@ header .icon {
header:not(.open) .navigation-block {
display: none;
}
.dropdown-menu {
position: static;
transform: none;
display: flex;
box-shadow: none;
border: none;
padding: 0 0 0 1em;
}
.dropdown-toggle {
display: none;
}
}
/* HERO */
@@ -416,6 +477,11 @@ blockquote {
padding-left: 1em;
}
main img {
max-width: 100%;
height: auto;
}
.links {
display: flex;
flex-wrap: wrap;