Hej szymekk chciałem ci dać pomysł na nową stronę przeglądarki radiance os opartej na moim projekcie EasyHomePage
( sites.google.com/view/easyhomepage )
Kod:<!DOCTYPE html>
<html lang="pl">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>RadianceOS</title>
<style>
body {
font-family: Arial, sans-serif;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
height: 100vh;
margin: 0;
background-color: rgba(128, 128, 128, 0.2); /* Szary, lekko przezroczysty */
background-size: cover;
background-repeat: no-repeat;
}
/* Styl przycisków */
button {
background-color: rgba(128, 128, 128, 0.5); /* Szary, lekko przezroczysty */
color: white;
padding: 10px 20px;
font-size: 16px;
border: none;
border-radius: 5px;
cursor: pointer;
transition: background-color 0.3s, transform 0.2s;
margin: 5px;
}
button:hover {
background-color: rgba(128, 128, 128, 0.7); /* Ciemniejszy szary */
transform: scale(1.05);
}
button:active {
transform: scale(0.95);
background-color: rgba(128, 128, 128, 0.8);
}
/* Styl paska wyszukiwania */
.search-bar {
display: flex;
align-items: center;
margin: 15px 0;
width: 100%;
max-width: 500px;
}
.search-bar input[type="text"] {
flex: 1;
padding: 10px 15px;
font-size: 16px;
border: 1px solid rgba(128, 128, 128, 0.5);
border-right: none;
border-radius: 5px 0 0 5px;
outline: none;
transition: border-color 0.3s;
}
.search-bar input[type="text"]:focus {
border-color: rgba(128, 128, 128, 0.7); /* Ciemniejszy szary na fokus */
}
.search-bar button {
padding: 10px 20px;
font-size: 16px;
border-radius: 0 5px 5px 0;
}
/* Menu i styl dla hamburgera */
.menu {
position: absolute;
top: 10px;
right: 10px;
}
.menu button {
background-color: rgba(128, 128, 128, 0.5);
color: white;
border: none;
cursor: pointer;
padding: 10px;
border-radius: 5px;
}
.menu button:hover {
background-color: rgba(128, 128, 128, 0.7);
}
.menu-content {
display: none;
position: absolute;
top: 40px;
right: 10px;
background-color: white;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
border-radius: 5px;
overflow: hidden;
}
.menu-content a {
display: block;
padding: 10px;
text-decoration: none;
color: black;
}
.menu-content a:hover {
background-color: rgba(128, 128, 128, 0.1);
}
/* Ustawienia */
.settings {
display: none;
flex-direction: column;
align-items: center;
gap: 10px;
position: fixed;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
background-color: white;
padding: 20px;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
border-radius: 5px;
}
.settings button {
background-color: rgba(128, 128, 128, 0.5);
color: white;
border: none;
padding: 10px;
border-radius: 5px;
cursor: pointer;
}
.settings button:hover {
background-color: rgba(128, 128, 128, 0.7);
}
.close-btn {
align-self: flex-end;
background-color: transparent;
border: none;
font-size: 20px;
cursor: pointer;
}
.info {
margin-top: 20px;
font-size: 14px;
color: #555;
}
</style>
</head>
<body>
<h1>RadianceOS</h1>
<!-- Pasek wyszukiwania -->
<div class="search-bar">
<input type="text" id="search" placeholder="Szukaj w Google...">
<button onclick="search()">Szukaj</button>
</div>
<div class="buttons">
<button onclick="window.open('https://sites.google.com', '_blank')">GoogleSites</button>
<button onclick="window.open('https://youtube.com/pl/', '_blank')">YouTube</button>
</div>
<div class="info">
Jeśli otwierasz ustawienia i wyskoczy ci nowa karta, możesz ją zamknąć i otworzą się ustawienia.
</div>
<div class="menu">
<button onclick="toggleMenu()">☰</button>
<div class="menu-content" id="menuContent">
<a href="#" onclick="openSettings()">Ustawienia</a>
</div>
</div>
<div id="settings" class="settings">
<button class="close-btn" onclick="closeSettings()">X</button>
<h2>Ustawienia</h2>
<button onclick="setDefaultBackground()">Zwykła tapeta</button>
<button onclick="setBackground('https://images.pexels.com/photos/1236701/pexels-photo-1236701.jpeg')">Tapeta 1</button>
<button onclick="setBackground('https://images.pexels.com/photos/158827/pexels-photo-158827.jpeg')">Tapeta 2</button>
<button onclick="setBackground('https://images.pexels.com/photos/1323550/pexels-photo-1323550.jpeg')">Tapeta 3</button>
</div>
<script>
function search() {
const query = document.getElementById('search').value;
window.open(`https://www.google.com/search?q=${query}`, '_blank');
}
function toggleMenu() {
const menuContent = document.getElementById('menuContent');
menuContent.style.display = menuContent.style.display === 'block' ? 'none' : 'block';
}
function openSettings() {
const settings = document.getElementById('settings');
settings.style.display = 'flex';
document.getElementById('menuContent').style.display = 'none';
}
function closeSettings() {
const settings = document.getElementById('settings');
settings.style.display = 'none';
}
function setDefaultBackground() {
document.body.style.backgroundColor = 'rgba(128, 128, 128, 0.2)';
document.body.style.backgroundImage = 'none';
}
function setBackground(url) {
document.body.style.backgroundImage = `url(${url})`;
}
</script>
</body>
</html>