-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathsettings.html
More file actions
126 lines (118 loc) · 3.59 KB
/
Copy pathsettings.html
File metadata and controls
126 lines (118 loc) · 3.59 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Settings</title>
<link rel="stylesheet" href="style.css" />
<style>
.color-picker-container {
padding: 20px;
background: #fff;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
border-radius: 5px;
}
.unsplash-check {
font-size: 18px;
margin-bottom: 10px;
background-image: linear-gradient(135deg, #ff0000, #ff8000, #ffff00, #80ff00, #00ff00, #00ff80, #00ffff, #0080ff, #0000ff, #8000ff, #ff00ff, #ff0080, #ff0000);
background-clip: text;
-webkit-background-clip: text;
color: transparent;
animation: rainbow 5s linear infinite;
}
.color-picker {
width: 100%;
padding: 10px;
border: none;
border-radius: 3px;
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}
.button {
display: inline-block;
padding: 8px 12px;
background-color: #fff;
color: #333;
border-radius: 5px;
box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
transition: transform 0.3s ease;
text-decoration: none;
width: auto;
margin-bottom: 10px;
}
.button:hover {
transform: scale(1.16);
}
.project, .project-card {
background-color: #f8f8f8;
padding: 20px;
margin-bottom: 20px;
border-radius: 10px;
box-shadow: 4px 4px 8px rgba(0, 0, 0, 0.1);
transition: transform 0.3s ease;
margin-left: 80px;
}
@keyframes rainbow {
0% {
background-position: 0% 50%;
}
50% {
background-position: 100% 50%;
}
100% {
background-position: 0% 50%;
}
}
</style>
</head>
<body>
<div class="container">
<div class="color-picker-container">
<h2 class="unsplash-check">Choose Background Color:</h2>
<input
type="color"
class="color-picker"
id="background-color"
value="#ededed"
onchange="saveBackgroundColor(this.value); applyBackgroundColor()"
/>
<br><br>
<h2 class="unsplash-check">Enable Unsplash:</h2>
<input
type="checkbox"
id="unsplash"
onchange="toggleUnsplash(this.checked)"
/>
</div>
</div>
<script type="text/javascript" src="js/settings.js"></script>
<script type="text/javascript" src="js/predict.js"></script>
<script type="text/javascript" src="js/script.js"></script>
<script>
const unsplashCheckbox = document.getElementById('unsplash');
if (unsplashCheckbox.checked) {
// Zufälliges Hintergrundbild von Unsplash holen
fetch('https://source.unsplash.com/1600x900/?nature')
.then(response => {
document.body.style.backgroundImage = `url(${response.url})`;
})
.catch(error => console.error('Fehler beim Laden des Hintergrundbilds:', error));
// Automatische Anpassung des oberen Paddings
window.addEventListener('resize', () => {
const windowHeight = window.innerHeight;
const formHeight = document.getElementById('form').offsetHeight;
const padding = (windowHeight - formHeight) / 2;
document.body.style.paddingTop = padding + 'px';
});
// Initialisierung der Anpassung des oberen Paddings
window.dispatchEvent(new Event('resize'));
}
if (document.getElementById('style').checked) {
const link = document.createElement('link');
link.rel = 'stylesheet';
link.href = 'style-glass.css';
document.head.appendChild(link);
}
</script>
</body>
</html>