docula
Version:
Beautiful Website for Your Projects
484 lines (428 loc) • 8.25 kB
CSS
/* Home */
.home-hero {
padding: 3rem 0 2.5rem;
}
.hero-container {
margin: 2rem auto 3rem;
max-width: 90%;
}
.home-container {
margin: 0 auto 3rem;
}
.home-container h1, .hero-container h1 {
font-weight: 500;
font-size: 1.5rem;
}
.home-docs-button {
padding: 0.75rem 1.5rem;
border: 2px solid var(--color-secondary-dark);
border-radius: 0.5rem;
color: var(--color-secondary-dark);
font-weight: 600;
}
/* Docs */
.nav {
padding-left: 1rem;
padding-right: 1rem;
height: 4.5rem;
display: flex;
justify-content: space-between;
align-items: center;
width: 100%;
border-bottom: 1px solid var(--border);
z-index: 3;
white-space: nowrap;
flex-grow: 1;
}
.nav-list {
padding-left: 0;
}
.nav-list li {
margin-top: 1.5rem;
color: var(--sidebar-text);
list-style: none;
}
.nav-list .active {
color: var(--sidebar-text-active);
}
.icon {
background-color: transparent;
border: none;
cursor: pointer;
}
.menu-btn svg {
width: 1.25rem;
height: 1.25rem;
margin-right: 0.5rem;
}
.menu-btn span {
text-transform: uppercase;
font-size: 0.625rem;
vertical-align: super;
color: var(--color-text);
}
.header-menu {
display: flex;
align-items: center;
}
.header-logo {
flex-shrink: 0;
margin-right: 1.5rem;
display: block;
}
.header-logo img {
width: 3rem;
height: 3rem;
}
.breadcrumb a:hover {
text-decoration: underline;
}
details > summary {
cursor: pointer;
list-style: none;
}
.child-list {
padding-left: 1.125rem;
}
.child-list li {
color: var(--sidebar-text);
opacity: 0.8;
}
.sidebar {
background: var(--sidebar-background);
z-index: 10000;
width: 100%;
top: 0;
height: 100vh;
flex-direction: column;
flex-shrink: 0;
position: fixed;
font-family: var(--font-family);
border-right: 1px solid var(--border);
}
.sidebar-container {
overflow-y: auto;
width: inherit;
flex-grow: 1;
position: relative;
}
.sidebar-content {
padding: 3rem 2rem 1.5rem;
overflow-y: auto;
font-size: 0.875rem;
height: 90vh;
}
.sidebar-logo {
display: none;
}
.close-btn {
transition: all .2s ease-out;
color: var(--sidebar-text);
margin-top: 3rem;
display: flex;
align-items: center;
position: absolute;
right: 0;
top: 0;
margin-right: 2.5rem;
}
.close-btn svg {
width: 1rem;
height: 1rem;
fill: currentColor;
margin-right: 1rem;
}
.main-container {
width: 100%;
overflow-x: hidden;
padding-top: 2rem;
}
.main-content {
padding: 0 1.5rem;
display: flex;
}
.breadcrumb {
line-height: 1rem;
font-size: 0.625rem;
letter-spacing: 1.5px;
text-transform: uppercase;
font-weight: 600;
}
.sidebar-footer {
padding: 1rem 2.5rem;
display: flex;
align-items: center;
flex-wrap: wrap;
font-size: 0.875rem;
border-top: 1px solid var(--border);
justify-content: space-between;
position: absolute;
bottom: 0;
background-color: var(--sidebar-background);
width: 100%;
}
.sidebar-footer a {
font-size: 0.75rem;
color: var(--sidebar-text);
}
.sidebar-footer a:first-child {
margin-right: 2rem
}
.main-toc {
padding-bottom: 1.5rem;
}
.toc {
font-size: 0.875rem;
}
.toc #table-of-contents {
text-transform: uppercase;
font-size: 0.75rem;
margin-bottom: 0.5rem;
}
.toc ul {
list-style: none;
padding-left: 0;
}
.toc ul li {
padding-top: 0.5rem;
padding-bottom: 0.5rem;
}
.toc ul li > ul {
display: none;
}
.toc ul li a {
opacity: 0.8;
display: flex;
align-items: center;
justify-content: space-between;
width: 100%;
overflow: hidden;
text-overflow: ellipsis;
white-space: initial;
position: relative;
transition: all .2s ease-out;
}
.toc ul > li:hover > a {
transform: translateX(0.25rem);
text-decoration: none;
}
.main-toc ul > li > a::after {
position: absolute;
right: 0;
content: '';
display: inline-block;
width: 0.25rem;
height: 0.25rem;
border-right: 1px solid var(--color-primary);
border-bottom: 1px solid var(--color-primary);
transform: rotate(-45deg);
}
.fixed-toc {
display: none;
position: fixed;
max-width: 15rem;
margin-top: 2rem;
}
.fixed-toc-container {
flex: 0.8;
}
@media screen and (min-width: 576px) {
.date {
display: flex;
position: relative;
text-transform: uppercase;
letter-spacing: 1.5px;
color: var(--color-secondary);
font-size: 0.625rem;
font-weight: 600;
}
.date span::before {
position: absolute;
content: '';
background-image: url("data:image/svg+xml,%3Csvg class='block h-full' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 22 22'%3E%3Cpath d='M11 22A11 11 0 1 1 22 11 11 11 0 0 1 11 22ZM11 2a9 9 0 1 0 9 9A9 9 0 0 0 11 2Z'%3E%3C/path%3E%3Cpath d='M15 14a.93.93 0 0 1-.45-.11l-4-2A1 1 0 0 1 10 11V5a1 1 0 0 1 2 0v5.38l3.45 1.73a1 1 0 0 1 .44 1.34A1 1 0 0 1 15 14Z'%3E%3C/path%3E%3C/svg%3E");
left: -1.5rem;
width: 0.75rem;
height: 0.75rem;
}
.nav {
padding-left: 2rem;
padding-right: 2rem;
}
}
@media screen and (min-width: 640px) {
.home-hero {
padding: 4rem 0;
}
}
@media screen and (min-width: 768px) {
.home-container h1, .hero-container h1 {
font-size: 1.75rem;
}
.main-content {
padding: 0 3.5rem 1.5rem;
}
.main-container {
padding-top: 3.5rem;
}
.nav {
padding-left: 3.5rem;
padding-right: 3.5rem;
}
}
@media screen and (min-width: 992px) {
.home-container {
margin: 0 auto 3.5rem;
}
.hero-container {
margin-bottom: 3.5rem;
}
.home-hero img {
max-width: 28rem;
}
.home-container h1, .hero-container h1 {
font-size: 2rem;
}
.home-docs-button {
font-size: 1.5rem;
}
.header {
display: none;
}
.nav {
width: 100%;
justify-content: space-between;
height: auto;
box-shadow: none;
padding-right: 1rem;
z-index: 30;
}
.sidebar {
width: 20.25rem;
display: flex;
height: 100%;
z-index: 20;
}
.close-btn {
display: none;
}
.sidebar-content {
padding-top: 1.5rem;
height: 100%;
}
.nav-list {
margin-top: 0;
}
.main-container {
margin-top: 3rem;
padding-top: 0;
}
.header-link {
margin-top: 1.25rem;
}
.header-link img {
width: 11.25rem;
}
.layout {
display: grid;
grid-template-columns: 20.25rem 1fr;
grid-template-rows: 1fr;
grid-gap: 0;
}
aside {
grid-area: 1 / 1 / 4 / 2;
position: fixed;
top: 12.5rem;
left: 0;
z-index: 40;
height: 100%;
width: 20.25rem;
}
.main-container {
grid-area: 1 / 2 / 4 / 3;
}
.sidebar-logo {
position: sticky;
top: 0;
left: 0;
z-index: 80;
width: 20.25rem;
background-color: var(--sidebar-background);
display: flex;
align-items: center;
justify-content: center;
border-right: 1px solid var(--border);
}
.sidebar-logo svg {
width: 2rem;
height: 2rem;
}
.header-content {
display: flex;
height: 100%;
}
.nav {
justify-content: flex-start;
padding-left: 3.5rem;
z-index: 30;
}
.nav-list {
padding-left: 0;
}
.sidebar-footer {
position: sticky;
}
.main-toc {
padding-bottom: 3rem;
}
}
@media screen and (min-width: 1458px) {
.main-content {
padding: 0 3.5rem 1.5rem;
justify-content: space-between;
}
}
@media screen and (min-width: 1600px) {
.layout {
grid-template-columns: 23.75rem 1fr;
}
.sidebar, aside, .sidebar-logo {
width: 23.75rem;
}
.sidebar-logo, .sidebar-content, .sidebar-footer {
padding-left: 2.5rem;
padding-right: 2.5rem;
}
.main-content {
padding-left: 4.5rem;
padding-right: 4.5rem;
}
}
@media screen and (min-width: 1728px) {
.fixed-toc {
max-width: 17rem;
}
}
@media screen and (min-width: 1800px) {
.layout {
grid-template-columns: 28.75rem 1fr;
}
.sidebar, aside, .sidebar-logo {
width: 28.75rem;
}
.sidebar-logo, .sidebar-content, .sidebar-footer {
padding-left: 4rem;
padding-right: 4rem;
}
}
@media screen and (min-width: 2400px) {
.layout {
grid-template-columns: 37.5rem 1fr;
}
.sidebar, aside, .sidebar-logo {
width: 37.5rem;
}
.sidebar-logo, .sidebar-content, .sidebar-footer {
padding-left: 6rem;
padding-right: 6rem;
}
}