caddy-website/new/resources/css/common.css

522 lines
8.7 KiB
CSS
Raw Normal View History

:root,
.light {
2023-05-02 17:29:08 -06:00
--body-bg: white;
--text-color: #222;
--header-bg: rgba(118, 179, 194, 0.11);
--header-border-color: #ebf0f2;
--topbar-link-color-hover: black;
--topbar-link-bg-hover: rgb(244, 249, 251);
2023-05-02 17:29:08 -06:00
--main-nav-link-color: #546c75;
--main-nav-link-hover-color: #01324b;
--link-color: #0097f2;
--link-decoration-color: #ddd;
--link-hover-color: rgb(27, 170, 70);
--heading-color: var(--text-color);
2023-05-02 17:29:08 -06:00
--code-bg: #f2f8f9;
--dropdown-bg: #e8ecef;
--dropdown-linkbox: white;
--dropdown-link-title-color: #384f61;
--dropdown-link-color: #647687;
--dropdown-link-hover-bg: rgb(239, 244, 248);
--dropdown-link-hover-color: #142633;
--dropdown-featured-bg: linear-gradient(to bottom, rgb(239 244 247), transparent);
--dropdown-featured-hover-bg: rgb(223, 233, 238); /* rgb(232, 255, 254); */
2023-05-02 17:29:08 -06:00
--dropdown-shadow-color: rgb(0 0 0 / .4);
}
.dark {
2023-05-02 17:29:08 -06:00
--body-bg: #0d171a;
--text-color: #cbe2e4; /* #a4c0c2 */
2023-05-02 17:29:08 -06:00
--header-bg: rgba(44, 130, 164, 0.11);
--header-border-color: transparent;
--topbar-link-color-hover: white;
--topbar-link-bg-hover: rgb(255 255 255 / .1);
--main-nav-link-color: #86a7b1;
2023-05-02 17:29:08 -06:00
--main-nav-link-hover-color: #e2e9ec;
--link-color: #34a1e4;
--link-decoration-color: #375862;
--link-hover-color: rgb(42, 228, 98);
--heading-color: #dee8ee;
2023-05-02 17:29:08 -06:00
--code-bg: #1f3237;
2023-09-19 09:30:32 -06:00
--dropdown-bg: #152125; /* #34414b; */
--dropdown-linkbox: #1d2c32;
2023-05-02 17:29:08 -06:00
--dropdown-link-title-color: #f0f3f5;
--dropdown-link-color: #9ebeca;
--dropdown-link-hover-color: white;
--dropdown-link-hover-bg: rgb(30, 48, 63);
--dropdown-featured-bg: linear-gradient(to bottom, rgb(46, 58, 66), transparent);
--dropdown-featured-hover-bg: rgb(64, 82, 92);
2023-05-02 17:29:08 -06:00
--dropdown-shadow-color: black;
}
.dark #logo-light,
.dark-header #logo-light,
#logo-dark {
display: none;
2023-05-02 17:29:08 -06:00
}
.dark #logo-dark,
.dark-header #logo-dark {
display: initial;
2023-05-02 17:29:08 -06:00
}
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
2023-05-02 17:29:08 -06:00
font-family: Inter, Figtree, Gantari, 'Albert Sans', Inter, system-ui;
font-size: 18px;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
tab-size: 4;
2023-05-02 17:29:08 -06:00
background-color: var(--body-bg);
color: var(--text-color);
}
main a {
color: var(--link-color);
text-decoration-line: underline;
text-decoration-thickness: 2px;
text-underline-offset: 2px;
text-decoration-color: var(--link-decoration-color);
transition: all .15s;
}
main a:hover {
color: var(--link-hover-color);
text-decoration-color: var(--link-color);
}
b,
strong {
font-weight: 600;
}
code {
font-family: 'JetBrains Mono', 'Chivo Mono', monospace;
font-feature-settings: "liga" 0; /* prevent the merging of chars like "fi", relevant for Chivo Mono especially */
}
.wrapper {
max-width: 1400px;
margin-left: auto;
margin-right: auto;
2023-05-02 17:29:08 -06:00
padding-left: 50px;
padding-right: 50px;
}
header {
2023-05-02 17:29:08 -06:00
background: var(--header-bg);
position: relative;
z-index: 99;
}
header a {
text-decoration: none;
}
header nav>ul {
background: linear-gradient(to right, rgb(100 190 121), rgb(54 206 255));
background-clip: text;
-webkit-background-clip: text;
}
.topbar {
2023-05-02 17:29:08 -06:00
font-size: 12px;
border-bottom: 1px solid hsl(203deg 100% 79% / 20%);
}
.topbar .wrapper {
display: flex;
justify-content: flex-end;
align-items: center;
gap: 1em;
2023-05-02 17:29:08 -06:00
color: #777;
}
.topbar a {
display: inline-block;
2023-05-02 17:29:08 -06:00
padding: 10px 10px 8px;
color: #719bcc;
display: flex;
align-items: center;
}
.topbar a:hover {
background: var(--topbar-link-bg-hover);
color: var(--topbar-link-color-hover);
}
.navbar {
display: flex;
align-items: center;
gap: 2em;
}
2023-05-30 11:09:56 -06:00
.navbar .actions,
.navbar nav ul {
flex-wrap: wrap;
}
2023-05-02 17:29:08 -06:00
header nav ul {
list-style: none;
margin: 0;
padding-left: 0;
display: flex;
align-items: center;
flex: 1;
}
.navbar nav>ul>li>a {
-webkit-text-fill-color: rgba(0 0 0 / .1);
}
.navbar nav>ul>li>a:hover {
-webkit-text-fill-color: rgba(255 255 255 / .4);
}
2023-05-02 17:29:08 -06:00
.navbar nav {
position: relative;
}
.navbar nav>ul>li>a,
.navbar .button {
text-decoration: none;
2023-05-02 17:29:08 -06:00
transition: all 200ms;
color: inherit;
font-weight: 500;
}
.navbar nav>ul>li>a {
2023-05-02 17:29:08 -06:00
padding: 20px 1.5em;
display: block;
2023-05-02 17:29:08 -06:00
font-family: Figtree, system-ui;
font-size: 16px;
}
.navbar .button {
font-size: 80%;
}
.icon {
height: 1.4em;
vertical-align: middle;
}
.logo {
height: 2.25em;
}
.navbar .actions {
margin-left: auto;
display: flex;
gap: 1em;
}
.button {
padding: .6em 1.5em;
border-radius: 6px;
text-decoration: none;
/* necessary for hoversplash: */
position: relative;
overflow: hidden;
2023-09-19 09:30:32 -06:00
display: inline-block;
}
.button.primary {
background: linear-gradient(135deg, white 25%, rgba(167, 183, 193) 80%);
color: #222;
2023-09-19 09:30:32 -06:00
font-weight: bold;
}
.button.primary:hover {
color: #1a71cb;
}
2023-05-02 17:29:08 -06:00
.button:active {
transition: all 75ms;
transform: scale(.95);
box-shadow: 1px 1px 3px inset rgba(0, 0, 0, 0.2);
}
@keyframes hoverSplash {
0% {
opacity: 1;
transform: translate3d(-50%, -50%, 0) scale3d(0, 0, 1);
}
100% {
opacity: 0;
transform: translate3d(-50%, -50%, 0) scale3d(1, 1, 1);
}
}
.hover-splash {
pointer-events: none;
position: absolute;
/* z-index: 1; */
width: 200%;
height: 0;
padding-bottom: 200%;
border-radius: 50%;
/* transform: translate3d(-50%,-50%,0) scale3d(0,0,1); */
animation: 1s cubic-bezier(.16, 1, .3, 1) hoverSplash;
}
.button.primary .hover-splash {
background-color: rgba(255, 255, 255, 0.6);
}
.button.secondary .hover-splash {
background-color: rgba(24, 156, 233, 0.6);
}
.dropdown {
2023-05-02 17:29:08 -06:00
font-size: 16px;
position: absolute;
display: inline-block;
2023-05-02 17:29:08 -06:00
background: var(--dropdown-bg);
border-radius: 15px;
line-height: 1.5;
overflow: hidden;
2023-05-02 17:29:08 -06:00
box-shadow: 0 30px 75px var(--dropdown-shadow-color);
visibility: hidden;
top: calc(100% - 5px);
left: 0;
}
2023-05-02 17:29:08 -06:00
.dropdown-trigger:hover .dropdown {
visibility: visible;
transform-origin: top left;
animation: rotateMenu 300ms ease;
}
@keyframes rotateMenu {
0% {
transform: rotateX(-90deg) scale(0.75);
opacity: 0;
}
100% {
transform: rotateX(0deg) scale(1);
opacity: 1;
}
2023-05-02 17:29:08 -06:00
}
.dropdown .row {
display: flex;
gap: 1px;
margin-bottom: 1px;
}
.dropdown .plainbox,
.dropdown .linkbox {
display: flex;
gap: 4em;
padding: 1.5em;
}
.dropdown .plainbox {
padding-top: .5em;
width: 100%;
justify-content: space-around;
}
.dropdown .plainbox a {
2023-05-02 17:29:08 -06:00
color: var(--dropdown-link-color);
}
.dropdown .plainbox a:hover {
2023-05-02 17:29:08 -06:00
color: var(--dropdown-link-hover-color);
}
.dropdown .linkbox {
2023-05-02 17:29:08 -06:00
background: var(--dropdown-linkbox);
gap: 4em;
}
2023-05-02 17:29:08 -06:00
.dropdown .links-header {
font-family: Poppins, ui-rounded;
2023-05-02 17:29:08 -06:00
font-weight: 600;
color: var(--dropdown-link-title-color);
2023-09-19 09:30:32 -06:00
font-size: 18px;
2023-05-02 17:29:08 -06:00
margin-bottom: 5px;
}
.dropdown .col {
min-width: 150px;
}
.dropdown .col a {
display: block;
2023-05-02 17:29:08 -06:00
color: var(--dropdown-link-color);
text-decoration: none;
padding: 5px 0;
}
.dropdown .col a:hover {
2023-05-02 17:29:08 -06:00
color: var(--dropdown-link-hover-color);
}
.dropdown .flatlinks a,
.dropdown .featured a {
transition: background-color 150ms;
font-size: 12px;
}
.dropdown .flatlinks a {
2023-05-02 17:29:08 -06:00
background: var(--dropdown-linkbox);
padding: 1em 2em;
2023-05-02 17:29:08 -06:00
color: var(--dropdown-link-color);
}
.dropdown .flatlinks a b,
.dropdown .featured a b {
display: block;
font-size: 16px;
font-weight: 600;
}
.dropdown .flatlinks a b {
2023-05-02 17:29:08 -06:00
color: var(--dropdown-link-title-color);
margin-bottom: .25em;
}
.dropdown .flatlinks a:hover {
2023-05-02 17:29:08 -06:00
/* background: rgb(239, 244, 248); */
background: var(--dropdown-link-hover-bg);
}
.dropdown .featured a b {
2023-05-02 17:29:08 -06:00
color: var(--dropdown-link-title-color);
margin-bottom: .5em;
}
.dropdown .featured a:hover b {
2023-05-02 17:29:08 -06:00
color: var(--dropdown-link-hover-color);
}
.dropdown .featured {
gap: 1em;
padding: 1em;
/* background: white; */
}
.dropdown .featured a {
display: block;
padding: 1em;
line-height: 1.4;
border-radius: 10px;
2023-05-02 17:29:08 -06:00
color: var(--dropdown-link-color);
background-color: var(--dropdown-linkbox);
background-image: var(--dropdown-featured-bg);
/* background-image: linear-gradient(to bottom, rgb(239 244 247), rgba(252,252,252,0)); */
/* background: linear-gradient(137deg, rgb(241 251 247) 0%, rgb(242 248 255) 100%); */
flex: 1;
box-shadow: 0 1px 2px rgb(0 0 0 / .2);
}
.dropdown .featured a:hover {
background-color: var(--dropdown-featured-hover-bg);
2023-05-02 17:29:08 -06:00
}
.dropdown .featured a b {
display: block;
2023-05-02 17:29:08 -06:00
color: var(--dropdown-link-title-color);
font-size: 16px;
margin-bottom: .5em;
font-weight: 600;
2023-05-02 17:29:08 -06:00
}
#current-theme {
text-transform: capitalize;
2023-05-30 11:09:56 -06:00
}
@media (max-width: 1150px) {
.dropdown {
display: none;
}
.wrapper {
padding-left: 20px;
padding-right: 20px;
}
}
@media (max-width: 950px) {
header nav ul {
justify-content: space-evenly;
}
.topbar .wrapper {
justify-content: center;
flex-wrap: wrap;
gap: 0;
}
.logo {
height: 3em;
}
.navbar {
flex-direction: column;
gap: 0;
padding: 1em 0;
}
.navbar nav {
margin: .5em 0;
}
.navbar .actions {
margin: 0 auto;
}
.navbar nav > ul > li > a {
padding-top: 10px;
padding-bottom: 10px;
}
}