Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
158 changes: 135 additions & 23 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,25 +24,42 @@
<link href="https://fonts.googleapis.com/css2?family=Silkscreen&display=swap" rel="stylesheet">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.2/css/all.min.css">
<style>
:root {
--bg-gradient-start: #1f1f1f;
--bg-gradient-end: #3b3b3b;
--text-color: #f0f0f0;
--container-bg: rgba(40, 44, 52, 0.9);
--border-color: #61dafb;
--accent-color: #61dafb;
--shadow-color: rgba(0, 0, 0, 0.2);
--shadow-hover: rgba(0, 0, 0, 0.3);
}

body.light-mode {
--bg-gradient-start: #ffffff;
--bg-gradient-end: #e0e0e0;
--text-color: #282c34;
--container-bg: rgba(255, 255, 255, 0.9);
--border-color: #0097a7;
--accent-color: #0097a7;
--shadow-color: rgba(0, 0, 0, 0.1);
--shadow-hover: rgba(0, 0, 0, 0.2);
}

body, html {
margin: 0;
padding: 0;
font-family: 'Silkscreen', cursive;
background: linear-gradient(135deg, #1f1f1f, #3b3b3b);
color: #f0f0f0;
font-family: 'Silkscreen', cursive;
background: linear-gradient(135deg, var(--bg-gradient-start), var(--bg-gradient-end));
color: var(--text-color);
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
height: 100vh;
text-align: center;
transition: background-color 0.3s, color 0.3s;
padding: 20px;
}

.light-theme body, .light-theme html {
background: linear-gradient(135deg, #ffffff, #e0e0e0);
color: #282c34;
transition: background 0.3s ease, color 0.3s ease;
padding: 20px;
}

.container {
Expand All @@ -51,24 +68,25 @@
flex-direction: column;
justify-content: center;
align-items: center;
border: 2px solid #61dafb;
border-radius: 15px;
background: rgba(40, 44, 52, 0.9);
box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
transition: transform 0.3s ease, box-shadow 0.3s ease;
border: 2px solid var(--border-color);
border-radius: 15px;
background: var(--container-bg);
box-shadow: 0 8px 30px var(--shadow-color);
transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease, border-color 0.3s ease;
}

.container:hover {
transform: scale(1.02);
box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
box-shadow: 0 12px 40px var(--shadow-hover);
}

h1 {
font-size: 3.5rem;
font-size: 3.5rem;
margin-bottom: 20px;
color: #61dafb;
color: var(--accent-color);
text-shadow: 0 0 15px rgba(97, 218, 251, 0.5);
animation: fadeIn 1s ease-in-out;
transition: color 0.3s ease;
}

@keyframes fadeIn {
Expand Down Expand Up @@ -105,14 +123,16 @@
margin: 20px 0;
padding: 12px;
font-size: 1rem;
border: 1px solid #61dafb;
border: 1px solid var(--border-color);
border-radius: 5px;
width: 250px;
transition: border-color 0.3s, box-shadow 0.3s;
background: var(--container-bg);
color: var(--text-color);
transition: border-color 0.3s, box-shadow 0.3s, background 0.3s, color 0.3s;
}

.subdomain-input:focus {
border-color: #0097a7;
border-color: var(--accent-color);
outline: none;
box-shadow: 0 0 5px rgba(97, 218, 251, 0.5);
}
Expand All @@ -123,7 +143,7 @@
}

footer a {
color: #61dafb;
color: var(--accent-color);
text-decoration: none;
transition: color 0.3s;
}
Expand All @@ -137,11 +157,12 @@
margin-bottom: 20px;
width: 100%;
text-align: center;
position: relative;
}

.nav a {
margin: 0 15px;
color: #61dafb;
color: var(--accent-color);
text-decoration: none;
font-size: 1.2rem;
transition: color 0.3s;
Expand All @@ -151,6 +172,35 @@
color: #0097a7;
}

.theme-toggle {
position: fixed;
top: 20px;
right: 20px;
background: var(--container-bg);
border: 2px solid var(--border-color);
border-radius: 50%;
width: 50px;
height: 50px;
display: flex;
align-items: center;
justify-content: center;
cursor: pointer;
transition: transform 0.3s ease, background 0.3s ease, border-color 0.3s ease;
box-shadow: 0 4px 15px var(--shadow-color);
z-index: 1000;
}

.theme-toggle:hover {
transform: scale(1.1) rotate(15deg);
box-shadow: 0 6px 20px var(--shadow-hover);
}

.theme-toggle i {
font-size: 1.5rem;
color: var(--accent-color);
transition: color 0.3s ease;
}

@media (max-width: 600px) {
h1 {
font-size: 2.5rem;
Expand All @@ -162,10 +212,23 @@
padding: 10px 20px;
font-size: 0.9rem;
}
.theme-toggle {
width: 45px;
height: 45px;
top: 15px;
right: 15px;
}
.theme-toggle i {
font-size: 1.2rem;
}
}
</style>
</head>
<body>
<button class="theme-toggle" id="themeToggle" aria-label="Toggle theme">
<i class="fas fa-moon" id="themeIcon"></i>
</button>

<div class="nav">
<a href="index.html">Home</a>
<a href="/team">Team</a>
Expand Down Expand Up @@ -196,6 +259,55 @@ <h1 data-text="is-cod.in">is-cod.in</h1>
</footer>

<script>
// Theme management
const themeToggle = document.getElementById('themeToggle');
const themeIcon = document.getElementById('themeIcon');
const body = document.body;

// Check for saved theme preference or default to system preference
function getPreferredTheme() {
const savedTheme = localStorage.getItem('theme');
if (savedTheme) {
return savedTheme;
}
return window.matchMedia('(prefers-color-scheme: light)').matches ? 'light' : 'dark';
}

// Apply theme
function applyTheme(theme) {
if (theme === 'light') {
body.classList.add('light-mode');
themeIcon.classList.remove('fa-moon');
themeIcon.classList.add('fa-sun');
} else {
body.classList.remove('light-mode');
themeIcon.classList.remove('fa-sun');
themeIcon.classList.add('fa-moon');
}
}

// Toggle theme
function toggleTheme() {
const currentTheme = body.classList.contains('light-mode') ? 'light' : 'dark';
const newTheme = currentTheme === 'light' ? 'dark' : 'light';
localStorage.setItem('theme', newTheme);
applyTheme(newTheme);
}

// Initialize theme on page load
applyTheme(getPreferredTheme());

// Listen for theme toggle clicks
themeToggle.addEventListener('click', toggleTheme);

// Listen for system theme changes
window.matchMedia('(prefers-color-scheme: light)').addEventListener('change', (e) => {
if (!localStorage.getItem('theme')) {
applyTheme(e.matches ? 'light' : 'dark');
}
});

// Subdomain redirect function
function redirectToSubdomain() {
const subdomain = document.getElementById('subdomainInput').value.trim().toLowerCase();
if (subdomain && /^[a-z0-9-]+$/.test(subdomain)) {
Expand Down
Loading