Browse Source

remaked pages

pull/1/head
Ivan Polyakov 3 years ago
parent
commit
6dbdc9fe06
  1. 19
      src/pages/contacts.scm
  2. 19
      src/pages/index.scm
  3. 55
      src/pages/webapps/index.scm
  4. 50
      src/pages/webapps/scrollbar.scm
  5. 0
      src/scripts/webapps/scrollbar.js
  6. 227
      src/style.scss
  7. 111
      src/styles/style.scm
  8. 104
      src/styles/webapps/scrollbar.scm
  9. 7
      src/templates/default.scm
  10. 24
      src/webapps/index.sxml

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

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

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

@ -15,9 +15,20 @@ @@ -15,9 +15,20 @@
;; You should have received a copy of the GNU General Public License
;; along with this program. If not, see <https://www.gnu.org/licenses/>.
((title . "vilor")
(page-name . "home"))
(import sxml-serializer)
'(div (@ (class "under-construction"))
(load "./src/general.scm")
(define title "vilor")
(define page-name "home")
(define page-desc '())
(define content
'(div (@ (class "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 @@ @@ -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 @@ @@ -15,12 +15,22 @@
;; You should have received a copy of the GNU General Public License
;; along with this program. If not, see <https://www.gnu.org/licenses/>.
((title . "vilor/webapps/scrollbar")
(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."))))
(import sxml-serializer)
'(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.")
(form
(fieldset (@ (class "scrollbar-app__panel"))
@ -43,14 +53,14 @@ @@ -43,14 +53,14 @@
(type "color")
(id "thumbclr")
(name "thumbclr")
(value "\#9b3e46")))
(value "#9b3e46")))
(input (@
(type "text")
(id "thumbclrtxt")
(name "thumbclrtxt")
(value "\#9b3e46")
(pattern "\#[0-9A-Fa-f]{6}")
(title "Hexadecimal RGB color with \"\#\" at the beginning"))))
(value "#9b3e46")
(pattern "#[0-9A-Fa-f]{6}")
(title "Hexadecimal RGB color with \"#\" at the beginning"))))
(fieldset
(h4 "Border:")
@ -94,13 +104,13 @@ @@ -94,13 +104,13 @@
(type "color")
(id "thumbbclr")
(name "thumbbclr")
(value "\#ffffff")))
(value "#ffffff")))
(input (@
(type "text")
(id "thumbbclrtxt")
(name "thumbbclrtxt")
(value "\#ffffff")
(pattern "\#[0-9A-Fa-f]{6}")
(value "#ffffff")
(pattern "#[0-9A-Fa-f]{6}")
(title "Hexadecimal RGB color with \"\#\" at the beginning"))))))
(fieldset (@ (class "scrollbar-app__panel"))
@ -111,14 +121,14 @@ @@ -111,14 +121,14 @@
(type "color")
(id "trackclr")
(name "trackclr")
(value "\#3b4252")))
(value "#3b4252")))
(input (@
(type "text")
(id "trackclrtxt")
(name "trackclrtxt")
(value "\#3b4252")
(pattern "\#[0-9A-Fa-f]{6}")
(title "Hexadecimal RGB color with \"\#\" at the beginning"))))
(value "#3b4252")
(pattern "#[0-9A-Fa-f]{6}")
(title "Hexadecimal RGB color with \"#\" at the beginning"))))
(div (@ (class "scrollbar-app__input"))
(label (@ (for "trackbrad")) "Border radius: ")
@ -156,5 +166,9 @@ @@ -156,5 +166,9 @@
(button (@ (type "button") (id "sbClearBtn")) "clear output")))
(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.")
(script (@ (src "scrollbar.js"))))
(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.")))
(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 @@ @@ -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 @@ @@ -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 @@ @@ -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)

7
src/templates/default.scm

@ -41,14 +41,15 @@ @@ -41,14 +41,15 @@
(title ,title))
(body
(div (@ (class "wrapper"))
,header
(hr (@ (style "display: none")))
(hr)
(div (@ (class "content container"))
(h1 (@ (class "content__title")) ,page-name)
(div (@ (class "content__description")) ,page-desc)
,page-content)
(hr (@ (style "display: none")))
(hr)
,footer
,(map (lambda (l) `(script (@ (src ,l)))) page-scripts))))
,(map (lambda (l) `(script (@ (src ,l)))) page-scripts)))))

24
src/webapps/index.sxml

@ -1,24 +0,0 @@ @@ -1,24 +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/>.
((title . "vilor/webapps")
(page-name . "webapps"))
'(div (@ (class "webapps"))
(ul
(li
(a (@ (href "scrollbar.html")) "Scrollbar styling"))))
Loading…
Cancel
Save