Update Result Page
This commit is contained in:
parent
bc1900d3f7
commit
dc759df038
126
app/globals.css
126
app/globals.css
@ -182,7 +182,7 @@
|
|||||||
|
|
||||||
/* Fullscreen styles for event overview */
|
/* Fullscreen styles for event overview */
|
||||||
[data-fullscreen-target="event-overview"]:fullscreen {
|
[data-fullscreen-target="event-overview"]:fullscreen {
|
||||||
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
|
background: #118a69;
|
||||||
padding: 4rem;
|
padding: 4rem;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
@ -425,6 +425,30 @@
|
|||||||
to { transform: rotate(360deg); }
|
to { transform: rotate(360deg); }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@keyframes pulse {
|
||||||
|
0% {
|
||||||
|
transform: scale(1);
|
||||||
|
opacity: 1;
|
||||||
|
}
|
||||||
|
50% {
|
||||||
|
transform: scale(1.05);
|
||||||
|
opacity: 0.9;
|
||||||
|
}
|
||||||
|
100% {
|
||||||
|
transform: scale(1);
|
||||||
|
opacity: 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@keyframes fadeIn {
|
||||||
|
from {
|
||||||
|
opacity: 0;
|
||||||
|
}
|
||||||
|
to {
|
||||||
|
opacity: 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
[data-fullscreen-target="event-overview"]:fullscreen .bg-gradient-to-r .text-3xl {
|
[data-fullscreen-target="event-overview"]:fullscreen .bg-gradient-to-r .text-3xl {
|
||||||
font-size: 7rem !important;
|
font-size: 7rem !important;
|
||||||
font-weight: 900 !important;
|
font-weight: 900 !important;
|
||||||
@ -455,7 +479,7 @@
|
|||||||
|
|
||||||
/* Fullscreen styles for Ready to Reveal Results */
|
/* Fullscreen styles for Ready to Reveal Results */
|
||||||
[data-fullscreen-target="reveal-results"]:fullscreen {
|
[data-fullscreen-target="reveal-results"]:fullscreen {
|
||||||
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
|
background: #118a69;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
@ -647,13 +671,33 @@
|
|||||||
margin: 1rem auto;
|
margin: 1rem auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
[data-fullscreen-target="reveal-results"]:fullscreen .trophy-icon {
|
/* METI Logo styling */
|
||||||
height: 5rem !important;
|
[data-fullscreen-target="reveal-results"]:not(:fullscreen) .meti-logo-container {
|
||||||
width: 5rem !important;
|
display: none;
|
||||||
color: #FFD700 !important;
|
}
|
||||||
filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.4));
|
|
||||||
animation: pulse 2s ease-in-out infinite, float 3s ease-in-out infinite;
|
[data-fullscreen-target="reveal-results"]:fullscreen .meti-logo-container {
|
||||||
margin-bottom: 1rem !important;
|
position: absolute;
|
||||||
|
top: 2rem;
|
||||||
|
left: 2rem;
|
||||||
|
z-index: 100;
|
||||||
|
animation: fadeIn 0.8s ease-out;
|
||||||
|
}
|
||||||
|
|
||||||
|
[data-fullscreen-target="reveal-results"]:fullscreen .meti-logo {
|
||||||
|
width: 120px !important;
|
||||||
|
height: 120px !important;
|
||||||
|
object-fit: contain;
|
||||||
|
filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Trophy icon: show in normal mode, hide in fullscreen */
|
||||||
|
[data-fullscreen-target="reveal-results"]:not(:fullscreen) .trophy-icon-normal {
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
|
||||||
|
[data-fullscreen-target="reveal-results"]:fullscreen .trophy-icon-normal {
|
||||||
|
display: none !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
[data-fullscreen-target="reveal-results"]:fullscreen .reveal-title {
|
[data-fullscreen-target="reveal-results"]:fullscreen .reveal-title {
|
||||||
@ -1105,6 +1149,70 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Fullscreen Results Display Styles within Container */
|
/* Fullscreen Results Display Styles within Container */
|
||||||
|
/* Fullscreen Logo */
|
||||||
|
.fullscreen-logo {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
[data-fullscreen-target="results-container"]:fullscreen .fullscreen-logo {
|
||||||
|
display: block !important;
|
||||||
|
position: fixed !important;
|
||||||
|
top: 2rem !important;
|
||||||
|
left: 2rem !important;
|
||||||
|
z-index: 100;
|
||||||
|
}
|
||||||
|
|
||||||
|
[data-fullscreen-target="results-container"]:fullscreen .fullscreen-logo img {
|
||||||
|
width: 120px !important;
|
||||||
|
height: 120px !important;
|
||||||
|
filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
|
||||||
|
transition: transform 0.3s ease;
|
||||||
|
}
|
||||||
|
|
||||||
|
[data-fullscreen-target="results-container"]:fullscreen .fullscreen-logo img:hover {
|
||||||
|
transform: scale(1.1);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Fullscreen Logo for Event Overview */
|
||||||
|
[data-fullscreen-target="event-overview"]:fullscreen .fullscreen-logo {
|
||||||
|
display: block !important;
|
||||||
|
position: fixed !important;
|
||||||
|
top: 2rem !important;
|
||||||
|
left: 2rem !important;
|
||||||
|
z-index: 100;
|
||||||
|
}
|
||||||
|
|
||||||
|
[data-fullscreen-target="event-overview"]:fullscreen .fullscreen-logo img {
|
||||||
|
width: 120px !important;
|
||||||
|
height: 120px !important;
|
||||||
|
filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
|
||||||
|
transition: transform 0.3s ease;
|
||||||
|
}
|
||||||
|
|
||||||
|
[data-fullscreen-target="event-overview"]:fullscreen .fullscreen-logo img:hover {
|
||||||
|
transform: scale(1.1);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Fullscreen Logo for Reveal Results */
|
||||||
|
[data-fullscreen-target="reveal-results"]:fullscreen .fullscreen-logo {
|
||||||
|
display: block !important;
|
||||||
|
position: fixed !important;
|
||||||
|
top: 2rem !important;
|
||||||
|
left: 2rem !important;
|
||||||
|
z-index: 100;
|
||||||
|
}
|
||||||
|
|
||||||
|
[data-fullscreen-target="reveal-results"]:fullscreen .fullscreen-logo img {
|
||||||
|
width: 200px !important;
|
||||||
|
height: 200px !important;
|
||||||
|
filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
|
||||||
|
transition: transform 0.3s ease;
|
||||||
|
}
|
||||||
|
|
||||||
|
[data-fullscreen-target="reveal-results"]:fullscreen .fullscreen-logo img:hover {
|
||||||
|
transform: scale(1.1);
|
||||||
|
}
|
||||||
|
|
||||||
[data-fullscreen-target="results-container"]:fullscreen .fullscreen-results-btn {
|
[data-fullscreen-target="results-container"]:fullscreen .fullscreen-results-btn {
|
||||||
position: fixed !important;
|
position: fixed !important;
|
||||||
top: 2rem !important;
|
top: 2rem !important;
|
||||||
|
|||||||
@ -459,6 +459,17 @@ function ResultsPageContent() {
|
|||||||
<div className="space-y-6 mb-8 animate-fade-in-up">
|
<div className="space-y-6 mb-8 animate-fade-in-up">
|
||||||
{/* Event Overview */}
|
{/* Event Overview */}
|
||||||
<Card data-fullscreen-target="event-overview" className="relative">
|
<Card data-fullscreen-target="event-overview" className="relative">
|
||||||
|
{/* Logo for Fullscreen Mode */}
|
||||||
|
<div className="fullscreen-logo">
|
||||||
|
<Image
|
||||||
|
src="/logo.jpeg"
|
||||||
|
alt="Logo"
|
||||||
|
width={80}
|
||||||
|
height={80}
|
||||||
|
className="rounded-lg shadow-lg"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
|
||||||
<CardHeader className="card-header">
|
<CardHeader className="card-header">
|
||||||
<div className="flex items-center justify-center gap-3 mb-2">
|
<div className="flex items-center justify-center gap-3 mb-2">
|
||||||
{isRefreshing && (
|
{isRefreshing && (
|
||||||
@ -534,6 +545,17 @@ function ResultsPageContent() {
|
|||||||
|
|
||||||
{/* Show Results Button */}
|
{/* Show Results Button */}
|
||||||
<Card data-fullscreen-target="reveal-results" className="relative">
|
<Card data-fullscreen-target="reveal-results" className="relative">
|
||||||
|
{/* Logo for Fullscreen Mode */}
|
||||||
|
<div className="fullscreen-logo">
|
||||||
|
<Image
|
||||||
|
src="/logo.jpeg"
|
||||||
|
alt="Logo"
|
||||||
|
width={80}
|
||||||
|
height={80}
|
||||||
|
className="rounded-lg shadow-lg"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
|
||||||
<CardContent className="text-center py-16 reveal-content">
|
<CardContent className="text-center py-16 reveal-content">
|
||||||
<Button
|
<Button
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
@ -605,8 +627,9 @@ function ResultsPageContent() {
|
|||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
<Trophy className="h-16 w-16 text-blue-500 mx-auto mb-6 trophy-icon" />
|
{/* Trophy icon for normal mode */}
|
||||||
<h2 className="text-2xl font-bold mb-4 reveal-title">Ready to Reveal Results?</h2>
|
<Trophy className="h-16 w-16 text-blue-500 mx-auto mb-6 trophy-icon-normal" />
|
||||||
|
<h2 className="text-2xl font-bold mb-4 reveal-title">{selectedEvent?.title}</h2>
|
||||||
<p className="text-gray-600 mb-8 reveal-description">
|
<p className="text-gray-600 mb-8 reveal-description">
|
||||||
Click the button below to see the voting results for "{selectedEvent?.title}"
|
Click the button below to see the voting results for "{selectedEvent?.title}"
|
||||||
</p>
|
</p>
|
||||||
@ -629,6 +652,17 @@ function ResultsPageContent() {
|
|||||||
|
|
||||||
{/* Results Container - Wraps both countdown and results for seamless fullscreen */}
|
{/* Results Container - Wraps both countdown and results for seamless fullscreen */}
|
||||||
<div data-fullscreen-target="results-container" className="results-fullscreen-container">
|
<div data-fullscreen-target="results-container" className="results-fullscreen-container">
|
||||||
|
{/* Logo for Fullscreen Mode */}
|
||||||
|
<div className="fullscreen-logo">
|
||||||
|
<Image
|
||||||
|
src="/logo.jpeg"
|
||||||
|
alt="Logo"
|
||||||
|
width={80}
|
||||||
|
height={80}
|
||||||
|
className="rounded-lg shadow-lg"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
|
||||||
{/* Countdown Animation */}
|
{/* Countdown Animation */}
|
||||||
{showCountdown && (
|
{showCountdown && (
|
||||||
<Card className="relative countdown-card">
|
<Card className="relative countdown-card">
|
||||||
|
|||||||
50
components/reveal-screen.tsx
Normal file
50
components/reveal-screen.tsx
Normal file
@ -0,0 +1,50 @@
|
|||||||
|
"use client"
|
||||||
|
|
||||||
|
import { useEffect, useState } from "react"
|
||||||
|
import Image from "next/image"
|
||||||
|
|
||||||
|
export function RevealScreen() {
|
||||||
|
const [isVisible, setIsVisible] = useState(true)
|
||||||
|
const [isAnimating, setIsAnimating] = useState(false)
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
// Start fade out animation after 2 seconds
|
||||||
|
const timer = setTimeout(() => {
|
||||||
|
setIsAnimating(true)
|
||||||
|
// Remove the component after animation completes
|
||||||
|
setTimeout(() => {
|
||||||
|
setIsVisible(false)
|
||||||
|
}, 500)
|
||||||
|
}, 2000)
|
||||||
|
|
||||||
|
return () => clearTimeout(timer)
|
||||||
|
}, [])
|
||||||
|
|
||||||
|
if (!isVisible) return null
|
||||||
|
|
||||||
|
return (
|
||||||
|
<div
|
||||||
|
className={`fixed inset-0 z-50 flex items-center justify-center transition-opacity duration-500 ${
|
||||||
|
isAnimating ? "opacity-0" : "opacity-100"
|
||||||
|
}`}
|
||||||
|
style={{ backgroundColor: "#118a69" }}
|
||||||
|
>
|
||||||
|
<div className="flex flex-col items-center">
|
||||||
|
<div className="relative w-48 h-48 sm:w-64 sm:h-64 animate-pulse">
|
||||||
|
<Image
|
||||||
|
src="/images/meti-logo.png"
|
||||||
|
alt="METI Logo"
|
||||||
|
fill
|
||||||
|
style={{ objectFit: "contain" }}
|
||||||
|
priority
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
<div className="mt-8 flex space-x-2">
|
||||||
|
<div className="w-3 h-3 bg-white rounded-full animate-bounce" style={{ animationDelay: "0ms" }}></div>
|
||||||
|
<div className="w-3 h-3 bg-white rounded-full animate-bounce" style={{ animationDelay: "150ms" }}></div>
|
||||||
|
<div className="w-3 h-3 bg-white rounded-full animate-bounce" style={{ animationDelay: "300ms" }}></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
)
|
||||||
|
}
|
||||||
BIN
public/logo.jpeg
Normal file
BIN
public/logo.jpeg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 6.3 KiB |
Loading…
x
Reference in New Issue
Block a user