-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
executable file
·302 lines (302 loc) · 22.2 KB
/
index.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
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
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
<!DOCTYPE html>
<html lang="en" x-init="document.init">
<head>
<meta charset="UTF-8">
<meta name="author" content="RatajS">
<meta name="viewport" content="width=device-width,initial-scale=1">
<link rel="icon" href="./imgs/icon.svg" type="image/svg+xml">
<link rel="stylesheet" href="./index.css" type="text/css">
<script src="https://cdnjs.cloudflare.com/ajax/libs/alpinejs/3.13.0/cdn.min.js" type="text/javascript" integrity="sha512-Y49pUg0xNIEjgzK+CniNvpHjTssxb3WE/YHZs7GSsD6En0Q4u3iKHn3ZIZfDB1hfrFV/9c8eTwEjpOGJHsL7CQ==" crossorigin="anonymous" referrerpolicy="no-referrer" defer></script>
<script src="https://cdn.jsdelivr.net/gh/lrsjng/[email protected]/dist/lolight.min.js" type="text/javascript" integrity="sha384-jLPkEyloF4Kv9rHEafLniNgZ0hcwM+DWHOAZPSSbvA909wNIhNZh1J5Kmeq7JWYt" crossorigin="anonymous"></script>
<script src="./index.js" type="text/javascript"></script>
<title>Advanced Division</title>
</head>
<body x-data="opts" :class="theme">
<div id="container">
<header>
<img src="./imgs/icon-marginless.svg" width="128" height="128" alt="">
<h1>Advanced Division</h1>
<button id="theme-switcher" aria-hidden="true" @click="dark = !dark" x-text="themeSwitcherIcon" tabindex="-1"></button>
</header>
<main x-data="sections" x-init="section ='js'">
<div :class="collapsed('js py dart c cli')" tabindex="13" @click="expand('js py dart c cli')" @focus="expand('js py dart c cli')">
<h2>API / CLI</h2>
<nav>
<button :class="activeSection('js')" @click="select('js')" @focus="select('js')" tabindex="1">JavaScript</button>
<button :class="activeSection('py')" @click="select('py')" @focus="select('py')" tabindex="3">Python</button>
<button :class="activeSection('dart')" @click="select('dart')" @focus="select('dart')" tabindex="6">Dart</button>
<button :class="activeSection('c')" @click="select('c')" @focus="select('c')" tabindex="9">C</button>
<button :class="activeSection('cli')" @click="select('cli')" @focus="select('cli')" tabindex="12">CLI</button>
<button class="next" @click="next('js py dart c cli')"><span x-text="nextLabel('js py dart c cli', 'JavaScript;Python;Dart;C;CLI')"></span><span class="material-icons-round">navigate_next</span></button>
</nav>
<div>
<section :class="activeSection('js')" @focusin="select('js')">
<h3>JavaScript</h3>
<p>
Include this code to use Advanced Division in your website / JavaScript project:
</p>
<code class="lolight">
<script src="https://cdn.jsdelivr.net/gh/ratajs/[email protected]/AdvDiv.min.js" type="text/javascript" integrity="sha384-V0RdxveNPPBfIo4374oMkSjSkDBFh29wOCfIATs+/0CetZk8Bsr9rVZYNF3hedi8" crossorigin="anonymous"></script>
</code>
<p>
<strong>Usage:</strong>
<code class="lolight">
advdiv(n1, n2[, r[, rstr1, [rstr2]]])
</code>
<ul>
<li><span class="mono">n1</span> – First number (numerator)</li>
<li><span class="mono">n2</span> – Second number (denominator)</li>
<li><span class="mono">minstr</span> – String representing the minus sign (default <code class="lolight">"-"</code>)</li>
<li><span class="mono">decstr</span> – String separating the decimal digits (default <code class="lolight">"."</code>)</li>
<li><span class="mono">rstr1</span> – String to be inserted before recursion (default <code class="lolight">"["</code>)</li>
<li><span class="mono">rstr2</span> – String to be inserted after recursion (default <code class="lolight">"]"</code>)</li>
</ul>
See the <a href="https://github.com/ratajs/Advanced-Division-js/" tabindex="2">repository</a>.
</p>
</section>
<section :class="activeSection('py')" @focusin="select('py')">
<h3>Python</h3>
<p>
Download the <a href="https://github.com/ratajs/Advanced-Division-py/blob/1.2/AdvDiv.py" target="_blank" tabindex="4">AdvDiv.py</a> file and import it with:
</p>
<code class="lolight">
import AdvDiv
</code>
<p>
<strong>Usage:</strong>
<code class="lolight">
AdvDiv.div(n1, n2[, minstr, [decstr[, rstr1, rstr2]]])
</code>
<ul>
<li><span class="mono">n1</span> – First number (numerator)</li>
<li><span class="mono">n2</span> – Second number (denominator)</li>
<li><span class="mono">minstr</span> – String representing the minus sign (default <code class="lolight">"-"</code>)</li>
<li><span class="mono">decstr</span> – String separating the decimal digits (default <code class="lolight">"."</code>)</li>
<li><span class="mono">rstr1</span> – String to be inserted before recursion (default <code class="lolight">"["</code>)</li>
<li><span class="mono">rstr2</span> – String to be inserted after recursion (default <code class="lolight">"]"</code>)</li>
</ul>
See the <a href="https://github.com/ratajs/Advanced-Division-py/" tabindex="5">repository</a>.
</p>
</section>
<section :class="activeSection('dart')" @focusin="select('dart')">
<h3>Dart</h3>
<p>
Download the <a href="https://github.com/ratajs/Advanced-Division-dart/blob/1.2/AdvDiv.dart" target="_blank" tabindex="7">AdvDiv.dart</a> file and import it with:
</p>
<code class="lolight">
import 'AdvDiv.dart';
</code>
<p>
<strong>Usage:</strong>
<code class="lolight">
advdiv(String n1, String n2[, String minstr[, String decstr[, String rstr1, String rstr2]]])
</code>
<ul>
<li><span class="mono">n1</span> – First number (numerator)</li>
<li><span class="mono">n2</span> – Second number (denominator)</li>
<li><span class="mono">minstr</span> – String representing the minus sign (default <code class="lolight">"-"</code>)</li>
<li><span class="mono">decstr</span> – String separating the decimal digits (default <code class="lolight">"."</code>)</li>
<li><span class="mono">rstr1</span> – String to be inserted before recursion (default <code class="lolight">"["</code>)</li>
<li><span class="mono">rstr2</span> – String to be inserted after recursion (default <code class="lolight">"]"</code>)</li>
</ul>
See the <a href="https://github.com/ratajs/Advanced-Division-dart/" tabindex="8">repository</a>.
</p>
</section>
<section :class="activeSection('c')" @focusin="select('c')">
<h3>C</h3>
<p>
Download the <a href="https://github.com/ratajs/Advanced-Division-c/blob/1.2/AdvDiv.c" target="_blank" tabindex="10">AdvDiv.c</a> file and import it.
</p>
<p>
<strong>Usage:</strong>
<code class="lolight">
char *advdiv(char *n1, char *n2, char minch, char decch, char rch1, char rch2)
</code>
<ul>
<li><span class="mono">n1</span> – First number (numerator)</li>
<li><span class="mono">n2</span> – Second number (denominator)</li>
<li><span class="mono">minch</span> – Character representing the minus sign (default <code class="lolight">'-'</code>)</li>
<li><span class="mono">decch</span> – Character separating the decimal digits (default <code class="lolight">'.'</code>)</li>
<li><span class="mono">rch1</span> – Character to be inserted before recursion (default <code class="lolight">'['</code>)</li>
<li><span class="mono">rch2</span> – Character to be inserted after recursion (default <code class="lolight">']'</code>)</li>
</ul>
An empty string is returned if an error occurs. The returned string is always allocated with malloc, don’t forget to free it.<br />
See the <a href="https://github.com/ratajs/Advanced-Division-c/" tabindex="11">repository</a>.
</p>
</section>
<section :class="activeSection('cli')" @focusin="select('cli')">
<h3>CLI</h3>
<p>
You can use the C or Dart compiled binaries (from GitHub releases). It is also possible to use the Python script that way (e. g. <code>python3 AdvDiv.py <em>n1</em> <em>n2</em></code>).
You can move the file to <span class="mono">/bin/</span> or another directory specified in the <span class="mono">PATH</span> environment variable on Linux to use it anywhere.
</p>
<p>
<strong>Usage:</strong>
<code>advdiv n1 n2 [minstr [decstr [rstr1 [rstr2]]]]</code>
<ul>
<li><span class="mono">n1</span> – First number (numerator)</li>
<li><span class="mono">n2</span> – Second number (denominator)</li>
<li><span class="mono">minstr</span> – String (character) representing the minus sign (default <code class="lolight">"-"</code>)</li>
<li><span class="mono">decstr</span> – String (character) separating the decimal digits (default <code class="lolight">"."</code>)</li>
<li><span class="mono">rstr1</span> – String (character) to be inserted before recursion (default <code class="lolight">"["</code>)</li>
<li><span class="mono">rstr2</span> – String (character) to be inserted after recursion (default <code class="lolight">"]"</code> or <code class="lolight">""</code> when <span class="mono">rstr1</span> is specified)</li>
</ul>
</p>
<p>
Only the first characters (8-bit) are used from the last four arguments when using the C binary.
</p>
</section>
</div>
</div>
<div :class="collapsed('kirigami flutter www nwjs')" tabindex="14" @click="expand('kirigami flutter www nwjs')" @focus="expand('kirigami flutter www nwjs')">
<h2>GUI</h2>
<nav>
<button :class="activeSection('kirigami')" @click="select('kirigami')" @focus="select('kirigami')" tabindex="15">Kirigami</button>
<button :class="activeSection('flutter')" @click="select('flutter')" @focus="select('flutter')" tabindex="20">Flutter</button>
<button :class="activeSection('www')" @click="select('www')" @focus="select('www')" tabindex="28">Web</button>
<button :class="activeSection('nwjs')" @click="select('nwjs')" @focus="select('nwjs')" tabindex="31">NW.js</button>
<button class="next" @click="next('kirigami flutter www nwjs')"><span x-text="nextLabel('kirigami flutter www nwjs', 'Kirigami;Flutter;Web;NW.js')"></span><span class="material-icons-round">navigate_next</span></button>
</nav>
<div>
<section :class="activeSection('kirigami')" @focusin="select('kirigami')">
<h3>Kirigami</h3>
<p>
Kirigami is a framework by KDE, which is based on Qt. This version looks best when used in a Qt‐based environment, like KDE Plasma or LXQt.
It is available for Linux as a Flatpak bundle, a Deb package or an archive with an installation script.
</p>
<p>
<strong>Installation instructions for Linux (Flatpak):</strong>
<ul>
<li>Flatpak is a universal package distribution system for Linux, this method should work on most desktop Linux systems</li>
<li>Download the <a href="https://sourceforge.net/projects/advanced-division/files/Advanced-Division-Kirigami-Linux.flatpak/download" tabindex="16">Advanced-Division-Kirigami-Linux.flatpak</a> file</li>
<li>Open terminal (often can be done with <kbd>Ctrl+Alt+T</kbd>)</li>
<li>Navigate to the directory, where the downloaded file is, e. g. by entering <code>cd ~/Downloads/</code> and pressing enter</li>
<li>Enter <code>flatpak install Advanced-Division-Kirigami-Linux.flatpak</code> and hit enter</li>
<li>If it doesn’t work, make sure you have Flathub repository enabled by entering <code>flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo</code> and trying the previous command again</li>
<li>You can uninstall the application with <code>flatpak remove cz.ratajs.advdiv</code></li>
</ul>
<strong>Installation instructions for Linux (Deb package):</strong>
<ul>
<li>You can install the program with a deb package if you use Debian‐based OS, like Ubuntu, Pop!_OS, Linux Mint, elementary OS or KDE neon</li>
<li>Download the <a href="https://sourceforge.net/projects/advanced-division/files/Advanced-Division-Kirigami-Linux.deb/download" tabindex="17">Advanced-Division-Kirigami-Linux.deb</a> file</li>
<li>Enter <code>sudo dpkg -i Advanced-Division-Kirigami-Linux.deb</code> and hit enter</li>
<li>You can uninstall the package with <code>sudo dpkg -r advdiv</code></li>
</ul>
<strong>Installation instructions for Linux (archive with installation script):</strong>
<ul>
<li>You can use this method if neither of the previous worked for you or you don’t have a Debian‐based OS and don’t want to use Flatpak, but there could be problems with KDE dependencies (if you use KDE apps or Plasma desktop, you will likely have all the required packages installed)</li>
<li>Download the <a href="https://sourceforge.net/projects/advanced-division/files/Advanced-Division-Kirigami-Linux.tar.gz/download" tabindex="18">Advanced-Division-Kirigami-Linux.tar.gz</a></li>
<li>Decompress the archive</li>
<li>Open terminal (often can be done with <kbd>Ctrl+Alt+T</kbd>)</li>
<li>Navigate to the decompressed folder, e. g. by entering <code>cd ~/Downloads/AdvDiv-Kirigami</code> and pressing enter</li>
<li>Enter <code>chmod +x install.sh</code>, hit enter and then <code>./install.sh</code> and press enter again</li>
<li>Enter your root password if prompted</li>
<li>The app should be installed in a short time</li>
<li>To uninstall the app, run the <code>uninstall.sh</code> file the same way as <code>install.sh</code></li>
<li>You can replace <code>install.sh</code> with <code>install-noroot.sh</code> and <code>uninstall.sh</code> with <code>uninstall-noroot.sh</code> to install / uninstall the app only for the current user (doesn’t require root priviliges)</li>
</ul>
See the <a href="https://invent.kde.org/ratajsk/advanced-division" tabindex="19">repository</a>.
</p>
<img :src="screenshot('kirigami')" width="1120" height="879" alt="screenshot">
</section>
<section :class="activeSection('flutter')" @focusin="select('flutter')">
<h3>Flutter</h3>
<p>
Flutter is a cross‐platform framework by Google. This version Advanced Division is available for Android, Linux and Windows.
</p>
<p>
<strong>Installation instructions for Android:</strong>
<ul>
<li>Download the <a href="https://sourceforge.net/projects/advanced-division/files/Advanced-Division-Flutter-Android.apk/download" tabindex="21">Advanced-Division-Flutter-Android.apk</a> file to your Android device</li>
<li>Try opening the file, allow installing apps from this source if prompted, more info <a href="https://www.xda-developers.com/how-to-sideload-install-android-app-apk/#apkinstall" tabindex="22">here</a></li>
<li>Once opened, click install</li>
<li>After the process ended, the app should be installed</li>
<li>You can uninstall it like other applications</li>
</ul>
<strong>Installation instructions for Linux (Flatpak):</strong>
<ul>
<li>Flatpak is a universal package distribution system for Linux, this method should work on most desktop Linux systems</li>
<li>Download the <a href="https://sourceforge.net/projects/advanced-division/files/Advanced-Division-Flutter-Linux.flatpak/download" tabindex="23">Advanced-Division-Flutter-Linux.flatpak</a> file</li>
<li>Open terminal (often can be done with <kbd>Ctrl+Alt+T</kbd>)</li>
<li>Navigate to the directory, where the downloaded file is, e. g. by entering <code>cd ~/Downloads/</code> and pressing enter</li>
<li>Enter <code>flatpak install Advanced-Division-Flutter-Linux.flatpak</code> and hit enter</li>
<li>If it doesn’t work, make sure you have Flathub repository enabled by entering <code>flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo</code> and trying the previous command again</li>
<li>You can uninstall the application with <code>flatpak remove cz.ratajs.advdiv-flutter</code></li>
</ul>
<strong>Installation instructions for Linux (Deb package):</strong>
<ul>
<li>You can install the program with a deb package if you use Debian‐based OS, like Ubuntu, Pop!_OS, Linux Mint, elementary OS or KDE neon</li>
<li>Download the <a href="https://sourceforge.net/projects/advanced-division/files/Advanced-Division-Flutter-Linux.deb/download" tabindex="24">Advanced-Division-Flutter-Linux.deb</a> file</li>
<li>Enter <code>sudo dpkg -i Advanced-Division-Flutter-Linux.deb</code> and hit enter</li>
<li>You can uninstall the package with <code>sudo dpkg -r advdiv-flutter</code></li>
</ul>
<strong>Installation instructions for Linux (archive with installation script):</strong>
<ul>
<li>You can use this method if neither of the previous worked for you or you don’t have a Debian‐based OS and don’t want to use Flatpak, but there could be problems with KDE dependencies (if you use KDE apps or Plasma desktop, you will likely have all the required packages installed)</li>
<li>Download the <a href="https://sourceforge.net/projects/advanced-division/files/Advanced-Division-Flutter-Linux.tar.gz/download" tabindex="25">Advanced-Division-Flutter-Linux.tar.gz</a></li>
<li>Decompress the archive</li>
<li>Open terminal (often can be done with <kbd>Ctrl+Alt+T</kbd>)</li>
<li>Navigate to the decompressed folder, e. g. by entering <code>cd ~/Downloads/AdvDiv-Flutter</code> and pressing enter</li>
<li>Enter <code>chmod +x install.sh</code>, hit enter and then <code>./install.sh</code> and press enter again</li>
<li>Enter your root password if prompted</li>
<li>The app should be installed in a short time</li>
<li>To uninstall the app, run the <code>uninstall.sh</code> file the same way as <code>install.sh</code></li>
<li>You can replace <code>install.sh</code> with <code>install-noroot.sh</code> and <code>uninstall.sh</code> with <code>uninstall-noroot.sh</code> to install / uninstall the app only for the current user (doesn’t require root priviliges)</li>
</ul>
<strong>Installation instructions for Windows:</strong>
<ul>
<li>Download the <a href="https://sourceforge.net/projects/advanced-division/files/Advanced-Division-Flutter-Windows.exe/download" tabindex="26">Advanced-Division-Flutter-Windows.exe</a> file</li>
<li>Follow the instructions in the wizard</li>
<li>After finishing the wizard, the app should be installed</li>
<li>The uninstaller should be in the install directory</li>
</ul>
See the <a href="https://github.com/ratajs/Advanced-Division-Flutter" tabindex="27">repository</a>.
</p>
<div class="image-grid">
<img src="./imgs/screenshot_flutter.png" width="1370" height="858" alt="screenshot">
<img src="./imgs/screenshot_flutter_phone.png" width="360" height="820" alt="screenshot">
</div>
</section>
<section :class="activeSection('www')" @focusin="select('www')">
<h3>Web</h3>
<p>
This version is meant to be opened in a browser. The file is available online <a href="demo.html" tabindex="29">here</a> and the offline version is <a href="https://sourceforge.net/projects/advanced-division/files/Advanced-Division.html/download" tabindex="30">here</a> for you to download.
</p>
<img src="./imgs/screenshot_www.png" width="845" height="700" alt="screenshot">
</section>
<section :class="activeSection('nwjs')" @focusin="select('nwjs')">
<h3>NW.js</h3>
<p>
This version is also web‐based, but runs outside any web browser, there are versions for both Linux and Windows.
</p>
<p>
<strong>Installation instructions for Linux:</strong>
<ul>
<li>Download the <a href="https://sourceforge.net/projects/advanced-division/files/Advanced-Division-NWjs-Linux.tar.gz/download" tabindex="32">Advanced-Division-NWjs-Linux.tar.gz</a> file</li>
<li>Decompress the archive</li>
<li>Open terminal (often can be done with <kbd>Ctrl+Alt+T</kbd>)</li>
<li>Navigate to the decompressed folder, e. g. by entering <code>cd ~/Downloads/Advanced-Division</code> and pressing enter</li>
<li>Enter <code>chmod +x install.sh</code>, hit enter and then <code>./install.sh</code> and press enter again</li>
<li>Enter your root password if prompted</li>
<li>The app should be installed in a while (the speed depends on your internet connection)</li>
<li>The uninstaller should be in the install directory (<code>/var/nw-apps/Advanced-Division/uninstall.sh</code>), you can execute it like the install script.</li>
</ul>
<strong>Installation instructions for Windows:</strong>
<ul>
<li>Download the <a href="https://sourceforge.net/projects/advanced-division/files/Advanced-Division-NWjs-Windows.exe/download" tabindex="33">Advanced-Division-NWjs-Windows.exe</a> file</li>
<li>Follow the instructions in the wizard</li>
<li>After finishing the wizard, the app should be installed</li>
<li>The uninstaller should be in the install directory</li>
</ul>
</p>
</section>
</div>
</div>
</main>
<footer>
APIs, applications and website by RatajS<br />
Hosted by <a href="https://github.com/ratajs/Advanced-Division" target="_blank" tabindex="34" @keydown.tab="if(!$event.shiftKey) { $event.preventDefault(); return false; };">GitHub</a>
</footer>
</div>
</body>
</html>