heroweb/examples/heroweb_example_base/css/heroweb.css

216 lines
3.5 KiB
CSS
Raw Normal View History

/* Custom properties for theming */
:root {
--nav-background: #f1f3f5;
--nav-text: #495057;
--nav-hover: #1971c2;
--nav-input-border: #ced4da;
--nav-input-background: #f8f9fa;
--theme-icon-hover: #e9ecef;
}
[data-theme="dark"] {
--nav-background: #1a1e24;
--nav-text: #e0e0e0;
--nav-hover: #4dabf7;
--nav-input-border: #495057;
--nav-input-background: #2a2e33;
--theme-icon-hover: #2a2e33;
}
2024-09-13 13:00:11 +00:00
/* Custom styles to enhance the nav bar */
body > main {
display: flex;
flex-wrap: wrap;
gap: 1rem;
height: 100vh;
overflow: hidden;
}
2024-09-13 13:00:11 +00:00
nav {
background-color: var(--nav-background);
2024-09-13 13:00:11 +00:00
padding: 0rem 1rem;
}
2024-09-13 13:00:11 +00:00
nav ul {
margin: 0;
padding: 0;
list-style: none;
display: flex;
justify-content: space-between;
align-items: center;
}
2024-09-13 13:00:11 +00:00
nav ul li {
margin: 0 0.5rem;
}
2024-09-13 13:00:11 +00:00
nav ul li a {
text-decoration: none;
color: var(--nav-text);
2024-09-13 13:00:11 +00:00
font-weight: 500;
transition: color 0.3s ease;
}
2024-09-13 13:00:11 +00:00
nav ul li a:hover {
color: var(--nav-hover);
2024-09-13 13:00:11 +00:00
}
2024-09-13 13:00:11 +00:00
.brand {
font-size: 1rem;
font-weight: bold;
}
2024-09-13 13:00:11 +00:00
navbar-right {
display: flex;
align-items: center;
margin-left: 30%;
}
2024-09-13 13:00:11 +00:00
navbar-right a {
margin-left: 1rem;
}
2024-09-13 13:00:11 +00:00
navbar-right input[type="search"] {
padding: 0.2rem 0.5rem;
border: 1px solid var(--nav-input-border);
2024-09-13 13:00:11 +00:00
border-radius: 1rem;
background-color: var(--nav-input-background);
color: var(--nav-text);
2024-09-13 13:00:11 +00:00
font-size: 0.8rem;
line-height: 1;
height: 2rem;
width: 300px;
margin: 0;
}
/* Styles for theme icons */
2024-09-13 13:00:11 +00:00
.theme-icons {
display: flex;
align-items: center;
}
2024-09-13 13:00:11 +00:00
.theme-icon {
cursor: pointer;
padding: 5px;
border-radius: 50%;
margin-left: 0.5rem;
}
2024-09-13 13:00:11 +00:00
.theme-icon svg {
width: 20px;
height: 20px;
fill: var(--nav-text);
2024-09-13 13:00:11 +00:00
}
2024-09-13 13:00:11 +00:00
.theme-icon:hover {
background-color: var(--theme-icon-hover);
2024-09-13 13:00:11 +00:00
}
mynav,
docnav {
flex: 1;
min-width: 200px;
max-width: 250px;
overflow-y: auto;
color: var(--nav-text);
2024-09-13 13:00:11 +00:00
}
2024-09-13 13:00:11 +00:00
mynav ul {
list-style-type: none;
padding-left: 0;
}
2024-09-13 13:00:11 +00:00
mynav ul ul {
list-style-type: none;
2024-09-13 13:00:11 +00:00
padding-left: 0;
margin-left: 0.2rem;
display: none;
2024-09-13 13:00:11 +00:00
}
2024-09-13 13:00:11 +00:00
mynav ul li {
margin-left: 0.5rem;
padding-left: 0.3rem;
cursor: pointer;
list-style-type: none;
2024-09-13 13:00:11 +00:00
}
2024-09-13 13:00:11 +00:00
mynav ul li a {
text-decoration: none;
color: inherit;
}
2024-09-13 13:00:11 +00:00
mynav ul li.open > ul {
display: block;
2024-09-13 13:00:11 +00:00
}
2024-09-13 13:00:11 +00:00
.arrow {
font-size: 0.8rem;
margin-right: 0.2rem;
2024-09-13 13:00:11 +00:00
}
article {
flex: 4;
min-width: 200px;
max-width: 1200px;
overflow-y: auto;
2024-09-13 13:00:11 +00:00
height: 100%;
scrollbar-width: none;
-ms-overflow-style: none;
}
2024-09-13 13:00:11 +00:00
article textarea {
line-height: 1.2;
}
2024-09-13 13:00:11 +00:00
article md {
line-height: 1.2;
}
2024-09-13 13:00:11 +00:00
docnav {
flex: 1;
min-width: 200px;
font-size: 0.9rem;
}
2024-09-13 13:00:11 +00:00
docnav ul {
list-style-type: none;
padding-left: 0;
}
2024-09-13 13:00:11 +00:00
docnav ul li {
margin-left: 0.4rem;
padding-left: 0rem;
cursor: pointer;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
max-width: 40ch;
2024-09-13 13:00:11 +00:00
}
@media (max-width: 768px) {
nav {
margin-top: 0rem;
}
nav ul {
flex-direction: column;
align-items: flex-start;
}
nav ul li {
margin: 0 rem 0;
}
navbar-right {
flex-direction: column;
align-items: flex-start;
margin-left: 0;
}
navbar-right a {
margin-left: 0;
}
navbar-right input[type="search"] {
width: 100%;
margin: 0;
}
.theme-icons {
margin-top: 0.5rem;
}
}