From 79c22ca796e32f3485acc22a36d731ed474291f4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yanis=20Zafir=C3=B3pulos?= <1265028+drkameleon@users.noreply.github.com> Date: Mon, 29 Jan 2024 14:51:22 +0100 Subject: [PATCH 1/7] added `getPackageBox` helper --- tools/generateweb.art | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tools/generateweb.art b/tools/generateweb.art index 6e8719ce..90046084 100755 --- a/tools/generateweb.art +++ b/tools/generateweb.art @@ -43,6 +43,10 @@ getLink: function [loc, subv][ return rett ] +getPackageBox: function [entry][ + render.template read "website/components/package-box.html" +] + createSpecFile: function [package, versionToProcess, targetFolder][ ret: #[ name: package\name, From 0adb0cc207bf547056977cc7b417a04259978179 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yanis=20Zafir=C3=B3pulos?= <1265028+drkameleon@users.noreply.github.com> Date: Mon, 29 Jan 2024 14:51:36 +0100 Subject: [PATCH 2/7] use `getPackageBox` instead --- website/index.html | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/website/index.html b/website/index.html index 4f3d5af6..1d3c26fa 100644 --- a/website/index.html +++ b/website/index.html @@ -11,17 +11,14 @@

- <|| loop entries [entryLeft, entryRight][||>
- <|| entry: entryLeft ||> - <||= read "website/components/package-box.html" ||> + <||= getPackageBox entryLeft ||>
<|| unless null? entryRight [||> - <|| entry: entryRight ||> - <||= read "website/components/package-box.html" ||> + <||= getPackageBox entryRight ||> <|| ] ||>
@@ -33,8 +30,8 @@

From fb65bbe9e80309fcedd80e73b3bca6bf3569a2eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yanis=20Zafir=C3=B3pulos?= <1265028+drkameleon@users.noreply.github.com> Date: Mon, 29 Jan 2024 14:51:55 +0100 Subject: [PATCH 3/7] update footer (+ copyright year) --- website/components/footer.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/components/footer.html b/website/components/footer.html index 3659bc7f..4719c97c 100644 --- a/website/components/footer.html +++ b/website/components/footer.html @@ -9,7 +9,7 @@

- Arturo Programming Language
Copyright © 2019-2023 Yanis Zafirópulos

+ Arturo Programming Language
Copyright © 2019-2024 Yanis Zafirópulos

Website built and generated using Arturo + Webize. Running on DigitalOcean.
Source code licensed under MIT. Website content licensed under CC BY NC SA 4.0.

From be1633fa26db3048ec713b1c417823faf040e65b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yanis=20Zafir=C3=B3pulos?= <1265028+drkameleon@users.noreply.github.com> Date: Mon, 29 Jan 2024 16:08:23 +0100 Subject: [PATCH 4/7] homepage link doesn't need "index.html" --- website/components/search.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/components/search.html b/website/components/search.html index 4d195bc4..c1d6e351 100644 --- a/website/components/search.html +++ b/website/components/search.html @@ -8,7 +8,7 @@ <|| ] ||>

- + Arturo Packages

From f320a6db019ac5d6eb82c33d2e81959ee1b06ecb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yanis=20Zafir=C3=B3pulos?= <1265028+drkameleon@users.noreply.github.com> Date: Mon, 29 Jan 2024 18:29:40 +0100 Subject: [PATCH 5/7] added handling for alert boxes --- tools/generateweb.art | 33 +++++++++++++++++++++++++++++++-- 1 file changed, 31 insertions(+), 2 deletions(-) diff --git a/tools/generateweb.art b/tools/generateweb.art index 90046084..acfa5c74 100755 --- a/tools/generateweb.art +++ b/tools/generateweb.art @@ -23,6 +23,9 @@ compressCSS: function [file][ ] getProperMarkdown: function [md][ + ; write "tmp.md" md + ; ret: execute ~{ruby |relative "gfm.rb"| tmp.md} + ; print ["Got:\n" ret] ret: read.markdown md ret: replace ret {/class="language-[^"]+"/} "" return ret @@ -47,6 +50,32 @@ getPackageBox: function [entry][ render.template read "website/components/package-box.html" ] +getCleanTags: function [taglist][ + filter taglist 'tag [ + contains? ["arturo" "arturo-lang" "package"] tag + ] +] + +postprocessAlerts: function [src][ + replace src [ + {/
\n

\[!TIP\]/} + {/

\n

\[!NOTE\]/} + {/

\n

\[!IMPORTANT\]/} + {/

\n

\[!WARNING\]/} + {/

\n

\[!CAUTION\]/} + ][ + "

\n

Tip
\n" + "

\n

Note
\n" + "

\n

Important
\n" + "

\n

Warning
\n" + "

\n

Caution
\n" + ] +] + +postprocessHTML: function [htm][ + return postprocessAlerts htm +] + createSpecFile: function [package, versionToProcess, targetFolder][ ret: #[ name: package\name, @@ -110,7 +139,7 @@ loop entries 'entry [ currentVersion: first entry\version currentVersionIsLatest: true write ~{|tgtName|/index.html} - render.template read "website/package.html" + postprocessHTML render.template read "website/package.html" createSpecFile entry currentVersion tgtName @@ -122,7 +151,7 @@ loop entries 'entry [ currentVersion: vv currentVersionIsLatest: false write ~{|versionTgt|/index.html} - render.template read "website/package.html" + postprocessHTML render.template read "website/package.html" createSpecFile entry vv versionTgt ] From 8e9e261bf296af2589780a51c3b969e741ec0ced Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yanis=20Zafir=C3=B3pulos?= <1265028+drkameleon@users.noreply.github.com> Date: Mon, 29 Jan 2024 18:29:53 +0100 Subject: [PATCH 6/7] fix unused tags --- website/package.html | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/website/package.html b/website/package.html index b1eb5a6d..8be99a84 100644 --- a/website/package.html +++ b/website/package.html @@ -25,9 +25,10 @@

<||= entry\nam

<||= entry\info\description ||>

- <|| unless empty? entry\info\tags [ ||> + <|| filteredTags: getCleanTags entry\info\tags ||> + <|| unless empty? filteredTags [ ||>
- <|| loop entry\info\tags 'tag [||> + <|| loop filteredTags 'tag [||> <||= tag ||> <|| ] ||>
From 00ebf0b313f45af111c55023e0ff1eb809090cfe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yanis=20Zafir=C3=B3pulos?= <1265028+drkameleon@users.noreply.github.com> Date: Mon, 29 Jan 2024 18:30:08 +0100 Subject: [PATCH 7/7] added alert styles + cleanup --- website/style.scss | 50 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) diff --git a/website/style.scss b/website/style.scss index 004f0847..3b720da5 100644 --- a/website/style.scss +++ b/website/style.scss @@ -203,6 +203,56 @@ a.version-link { box-shadow: none; padding-top: 2rem; padding-bottom: 2rem; + + .readme { + blockquote { + &.alert { + padding-top: 0.5rem; + padding-bottom: 0.5rem; + + background-color: inherit !important; + border-left-width: 5px; + border-left-style: solid; + + .alert-message { + i { + margin-right: 0.5rem; + } + } + + &.alert-tip { + border-left-color: #428546; + .alert-message { + color: #428546; + } + } + &.alert-note { + border-left-color: #296BD3; + .alert-message { + color: #296BD3; + } + } + &.alert-important { + border-left-color: #7A58D7; + .alert-message { + color: #7A58D7; + } + } + &.alert-warning { + border-left-color: #936821; + .alert-message { + color: #936821; + } + } + &.alert-caution { + border-left-color: #BF3536; + .alert-message { + color: #BF3536; + } + } + } + } + } } } }