Spaces:
Running

coty / index.html
Frunya's picture
Мне нужен сайт для подачи своих клипов в 10 номинациях. Называется премия Clip of The Year. Организовывает FrunyaShow
2a164d0 verified
Raw History Blame Contribute Delete
28.6 kB
<!DOCTYPE html>
<html lang="ru">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Clip of The Year | FrunyaShow</title>
<script src="https://cdn.tailwindcss.com"></script>
<link href="https://unpkg.com/aos@2.3.1/dist/aos.css" rel="stylesheet">
<script src="https://unpkg.com/aos@2.3.1/dist/aos.js"></script>
<script src="https://cdn.jsdelivr.net/npm/feather-icons/dist/feather.min.js"></script>
<script src="https://unpkg.com/feather-icons"></script>
<script src="https://cdn.jsdelivr.net/npm/vanta@latest/dist/vanta.globe.min.js"></script>
<script src="https://apis.google.com/js/api.js"></script>
<script src="https://extension-files.twitch.tv/helper/v1/twitch-ext.min.js"></script>
<style>
.nomination-card:hover {
transform: translateY(-5px);
box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}
#vanta-bg {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
z-index: -1;
opacity: 0.2;
}
.clip-preview {
aspect-ratio: 16/9;
}
</style>
</head>
<body class="bg-gray-900 text-white">
<div id="vanta-bg"></div>
<!-- Header -->
<header class="bg-black bg-opacity-80 backdrop-blur-md sticky top-0 z-50">
<div class="container mx-auto px-4 py-4 flex justify-between items-center">
<div class="flex items-center space-x-2">
<i data-feather="award" class="text-purple-500"></i>
<h1 class="text-2xl font-bold bg-gradient-to-r from-purple-500 to-pink-500 bg-clip-text text-transparent">Clip of The Year</h1>
</div>
<div id="auth-section">
<button id="twitch-login" class="bg-purple-600 hover:bg-purple-700 px-4 py-2 rounded-md flex items-center space-x-2 transition">
<i data-feather="log-in"></i>
<span>Войти через Twitch</span>
</button>
<div id="user-profile" class="hidden flex items-center space-x-4">
<img id="user-avatar" class="w-10 h-10 rounded-full" src="" alt="Profile">
<span id="username" class="font-medium"></span>
<button id="logout-btn" class="text-gray-400 hover:text-white">
<i data-feather="log-out"></i>
</button>
</div>
</div>
</div>
</header>
<!-- Hero Section -->
<section class="py-20 px-4 text-center">
<div class="max-w-4xl mx-auto" data-aos="fade-up">
<h2 class="text-4xl md:text-6xl font-bold mb-6">Премия <span class="bg-gradient-to-r from-purple-500 to-pink-500 bg-clip-text text-transparent">Clip of The Year</span></h2>
<p class="text-xl text-gray-300 mb-8">Отмечаем лучшие моменты стримеров в 10 уникальных номинациях</p>
<div class="flex flex-col sm:flex-row justify-center gap-4">
<a href="#nominations" class="bg-purple-600 hover:bg-purple-700 px-6 py-3 rounded-md font-medium transition">Номинации</a>
<button id="submit-clip-btn" class="bg-pink-600 hover:bg-pink-700 px-6 py-3 rounded-md font-medium transition hidden">Подать клип</button>
</div>
</div>
</section>
<!-- Nominations Section -->
<section id="nominations" class="py-16 px-4">
<div class="container mx-auto">
<h2 class="text-3xl font-bold mb-12 text-center" data-aos="fade-up">Номинации</h2>
<div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-8">
<!-- Nomination 1 -->
<div class="bg-gray-800 rounded-xl p-6 nomination-card transition duration-300" data-aos="fade-up">
<div class="flex items-center mb-4">
<div class="bg-purple-500 rounded-full w-10 h-10 flex items-center justify-center mr-4">
<i data-feather="smile" class="text-white"></i>
</div>
<h3 class="text-xl font-bold">"Бу! Испугался?"</h3>
</div>
<p class="text-gray-300 mb-4">Самая эмоциональная (смешная/испуганная и тд) реакция на скример</p>
<div class="flex justify-between items-center">
<span class="text-sm text-gray-400">Макс. клипов: 1</span>
<button class="nomination-select bg-gray-700 hover:bg-gray-600 px-3 py-1 rounded text-sm transition" data-nomination="1">Выбрать</button>
</div>
</div>
<!-- Nomination 2 -->
<div class="bg-gray-800 rounded-xl p-6 nomination-card transition duration-300" data-aos="fade-up">
<div class="flex items-center mb-4">
<div class="bg-blue-500 rounded-full w-10 h-10 flex items-center justify-center mr-4">
<i data-feather="target" class="text-white"></i>
</div>
<h3 class="text-xl font-bold">"Брошу стримы и пойду в киберспорт"</h3>
</div>
<p class="text-gray-300 mb-4">Лучший скилловый игровой момент а.к.а ноускоуп 360 или блекхол в 5ых. В любой игре.</p>
<div class="flex justify-between items-center">
<span class="text-sm text-gray-400">Макс. клипов: 1</span>
<button class="nomination-select bg-gray-700 hover:bg-gray-600 px-3 py-1 rounded text-sm transition" data-nomination="2">Выбрать</button>
</div>
</div>
<!-- Nomination 3 -->
<div class="bg-gray-800 rounded-xl p-6 nomination-card transition duration-300" data-aos="fade-up">
<div class="flex items-center mb-4">
<div class="bg-red-500 rounded-full w-10 h-10 flex items-center justify-center mr-4">
<i data-feather="user" class="text-white"></i>
</div>
<h3 class="text-xl font-bold">"Буду как ЧА"</h3>
</div>
<p class="text-gray-300 mb-4">Самый лучший образ (да тот самый бюджетный косплеер)</p>
<div class="flex justify-between items-center">
<span class="text-sm text-gray-400">Макс. клипов: 1</span>
<button class="nomination-select bg-gray-700 hover:bg-gray-600 px-3 py-1 rounded text-sm transition" data-nomination="3">Выбрать</button>
</div>
</div>
<!-- Nomination 4 -->
<div class="bg-gray-800 rounded-xl p-6 nomination-card transition duration-300" data-aos="fade-up">
<div class="flex items-center mb-4">
<div class="bg-green-500 rounded-full w-10 h-10 flex items-center justify-center mr-4">
<i data-feather="users" class="text-white"></i>
</div>
<h3 class="text-xl font-bold">"Команда мечты"</h3>
</div>
<p class="text-gray-300 mb-4">Лучший момент из кооп стримов</p>
<div class="flex justify-between items-center">
<span class="text-sm text-gray-400">Макс. клипов: 1</span>
<button class="nomination-select bg-gray-700 hover:bg-gray-600 px-3 py-1 rounded text-sm transition" data-nomination="4">Выбрать</button>
</div>
</div>
<!-- Nomination 5 -->
<div class="bg-gray-800 rounded-xl p-6 nomination-card transition duration-300" data-aos="fade-up">
<div class="flex items-center mb-4">
<div class="bg-yellow-500 rounded-full w-10 h-10 flex items-center justify-center mr-4">
<i data-feather="zap" class="text-white"></i>
</div>
<h3 class="text-xl font-bold">"АУФ-момент"</h3>
</div>
<p class="text-gray-300 mb-4">Самый мудрый/АУФный момент из стрима</p>
<div class="flex justify-between items-center">
<span class="text-sm text-gray-400">Макс. клипов: 1</span>
<button class="nomination-select bg-gray-700 hover:bg-gray-600 px-3 py-1 rounded text-sm transition" data-nomination="5">Выбрать</button>
</div>
</div>
<!-- Nomination 6 -->
<div class="bg-gray-800 rounded-xl p-6 nomination-card transition duration-300" data-aos="fade-up">
<div class="flex items-center mb-4">
<div class="bg-indigo-500 rounded-full w-10 h-10 flex items-center justify-center mr-4">
<i data-feather="heart" class="text-white"></i>
</div>
<h3 class="text-xl font-bold">"BibleThump"</h3>
</div>
<p class="text-gray-300 mb-4">Самый драматичный момент</p>
<div class="flex justify-between items-center">
<span class="text-sm text-gray-400">Макс. клипов: 1</span>
<button class="nomination-select bg-gray-700 hover:bg-gray-600 px-3 py-1 rounded text-sm transition" data-nomination="6">Выбрать</button>
</div>
</div>
<!-- Nomination 7 -->
<div class="bg-gray-800 rounded-xl p-6 nomination-card transition duration-300" data-aos="fade-up">
<div class="flex items-center mb-4">
<div class="bg-pink-500 rounded-full w-10 h-10 flex items-center justify-center mr-4">
<i data-feather="thumbs-up" class="text-white"></i>
</div>
<h3 class="text-xl font-bold">"Ягами позавидует"</h3>
</div>
<p class="text-gray-300 mb-4">Лучший смех твича. Например, заразительный или смех злодея</p>
<div class="flex justify-between items-center">
<span class="text-sm text-gray-400">Макс. клипов: 1</span>
<button class="nomination-select bg-gray-700 hover:bg-gray-600 px-3 py-1 rounded text-sm transition" data-nomination="7">Выбрать</button>
</div>
</div>
<!-- Nomination 8 -->
<div class="bg-gray-800 rounded-xl p-6 nomination-card transition duration-300" data-aos="fade-up">
<div class="flex items-center mb-4">
<div class="bg-orange-500 rounded-full w-10 h-10 flex items-center justify-center mr-4">
<i data-feather="alert-triangle" class="text-white"></i>
</div>
<h3 class="text-xl font-bold">"Это фиаско, братан"</h3>
</div>
<p class="text-gray-300 mb-4">Самый фейловый момент. Смешной/фейл</p>
<div class="flex justify-between items-center">
<span class="text-sm text-gray-400">Макс. клипов: 1</span>
<button class="nomination-select bg-gray-700 hover:bg-gray-600 px-3 py-1 rounded text-sm transition" data-nomination="8">Выбрать</button>
</div>
</div>
<!-- Nomination 9 -->
<div class="bg-gray-800 rounded-xl p-6 nomination-card transition duration-300" data-aos="fade-up">
<div class="flex items-center mb-4">
<div class="bg-teal-500 rounded-full w-10 h-10 flex items-center justify-center mr-4">
<i data-feather="star" class="text-white"></i>
</div>
<h3 class="text-xl font-bold">"Мимимимими"</h3>
</div>
<p class="text-gray-300 mb-4">Самый милый момент. Игра, стример или даже питомец</p>
<div class="flex justify-between items-center">
<span class="text-sm text-gray-400">Макс. клипов: 1</span>
<button class="nomination-select bg-gray-700 hover:bg-gray-600 px-3 py-1 rounded text-sm transition" data-nomination="9">Выбрать</button>
</div>
</div>
<!-- Nomination 10 -->
<div class="bg-gray-800 rounded-xl p-6 nomination-card transition duration-300" data-aos="fade-up">
<div class="flex items-center mb-4">
<div class="bg-gray-500 rounded-full w-10 h-10 flex items-center justify-center mr-4">
<i data-feather="award" class="text-white"></i>
</div>
<h3 class="text-xl font-bold">"Какая-то еще номинация"</h3>
</div>
<p class="text-gray-300 mb-4">Если вдруг есть клип, который не попал в список номинаций, но он крутой</p>
<div class="flex justify-between items-center">
<span class="text-sm text-gray-400">Макс. клипов: 1</span>
<button class="nomination-select bg-gray-700 hover:bg-gray-600 px-3 py-1 rounded text-sm transition" data-nomination="10">Выбрать</button>
</div>
</div>
</div>
</div>
</section>
<!-- Submission Modal -->
<div id="submission-modal" class="fixed inset-0 bg-black bg-opacity-70 z-50 hidden flex items-center justify-center p-4">
<div class="bg-gray-800 rounded-xl max-w-2xl w-full max-h-[90vh] overflow-y-auto">
<div class="p-6">
<div class="flex justify-between items-center mb-6">
<h3 class="text-2xl font-bold" id="modal-title">Подача клипа</h3>
<button id="close-modal" class="text-gray-400 hover:text-white">
<i data-feather="x"></i>
</button>
</div>
<form id="clip-form" class="space-y-4">
<input type="hidden" id="nomination-id">
<div>
<label for="clip-url" class="block mb-2 font-medium">Ссылка на клип (Twitch Clip)</label>
<input type="url" id="clip-url" class="w-full bg-gray-700 border border-gray-600 rounded-md px-4 py-2 focus:outline-none focus:ring-2 focus:ring-purple-500" placeholder="https://clips.twitch.tv/..." required>
</div>
<div>
<label for="clip-description" class="block mb-2 font-medium">Описание (почему этот клип достоин победы?)</label>
<textarea id="clip-description" rows="3" class="w-full bg-gray-700 border border-gray-600 rounded-md px-4 py-2 focus:outline-none focus:ring-2 focus:ring-purple-500" required></textarea>
</div>
<div id="clip-preview-container" class="hidden">
<label class="block mb-2 font-medium">Предпросмотр клипа</label>
<div class="clip-preview bg-black rounded-md overflow-hidden">
<iframe id="clip-preview" class="w-full h-full" frameborder="0" allowfullscreen></iframe>
</div>
</div>
<div id="eligibility-message" class="hidden bg-red-900 bg-opacity-50 p-4 rounded-md">
<div class="flex items-start">
<i data-feather="alert-circle" class="mr-2 mt-1"></i>
<div>
<p class="font-medium">У вас пока недостаточно подписчиков для участия</p>
<p class="text-sm mt-1">Вы можете предложить своему стримеру поучаствовать на премии</p>
</div>
</div>
</div>
<div class="pt-4">
<button type="submit" id="submit-clip" class="w-full bg-purple-600 hover:bg-purple-700 px-6 py-3 rounded-md font-medium transition">Отправить клип</button>
</div>
</form>
</div>
</div>
</div>
<!-- User Submissions Section -->
<section id="my-submissions" class="py-16 px-4 hidden">
<div class="container mx-auto">
<h2 class="text-3xl font-bold mb-8 text-center">Мои заявки</h2>
<div class="grid grid-cols-1 md:grid-cols-2 gap-6" id="submissions-list">
<!-- Submissions will be loaded here -->
</div>
</div>
</section>
<!-- Footer -->
<footer class="bg-black bg-opacity-80 py-8 px-4">
<div class="container mx-auto text-center">
<p class="text-gray-400">Организатор: <span class="text-purple-400">FrunyaShow</span></p>
<p class="text-gray-500 text-sm mt-2">© 2023 Clip of The Year. Все права защищены.</p>
</div>
</footer>
<script>
// Initialize animations and icons
document.addEventListener('DOMContentLoaded', function() {
AOS.init({
duration: 800,
easing: 'ease-in-out',
once: true
});
feather.replace();
// Vanta.js background
VANTA.GLOBE({
el: "#vanta-bg",
mouseControls: true,
touchControls: true,
gyroControls: false,
minHeight: 200.00,
minWidth: 200.00,
scale: 1.00,
scaleMobile: 1.00,
color: 0x7e22ce,
backgroundColor: 0x111827,
size: 0.8
});
// Modal handling
const modal = document.getElementById('submission-modal');
const closeModalBtn = document.getElementById('close-modal');
const nominationSelectBtns = document.querySelectorAll('.nomination-select');
const clipUrlInput = document.getElementById('clip-url');
const clipPreviewContainer = document.getElementById('clip-preview-container');
const clipPreview = document.getElementById('clip-preview');
const submitClipBtn = document.getElementById('submit-clip-btn');
const mySubmissionsSection = document.getElementById('my-submissions');
// Mock user data (replace with actual Twitch auth)
let currentUser = null;
let userSubmissions = [];
// Twitch login button
document.getElementById('twitch-login').addEventListener('click', function() {
// In a real implementation, this would redirect to Twitch OAuth
mockTwitchLogin();
});
// Logout button
document.getElementById('logout-btn').addEventListener('click', function() {
currentUser = null;
document.getElementById('twitch-login').classList.remove('hidden');
document.getElementById('user-profile').classList.add('hidden');
submitClipBtn.classList.add('hidden');
mySubmissionsSection.classList.add('hidden');
});
// Nomination selection
nominationSelectBtns.forEach(btn => {
btn.addEventListener('click', function() {
const nominationId = this.getAttribute('data-nomination');
const nominationTitle = this.closest('.nomination-card').querySelector('h3').textContent;
document.getElementById('nomination-id').value = nominationId;
document.getElementById('modal-title').textContent = `Подача клипа: ${nominationTitle}`;
// Reset form
document.getElementById('clip-form').reset();
clipPreviewContainer.classList.add('hidden');
// Show modal
modal.classList.remove('hidden');
// Check eligibility if user is logged in
if (currentUser) {
document.getElementById('eligibility-message').classList.add('hidden');
}
});
});
// Close modal
closeModalBtn.addEventListener('click', function() {
modal.classList.add('hidden');
});
// Clip URL input change
clipUrlInput.addEventListener('change', function() {
const url = this.value.trim();
if (url.includes('clips.twitch.tv')) {
const clipId = url.split('/').pop();
const embedUrl = `https://clips.twitch.tv/embed?clip=${clipId}&parent=${window.location.hostname}`;
clipPreview.src = embedUrl;
clipPreviewContainer.classList.remove('hidden');
} else {
clipPreviewContainer.classList.add('hidden');
}
});
// Form submission
document.getElementById('clip-form').addEventListener('submit', function(e) {
e.preventDefault();
if (!currentUser) {
alert('Пожалуйста, войдите через Twitch чтобы подать клип');
return;
}
if (currentUser.followers < 50) {
document.getElementById('eligibility-message').classList.remove('hidden');
return;
}
const submission = {
id: Date.now(),
nominationId: document.getElementById('nomination-id').value,
nominationTitle: document.getElementById('modal-title').textContent.replace('Подача клипа: ', ''),
clipUrl: document.getElementById('clip-url').value,
description: document.getElementById('clip-description').value,
date: new Date().toLocaleDateString(),
status: 'На рассмотрении'
};
// In a real implementation, this would save to Google Sheets
userSubmissions.push(submission);
updateSubmissionsList();
// Close modal and show success message
modal.classList.add('hidden');
alert('Ваш клип успешно отправлен!');
});
// Submit clip button
submitClipBtn.addEventListener('click', function() {
mySubmissionsSection.classList.remove('hidden');
mySubmissionsSection.scrollIntoView({ behavior: 'smooth' });
});
// Mock Twitch login function
function mockTwitchLogin() {
currentUser = {
id: '123456',
name: 'TestStreamer',
displayName: 'Test Streamer',
avatar: 'https://static-cdn.jtvnw.net/jtv_user_pictures/asmongold-profile_image-f7ddcbd0332f5d28-300x300.png',
followers: 75 // Change to <50 to test eligibility
};
document.getElementById('twitch-login').classList.add('hidden');
document.getElementById('user-profile').classList.remove('hidden');
document.getElementById('user-avatar').src = currentUser.avatar;
document.getElementById('username').textContent = currentUser.displayName;
submitClipBtn.classList.remove('hidden');
// Load user submissions
if (currentUser.followers >= 50) {
// In a real implementation, this would fetch from Google Sheets
userSubmissions = [
{
id: 1,
nominationId: '2',
nominationTitle: '"Брошу стримы и пойду в киберспорт"',
clipUrl: 'https://clips.twitch.tv/InventiveSuspiciousTrufflePogChamp',
description: 'Сделал 360 ноускоуп в CS:GO',
date: '01.11.2023',
status: 'На рассмотрении'
}
];
updateSubmissionsList();
}
}
// Update submissions list
function updateSubmissionsList() {
const submissionsList = document.getElementById('submissions-list');
submissionsList.innerHTML = '';
if (userSubmissions.length === 0) {
submissionsList.innerHTML = '<p class="text-gray-400 col-span-2 text-center">У вас пока нет отправленных клипов</p>';
return;
}
userSubmissions.forEach(sub => {
const submissionElement = document.createElement('div');
submissionElement.className = 'bg-gray-800 rounded-xl p-6';
submissionElement.innerHTML = `
<div class="flex justify-between items-start mb-4">
<h3 class="text-xl font-bold">${sub.nominationTitle}</h3>
<span class="text-sm px-2 py-1 rounded ${sub.status === 'На рассмотрении' ? 'bg-yellow-900 text-yellow-200' : 'bg-green-900 text-green-200'}">${sub.status}</span>
</div>
<p class="text-gray-300 mb-4">${sub.description}</p>
<div class="flex justify-between items-center text-sm text-gray-400">
<span>${sub.date}</span>
<a href="${sub.clipUrl}" target="_blank" class="text-purple-400 hover:text-purple-300 flex items-center">
<i data-feather="external-link" class="w-4 h-4 mr-1"></i>
Посмотреть клип
</a>
</div>
`;
submissionsList.appendChild(submissionElement);
});
feather.replace();
}
});
</script>
</body>
</html>