No edit summary |
No edit summary Tag: Manual revert |
||
(33 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
/* | /* General Section Styling */ | ||
.featured-section { | .featured-section { | ||
max-width: 1200px; /* Restrict maximum width */ | |||
max-width: | |||
margin: auto; /* Center the section */ | margin: auto; /* Center the section */ | ||
padding: 10px; | |||
text-align: center; | |||
font-family: 'Lora', serif; | |||
color: #fff; | |||
} | } | ||
/* Background color section */ | |||
.featured-section h2 { | .featured-section h2 { | ||
margin-bottom: 20px; | |||
font-size: 24px; | font-size: 24px; | ||
color: #f5eccc; /* Optional: Subtle gold for title */ | |||
} | } | ||
/* | /* Featured Grid */ | ||
.featured-container { | .featured-container { | ||
display: | display: grid; | ||
grid-template-columns: repeat(3, 1fr); /* 3 items per row */ | |||
gap: | gap: 15px; /* Space between grid items */ | ||
justify- | justify-items: center; /* Center items within their grid cells */ | ||
} | } | ||
/* | /* Featured Item */ | ||
.featured-item { | .featured-item { | ||
position: relative; /* Parent container for card content */ | |||
width: 350px; /* Fixed width for each card */ | |||
height: 350px; /* Fixed height to keep cards square */ | |||
overflow: hidden; | overflow: hidden; | ||
border-radius: 10px; /* Rounded corners */ | |||
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3); /* Add subtle shadow */ | box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3); /* Add subtle shadow */ | ||
background-color: #222; /* Fallback color for card background */ | |||
} | } | ||
/* Image Container */ | /* Image Container */ | ||
.image-container { | .image-container { | ||
position: relative; /* For positioning | position: relative; /* For positioning child elements absolutely */ | ||
height: | width: 100%; | ||
overflow: hidden; | height: 100%; | ||
overflow: hidden; /* Prevent overflow of child elements */ | |||
} | } | ||
. | /* Ensures the image fills the container fully */ | ||
width: 100%; /* | .grid-img { | ||
height: 100%; /* | position: absolute; /* Ensures the image fills the container */ | ||
object-fit: cover; /* | top: 0; | ||
left: 0; | |||
width: 100%; /* Stretch image to container width */ | |||
height: 100%; /* Stretch image to container height */ | |||
object-fit: cover; /* Maintains aspect ratio while filling */ | |||
margin: 0; /* Removes any unwanted margins */ | |||
padding: 0; /* Removes padding */ | |||
} | } | ||
Line 53: | Line 58: | ||
.card-label { | .card-label { | ||
position: absolute; | position: absolute; | ||
top: 10px; | top: 10px; | ||
left: 10px; | left: 10px; | ||
background-color: | background-color: rgba(245, 236, 204, 0.9); /* Light gold, semi-transparent */ | ||
color: #333; | color: #333; | ||
font-size: 14px; | |||
font-weight: bold; | font-weight: bold; | ||
padding: 5px 10px; | |||
padding: 5px 10px; | border-radius: 5px; | ||
border-radius: 5px; | z-index: 2; /* Ensure it stays above the image */ | ||
z-index: | pointer-events: none; /* Prevent interactions with the label */ | ||
} | } | ||
/* | /* General styling for overlay text */ | ||
. | .overlay-text { | ||
padding: | position: absolute; /* Position it relative to the container */ | ||
text-align: | bottom: 0; /* Align to the bottom of the image */ | ||
left: 0; | |||
width: 100%; /* Take up full width of the container */ | |||
background-color: rgba(0, 0, 0, 0.7); /* Semi-transparent black background */ | |||
color: #fff; /* White text for contrast */ | |||
font-size: 14px; /* Adjust font size */ | |||
padding: 10px; /* Add padding for spacing */ | |||
text-align: center; /* Center-align the text */ | |||
line-height: 1.2; /* Adjust line height for readability */ | |||
word-wrap: break-word; /* Ensure long words wrap */ | |||
overflow-wrap: break-word; /* Modern equivalent for word breaking */ | |||
white-space: normal; /* Allow wrapping for multiple lines */ | |||
border-radius: 0 0 10px 10px; /* Rounded corners to match container */ | |||
box-sizing: border-box; /* Ensure padding is included in width/height calculations */ | |||
z-index: 2; /* Ensure it appears above the image */ | |||
} | } | ||
/* CODE FREEZE */ | |||
/* CODE BELOW WORKS WELL */ | |||
/* Main page background */ | |||
/* Header */ | /* Header */ | ||
. | .main-header::before { | ||
content: ''; | content: ''; | ||
position: absolute; | position: absolute; | ||
Line 109: | Line 118: | ||
} | } | ||
.page-Main_Page { | .page-Main_Page { | ||
background: url('https://predictive-pulse.com/images/5ean444_winter_cabin_forest_snow_night_sky_stars_peaceful_reali_fc7e7992-0c1e-4564-bf78-2930ff9dc2f9.png') no-repeat center center fixed; | background: url('https://predictive-pulse.com/images/5ean444_winter_cabin_forest_snow_night_sky_stars_peaceful_reali_fc7e7992-0c1e-4564-bf78-2930ff9dc2f9.png') no-repeat center center fixed; | ||
Line 128: | Line 136: | ||
.nav-item { | .nav-item { | ||
position: relative; /* Enables positioning of child elements */ | position: relative; /* Enables positioning of child elements */ | ||
width: | width: 175px; /* Fixed width for each grid item. Affected by flex-basis */ | ||
height: | height: 150px; /* Fixed height for each grid item */ | ||
border-radius: 6px; /* Consistent rounded corners */ | border-radius: 6px; /* Consistent rounded corners */ | ||
overflow: hidden; /* Ensures child content stays within bounds */ | overflow: hidden; /* Ensures child content stays within bounds */ | ||
Line 140: | Line 148: | ||
padding: 0; /* Removes padding */ | padding: 0; /* Removes padding */ | ||
flex-shrink: 1; /* Prevents flexbox from resizing items */ | flex-shrink: 1; /* Prevents flexbox from resizing items */ | ||
flex-basis: | flex-basis: 150px; /* Ensures all items take up the same width. Needs flex-shrink>0 */ | ||
transition: transform 0.3s, box-shadow 0.3s; /* Smooth hover effect */ | transition: transform 0.3s, box-shadow 0.3s; /* Smooth hover effect */ | ||
} | } | ||
Line 181: | Line 189: | ||
text-align: center !important; /* Centers the text horizontally */ | text-align: center !important; /* Centers the text horizontally */ | ||
/*font-size: 12px; /* Adjusts font size */ | /*font-size: 12px; /* Adjusts font size */ | ||
font-size: clamp(10px, | font-size: clamp(10px, 1.5vw, 12px); /* Responsive font size */ | ||
font-weight: bold; /* Makes the text bold */ | font-weight: bold; /* Makes the text bold */ | ||
line-height: 1 | line-height: 1; /* Adjusts line height for wrapped text */ | ||
padding: | padding: 5px; /* Adds padding inside the text area */ | ||
box-sizing: border-box; /* Includes padding in width/height calculations */ | |||
overflow-wrap: break-word; /* Ensures long words wrap */ | overflow-wrap: break-word; /* Ensures long words wrap */ | ||
overflow: hidden; /* Prevents overflowing text */ | overflow: hidden; /* Prevents overflowing text */ | ||
border-radius: 0 0 8px 8px; /* Rounded corners for the bottom of the text area */ | border-radius: 0 0 8px 8px; /* Rounded corners for the bottom of the text area */ | ||
} | } |
Latest revision as of 01:38, 10 December 2024
/* General Section Styling */
.featured-section {
max-width: 1200px; /* Restrict maximum width */
margin: auto; /* Center the section */
padding: 10px;
text-align: center;
font-family: 'Lora', serif;
color: #fff;
}
/* Background color section */
.featured-section h2 {
margin-bottom: 20px;
font-size: 24px;
color: #f5eccc; /* Optional: Subtle gold for title */
}
/* Featured Grid */
.featured-container {
display: grid;
grid-template-columns: repeat(3, 1fr); /* 3 items per row */
gap: 15px; /* Space between grid items */
justify-items: center; /* Center items within their grid cells */
}
/* Featured Item */
.featured-item {
position: relative; /* Parent container for card content */
width: 350px; /* Fixed width for each card */
height: 350px; /* Fixed height to keep cards square */
overflow: hidden;
border-radius: 10px; /* Rounded corners */
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3); /* Add subtle shadow */
background-color: #222; /* Fallback color for card background */
}
/* Image Container */
.image-container {
position: relative; /* For positioning child elements absolutely */
width: 100%;
height: 100%;
overflow: hidden; /* Prevent overflow of child elements */
}
/* Ensures the image fills the container fully */
.grid-img {
position: absolute; /* Ensures the image fills the container */
top: 0;
left: 0;
width: 100%; /* Stretch image to container width */
height: 100%; /* Stretch image to container height */
object-fit: cover; /* Maintains aspect ratio while filling */
margin: 0; /* Removes any unwanted margins */
padding: 0; /* Removes padding */
}
/* Card Label */
.card-label {
position: absolute;
top: 10px;
left: 10px;
background-color: rgba(245, 236, 204, 0.9); /* Light gold, semi-transparent */
color: #333;
font-size: 14px;
font-weight: bold;
padding: 5px 10px;
border-radius: 5px;
z-index: 2; /* Ensure it stays above the image */
pointer-events: none; /* Prevent interactions with the label */
}
/* General styling for overlay text */
.overlay-text {
position: absolute; /* Position it relative to the container */
bottom: 0; /* Align to the bottom of the image */
left: 0;
width: 100%; /* Take up full width of the container */
background-color: rgba(0, 0, 0, 0.7); /* Semi-transparent black background */
color: #fff; /* White text for contrast */
font-size: 14px; /* Adjust font size */
padding: 10px; /* Add padding for spacing */
text-align: center; /* Center-align the text */
line-height: 1.2; /* Adjust line height for readability */
word-wrap: break-word; /* Ensure long words wrap */
overflow-wrap: break-word; /* Modern equivalent for word breaking */
white-space: normal; /* Allow wrapping for multiple lines */
border-radius: 0 0 10px 10px; /* Rounded corners to match container */
box-sizing: border-box; /* Ensure padding is included in width/height calculations */
z-index: 2; /* Ensure it appears above the image */
}
/* CODE FREEZE */
/* CODE BELOW WORKS WELL */
/* Main page background */
/* Header */
.main-header::before {
content: '';
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 200px;
background-image: url('flourish.svg'); /* Could also be SVG code */
background-size: contain;
animation: flourishAnimation 5s infinite; /* Example animation */
}
@keyframes flourishAnimation {
from {
opacity: 0;
transform: translateY(-20px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
.page-Main_Page {
background: url('https://predictive-pulse.com/images/5ean444_winter_cabin_forest_snow_night_sky_stars_peaceful_reali_fc7e7992-0c1e-4564-bf78-2930ff9dc2f9.png') no-repeat center center fixed;
background-size: cover;
}
.mainpage-navigation {
display: flex;
flex-wrap: wrap; /* Allows items to wrap to the next line */
gap: 10px; /* Adds spacing between grid items */
justify-content: center; /* Centers the items horizontally */
padding: 10px;
align-items: stretch; /* Ensures all items align consistently */
/* max-width: 660px; /* Ensures three items per row (3 items * 200px width + 2 gaps of 10px each)
margin: 0 auto; /* Centers the container horizontally */
}
.nav-item {
position: relative; /* Enables positioning of child elements */
width: 175px; /* Fixed width for each grid item. Affected by flex-basis */
height: 150px; /* Fixed height for each grid item */
border-radius: 6px; /* Consistent rounded corners */
overflow: hidden; /* Ensures child content stays within bounds */
background-color: rgba(0, 0, 0, 0.2); /* Light gray background for uniformity */
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); /* Optional shadow effect */
display: flex;
flex-direction: column; /* Stacks the image and text vertically */
align-items: center; /* Centers items horizontally */
justify-content: flex-start; /* Aligns items to the top */
padding: 0; /* Removes padding */
flex-shrink: 1; /* Prevents flexbox from resizing items */
flex-basis: 150px; /* Ensures all items take up the same width. Needs flex-shrink>0 */
transition: transform 0.3s, box-shadow 0.3s; /* Smooth hover effect */
}
/* the pre element, which is a block-level element, preserves all the whitespace,
line breaks, and formatting inside it, often causing it to exceed the intended
dimensions of the parent container (in this case, .nav-item). This can happen
if MediaWiki or some part of your content generation wraps the rendered content
(e.g., from [[File:...]]) inside a <pre> tag. */
.nav-item pre {
margin: 0; /* Removes extra margin */
padding: 0; /* Removes extra padding */
min-width: 100%; /* Ensures the pre spans at least the full width of the container */
min-height: 100%; /* Ensures the pre spans at least the full height of the container */
max-width: 100%; /* Prevents it from exceeding the container's width */
max-height: 100%; /* Prevents it from exceeding the container's height */
/*box-sizing: border-box; /* Includes padding within the specified dimensions */
overflow: hidden; /* Clips content that exceeds the container */
white-space: normal; /* Allows text to wrap instead of preserving whitespace */
}
.nav-item img {
width: 100%; /* Ensures the image takes the full width of the container */
height: 70%; /* Allocates 70% of the height to the image */
object-fit: cover; /* Ensures the image fills the area without distortion */
border-radius: 8px 8px 0 0; /* Apply rounded corners only to the top of the image */
margin: 0; /* Removes extra margin */
}
.nav-item span {
/* display: block; /* Ensures the text takes full width */
display: flex; /* Make span a flex container */
align-items: center; /* Center vertically */
justify-content: center;
text-align: center;
width: 100%; /* Matches the width of the container */
height: 30%; /* Allocates x% of the height to the text area */
background-color: rgba(0, 0, 0, 0.7); /* Semi-transparent background for text */
color: #fff; /* White text color */
text-align: center !important; /* Centers the text horizontally */
/*font-size: 12px; /* Adjusts font size */
font-size: clamp(10px, 1.5vw, 12px); /* Responsive font size */
font-weight: bold; /* Makes the text bold */
line-height: 1; /* Adjusts line height for wrapped text */
padding: 5px; /* Adds padding inside the text area */
box-sizing: border-box; /* Includes padding in width/height calculations */
overflow-wrap: break-word; /* Ensures long words wrap */
overflow: hidden; /* Prevents overflowing text */
border-radius: 0 0 8px 8px; /* Rounded corners for the bottom of the text area */
}