-
Notifications
You must be signed in to change notification settings - Fork 1
/
color_matrix.html
135 lines (100 loc) · 4.14 KB
/
color_matrix.html
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
<!DOCTYPE html>
<html lang="en" class="normal green">
<head>
<meta charset="UTF-8">
<meta name="description" content="Color Matrix, Turbo C/C++ simple basic web site theme." />
<meta name="author" content="Fatih Tatoğlu" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Turbo C Theme - Color Matrix</title>
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Roboto+Mono:ital,wght@0,400;0,700;1,400;1,700&display=swap"
rel="stylesheet">
<link rel="canonical" href="https://blog.tatoglu.net/blog-theme-turboc" />
<link rel="home" href="https://blog.tatoglu.net/blog-theme-turboc" />
<link rel="apple-touch-icon" sizes="180x180" href="images/favicon/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="images/favicon/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="images/favicon/favicon-16x16.png">
<link rel="manifest" href="images/favicon/site.webmanifest">
<link rel="icon" href="favicon.ico" type="image/x-icon">
<link rel="shortcut icon" href="favicon.ico" type="image/x-icon" />
<link rel="stylesheet" href="./css/main.css">
<script src="node_modules/mustache/mustache.min.js"></script>
<script src="./js/main.js"></script>
<style>
.box {
width: 50px;
padding: 16px 5px;
margin: 0px;
display: inline-block;
border: 1px solid black;
text-align: center;
font-size: 10rem;
}
</style>
</head>
<body>
<header>
<span class="site-name">Turbo C Theme - Color Matrix</span>
</header>
<nav id="navigation"></nav>
<main>
<article>
<header>
<h1>Color Matrix</h1>
<button>#</button>
</header>
<div id="pnlMatrix"></div>
<script>
var colors = [
"black",
"blue",
"green",
"aqua",
"red",
"purple",
"yellow",
"white",
"gray",
"light_blue",
"light_green",
"light_aqua",
"light_red",
"light_purple",
"light_yellow",
"bright_white"
];
var $pnlMatrix = document.getElementById("pnlMatrix");
for (var i = 0; i < colors.length; i++) {
var h2 = document.createElement("h2");
h2.innerHTML = "Backgroun Color: " + colors[i];
$pnlMatrix.appendChild(h2);
for (var j = 0; j < colors.length; j++) {
var bgColor = colors[i];
var fgColor = colors[j];
var text = colors[j] + "<br>" + colors[i];
createBox($pnlMatrix, text, bgColor, fgColor);
}
}
function createBox(parent, text, bgColor, fgColor) {
var div = document.createElement("div");
div.classList.add("color-box");
div.setAttribute("title", "bg: " + bgColor + " | fg: " + fgColor);
var pre = document.createElement("pre");
pre.classList.add("bg-" + bgColor);
pre.classList.add("fg-" + fgColor);
pre.innerHTML = "TEXT TEXT";
div.appendChild(pre);
parent.appendChild(div);
}
</script>
</article>
</main>
<footer>
<span class="credits">By <a href="https://github.com/fatihtatoglu" target="_new" rel="external"
title="Developed by Fatih Tatoğlu">Fatih
Tatoğlu</a> - 2022</span>
</footer>
</body>
</html>