Files
peworkshop/app/(main)/map/map.module.css
T
bobbert 6d1cbe9195 fixed map display and fixed some routing issues for if the hunt timer runs out.
Grey = cant click
Red = current
Green = complete
blue = skipped?
2025-03-15 20:13:00 +00:00

225 lines
4.6 KiB
CSS

.map-page {
display: flex;
flex-direction: column;
width: 100%;
height: 100vh; /* Full viewport height */
overflow: hidden; /* Hide overflow at page level */
position: relative;
background-color: #69b5a8;
}
.map-banner {
background-color: #68543c;
color: white;
padding: 15px;
display: flex;
align-items: center;
justify-content: space-between;
border-bottom: 2px solid #4a3c2a;
z-index: 10;
flex-shrink: 0; /* Prevent banner from shrinking */
}
.team-name {
font-size: 18px;
font-weight: bold;
flex: 1;
text-align: left;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
padding-right: 5px;
}
.elapsed-time {
text-align: center;
padding: 5px 10px;
background-color: rgba(0, 0, 0, 0.2);
border-radius: 8px;
flex: 0 0 auto; /* Don't grow or shrink */
margin: 0 10px;
}
.time-value {
font-size: 18px;
font-weight: bold;
}
.team-code {
font-size: 16px;
font-weight: bold;
flex: 1;
text-align: right;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
padding-left: 5px;
}
/* Map container takes all available space */
.map-container {
flex: 1; /* Take all available space */
position: relative;
width: 100%;
height: 100%;
background-color: #69b5a8; /* Background color */
overflow: auto; /* Enable scrolling */
display: block; /* Change from flex to block for proper scrolling */
}
.treasure-map {
position: relative;
width: fit-content; /* Change from 100% to fit-content to allow natural svg size */
min-width: 100%; /* Ensure it's at least full width */
height: fit-content;
min-height: 100%;
display: flex; /* Keep flex for alignment */
justify-content: flex-end; /* Align to the right */
align-items: flex-start; /* Align to the top */
}
/* SVG container for better scrolling and zooming */
.svg-container {
position: relative;
width: fit-content; /* Allow natural width */
height: fit-content; /* Allow natural height */
display: block; /* Change to block for proper scrolling */
overflow: visible; /* Show content beyond boundaries */
}
.svg-container svg {
max-width: none; /* Remove max-width limitation */
width: auto;
height: auto;
display: block;
object-fit: none; /* Don't constrain the SVG */
}
/* Map background - display as full-page map */
.map-background {
position: absolute;
top: 0;
right: 0; /* Align to the right */
width: 100vw; /* Full viewport width */
height: auto;
background-image: url("/images/map.svg");
background-size: auto; /* Don't resize the background */
background-position: top right; /* Position at top right */
background-repeat: no-repeat;
z-index: 5;
}
/* Circle elements in the SVG map - attach to a container class */
.svg-container circle {
cursor: pointer;
transition: fill 0.3s ease; /* Only transition the fill color, not size */
}
.svg-container circle:hover {
fill: #ffb74d !important; /* Only change color on hover, no movement */
}
/* Remaining styles unchanged */
.map-svg {
width: 100% !important; /* Override Next.js Image default width */
height: auto !important; /* Override Next.js Image default height */
max-width: none; /* Allow image to grow beyond container */
object-fit: contain;
display: block;
}
.loading-container {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
height: 100vh;
width: 100%;
}
.loading-spinner {
border: 4px solid #f3f3f3;
border-top: 4px solid #68543c;
border-radius: 50%;
width: 40px;
height: 40px;
animation: spin 1s linear infinite;
margin-bottom: 20px;
}
@keyframes spin {
0% {
transform: rotate(0deg);
}
100% {
transform: rotate(360deg);
}
}
.map-error {
padding: 20px;
text-align: center;
}
/* Navigation bar - now sticky at the bottom */
.nav-bar {
display: flex;
justify-content: space-around;
background-color: white;
border-top: 1px solid #ddd;
padding: 10px 0;
position: sticky; /* Sticky positioning */
bottom: 0; /* Stick to bottom */
left: 0;
width: 100%;
box-sizing: border-box;
z-index: 100; /* Ensure it stays on top */
flex-shrink: 0; /* Prevent navbar from shrinking */
}
.nav-item {
display: flex;
flex-direction: column;
align-items: center;
text-decoration: none;
color: #666;
flex: 1;
padding: 8px 0;
}
.nav-icon {
font-size: 22px;
margin-bottom: 3px;
}
.nav-label {
font-size: 12px;
}
.nav-item.active {
color: #68543c;
}
/* Make sure the map is responsive */
@media (max-width: 480px) {
.team-name {
font-size: 16px;
}
.team-code {
font-size: 14px;
}
.time-value {
font-size: 16px;
}
.nav-icon {
font-size: 20px;
}
.nav-label {
font-size: 11px;
}
}