heroweb/examples/heroweb_example_base/css/heroweb.css
2024-09-13 16:00:11 +03:00

193 lines
3.8 KiB
CSS

/* Custom styles to enhance the nav bar */
body > main {
display: flex;
flex-wrap: wrap;
gap: 1rem;
height: 100vh;
overflow: hidden;
}
nav {
background-color: #f1f3f5;
padding: 0rem 1rem;
}
nav ul {
margin: 0;
padding: 0;
list-style: none;
display: flex;
justify-content: space-between;
align-items: center;
}
nav ul li {
margin: 0 0.5rem;
}
nav ul li a {
text-decoration: none;
color: #495057;
font-weight: 500;
transition: color 0.3s ease;
}
nav ul li a:hover {
color: #1971c2;
}
.brand {
font-size: 1rem;
font-weight: bold;
}
navbar-right {
display: flex;
align-items: center;
margin-left: 30%;
}
navbar-right a {
margin-left: 1rem;
}
navbar-right input[type="search"] {
padding: 0.2rem 0.5rem;
border: 1px solid #ced4da;
border-radius: 1rem;
background-color: #f8f9fa;
font-size: 0.8rem;
line-height: 1;
height: 2rem;
width: 300px;
margin: 0;
}
/* New styles for theme icons */
.theme-icons {
display: flex;
align-items: center;
}
.theme-icon {
cursor: pointer;
padding: 5px;
border-radius: 50%;
margin-left: 0.5rem;
}
.theme-icon svg {
width: 20px;
height: 20px;
fill: currentColor;
}
.theme-icon:hover {
background-color: #e9ecef;
}
mynav,
docnav {
flex: 1;
min-width: 200px;
max-width: 250px;
overflow-y: auto; /* Enable scrolling for nav and docnav */
}
mynav ul {
list-style-type: none;
padding-left: 0;
}
mynav ul ul {
list-style-type: none; /* Remove bullets */
padding-left: 0;
margin-left: 0.2rem;
display: none; /* Hide nested lists by default */
}
mynav ul li {
margin-left: 0.5rem;
padding-left: 0.3rem;
cursor: pointer; /* Indicate that items are clickable */
list-style-type: none; /* Remove bullets */
}
mynav ul li a {
text-decoration: none;
color: inherit;
}
mynav ul li.open > ul {
display: block; /* Show nested lists when parent is open */
}
.arrow {
font-size: 0.8rem; /* Reduce the font size of the arrows */
margin-right: 0.2rem; /* Adjust the space between the arrow and the text */
}
article {
flex: 4;
min-width: 200px;
max-width: 1200px;
overflow-y: auto; /* Enable scrolling for article */
height: 100%;
scrollbar-width: none;
-ms-overflow-style: none;
}
article textarea {
line-height: 1.2;
}
article md {
line-height: 1.2;
}
docnav {
flex: 1;
min-width: 200px;
font-size: 0.9rem;
}
docnav ul {
list-style-type: none;
padding-left: 0;
}
docnav ul li {
margin-left: 0.4rem;
padding-left: 0rem;
cursor: pointer; /* Indicate that items are clickable */
white-space: nowrap; /* Prevent text from wrapping */
overflow: hidden; /* Hide overflow text */
text-overflow: ellipsis; /* Add ellipses for overflow text */
max-width: 40ch; /* Limit length of item to 40 characters */
}
@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;
}
}
/* [data-theme="dark"] {
--background-color: #333;
--text-color: #fff;
}
[data-theme="dark"] body {
background-color: var(--background-color);
color: var(--text-color);
}
[data-theme="dark"] nav {
background-color: #444;
}
[data-theme="dark"] nav ul li a {
color: #ddd;
}
[data-theme="dark"] nav ul li a:hover {
color: #fff;
}
[data-theme="dark"] .theme-icon:hover {
background-color: #555;
} */