From 3043409dc75c6a5ab8fd6697148d9a20a5fab802 Mon Sep 17 00:00:00 2001 From: Younes <47226184+younesaassila@users.noreply.github.com> Date: Sat, 14 Aug 2021 14:03:52 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=8C=90=20Update=20website?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/app.js | 7 ++++ docs/favicon.ico | Bin 0 -> 7406 bytes docs/index.html | 27 ++++++++------ docs/index.js | 46 ------------------------ docs/style.css | 82 ------------------------------------------ docs/styles.css | 74 ++++++++++++++++++++++++++++++++++++++ docs/update.json | 4 +++ docs/update_info.json | 4 --- 8 files changed, 102 insertions(+), 142 deletions(-) create mode 100644 docs/app.js create mode 100644 docs/favicon.ico delete mode 100644 docs/index.js delete mode 100644 docs/style.css create mode 100644 docs/styles.css create mode 100644 docs/update.json delete mode 100644 docs/update_info.json diff --git a/docs/app.js b/docs/app.js new file mode 100644 index 0000000..8119701 --- /dev/null +++ b/docs/app.js @@ -0,0 +1,7 @@ +(async function () { + // Fetch download link of the latest version. + const { url: downloadLink } = await fetch("update.json") + .then((response) => response.json()) + .catch(console.error); + document.querySelector("#download-link").setAttribute("href", downloadLink); +})(); diff --git a/docs/favicon.ico b/docs/favicon.ico new file mode 100644 index 0000000000000000000000000000000000000000..535736fce98f6226a49f394f4bcfb057907da39e GIT binary patch literal 7406 zcmeI02~bv56o3x`3c`~`WEDXa0T*O(!zYURiwYtrN(vI9K0&XzVeVUr3n1=mnwDv5 zlS?&a?xwa|nU>q6X{l+pXzuIjoOl2C!(YwRjMI!x|C{;WJ?GqW&b#-%H~+og0k8vm zh>8MgonS*XfMx&?9BkH|0M3xj-CgSWjsP=!0K&NY20dATG zxOoQPwVwcw>;!y!HsIpEfF}+DZeI+zVi4fN2Y|1P1bm@A;Q3>KAFKzQ)dldgt$>H# zrW{3pS1(a)8Q`sJ6#D_iE&+To5AeY~z|)@rp7{ds<>7$Ox1~HL%CQ0PwQ+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|vMRGVvn=zo&bY*t%;j&D5}#d{T*f@Vnpl&W z`;*O*Y46^W?8*GfOwatgwOBGCGb*z;bKJ#~lI>p_BDs>;pE-H;Fv*=emQucLl1G`* zkMAdD?3p(%5IZspw^4ULT#jBNe|ZwY8i^Du2z%fmReVf$+NGPVNslN8nK+JRkD~`w@z&A zXJ~#ALs*Q`v;eay-Z?Wjd8pBE*DaLA^eoMpCPY{JSYMN=dB@tiVyY2rFNG1#np>9; zQ%`r725g9mYr;*xm@3@x7452N5o%y{f2sDX8dJ|VwRg7E^t(so0H4m~GcyS=uWbb% zoA`Gt@Q;5G|FHv~Q>etQpH(d96!Y0cf3$H<`QaN`L+8Df_i)~8`3%5y*rG%_M;xb` zb~e>wzm$76@9(^qa~+(|16=RsnmgBe`7FY9TCPQN&714NR8!T@CtO43`Y!Lwd`96t zoA=s9l!MPld{*LmEZ6F}_RKYYKI`y4{QXf`|K@$1YrtIZ<{CTK*LjcTnljgLx%SOx z7p|}K{?7Glu9d$^XBn=Q^Lc~MQkPHv$E$BkZ(D( - + + Kwyk Solver -
-

Kwyk Solver

-

Un outil open source pour résoudre vos devoirs Kwyk.

+
+

Kwyk Solver

+

+ Un outil open source pour résoudre vos devoirs Kwyk. +

- - + Télécharger + + Page GitHub +
-
-
- - + + diff --git a/docs/index.js b/docs/index.js deleted file mode 100644 index 77664a3..0000000 --- a/docs/index.js +++ /dev/null @@ -1,46 +0,0 @@ -const md = window.markdownit(); -const downloadButton = document.getElementById("download-button"); -const gitHubButton = document.getElementById("github-button"); -const main = document.getElementById("main"); - -//#region Download button - -const dlUrlRequest = new XMLHttpRequest(); -dlUrlRequest.onreadystatechange = () => { - if (dlUrlRequest.readyState == 4 && dlUrlRequest.status == 200) { - const url = JSON.parse(dlUrlRequest.responseText).url; - downloadButton.addEventListener("click", () => { - location.href = url; - }); - } -}; -dlUrlRequest.open("GET", "update_info.json", true); -dlUrlRequest.send(); - -//#endregion - -//#region Main, README - -const readMeRequest = new XMLHttpRequest(); -readMeRequest.onreadystatechange = () => { - if (readMeRequest.readyState == 4 && readMeRequest.status == 200) { - const html = md.render(readMeRequest.responseText); - main.innerHTML = html; - } -}; -readMeRequest.open( - "GET", - "https://raw.githubusercontent.com/younesaassila/Kwyk-Solver/main/README.md", - true -); -readMeRequest.send(); - -//#endregion - -//#region GitHub button - -gitHubButton.addEventListener("click", () => { - location.href = "https://github.com/younesaassila/Kwyk-Solver"; -}); - -//#endregion diff --git a/docs/style.css b/docs/style.css deleted file mode 100644 index d78ef36..0000000 --- a/docs/style.css +++ /dev/null @@ -1,82 +0,0 @@ -@import url("https://fonts.googleapis.com/css2?family=Open+Sans:wght@300;400;600;700;800&display=swap"); - -body { - background-color: #fafafa; - color: #000000; - font-family: "Open Sans", sans-serif; - margin: 0; - padding: 0; -} - -header { - align-items: center; - background-color: #ffffff; - box-shadow: 0 0 12px rgba(0, 0, 0, 0.1); - display: flex; - flex-direction: column; - height: 35vh; - justify-content: center; - margin: 0; - overflow: hidden; - text-align: center; -} - -header h1 { - font-size: 32pt; - margin-bottom: 0; -} - -header p { - font-size: 15pt; - margin-top: 0.5em; - margin-bottom: 2em; -} - -header button { - background-color: inherit; - border: 1px solid #4080ff; - border-radius: 6px; - color: #4080ff; - cursor: pointer; - font-size: 15pt; - opacity: 1; - padding: 8px 16px; - transition: opacity 200ms; -} - -header button:hover { - opacity: 0.7; - transition: opacity 200ms; -} - -header .button-fill { - background-color: #4080ff; - color: #ffffff; -} - -main { - margin: 3em auto 5em auto; - width: 80vw; -} - -main a, -main a:visited { - color: #4080ff; - opacity: 1; - text-decoration: none; - transition: opacity 200ms; -} - -main a:hover, -main a:visited:hover { - color: #4080ff; - opacity: 0.7; - text-decoration: none; - transition: opacity 200ms; -} - -main code { - background-color: #f0f0f0; - border-radius: 4px; - padding: 3px 6px; -} diff --git a/docs/styles.css b/docs/styles.css new file mode 100644 index 0000000..638767f --- /dev/null +++ b/docs/styles.css @@ -0,0 +1,74 @@ +@import url("https://fonts.googleapis.com/css2?family=Atkinson+Hyperlegible:ital,wght@0,400;0,700;1,400;1,700&display=swap"); + +:root { + --accent-color: #007aff; + --bg-color: #fafafa; + --font-family: "Atkinson Hyperlegible", sans-serif; + --text-color: #000000; +} + +@media (prefers-color-scheme: dark) { + :root { + --accent-color: #0a84ff; + --bg-color: #1c1c1e; + --text-color: #ffffff; + } +} + +* { + box-sizing: border-box; +} + +body { + background-color: var(--bg-color); + color: var(--text-color); + font-family: var(--font-family); + margin: 0; + padding: 0; +} + +main { + align-items: center; + display: flex; + flex-direction: column; + height: 100vh; + justify-content: center; + margin: 0; + overflow: hidden; + padding: 0; + text-align: center; +} + +main > .title { + font-size: 32pt; + margin-top: 0; + margin-bottom: 0; +} + +main > .description { + font-size: 16pt; + margin-top: 0.5rem; + margin-bottom: 3rem; +} + +.button { + background-color: inherit; + border: 1px solid var(--accent-color); + border-radius: 8px; + color: var(--accent-color); + cursor: pointer; + font-size: 15pt; + margin: 0.5rem; + padding: 0.65rem 1.65rem; + text-decoration: none; + transition: opacity 200ms; +} + +.button:hover { + opacity: 0.7; +} + +.button.fill { + background-color: var(--accent-color); + color: #ffffff; +} diff --git a/docs/update.json b/docs/update.json new file mode 100644 index 0000000..4447166 --- /dev/null +++ b/docs/update.json @@ -0,0 +1,4 @@ +{ + "version": "2.0.4", + "url": "https://github.com/younesaassila/kwyk-solver/releases/download/2.0.4/Kwyk-Solver-2.0.4.zip" +} diff --git a/docs/update_info.json b/docs/update_info.json deleted file mode 100644 index 981bb4b..0000000 --- a/docs/update_info.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "version": "2.0.3", - "url": "https://github.com/younesaassila/Kwyk-Solver/releases/download/2.0.3/Kwyk-Solver-2.0.3.zip" -}