petslive / index.html
tamnvcc's picture
Design a Chrome Extension New Tab page with the following MVP features: Background image,Core Widgets: Clock & Date: Live clock updating every second., Weather Widget: Mock weather data with modern icons., Search Bar: Integrated with Google search, supports Enter key., Quick Bookmarks: Display 6 frequently used bookmarks with emoji icons., Daily Pet Quote: Show rotating pet-related quotes every 30 seconds., Settings Panel: Toggle individual widgets on/off. The widget should have Glassmorphism effect. You can use this css snippet: .glass3d { --filter-glass3d: blur(32px) brightness(0.85) saturate(2.5); --color-glass3d: hsl(189 80% 10% / 0.2); --noise-glass3d: url("https://www.transparenttextures.com/patterns/egg-shell.png"); position: relative; z-index: 4; box-shadow: 0 0 0.75px hsl(205 20% 10% / 0.2), 0.7px 0.8px 1.2px -0.4px hsl(205 20% 10% / 0.1), 1.3px 1.5px 2.2px -0.8px hsl(205 20% 10% / 0.1), 2.3px 2.6px 3.9px -1.2px hsl(205 20% 10% / 0.1), 3.9px 4.4px 6.6px -1.7px hsl(205 20% 10% / 0.1), 6.5px 7.2px 10.9px -2.1px hsl(205 20% 10% / 0.1), 8px 9px 14px -2.5px hsl(205 20% 10% / 0.2); } .glass3d::before { content: ""; position: absolute; inset: 0; pointer-events: none; border-radius: inherit; overflow: hidden; z-index: 3; -webkit-backdrop-filter: var(--filter-glass3d); backdrop-filter: var(--filter-glass3d); background-color: var(--color-glass3d); background-image: var(--noise-glass3d); background-size: 100px; background-repeat: repeat; } .glass3d::after { content: ""; position: absolute; inset: 0; pointer-events: none; border-radius: inherit; overflow: hidden; z-index: 5; box-shadow: inset 2px 2px 1px -3px hsl(205 20% 90% / 0.8), inset 4px 4px 2px -6px hsl(205 20% 90% / 0.3), inset 1.5px 1.5px 1.5px -0.75px hsl(205 20% 90% / 0.15), inset 1.5px 1.5px 0.25px hsl(205 20% 90% / 0.03), inset 0 0 0.25px 0.5px hsl(205 20% 90% / 0.03); } .glass3d > * { position: relative; z-index: 6; } - Initial Deployment
cfd592a verified
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Pawsome New Tab</title>
<script src="https://cdn.tailwindcss.com"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
<style>
body {
background-image: url('https://images.unsplash.com/photo-1514888286974-6c03e2ca1dba?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxleHBsb3JlLWZlZWR8MXx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1600&q=80');
background-size: cover;
background-position: center;
background-attachment: fixed;
font-family: 'Inter', sans-serif;
min-height: 100vh;
margin: 0;
padding: 0;
color: white;
}
.glass3d {
--filter-glass3d: blur(32px) brightness(0.85) saturate(2.5);
--color-glass3d: hsl(189 80% 10% / 0.2);
--noise-glass3d: url("https://www.transparenttextures.com/patterns/egg-shell.png");
position: relative;
z-index: 4;
box-shadow:
0 0 0.75px hsl(205 20% 10% / 0.2),
0.7px 0.8px 1.2px -0.4px hsl(205 20% 10% / 0.1),
1.3px 1.5px 2.2px -0.8px hsl(205 20% 10% / 0.1),
2.3px 2.6px 3.9px -1.2px hsl(205 20% 10% / 0.1),
3.9px 4.4px 6.6px -1.7px hsl(205 20% 10% / 0.1),
6.5px 7.2px 10.9px -2.1px hsl(205 20% 10% / 0.1),
8px 9px 14px -2.5px hsl(205 20% 10% / 0.2);
}
.glass3d::before {
content: "";
position: absolute;
inset: 0;
pointer-events: none;
border-radius: inherit;
overflow: hidden;
z-index: 3;
-webkit-backdrop-filter: var(--filter-glass3d);
backdrop-filter: var(--filter-glass3d);
background-color: var(--color-glass3d);
background-image: var(--noise-glass3d);
background-size: 100px;
background-repeat: repeat;
}
.glass3d::after {
content: "";
position: absolute;
inset: 0;
pointer-events: none;
border-radius: inherit;
overflow: hidden;
z-index: 5;
box-shadow:
inset 2px 2px 1px -3px hsl(205 20% 90% / 0.8),
inset 4px 4px 2px -6px hsl(205 20% 90% / 0.3),
inset 1.5px 1.5px 1.5px -0.75px hsl(205 20% 90% / 0.15),
inset 1.5px 1.5px 0.25px hsl(205 20% 90% / 0.03),
inset 0 0 0.25px 0.5px hsl(205 20% 90% / 0.03);
}
.glass3d > * {
position: relative;
z-index: 6;
}
.widget {
transition: all 0.3s ease;
}
.widget.hidden {
opacity: 0;
transform: scale(0.9);
pointer-events: none;
}
.settings-panel {
transition: all 0.3s ease;
transform: translateY(100%);
}
.settings-panel.open {
transform: translateY(0);
}
.quote-transition {
transition: opacity 0.5s ease;
}
.search-bar {
transition: all 0.3s ease;
}
.search-bar:focus-within {
transform: scale(1.02);
}
@keyframes float {
0% { transform: translateY(0px); }
50% { transform: translateY(-10px); }
100% { transform: translateY(0px); }
}
.floating {
animation: float 6s ease-in-out infinite;
}
</style>
</head>
<body class="flex flex-col items-center justify-center p-4">
<!-- Main Content -->
<div class="w-full max-w-4xl mx-auto flex flex-col items-center gap-6">
<!-- Clock & Date Widget -->
<div id="clock-widget" class="glass3d widget rounded-2xl p-6 w-full max-w-md text-center">
<div class="text-6xl font-bold tracking-tighter" id="clock">00:00:00</div>
<div class="text-xl mt-2 font-medium" id="date">Monday, January 1, 2023</div>
</div>
<!-- Search Bar -->
<div id="search-widget" class="glass3d widget rounded-full p-1 w-full max-w-xl search-bar">
<form action="https://www.google.com/search" method="get" target="_blank" class="flex items-center">
<input type="text" name="q" placeholder="Search with Google..."
class="w-full bg-transparent border-none outline-none text-white placeholder-white/70 px-6 py-3 text-lg">
<button type="submit" class="p-3 rounded-full hover:bg-white/10 transition-colors">
<i class="fas fa-search text-white/80"></i>
</button>
</form>
</div>
<!-- Weather Widget -->
<div id="weather-widget" class="glass3d widget rounded-2xl p-6 w-full max-w-sm">
<div class="flex items-center justify-between">
<div class="flex items-center">
<div class="text-5xl mr-4" id="weather-icon">🌤️</div>
<div>
<div class="text-3xl font-bold" id="weather-temp">24°C</div>
<div class="text-lg" id="weather-location">San Francisco</div>
</div>
</div>
<div class="text-right">
<div class="text-sm opacity-80" id="weather-desc">Partly Cloudy</div>
<div class="text-sm opacity-80" id="weather-range">H:26° L:18°</div>
</div>
</div>
</div>
<!-- Quick Bookmarks -->
<div id="bookmarks-widget" class="glass3d widget rounded-2xl p-6 w-full">
<h2 class="text-xl font-semibold mb-4 text-center">Quick Links</h2>
<div class="grid grid-cols-2 sm:grid-cols-3 md:grid-cols-6 gap-4">
<a href="https://mail.google.com" target="_blank" class="flex flex-col items-center p-3 rounded-xl hover:bg-white/10 transition-colors">
<div class="text-3xl mb-2">📧</div>
<div class="text-sm text-center">Gmail</div>
</a>
<a href="https://calendar.google.com" target="_blank" class="flex flex-col items-center p-3 rounded-xl hover:bg-white/10 transition-colors">
<div class="text-3xl mb-2">📅</div>
<div class="text-sm text-center">Calendar</div>
</a>
<a href="https://youtube.com" target="_blank" class="flex flex-col items-center p-3 rounded-xl hover:bg-white/10 transition-colors">
<div class="text-3xl mb-2">📺</div>
<div class="text-sm text-center">YouTube</div>
</a>
<a href="https://github.com" target="_blank" class="flex flex-col items-center p-3 rounded-xl hover:bg-white/10 transition-colors">
<div class="text-3xl mb-2">💻</div>
<div class="text-sm text-center">GitHub</div>
</a>
<a href="https://twitter.com" target="_blank" class="flex flex-col items-center p-3 rounded-xl hover:bg-white/10 transition-colors">
<div class="text-3xl mb-2">🐦</div>
<div class="text-sm text-center">Twitter</div>
</a>
<a href="https://reddit.com" target="_blank" class="flex flex-col items-center p-3 rounded-xl hover:bg-white/10 transition-colors">
<div class="text-3xl mb-2">🦊</div>
<div class="text-sm text-center">Reddit</div>
</a>
</div>
</div>
<!-- Pet Quote Widget -->
<div id="quote-widget" class="glass3d widget rounded-2xl p-6 w-full max-w-2xl text-center">
<div class="text-4xl mb-4">🐾</div>
<div class="quote-transition">
<p class="text-xl italic" id="pet-quote">"Dogs do speak, but only to those who know how to listen."</p>
<p class="mt-2 opacity-80" id="pet-author">- Orhan Pamuk</p>
</div>
</div>
</div>
<!-- Settings Button -->
<button id="settings-button" class="fixed bottom-6 right-6 glass3d rounded-full p-4 hover:bg-white/10 transition-colors">
<i class="fas fa-cog text-xl"></i>
</button>
<!-- Settings Panel -->
<div id="settings-panel" class="fixed inset-0 bg-black/50 flex items-end settings-panel z-50">
<div class="glass3d w-full rounded-t-3xl p-6 max-h-[80vh] overflow-y-auto">
<div class="flex justify-between items-center mb-6">
<h2 class="text-2xl font-bold">Widget Settings</h2>
<button id="close-settings" class="p-2 rounded-full hover:bg-white/10">
<i class="fas fa-times"></i>
</button>
</div>
<div class="space-y-4">
<div class="flex items-center justify-between p-3 rounded-lg bg-white/5">
<div>
<h3 class="font-medium">Clock & Date</h3>
<p class="text-sm opacity-80">Display time and date</p>
</div>
<label class="relative inline-flex items-center cursor-pointer">
<input type="checkbox" class="sr-only peer" checked data-widget="clock-widget">
<div class="w-11 h-6 bg-gray-700 peer-focus:outline-none rounded-full peer peer-checked:after:translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[2px] after:left-[2px] after:bg-white after:border-gray-300 after:border after:rounded-full after:h-5 after:w-5 after:transition-all peer-checked:bg-blue-500"></div>
</label>
</div>
<div class="flex items-center justify-between p-3 rounded-lg bg-white/5">
<div>
<h3 class="font-medium">Search Bar</h3>
<p class="text-sm opacity-80">Google search integration</p>
</div>
<label class="relative inline-flex items-center cursor-pointer">
<input type="checkbox" class="sr-only peer" checked data-widget="search-widget">
<div class="w-11 h-6 bg-gray-700 peer-focus:outline-none rounded-full peer peer-checked:after:translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[2px] after:left-[2px] after:bg-white after:border-gray-300 after:border after:rounded-full after:h-5 after:w-5 after:transition-all peer-checked:bg-blue-500"></div>
</label>
</div>
<div class="flex items-center justify-between p-3 rounded-lg bg-white/5">
<div>
<h3 class="font-medium">Weather</h3>
<p class="text-sm opacity-80">Current weather conditions</p>
</div>
<label class="relative inline-flex items-center cursor-pointer">
<input type="checkbox" class="sr-only peer" checked data-widget="weather-widget">
<div class="w-11 h-6 bg-gray-700 peer-focus:outline-none rounded-full peer peer-checked:after:translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[2px] after:left-[2px] after:bg-white after:border-gray-300 after:border after:rounded-full after:h-5 after:w-5 after:transition-all peer-checked:bg-blue-500"></div>
</label>
</div>
<div class="flex items-center justify-between p-3 rounded-lg bg-white/5">
<div>
<h3 class="font-medium">Quick Bookmarks</h3>
<p class="text-sm opacity-80">Frequently visited sites</p>
</div>
<label class="relative inline-flex items-center cursor-pointer">
<input type="checkbox" class="sr-only peer" checked data-widget="bookmarks-widget">
<div class="w-11 h-6 bg-gray-700 peer-focus:outline-none rounded-full peer peer-checked:after:translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[2px] after:left-[2px] after:bg-white after:border-gray-300 after:border after:rounded-full after:h-5 after:w-5 after:transition-all peer-checked:bg-blue-500"></div>
</label>
</div>
<div class="flex items-center justify-between p-3 rounded-lg bg-white/5">
<div>
<h3 class="font-medium">Pet Quotes</h3>
<p class="text-sm opacity-80">Daily inspirational pet quotes</p>
</div>
<label class="relative inline-flex items-center cursor-pointer">
<input type="checkbox" class="sr-only peer" checked data-widget="quote-widget">
<div class="w-11 h-6 bg-gray-700 peer-focus:outline-none rounded-full peer peer-checked:after:translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[2px] after:left-[2px] after:bg-white after:border-gray-300 after:border after:rounded-full after:h-5 after:w-5 after:transition-all peer-checked:bg-blue-500"></div>
</label>
</div>
</div>
<div class="mt-8 pt-4 border-t border-white/10">
<h3 class="font-medium mb-3">Background Image</h3>
<div class="grid grid-cols-3 gap-3">
<button class="aspect-video bg-cover bg-center rounded-lg overflow-hidden relative"
style="background-image: url('https://images.unsplash.com/photo-1514888286974-6c03e2ca1dba?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxleHBsb3JlLWZlZWR8MXx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=500&q=60')">
<div class="absolute inset-0 bg-black/30 flex items-center justify-center">
<i class="fas fa-check text-white"></i>
</div>
</button>
<button class="aspect-video bg-cover bg-center rounded-lg overflow-hidden"
style="background-image: url('https://images.unsplash.com/photo-1530281700549-e82e7bf110d6?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxleHBsb3JlLWZlZWR8Mnx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=500&q=60')"></button>
<button class="aspect-video bg-cover bg-center rounded-lg overflow-hidden"
style="background-image: url('https://images.unsplash.com/photo-1586671267731-da2cf3ceeb80?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxleHBsb3JlLWZlZWR8NHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=500&q=60')"></button>
</div>
</div>
</div>
</div>
<!-- Floating Pet Icon -->
<div class="fixed bottom-6 left-6 text-4xl floating">🐕</div>
<script>
// Clock functionality
function updateClock() {
const now = new Date();
const time = now.toLocaleTimeString();
const date = now.toLocaleDateString('en-US', {
weekday: 'long',
year: 'numeric',
month: 'long',
day: 'numeric'
});
document.getElementById('clock').textContent = time;
document.getElementById('date').textContent = date;
}
setInterval(updateClock, 1000);
updateClock();
// Weather data (mock)
const weatherData = {
temp: '24°C',
location: 'San Francisco',
desc: 'Partly Cloudy',
range: 'H:26° L:18°',
icon: '🌤️'
};
// Pet quotes
const petQuotes = [
{ quote: "Dogs do speak, but only to those who know how to listen.", author: "Orhan Pamuk" },
{ quote: "The better I get to know men, the more I find myself loving dogs.", author: "Charles de Gaulle" },
{ quote: "Cats are connoisseurs of comfort.", author: "James Herriot" },
{ quote: "Until one has loved an animal, a part of one's soul remains unawakened.", author: "Anatole France" },
{ quote: "Animals are such agreeable friends—they ask no questions; they pass no criticisms.", author: "George Eliot" },
{ quote: "Pets are humanizing. They remind us we have an obligation and responsibility to preserve and nurture and care for all life.", author: "James Cromwell" }
];
let currentQuoteIndex = 0;
function rotateQuote() {
const quoteElement = document.getElementById('pet-quote');
const authorElement = document.getElementById('pet-author');
// Fade out
quoteElement.style.opacity = '0';
authorElement.style.opacity = '0';
setTimeout(() => {
currentQuoteIndex = (currentQuoteIndex + 1) % petQuotes.length;
const quote = petQuotes[currentQuoteIndex];
quoteElement.textContent = `"${quote.quote}"`;
authorElement.textContent = `- ${quote.author}`;
// Fade in
quoteElement.style.opacity = '1';
authorElement.style.opacity = '0.8';
}, 500);
}
setInterval(rotateQuote, 30000);
// Settings functionality
const settingsButton = document.getElementById('settings-button');
const settingsPanel = document.getElementById('settings-panel');
const closeSettings = document.getElementById('close-settings');
settingsButton.addEventListener('click', () => {
settingsPanel.classList.add('open');
});
closeSettings.addEventListener('click', () => {
settingsPanel.classList.remove('open');
});
// Toggle widgets
const toggleSwitches = document.querySelectorAll('input[type="checkbox"][data-widget]');
toggleSwitches.forEach(switchEl => {
switchEl.addEventListener('change', (e) => {
const widgetId = e.target.getAttribute('data-widget');
const widget = document.getElementById(widgetId);
if (e.target.checked) {
widget.classList.remove('hidden');
} else {
widget.classList.add('hidden');
}
});
});
// Background selection (simplified)
const bgButtons = document.querySelectorAll('#settings-panel button[style*="background-image"]');
bgButtons.forEach((btn, index) => {
btn.addEventListener('click', () => {
// Remove active state from all buttons
bgButtons.forEach(b => b.innerHTML = '');
// Add active state to clicked button
if (index === 0) {
btn.innerHTML = '<div class="absolute inset-0 bg-black/30 flex items-center justify-center"><i class="fas fa-check text-white"></i></div>';
document.body.style.backgroundImage = 'url("https://images.unsplash.com/photo-1514888286974-6c03e2ca1dba?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxleHBsb3JlLWZlZWR8MXx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1600&q=80")';
} else if (index === 1) {
btn.innerHTML = '<div class="absolute inset-0 bg-black/30 flex items-center justify-center"><i class="fas fa-check text-white"></i></div>';
document.body.style.backgroundImage = 'url("https://images.unsplash.com/photo-1530281700549-e82e7bf110d6?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxleHBsb3JlLWZlZWR8Mnx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1600&q=80")';
} else {
btn.innerHTML = '<div class="absolute inset-0 bg-black/30 flex items-center justify-center"><i class="fas fa-check text-white"></i></div>';
document.body.style.backgroundImage = 'url("https://images.unsplash.com/photo-1586671267731-da2cf3ceeb80?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxleHBsb3JlLWZlZWR8NHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1600&q=80")';
}
});
});
</script>
<p style="border-radius: 8px; text-align: center; font-size: 12px; color: #fff; margin-top: 16px;position: fixed; left: 8px; bottom: 8px; z-index: 10; background: rgba(0, 0, 0, 0.8); padding: 4px 8px;">Made with <img src="https://enzostvs-deepsite.hf.space/logo.svg" alt="DeepSite Logo" style="width: 16px; height: 16px; vertical-align: middle;display:inline-block;margin-right:3px;filter:brightness(0) invert(1);"><a href="https://enzostvs-deepsite.hf.space" style="color: #fff;text-decoration: underline;" target="_blank" >DeepSite</a> - 🧬 <a href="https://enzostvs-deepsite.hf.space?remix=tamnvcc/petslive" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
</html>