freettrpg/style.css

293 lines
5.3 KiB
CSS
Raw Normal View History

2024-06-18 19:42:14 +02:00
/* Reset and global styles */
2024-06-30 00:17:59 +02:00
* {
2024-06-18 19:42:14 +02:00
box-sizing: border-box;
margin: 0;
padding: 0;
2024-06-30 00:17:59 +02:00
font-family: "Roboto", Arial, sans-serif;
transition: 0.5s; /* Smooth transitions */
2024-06-18 19:42:14 +02:00
}
/* Body styles */
body {
2024-06-30 00:17:59 +02:00
background-color: #f9f9f9;
2024-06-18 19:16:01 +02:00
background: #f5f5f5 url("assets/background.jpg") no-repeat center fixed;
2024-06-18 19:42:14 +02:00
display: flex;
flex-direction: column;
align-items: center;
min-height: 100vh;
2024-06-30 00:17:59 +02:00
margin: 0;
padding: 0;
}
.div-menu{
z-index: 1;
background-color: #211c1c;
width: 100%;
position: fixed;
top: 0;
left: 0;
box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
padding: 0;
height: auto;
2024-06-18 19:42:14 +02:00
}
/* Header styles */
header {
2024-06-30 00:17:59 +02:00
background-color: #211c1c;
2024-06-18 19:42:14 +02:00
width: 100%;
position: fixed;
top: 0;
left: 0;
2024-06-30 00:17:59 +02:00
box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
padding: 0; /* Further reduce the padding */
height: auto;
z-index: 10; /* Higher z-index to ensure it is above other elements */
2024-06-18 19:42:14 +02:00
}
.header-content {
display: flex;
justify-content: space-between;
align-items: center;
2024-06-30 00:17:59 +02:00
max-width: 1200px;
margin: 0 auto;
flex-direction: row;
padding: 0 20px; /* Original padding */
z-index: 10;
}
.div-menu li {
margin: 1;
z-index: 1;
padding: 1em;
}
.div-menu a {
width: 100%;
padding: 12px 0;
text-align: center; /* Center align the menu items */
color: #ffffff;
text-decoration: none;
padding: 8px; /* Smaller padding */
border-radius: 5px;
transition: background-color 0.3s ease;
justify-content: center;
z-index: 1;
}
.div-menu a:hover {
background-color: #34495e;
2024-06-18 19:42:14 +02:00
}
.project-name {
2024-06-30 00:17:59 +02:00
text-decoration: none;
color: #ffffff;
font-size: 1.5em; /* Updated font size */
font-weight: bold;
z-index: 11; /* Higher z-index to ensure it is above the menu */
2024-06-18 19:42:14 +02:00
}
.burger-menu {
background: none;
border: none;
2024-06-30 00:17:59 +02:00
color: #ffffff;
font-size: 1.5em; /* Updated font size */
2024-06-18 19:42:14 +02:00
cursor: pointer;
2024-06-30 00:17:59 +02:00
display: block;
padding: 0;
z-index: 12; /* Higher z-index to ensure it is above the menu */
2024-06-18 19:42:14 +02:00
}
.menu {
display: flex;
2024-06-30 00:17:59 +02:00
flex-direction: column;
background-color: #211c1c;
position: absolute;
top: -50vh;
left: 0;
width: 100%; /* Full width of the header */
z-index: 5; /* Lower z-index than header, header content, and project name */
padding: 0;
list-style: none;
justify-content: center; /* Center items vertically */
text-align: center; /* Center items horizontally */
animation: top 1s ease-in-out; /* Initial animation state */
2024-06-18 19:42:14 +02:00
}
2024-06-30 00:17:59 +02:00
.menu.active {
display: flex;
top: 10vh;
z-index: 5; /* Lower z-index than header, header content, and project name */
2024-06-18 19:42:14 +02:00
}
/* Article styles */
article {
2024-06-30 00:17:59 +02:00
margin-bottom: 50px;
padding: 20px;
2024-06-18 19:42:14 +02:00
width: 90%;
max-width: 800px;
2024-06-30 00:17:59 +02:00
background-color: #ffffff;
2024-06-18 19:42:14 +02:00
border-radius: 10px;
2024-06-30 00:17:59 +02:00
box-shadow: 0 0 15px rgba(0, 0, 0, 0.1);
text-align: left;
margin-top: 140px; /* Increase margin-top for better readability */
padding-top: 20px;
2024-06-18 19:16:01 +02:00
}
2024-06-18 19:42:14 +02:00
h1 {
2024-06-30 00:17:59 +02:00
color: #333333;
margin: 20px 0;
font-size: 2.5em;
2024-06-18 19:16:01 +02:00
}
2024-06-30 00:17:59 +02:00
p.text {
color: #555555;
line-height: 1.6;
margin: 20px 0;
font-size: 1.1em;
2024-06-18 19:42:14 +02:00
}
2024-06-30 00:17:59 +02:00
.code-box {
background-color: #f7f7f7;
border: 1px solid #ddd;
font-family: monospace;
padding: 15px;
margin: 1em 0;
2024-06-18 19:42:14 +02:00
}
2024-06-30 00:17:59 +02:00
2024-06-18 19:42:14 +02:00
img {
max-width: 100%;
height: auto;
margin-bottom: 20px;
2024-06-30 00:17:59 +02:00
border-radius: 8px;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
2024-06-18 19:42:14 +02:00
}
button {
2024-06-18 19:16:01 +02:00
padding: 12px 24px;
2024-06-30 00:17:59 +02:00
margin: 1em 0;
2024-06-18 19:42:14 +02:00
border: none;
2024-06-30 00:17:59 +02:00
background-color: #3498db;
color: #ffffff;
2024-06-18 19:42:14 +02:00
border-radius: 5px;
cursor: pointer;
transition: background-color 0.3s ease;
}
button:hover {
2024-06-30 00:17:59 +02:00
background-color: #2980b9;
}
.flex {
display: flex;
align-items: center;
}
nav {
margin: 20px;
}
.folder-list {
justify-content: center;
list-style-type: none;
padding: 0;
}
.folder-list-item {
margin-bottom: 10px;
justify-content: center;
}
.folder-link {
text-decoration: none;
color: #ffffff;
font-weight: bold;
display: block;
padding: 10px;
border-radius: 5px;
background-color: #2c3e50;
transition: background-color 0.3s ease;
}
.folder-link:hover {
background-color: #34495e;
}
.folder-link:active {
transform: scale(0.98); /* Slight scale down on click */
}
article img{
margin-top: 1em;
2024-06-18 19:42:14 +02:00
}
/* Cards section styles */
section .cards {
display: grid;
2024-06-18 19:16:01 +02:00
grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
2024-06-18 19:42:14 +02:00
gap: 20px;
margin-top: 50px;
2024-06-30 00:17:59 +02:00
z-index: 0; /* Ensure cards are behind the dropdown menu */
2024-06-18 19:42:14 +02:00
}
section .card {
text-align: center;
list-style: none;
background-color: #fff;
padding: 20px;
border-radius: 10px;
box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
text-decoration: none;
color: #333;
transition: transform 0.2s, box-shadow 0.2s;
position: relative;
overflow: hidden;
display: flex;
flex-direction: column;
justify-content: space-between;
}
section .card:hover {
transform: translateY(-10px);
box-shadow: 0 15px 25px rgba(0, 0, 0, 0.2);
}
section .card img {
2024-06-18 19:16:01 +02:00
height: 64px;
width: 64px;
2024-06-18 19:42:14 +02:00
object-fit: cover;
border-radius: 5px;
2024-06-18 19:16:01 +02:00
margin: 0 auto 10px;
2024-06-18 19:42:14 +02:00
}
2024-06-30 00:17:59 +02:00
h2{
margin-bottom: 1em;
margin-top: 1em;
}
2024-06-18 19:42:14 +02:00
section .card h3 {
margin: 10px 0;
}
section .card p {
flex-grow: 1;
}
2024-06-30 00:17:59 +02:00
.no-margin{
margin: -20px 0;
margin-bottom: 20px;
}
2024-06-18 19:42:14 +02:00
/* Mobile Styles */
@media (max-width: 768px) {
section .card {
2024-06-18 19:16:01 +02:00
padding: 12px; /* Adjusted padding */
2024-06-18 19:42:14 +02:00
}
section .card img {
2024-06-18 19:16:01 +02:00
height: 60px; /* Adjusted height */
width: 60px; /* Adjusted width */
border-radius: 8px; /* Adjusted border-radius */
2024-06-18 19:42:14 +02:00
}
}