-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
265 lines (234 loc) · 8.4 KB
/
index.html
File metadata and controls
265 lines (234 loc) · 8.4 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
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Quark</title>
<link rel="shortcut icon" href="assets/icon.png" />
<link rel="stylesheet" href="style.css" />
<script src="js/loader.js"></script>
<script src="js/markdown.js"></script>
<script src="js/e.js"></script>
<style>
main p, main a {
color: black;
}
@media (max-aspect-ratio: 1) {
nav {
justify-content: center !important;
> div { padding-right: 0 !important; }
}
header {
flex-direction: column-reverse !important;
> #logo {
width: 100% !important;
height: 180px !important;
flex-direction: row !important;
align-items: end;
& img {
width: 70vh !important;
height: auto !important;
translate: 0 60% !important;
}
}
> #title-content {
padding-top: 5em;
& h1 {
font-size: 6vw !important;
}
& a:first-child {
font-size: 3vw !important;
}
}
}
}
</style>
</head>
<body>
<nav style="position: fixed; height: 5em; width: 100%; display: flex; justify-content: end;
background: var(--background); z-index: 1;">
<div style="display: flex; align-items: center; gap: 1em; padding-right: 3em;">
<a href="https://github.com/quark-programming/quark" target="_blank">GitHub</a>
<a href="docs.html">Docs</a>
</div>
</nav>
<header style="height: 100vh; background: var(--background); display: flex;">
<div id="logo" style="width: 40vh; height: 100%; overflow: hidden; display: flex; flex-direction: column;
justify-content: center;">
<div>
<style>
@keyframes rotate {
from { transform: rotate(0deg); }
to { transform: rotate(360deg); }
}
</style>
<img src="assets/icon-light.svg" draggable="false" style="height: 90vh; translate: -50% 0;
animation: rotate 100s linear infinite;"/>
</div>
</div>
<div id="title-content" style="flex: 3; height: 100%; display: grid; place-items: center;">
<div style="display: grid; place-items: center; gap: 5em;">
<div style="display: grid; place-items: center;">
<h1 style="font-size: 4.5vw;">
The
<b style="background: linear-gradient(to right, var(--purple), var(--purple2));
background-clip: text; color: transparent;">
Quark
</b>
Programming <br/>
Language
</h1>
</div>
<div style="display: grid; place-items: center; gap: 1em;">
<a href="docs.html" style="font-size: 1.5em; padding: 1em 2em; background: var(--purple);
text-decoration: none; letter-spacing: 0.1em; border-bottom: none;">
<b>QUICK START</b>
</a>
<a href="https://github.com/quark-programming/quark/releases/tag/0.4.1" target="_blank">
Version 0.4.1
</a>
<a href="https://github.com/quark-programming/quark/releases/tag/0.5.5pre" target="_blank" class="experimental">
Experimental Pre-release 0.5.5
</a>
</div>
</div>
</div>
</header>
<main style="display: flex; flex-direction: column; gap: 5em; padding: 5em; width: 100%; box-sizing: border-box;">
<style>
main > div {
display: flex;
gap: 5em;
width: 100%;
> .code {
flex: 1;
display: grid;
place-items: center;
> pre {
width: 100%;
box-shadow: 0 0 20px #0005;
}
}
> .description {
flex: 1;
font-size: 1.4em;
display: grid;
place-items: center;
}
}
@media (max-width: 920px) {
main > div:nth-child(odd) {
flex-direction: column;
}
main > div:nth-child(even) {
flex-direction: column-reverse;
}
}
@media (max-width: 630px) {
code {
font-size: 2vw;
}
main {
padding: 2em !important;
padding-top: 5em !important;
> div {
gap: 2em !important;
}
}
}
</style>
<div>
<div class="code">
<script>
document.currentScript.replaceWith(e`<pre><code>${markdown_language("quark", `
struct Wrapper<T> {
T value;
Wrapper<T> new(T value) {
return Wrapper { value };
}
T get() {
return value;
}
}
Wrapper<i32> wrapper = Wrapper::new(42);
`.trim())}</code></pre>`);
</script>
</div>
<div class="description">
<p>
C-like syntax with powerful features like methods and compile-time generics.
</p>
</div>
</div>
<div>
<div class="description">
<p>
A growing standard library with utilities for common programming tasks, like collections and
standard output.
</p>
</div>
<div class="code">
<script>
document.currentScript.replaceWith(e`<pre><code>${markdown_language("quark", `
Vec<i32> vec = Vec::from([1, 2, 3]);
vec.push(4);
for(int i = 0; i < vec.len(); i++) {
print_i32(vec[i]);
}
// 0.5pre
vec.free();
`.trim())}</code></pre>`);
</script>
</div>
</div>
<div>
<div class="code">
<script>
document.currentScript.replaceWith(e`<pre><code>${markdown_language("bash", `
QUARK_ROOT ?= /path/to/quark
# 0.5pre
QUARK_LIB ?= /path/to/quark/lib
build:
\tqc main.qk -o main.c -l $(QUARK_ROOT)
\t# -l $(QUARK_LIB) 0.5pre
\t$(CC) main.c -o my_program
`.trim())}</code></pre>`);
</script>
</div>
<div class="description">
<p>
Simple command-line interface for compiling your entire project into a single C file.
</p>
</div>
</div>
<div>
<div class="description">
<div>
<p class="experimental" style="font-size: 0.7em; border-left: 1px solid #f1c309; padding-left: 0.5em;">
experimental</p>
<p>
Create and run threads with shared state using the external threads library
<a href="https://github.com/ephf/quark-threads" target="_blank">ephf/threads</a>.
</p>
</div>
</div>
<div class="code">
<script>
document.currentScript.replaceWith(e`<pre><code>${markdown_language("quark", `
import thread::{ Thread, Mutex };
Mutex<i32> counter = Mutex::new(0);
Thread thread = Thread::new(i32 (Mutex<i32>* counter) {
i32* count = counter->lock();
*counter++;
counter->unlock();
return *counter;
}, &counter);
print_i32(thread.wait());
counter->free();
`.trim())}</code></pre>`);
</script>
</div>
</div>
</main>
</body>
</html>