suckless, page.ss example

This commit is contained in:
voidlizard 2025-02-03 08:00:37 +03:00
parent ac12723dd1
commit 4aee79eb66
1 changed files with 33 additions and 29 deletions

View File

@ -1,62 +1,66 @@
[define source [json:file miscellaneous/fuzzy-parse/nix/pkgs.json]] [define source [json:file miscellaneous/fuzzy-parse/nix/pkgs.json]]
; iterate println source
print print
[html :html [kw] [html :html [kw]
[html :head [kw] [html :head [kw]
[html :title [kw] "Suckless HTML Page"] [html :title [kw] Suckless HTML Page]
[html :meta [kw :charset "UTF-8"]] [html :meta [kw :charset UTF-8]]
[html :style [kw] [html :style [kw]
[css body [kw font-family sans-serif margin 40px]] [css body [kw font-family sans-serif margin-left 20px max-width 1024px]]
[css table [kw border-collapse "collapse width 100%"]] [css table [kw border-collapse collapse width auto]]
[css (list td th) [kw border "1px solid #ccc" [css (list td th) [kw border [sym (unwords 1px solid #ccc)]
padding 8px padding 8px
text-align left]] text-align left]]
[css th [kw background-color #f2f2f2]] [css th [kw background-color #f2f2f2 white-space nowrap]]
[css .che [kw margin-right 8px]] [css .che [kw margin-right 8px]]
] ]
] ]
[html :body [kw] [html :body [kw]
[html :h1 [kw] "Пример страницы"] [html :h1 [kw] Example Page]
[html :h2 [kw] "Сделано на Suckless Script"] [html :h2 [kw] Built with Suckless Script]
[html :p [kw] "Это пример страницы, созданной в `hbs2`."] [html :p [kw] This is an example page generated using hbs2.]
[html :form [kw action "#" method "POST"] [html :form [kw action # method POST]
[html :label [kw for "cb1"] [html :label [kw for cb1]
[html :input [kw :type checkbox name :checkbox1 :id cb1 :class che]] [html :input [kw :type checkbox name checkbox1 :id cb1 :class che]]
"Согласен с условиями" I agree with the terms
] ]
[html :br] [html :br]
[html :input [kw :type text :name username :placeholder "Введите имя"]] [html :input [kw :type text :name username :placeholder Enter your name]]
[html :br] [html :br]
[html :input [kw :type submit :value "Отправить"]] [html :input [kw :type submit :value Submit]]
] ]
[html :br] [html :br]
[html :p [kw] [html :p [kw]
"Этот текст с " This text contains
[html :b [kw] "жирным"] [html :b [kw] bold]
", " ,
[html :i [kw] "курсивом"] [html :i [kw] italic]
" и " and
[html :u [kw] "подчёркнутым"] [html :u [kw] underlined]
" стилями." styles.
] ]
[html :br] [html :br]
; Unicode test section
[html :p [kw] Russian: Привет, мир!]
[html :p [kw] Chinese: 你好世界]
[html :p [kw] Korean: 안녕하세요, 세계!]
[html :br]
[html :table [kw] [html :table [kw]
[html :thead [kw] [html :thead [kw]
[html :tr [kw] [html :tr [kw]
[html [kw] :td] [html :th [kw] Package]
[html [kw] :td] [html :th [kw] Version]
] ]
] ]
@ -69,8 +73,8 @@ print
[html :br] [html :br]
[html :p [kw] [html :p [kw]
Подробнее читайте на For more information, visit
[html :a [kw href "http://example.com"] нашем сайте] [html :a [kw href http://example.com] our website]
"." "."
] ]
] ]