Browse Source

Merge pull request 'switch-to-makefile' (#1) from switch-to-makefile into master

Reviewed-on: http://31.184.254.176:8078/vilor/website/pulls/1
pull/2/head
vilor 3 years ago
parent
commit
c7dca47cbd
  1. 56
      Makefile
  2. 11
      README.md
  3. 23
      config.mk
  4. 25
      layouts/clean.sxml
  5. 52
      layouts/default.sxml
  6. BIN
      public/img/chicken.png
  7. 0
      public/img/under-construction.png
  8. 1
      scripts/minify-html.sed
  9. 38
      src/components/footer.scm
  10. 22
      src/components/header.scm
  11. 5
      src/general.scm
  12. BIN
      src/img/anybrowser3.jpg
  13. 17
      src/pages/contacts.scm
  14. 17
      src/pages/index.scm
  15. 55
      src/pages/webapps/index.scm
  16. 50
      src/pages/webapps/scrollbar.scm
  17. 0
      src/scripts/webapps/scrollbar.js
  18. 227
      src/style.scss
  19. 111
      src/styles/style.scm
  20. 104
      src/styles/webapps/scrollbar.scm
  21. 39
      src/templates/clean.scm
  22. 55
      src/templates/default.scm

56
Makefile

@ -0,0 +1,56 @@
# Copyright (C) 2022 Ivan Polyakov
#
# This file is part of vilor's website.
#
# Vilor's website is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Vilor's website is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
include config.mk
DIRS := $(shell find $(SRCDIR)/pages/* -type d | sed 's/$(SRCDIR)\/pages/$(OUTDIR)/')
SRCPAGES := $(shell find $(SRCDIR)/pages/* -name '*.scm')
SRCSTYLES := $(shell find $(SRCDIR)/styles/* -name '*.scm')
SRCJS := $(shell find $(SRCDIR)/scripts/* -name '*.js')
all: $(OUTDIR) $(STATICDIR) pages styles js
pages: $(SRCPAGES)
for page in $(SRCPAGES) ; do \
$(SCHEME) $(SCHEMEFLAGS) $$page \
| sed -f scripts/minify-html.sed \
> $$(echo $$page | sed 's/.*\/pages/dist/' | sed 's/scm/xhtml/') \
; done
styles: $(SRCSTYLES)
for style in $(SRCSTYLES) ; do \
$(SCHEME) $(SCHEMEFLAGS) $$style \
> $$(echo $$style | sed 's/.*\/styles/dist/' | sed 's/scm/css/') \
; done
js: $(SRCJS)
for script in $(SRCJS) ; do \
cp $$script $$(echo $$script | sed 's/.*\/scripts/dist/') \
; done
$(OUTDIR):
mkdir -p $(OUTDIR)
mkdir -p $(DIRS)
$(STATICDIR): $(OUTDIR)
cp -rf $@/* $< || echo $(STATICDIR) "dir is empty"
cp COPYING dist/
clean:
rm -rf $(OUTDIR)
.PHONY: all $(OUTDIR) $(STATICDIR) clean

11
README.md

@ -3,11 +3,14 @@ website
Dependencies Dependencies
------------ ------------
Chicken Scheme: http://www.call-cc.org/ Chicken Scheme: http://www.call-cc.org/
Hyde egg: http://wiki.call-cc.org/eggref/5/hyde sxml-serializer egg: http://wiki.call-cc.org/eggref/5/sxml-serializer
scss egg: http://wiki.call-cc.org/eggref/5/scss
Usage Building
----- --------
See `hyde --help`. ```
make
```
License License
------- -------

23
config.mk

@ -0,0 +1,23 @@
# Copyright (C) 2022 Ivan Polyakov
#
# This file is part of vilor's website.
#
# Vilor's website is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Vilor's website is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
SCHEME=csi
SCHEMEFLAGS=-s
SRCDIR=src
STATICDIR=public
OUTDIR=dist

25
layouts/clean.sxml

@ -1,25 +0,0 @@
;; Copyright (C) 2022 Ivan Polyakov
;;
;; This file is part of vilor's website.
;;
;; Vilor's website is free software: you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation, either version 3 of the License, or
;; (at your option) any later version.
;;
;; Vilor's website is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;; GNU General Public License for more details.
;;
;; You should have received a copy of the GNU General Public License
;; along with this program. If not, see <https://www.gnu.org/licenses/>.
()
`((xhtml-1.0-strict)
(html (@ (xmlns "http://www.w3.org/1999/xhtml") (xml:lang "en") (lang "en"))
(head
(meta (@ (http-equiv "Content-Type") (content "text/html; charset=ascii")))
(link (@ (rel "stylesheet") (href "/style.css")))
(title ,($ 'title)))
(body (inject ,contents))))

52
layouts/default.sxml

@ -1,52 +0,0 @@
;; Copyright (C) 2022 Ivan Polyakov
;;
;; This file is part of vilor's website.
;;
;; Vilor's website is free software: you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation, either version 3 of the License, or
;; (at your option) any later version.
;;
;; Vilor's website is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;; GNU General Public License for more details.
;;
;; You should have received a copy of the GNU General Public License
;; along with this program. If not, see <https://www.gnu.org/licenses/>.
()
`((xhtml-1.0-strict)
(html (@ (xmlns "http://www.w3.org/1999/xhtml") (xml:lang "en") (lang "en"))
(head
(meta (@ (http-equiv "Content-Type") (content "text/html; charset=ascii")))
(link (@ (rel "stylesheet") (href "/style.css")))
(title ,($ 'title)))
(body
(div (@ (class "wrapper"))
(div (@ (class "header"))
(div (@ (class "container"))
(h4 (@ (class "header__logo")) vilor)
(ul (@ (class "header__nav"))
(li (a (@ (href "/index.html")) "Home"))
(li (a (@ (href "/webapps/index.html")) "Web Apps"))
(li (a (@ (href "http://31.184.254.176:8078/")) "Git"))
(li (a (@ (href "/contacts.html")) "Contacts")))))
(div (@ (class "content container"))
(h1 (@ (class "content__title")) ,($ 'page-name))
(div (@ (class "content__description")) ,($ 'page-desc))
(inject ,contents))
(div (@ (class "footer"))
(div (@ (class "footer__authors"))
(div "Content: " (a (@ (href "/contacts.html")) "Ivan Polyakov"))
(div "Design: " (a (@ (href "https://t.me/olnaolna")) "Olga Revenkova")))
(div (@ (class "links"))
(a (@ (href "http://validator.w3.org/check?uri=referer"))
(img (@ (src "http://www.w3.org/Icons/valid-xhtml10") (alt "Valid XHTML 1.0 Strict") (height 31) (width 88))))
(a (@ (href "http://31.184.254.176:8078/vilor/website/"))
"Source code")
(a (@ (href "http://www.anybrowser.org/campaign/"))
(img (@ (src "/img/anybrowser3.jpg")
(alt "Viewable With Any Browser"))))))))))

BIN
public/img/chicken.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 78 KiB

0
src/img/under-construction.png → public/img/under-construction.png

Before

Width:  |  Height:  |  Size: 6.7 KiB

After

Width:  |  Height:  |  Size: 6.7 KiB

1
scripts/minify-html.sed

@ -0,0 +1 @@
:a;N;$!ba;s/>\s*</></g

38
src/components/footer.scm

@ -0,0 +1,38 @@
;; Copyright (C) 2022 Ivan Polyakov
;;
;; This file is part of vilor's website.
;;
;; Vilor's website is free software: you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation, either version 3 of the License, or
;; (at your option) any later version.
;;
;; Vilor's website is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;; GNU General Public License for more details.
;;
;; You should have received a copy of the GNU General Public License
;; along with this program. If not, see <https://www.gnu.org/licenses/>.
(define footer-links
'(("http://validator.w3.org/check?uri=referer" "XHTML 1.0")
("https://call-cc.org/" "Made with Chicken Scheme")
("http://31.184.254.176:8078/vilor/website/" "Source code")
("http://www.anybrowser.org/campaign/" "Any Browser")))
(define footer
`(div (@ (class "footer"))
(div (@ (class "footer__authors"))
(div "Content: "
(a (@ (href "/contacts.xhtml")) "Ivan Polyakov"))
(div "Design: "
(a (@ (href "https://t.me/olnaolna")) "Olga Revenkova")))
(div (@ (class "footer__links"))
,(let ((idx -1))
(map (lambda (l)
(set! idx (+ idx 1))
`(,(if (> idx 0) '(" | ") '())
(a (@ (href ,(car l))) ,(cdr l))))
footer-links)))))

22
src/webapps/index.sxml → src/components/header.scm

@ -15,10 +15,20 @@
;; You should have received a copy of the GNU General Public License ;; You should have received a copy of the GNU General Public License
;; along with this program. If not, see <https://www.gnu.org/licenses/>. ;; along with this program. If not, see <https://www.gnu.org/licenses/>.
((title . "vilor/webapps") (define header-links
(page-name . "webapps")) '(("/index.xhtml" "Home")
("/webapps/index.xhtml" "Web Apps")
("http://31.184.254.176:8078/" "Git")
("/contacts.xhtml" "Contacts")))
'(div (@ (class "webapps")) (define header
(ul `(div (@ (class "header"))
(li (div (@ (class "container"))
(a (@ (href "scrollbar.html")) "Scrollbar styling")))) (h4 (@ (class "header__logo")) "vilor")
(span (@ (class "header__nav"))
,(let ((idx -1))
(map (lambda (l)
(set! idx (+ idx 1))
`(,(if (> idx 0) '(" | ") '())
(a (@ (href ,(car l))) ,(cdr l))))
header-links))))))

5
hyde.scm → src/general.scm

@ -15,6 +15,5 @@
;; You should have received a copy of the GNU General Public License ;; You should have received a copy of the GNU General Public License
;; along with this program. If not, see <https://www.gnu.org/licenses/>. ;; along with this program. If not, see <https://www.gnu.org/licenses/>.
(import hyde) (define xhtml-1.0-doctype
"<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\">")
(output-dir "dist")

BIN
src/img/anybrowser3.jpg

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.2 KiB

17
src/contacts.sxml → src/pages/contacts.scm

@ -15,11 +15,22 @@
;; You should have received a copy of the GNU General Public License ;; You should have received a copy of the GNU General Public License
;; along with this program. If not, see <https://www.gnu.org/licenses/>. ;; along with this program. If not, see <https://www.gnu.org/licenses/>.
((title . "vilor/contacts") (import sxml-serializer)
(page-name . "contacts"))
(load "./src/general.scm")
(define title "vilor/contacts")
(define page-name "contacts")
(define page-desc '())
(define content
'(ul (@ (class "contacts")) '(ul (@ (class "contacts"))
(li "E-mail: " (a (@ (href "mailto:https://v1lor@protonmail.com")) (li "E-mail: " (a (@ (href "mailto:https://v1lor@protonmail.com"))
"v1lor at protonmail dot com")) "v1lor at protonmail dot com"))
(li "Matrix: " (a (@ (href "https://matrix.to/#/@vilor:matrix.org")) (li "Matrix: " (a (@ (href "https://matrix.to/#/@vilor:matrix.org"))
"vilor at matrix dot org"))) "vilor at matrix dot org"))))
(load "./src/templates/default.scm")
(display xhtml-1.0-doctype)
(display (serialize-sxml
(default-tpl title content page-name page-desc)))

17
src/index.sxml → src/pages/index.scm

@ -15,9 +15,20 @@
;; You should have received a copy of the GNU General Public License ;; You should have received a copy of the GNU General Public License
;; along with this program. If not, see <https://www.gnu.org/licenses/>. ;; along with this program. If not, see <https://www.gnu.org/licenses/>.
((title . "vilor") (import sxml-serializer)
(page-name . "home"))
(load "./src/general.scm")
(define title "vilor")
(define page-name "home")
(define page-desc '())
(define content
'(div (@ (class "under-construction")) '(div (@ (class "under-construction"))
(img (@ (src "img/under-construction.png") (alt "under construction"))) (img (@ (src "img/under-construction.png") (alt "under construction")))
(h2 "Under construction.")) (h2 "Under construction.")))
(load "./src/templates/default.scm")
(display xhtml-1.0-doctype)
(display (serialize-sxml
(default-tpl title content page-name page-desc)))

55
src/pages/webapps/index.scm

@ -0,0 +1,55 @@
;; Copyright (C) 2022 Ivan Polyakov
;;
;; This file is part of vilor's website.
;;
;; Vilor's website is free software: you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation, either version 3 of the License, or
;; (at your option) any later version.
;;
;; Vilor's website is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;; GNU General Public License for more details.
;;
;; You should have received a copy of the GNU General Public License
;; along with this program. If not, see <https://www.gnu.org/licenses/>.
(import sxml-serializer)
(load "./src/general.scm")
(define ideas-list
'(("Desktop YouTube client"
("Google is peace of shit. Repository: " '(a (@ (href "https://notabug.org/vilor/fltube")) "notabug.org/vilor/fltube"))
"Work in progress")
("System calls translator and binary format converter"
("On computers with the same CPU architecture, the executable always has the same CPU instructions, "
"and the only difference is in the format of the executable (such as ELF and PE) and system calls. "
"So, if we convert the executable (and the libraries used, of course) and translate system calls "
"from the source OS to the target, we can run any software on any OS.")
"Suspended, there are developments.")
("Open source ArmA" "ArmA is the battle simulator" "Idea")))
(define title "vilor/webapps")
(define page-name "webapps")
(define page-desc '())
(define webapps-links
'(("scrollbar.xhtml" "Scrollbar styling")))
(define content
`(div (@ (class "webapps"))
(ul
,(map (lambda (l)
`(li (a (@ (href ,(car l))) ,(cdr l))))
webapps-links))))
(load "./src/templates/default.scm")
(display xhtml-1.0-doctype)
(display (serialize-sxml
(default-tpl title content page-name page-desc)))

50
src/webapps/scrollbar.sxml → src/pages/webapps/scrollbar.scm

@ -15,12 +15,22 @@
;; You should have received a copy of the GNU General Public License ;; You should have received a copy of the GNU General Public License
;; along with this program. If not, see <https://www.gnu.org/licenses/>. ;; along with this program. If not, see <https://www.gnu.org/licenses/>.
((title . "vilor/webapps/scrollbar") (import sxml-serializer)
(page-name . "Scrollbar styling")
(page-desc . ("Demonstration of possible customization of the scrollbar."
(p (@ (class "note")) (b "Note") ": The result will look different in different browsers, try checking the result in browsers based on different engines."))))
'(div (@ (class "scrollbar-app")) (load "./src/general.scm")
(define title "vilor/webapps/scrollbar")
(define page-name "Scrollbar styling")
(define page-desc
'((p "Demonstration of possible customization of the scrollbar.")
(p (@ (class "note"))
(b "Note")
": The result will look different in different browsers, try checking the result in browsers based on different engines.")))
(define page-styles '("scrollbar.css"))
(define page-scripts '("scrollbar.js"))
(define content
`(div (@ (class "scrollbar-app"))
(noscript "Sorry, but this crap doesn't work without JavaScript.") (noscript "Sorry, but this crap doesn't work without JavaScript.")
(form (form
(fieldset (@ (class "scrollbar-app__panel")) (fieldset (@ (class "scrollbar-app__panel"))
@ -43,14 +53,14 @@
(type "color") (type "color")
(id "thumbclr") (id "thumbclr")
(name "thumbclr") (name "thumbclr")
(value "\#9b3e46"))) (value "#9b3e46")))
(input (@ (input (@
(type "text") (type "text")
(id "thumbclrtxt") (id "thumbclrtxt")
(name "thumbclrtxt") (name "thumbclrtxt")
(value "\#9b3e46") (value "#9b3e46")
(pattern "\#[0-9A-Fa-f]{6}") (pattern "#[0-9A-Fa-f]{6}")
(title "Hexadecimal RGB color with \"\#\" at the beginning")))) (title "Hexadecimal RGB color with \"#\" at the beginning"))))
(fieldset (fieldset
(h4 "Border:") (h4 "Border:")
@ -94,13 +104,13 @@
(type "color") (type "color")
(id "thumbbclr") (id "thumbbclr")
(name "thumbbclr") (name "thumbbclr")
(value "\#ffffff"))) (value "#ffffff")))
(input (@ (input (@
(type "text") (type "text")
(id "thumbbclrtxt") (id "thumbbclrtxt")
(name "thumbbclrtxt") (name "thumbbclrtxt")
(value "\#ffffff") (value "#ffffff")
(pattern "\#[0-9A-Fa-f]{6}") (pattern "#[0-9A-Fa-f]{6}")
(title "Hexadecimal RGB color with \"\#\" at the beginning")))))) (title "Hexadecimal RGB color with \"\#\" at the beginning"))))))
(fieldset (@ (class "scrollbar-app__panel")) (fieldset (@ (class "scrollbar-app__panel"))
@ -111,14 +121,14 @@
(type "color") (type "color")
(id "trackclr") (id "trackclr")
(name "trackclr") (name "trackclr")
(value "\#3b4252"))) (value "#3b4252")))
(input (@ (input (@
(type "text") (type "text")
(id "trackclrtxt") (id "trackclrtxt")
(name "trackclrtxt") (name "trackclrtxt")
(value "\#3b4252") (value "#3b4252")
(pattern "\#[0-9A-Fa-f]{6}") (pattern "#[0-9A-Fa-f]{6}")
(title "Hexadecimal RGB color with \"\#\" at the beginning")))) (title "Hexadecimal RGB color with \"#\" at the beginning"))))
(div (@ (class "scrollbar-app__input")) (div (@ (class "scrollbar-app__input"))
(label (@ (for "trackbrad")) "Border radius: ") (label (@ (for "trackbrad")) "Border radius: ")
@ -156,5 +166,9 @@
(button (@ (type "button") (id "sbClearBtn")) "clear output"))) (button (@ (type "button") (id "sbClearBtn")) "clear output")))
(pre (@ (class "scrollbar-app__panel") (style "display: none") (id "sbScssOut"))) (pre (@ (class "scrollbar-app__panel") (style "display: none") (id "sbScssOut")))
(textarea (@ (id "sbTextArea") (readonly "readonly")) "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.") (textarea (@ (id "sbTextArea") (readonly "readonly")) "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.")))
(script (@ (src "scrollbar.js"))))
(load "./src/templates/default.scm")
(display xhtml-1.0-doctype)
(display (serialize-sxml
(default-tpl title content page-name page-desc page-styles page-scripts)))

0
src/webapps/scrollbar.js → src/scripts/webapps/scrollbar.js

227
src/style.scss

@ -1,227 +0,0 @@
;; Copyright (C) 2022 Ivan Polyakov
;;
;; This file is part of vilor's website.
;;
;; Vilor's website is free software: you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation, either version 3 of the License, or
;; (at your option) any later version.
;;
;; Vilor's website is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;; GNU General Public License for more details.
;;
;; You should have received a copy of the GNU General Public License
;; along with this program. If not, see <https://www.gnu.org/licenses/>.
()
'((|html, body|
(height 100%)
(margin 0))
(|body|
(font-family "Arial, sans-serif")
(color white)
(background-color "#3b4252"))
(|.wrapper|
(position relative)
(min-height 100%))
(|.container|
(max-width 937px)
(padding 0 16px)
(margin 0 auto))
(|a|
(color white))
(|a:hover|
(text-decoration none))
(|a:visited|
(color "#bbb"))
;; /general
;; header
(|.header|
(background-color "#262d3e"))
(|.header .container|
(display flex)
(justify-content space-between))
(|.header__logo|
(display inline)
(font-size 24px)
(padding 8px 0)
(margin 0))
(|.header__nav|
(display inline)
(list-style none)
(font-size 16px)
(padding 14px 0)
(margin 0))
(|.header__nav li|
(display inline))
;; /header
;; content
(|.content|
(padding 32px 16px 138px 16px))
(|.content__title|
(font-size 36px)
(margin-top 0)
(margin-bottom 12px))
(|.content__description|
(font-size 20px)
(margin-bottom 24px))
(|.content__description .note|
(font-size 16px)
(margin-top 16px))
(|.content__description p|
(margin 0))
;; /content
;; footer
(|.footer|
(position absolute)
(bottom 0)
(width 100%)
(text-align center)
(background-color "#262d3e")
(padding 14px 0))
(|.footer__authors|
(margin-bottom 5px))
(|.footer .links a|
(margin "0 5px"))
;; /footer
(|.under-construction|
(max-width 300px)
(text-align center)
(margin "0 auto"))
(|.ideas table|
(margin "0 auto"))
(|table, th, td|
(border "1px solid black"))
(|th, td|
(padding "5px"))
(|.scrollbar-app form|
(margin-bottom 10px))
(|.scrollbar-app form fieldset|
(border none)
(padding 0)
(margin 0))
(|.scrollbar-app form .scrollbar-app__panel|
(margin-bottom 16px))
(|.scrollbar-app form h3|
(font-size 24px)
(margin 0))
(|.scrollbar-app form h4|
(font-size 20px)
(margin 12px 0 0 0))
(|.scrollbar-app__panel, .scrollbar-app form .scrollbar-app__panel|
(background-color "#585F70")
(padding 12px))
(|.scrollbar-app__input|
(display inline-block)
(display inline-flex)
(align-items center)
(padding 8px))
(|.scrollbar-app textarea|
("--sb-w" 10px)
("--thumb-clr" "#9b3e46")
("--thumb-bstl" "solid")
("--thumb-bw" 1px)
("--thumb-bclr" white)
("--thumb-brad" 8px)
("--track-clr" "#3b4252")
("--track-brad" 8px)
("--track-mt" 0px)
("--track-mb" 0px)
(height 300px)
(font-size 32px)
(overflow-y scroll)
(scrollbar-width "var(--sb-w)")
(scrollbar-color "var(--thumb-clr) var(--track-clr)")
(margin-top 60px))
(|.scrollbar-app textarea::-webkit-scrollbar|
(width "var(--sb-w)")
(margin-bottom 5px))
(|.scrollbar-app textarea::-webkit-scrollbar-thumb|
(background-color "var(--thumb-clr)")
(border-style "var(--thumb-bstl)")
(border-width "var(--thumb-bw)")
(border-color "var(--thumb-bclr)")
(border-radius "var(--thumb-brad)"))
(|.scrollbar-app textarea::-webkit-scrollbar-track|
(background-color "var(--track-clr)")
(border-radius "var(--track-brad)")
(margin-top "var(--track-mt)")
(margin-bottom "var(--track-mb)"))
(|.scrollbar-app__buttons|
(margin-top 24px))
(|.scrollbar-app__buttons button|
(min-width 149px)
(font-size 18px)
(background-color "#ced9f3")
(padding 14px 25px)
(border none)
(border-radius 4px)
(outline none)
(margin-right 16px))
(|.scrollbar-app__buttons button:hover|
(background-color "#a2b8ed"))
(|.rad-app .rtable|
(width 100%))
(|.rad-app table td > div|
(resize horizontal)
(overflow auto))
(|.rad-app .rad-app__tree ul|
(list-style none)
(padding-left 10px))
(|.rad-app .rad-app__tree ul li|
(padding-left 5px)
(border-left "1px solid #9b3e46"))
(|.rad-app .rad-app__tree ul li:hover|
(background-color "#9b3e46"))
(|.rad-app__viewport|
(color black)
(background-color white)))

111
src/styles/style.scm

@ -0,0 +1,111 @@
;; Copyright (C) 2022 Ivan Polyakov
;;
;; This file is part of vilor's website.
;;
;; Vilor's website is free software: you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation, either version 3 of the License, or
;; (at your option) any later version.
;;
;; Vilor's website is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;; GNU General Public License for more details.
;;
;; You should have received a copy of the GNU General Public License
;; along with this program. If not, see <https://www.gnu.org/licenses/>.
(import scss)
(define global-styles
`(css+
(|html, body|
(height 100%)
(margin 0))
(|body|
(font-family "Arial, sans-serif")
(color white)
(background-color "#3b4252"))
(a
(color white)
((& :hover)
(text-decoration none))
((& :visited)
(color "#bbb")))
(.wrapper
(position relative)
(min-height 100%)
((// > hr)
(display none)))
(.container
(max-width 937px)
(padding 0 16px)
(margin 0 auto))
(.under-construction
(max-width 300px)
(text-align center)
(margin 0 auto))
(.header
(background-color "#262d3e")
((// .container)
(display flex)
(justify-content space-between))
((// .header__logo)
(display inline)
(font-size 24px)
(padding 8px 0)
(margin 0))
((// .header__nav)
(display inline)
(list-style none)
(fonst-size 16px)
(padding 14px 0)
(margin 0)))
(.content
(padding 32px 16px 138px 16px)
((// .content__title)
(font-size 36px)
(margin-top 0)
(margin-bottom 12px))
((// .content__description)
(font-size 20px)
(margin-bottom 24px)
((// .note)
(font-size 16px)
(margin-top 16px))
((// p)
(margin 0))))
(.footer
(position absolute)
(bottom 0)
(width 100%)
(text-align center)
(background-color "#262d3e")
(padding 14px 0)
((// .footer__authors)
(margin-bottom 15px)
((// a)
(margin 0 5px))))))
(write-css global-styles)
(newline)

104
src/styles/webapps/scrollbar.scm

@ -0,0 +1,104 @@
;; Copyright (C) 2022 Ivan Polyakov
;;
;; This file is part of vilor's website.
;;
;; Vilor's website is free software: you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation, either version 3 of the License, or
;; (at your option) any later version.
;;
;; Vilor's website is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;; GNU General Public License for more details.
;;
;; You should have received a copy of the GNU General Public License
;; along with this program. If not, see <https://www.gnu.org/licenses/>.
(import scss)
(define scrollbar-styles
`(css+
(.scrollbar-app
((// form)
(margin-bottom 10px)
((// fieldset)
(border none)
(padding 0)
(margin 0))
((// .scrollbar-app__panel)
(margin-bottom 16px))
((// h3)
(font-size 24px)
(margin 0))
((// h4)
(font-size 20px)
(margin 12px 0 0 0))
((// .scrollbar-app__input)
(display inline-block)
(display inline-flex)
(align-items center)
(padding 8px)))
((// .scrollbar-app__panel)
(background-color "#585f70")
(padding 12px))
((// textarea)
("--sb-w" 10px)
("--thumb-clr" "#9b3e46")
("--thumb-bstl" "solid")
("--thumb-bw" 1px)
("--thumb-bclr" white)
("--thumb-brad" 8px)
("--track-clr" "#3b4252")
("--track-brad" 8px)
("--track-mt" 0px)
("--track-mb" 0px)
(height 300px)
(font-size 32px)
(overflow-y scroll)
(scrollbar-width "var(--sb-w)")
(scrollbar-color "var(--thumb-clr) var(--track-clr)")
(margin-top 60px)
((& ::-webkit-scrollbar)
(width "var(--sb-w)")
(margin-bottom 5px))
((& ::-webkit-scrollbar-thumb)
(background-color "var(--thumb-clr)")
(border-style "var(--thumb-bstl)")
(border-width "var(--thumb-bw)")
(border-color "var(--thumb-bclr)")
(border-radius "var(--thumb-brad)"))
((& ::-webkit-scrollbar-track)
(background-color "var(--track-clr)")
(border-radius "var(--track-brad)")
(margin-top "var(--track-mt)")
(margin-bottom "var(--track-mb)")))
((// .scrollbar-app__buttons)
(margin-top 24px)
((// button)
(min-width 149px)
(font-size 18px)
(background-color "#ced9f3")
(padding 14px 25px)
(border none)
(border-radius 4px)
(outline none)
(margin-right 16px)
((& :hover)
(background-color "#a2b8ed")))))))
(write-css scrollbar-styles)
(newline)

39
src/templates/clean.scm

@ -0,0 +1,39 @@
;; Copyright (C) 2022 Ivan Polyakov
;;
;; This file is part of vilor's website.
;;
;; Vilor's website is free software: you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation, either version 3 of the License, or
;; (at your option) any later version.
;;
;; Vilor's website is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;; GNU General Public License for more details.
;;
;; You should have received a copy of the GNU General Public License
;; along with this program. If not, see <https://www.gnu.org/licenses/>.
(define (clean-tpl
page-title
page-content
#!optional (page-styles '()) (page-scripts '()))
`(html (@ (xmlns "http://www.w3.org/1999/xhtml")
(xml:lang "en")
(lang "en"))
(head
(meta (@ (http-equiv "Content-Type")
(content "text/html; charset=ascii")))
(meta (@ (name "viewport")
(content "width=device-width, initial-scale=1")))
,(map (lambda (l)
`(link (@ (rel "stylesheet") (href ,l))))
page-styles)
(title ,page-title))
(body
,page-content
,(map (lambda (l) `(script (@ (src ,l)))) page-scripts))))

55
src/templates/default.scm

@ -0,0 +1,55 @@
;; Copyright (C) 2022 Ivan Polyakov
;;
;; This file is part of vilor's website.
;;
;; Vilor's website is free software: you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation, either version 3 of the License, or
;; (at your option) any later version.
;;
;; Vilor's website is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;; GNU General Public License for more details.
;;
;; You should have received a copy of the GNU General Public License
;; along with this program. If not, see <https://www.gnu.org/licenses/>.
(load "./src/components/header.scm")
(load "./src/components/footer.scm")
(define (default-tpl
page-title
page-content
page-name
page-desc
#!optional (page-styles '()) (page-scripts '()))
`(html (@ (xmlns "http://www.w3.org/1999/xhtml")
(xml:lang "en")
(lang "en"))
(head
(meta (@ (http-equiv "Content-Type")
(content "text/html; charset=ascii")))
(meta (@ (name "viewport")
(content "width=device-width, initial-scale=1")))
,(map (lambda (l)
`(link (@ (rel "stylesheet") (href ,l))))
page-styles)
(link (@ (rel "stylesheet") (href "/style.css")))
(title ,title))
(body
(div (@ (class "wrapper"))
,header
(hr)
(div (@ (class "content container"))
(h1 (@ (class "content__title")) ,page-name)
(div (@ (class "content__description")) ,page-desc)
,page-content)
(hr)
,footer
,(map (lambda (l) `(script (@ (src ,l)))) page-scripts)))))
Loading…
Cancel
Save