forked from sethcottle/littlelink
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcolors.html
More file actions
185 lines (168 loc) · 5.98 KB
/
colors.html
File metadata and controls
185 lines (168 loc) · 5.98 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
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Palette des Sous-Titres</title>
<!-- Mobile Specific Metas -->
<meta name="viewport" content="width=device-width, initial-scale=1" />
<!-- CSS -->
<link rel="stylesheet" href="css/normalize.css" />
<link rel="stylesheet" href="css/skeleton-auto.css" />
<link rel="stylesheet" href="css/brands.css" />
<!-- Favicon -->
<link rel="icon" type="image/png" href="images/icone-discord.png" />
<style>
.color-block img {
display: block;
margin: 0 auto 10px;
width: 24px;
height: 24px;
}
.search-container {
margin-bottom: 20px;
}
.desc {
font-size: smaller;
}
</style>
<script
defer
data-domain="links.adan-ea.net"
src="https://argos.adan-ea.net/js/script.js"
></script>
</head>
<body>
<div class="row">
<div class="column"></div>
<div class="container">
<!-- Title -->
<h2 role="heading">Palette des Sous-Titres</h2>
<h3 role="heading">Qui se Cache Derrière Chaque Couleur</h3>
<!-- Search Bar -->
<div class="search-container">
<input
type="text"
id="search-input"
placeholder="Quelqu'un en tête ?"
/>
</div>
<div id="etre-ajoute" style="display: none">
Coucou !<br />
Si tu vois ce message, c'est que j'aimerais t'ajouter à cette liste
!<br />
Envoie-moi un MP avec l'emoji et
<a
href="https://duckduckgo.com/?t=ffab&q=color+picker&ia=answer"
target="_blank"
>la couleur</a
>
de ton choix.<br /><br />
Pour t'expliquer vite fait le principe (parce que j'imagine que j'ai
donné zéro contexte) :<br />
C'est la couleur des sous-titres que j'utilise pour identifier les
gens dans les clips que je poste sur Insta.<br /><br />
Si jamais tu préfères que je n'utilise pas de clips avec toi, aucun
souci, dis-le-moi !
</div>
<div id="color-blocks"></div>
</div>
</div>
<script>
const colors = [
{
name: "🦦 Adan_ea",
url: "https://www.twitch.tv/adan_ea",
hex: "#B02020",
rgb: "176, 32, 32",
},
{ name: "❄ Cryofreeze", hex: "#A68EE6", rgb: "166, 142, 230" },
{ name: "❗ Dovino", hex: "#CC5500", rgb: "204, 85, 0" },
{ name: "😾 enyaa", hex: "#900C3F", rgb: "144, 12, 63" },
{ name: "😶🌫️ Jacodok", hex: "#A6AC24", rgb: "166, 172, 36" },
{ name: "🐳 Kapuche", hex: "#0096C7", rgb: "0, 150, 199" },
{ name: "🐈 Keya Shiro", hex: "#33367F", rgb: "51, 54, 127" },
{
name: "🐺 LeMondeDLaure",
url: "https://www.twitch.tv/lemondedlaure",
hex: "#3DE50F",
rgb: "61, 229, 15",
},
{ name: "❄ Maxharance", hex: "#9400D3", rgb: "148, 0, 211" },
{
name: "❄ Mayo_n_ez",
url: "https://www.twitch.tv/mayo_n_ez",
hex: "#008B8B",
rgb: "0, 139, 139",
},
{ name: "❄ Nalhaak", hex: "#D93F77", rgb: "217, 63, 119" },
{
name: "❄ Subbarath",
url: "https://www.twitch.tv/subbarath",
hex: "#40E0D0",
rgb: "64, 224, 208",
},
{
name: "🪖 Usishiiire",
url: "https://www.twitch.tv/usishiiire",
hex: "#C200FA",
rgb: "194, 0, 250",
},
{ name: "🦝 Zennf", hex: "#1F8B4C", rgb: "31, 139, 76" },
];
function createColorBlock(color) {
const block = document.createElement(color.url ? "a" : "div");
if (color.url) {
block.href = color.url;
block.target = "_blank";
const img = document.createElement("img");
img.src = "images/icons/twitch.svg";
img.alt = "twitch icon";
img.setAttribute("aria-hidden", "true");
block.appendChild(img);
}
const nameDiv = document.createElement("div");
nameDiv.textContent = color.name;
const hexDiv = document.createElement("div");
hexDiv.textContent = `HEX: ${color.hex}`;
hexDiv.className = "desc";
const rgbDiv = document.createElement("div");
rgbDiv.textContent = `RGB: ${color.rgb}`;
rgbDiv.className = "desc";
block.className = "button";
block.style.backgroundColor = color.hex;
block.style.color = "#ffffff";
block.style.cursor = color.url ? "pointer" : "default";
block.appendChild(nameDiv);
block.appendChild(hexDiv);
block.appendChild(rgbDiv);
return block;
}
function generateColorBlocks(filter = "") {
const container = document.getElementById("color-blocks");
container.innerHTML = "";
const filteredColors = colors.filter((color) =>
color.name.toLowerCase().includes(filter.toLowerCase())
);
filteredColors.forEach((color) =>
container.appendChild(createColorBlock(color))
);
}
document
.getElementById("search-input")
.addEventListener("input", function (e) {
generateColorBlocks(e.target.value);
});
document.addEventListener("DOMContentLoaded", () => {
const params = new URLSearchParams(window.location.search);
const etreAjouteDiv = document.getElementById("etre-ajoute");
if (params.has("invite")) {
etreAjouteDiv.style.display = "block";
} else {
etreAjouteDiv.style.display = "none";
}
});
generateColorBlocks();
</script>
</body>
</html>