adlerka.space/assets/style.css

172 lines
3.5 KiB
CSS
Raw Normal View History

2024-01-11 09:27:03 +01:00
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800&display=swap');
:root {
--primary-bg: rgb(27, 21, 41);
--secondary-bg: #1a1a1a;
2024-01-11 16:17:55 +01:00
--third-bg: #383838;
2024-01-11 09:27:03 +01:00
--primary-text: #d2d6e5;
--error: rgb(255, 55, 0);
--primary: #2a9dd6;
--primary-hover: #2489bb;
}
body {
2024-01-16 20:43:57 +01:00
background: linear-gradient(127deg, var(--secondary-bg), var(--primary-bg)) no-repeat fixed;
2024-01-11 09:27:03 +01:00
background-size: cover;
height: 100%;
width: 100%;
font-family: 'Poppins', sans-serif;
color: var(--primary-text);
margin: 0;
padding: 0;
}
nav {
display: flex;
flex-direction: row;
justify-content: space-between;
padding: 1.2rem 1rem;
background-color: rgba(0, 0, 0, 0.2);
2024-01-16 20:43:57 +01:00
-webkit-box-shadow: 0 20px 28px 0 rgba(0,0,0,0.2);
-moz-box-shadow: 0 20px 28px 0 rgba(0,0,0,0.2);
box-shadow: 0 20px 28px 0 rgba(0,0,0,0.2);
2024-01-11 09:27:03 +01:00
}
ul {
display: flex;
flex-direction: row;
gap: 2rem;
2024-01-11 16:15:50 +01:00
list-style: none;
padding-left: 0;
2024-01-11 09:27:03 +01:00
}
li {
list-style: none;
}
li a {
position: relative;
padding-bottom: 0.45rem;
color: var(--primary-text);
text-decoration: none;
transition: all 0.3s ease;
}
li a::after {
content: "";
position: absolute;
height: 4px;
width: 0;
bottom: 0;
left: 0;
background-color: var(--primary);
transition: all 0.3s ease;
border-radius: 15px;
}
li a:hover::after {
width: 85%;
}
.wrapper-404 {
text-align: center;
}
.wrapper-404 h1 {
font-size: 10rem;
margin: 0;
}
.wrapper-404 .error {
color: var(--error);
}
.wrapper-404 h3 {
margin-bottom: 2rem;
}
.error-code {
color: var(--primary);
}
.back {
color: var(--primary-text);
text-decoration: none;
background-color: #2a9dd6;
padding: 0.35rem 0.65rem;
transition: all 0.3s ease;
border-radius: 15px;
}
.back:hover {
transition: all 0.3s ease;
background-color: var(--primary-hover);
}
header {
width: 100%;
align-items: center;
text-align: center;
}
header h1 {
margin: 0;
padding: 0;
}
header a {
color: var(--primary);
}
header hr {
border-color: var(--primary);
opacity: 0.5;
width: 30%;
2024-01-11 16:08:49 +01:00
}
.navsite_list{
display: flex;
flex-direction: row;
}
.navpage_list{
display: none;
flex-direction: column;
}
2024-01-11 16:14:56 +01:00
.navsite_item:hover .navpage_list{
2024-01-11 16:08:49 +01:00
display: flex !important;
2024-01-11 16:17:55 +01:00
}
2024-01-16 22:00:38 +01:00
/* Add this style for the initial state of the navpage_list */
2024-01-16 21:59:18 +01:00
.navpage_list {
2024-01-11 16:19:53 +01:00
background-color: var(--third-bg);
2024-01-12 15:20:44 +01:00
margin-top: 10px;
2024-01-16 18:59:41 +01:00
display: flex;
flex-direction: column;
2024-01-16 21:57:23 +01:00
overflow: hidden; /* Hide the content initially */
max-height: 0; /* Set the initial height to 0 */
2024-01-16 22:02:45 +01:00
border: 4px solid var(--primary-hover); /* Set initial border */
2024-01-16 22:00:38 +01:00
transition: max-height 0.3s ease, border 0.3s ease; /* Add transition for smooth height and border animation */
2024-01-16 21:53:00 +01:00
}
2024-01-16 18:59:41 +01:00
2024-01-16 21:53:00 +01:00
/* Modify this style for the hover state of the navsite_item */
2024-01-16 18:59:41 +01:00
.navsite_item:hover .navpage_list {
2024-01-16 21:53:00 +01:00
max-height: 200px; /* Adjust the value based on your content height */
2024-01-16 22:02:45 +01:00
border: 8px solid var(--primary-hover); /* Ensure border remains visible on hover */
2024-01-12 15:19:05 +01:00
}
2024-01-16 22:00:38 +01:00
2024-01-16 22:02:45 +01:00
/* Add this style for the transition when not hovering */
.navsite_item:not(:hover) .navpage_list {
max-height: 0; /* Set height to 0 when not hovering */
border: 4px solid var(--primary-hover); /* Maintain border for the delay */
transition-delay: 0.3s; /* Delay the border fade-out transition */
}
2024-01-16 22:00:38 +01:00
2024-01-12 15:20:44 +01:00
li.navpage_item{
2024-01-12 15:24:58 +01:00
padding-left: 20px;
padding-right: 20px;
2024-01-12 15:26:36 +01:00
}
ul.navpage_list{
gap: 10px;
2024-01-11 09:27:03 +01:00
}