Ultima attività 4 days ago

Revisione d3b0b8daef24cfad332d87ad7a93684a0d04ca3c

junglecoder.css.st Raw Playground
1body: {[
2 max-width: 800px:
3 width: 90%:
4 font-size: 20px:
5 font-family: %s[ Verdana, Geneva, Tahoma, sans-serif ]
6 margin-left: auto:
7 margin-right: auto:
8]
9
10body,input,textarea: {[
11 background: Theme .bg
12 color: Theme .fg
13]
14
15blockquote: {[
16 font-style: italic:
17]
18td: {[ margin: 5px: ]
19a: {[ color: Theme .a ]
20
21a:visited: {[ color: Theme .av ]
22pre:has(code): {[
23 padding: 5px:
24 border: %s[ 1px teal solid ]
25]
26
27code: {[
28 color: burlywood:
29 white-space: nowrap:
30]
31
32"pre code" {[
33 white-space: unset:
34]
35
36h2,h3,h4,h5,h6: {[
37 margin-top: 40px:
38]
39
40
junglecoder.project.st Raw Playground
1css: fn[
2 temp[ { ]
3 {: fn[ >q
4 ^[ @ ] " {" /nl
5 q> Array .[ of pairs ] each[ .[ 0 at ^[ >k ] 1 at ^[ >v ] ]
6 " " k ": " v ";" /nl
7 ]
8 "}" /nl
9 ]
10 Array .of .[ "" join ]
11]
12
13Theme: is-obj[
14 theme: fn[ av: <-[ swap ] a: <-[ swap ] fg: <-[ swap ] bg: <-[ swap ] ]
15
16 aqua: fn[ "#191e2a" "#21ef9f" "aqua" "#32e6e6" theme ]
17 forest: fn[ "#191e2a" "#daffac" "#32e667" "#32e667" theme ]
18 qbasic: fn[ "#0000aa" "#e8e8e8" "#aaaaaa" "#aaaaaa" theme ]
19 stark: fn[ "black" "white" "white" "grey" theme ]
20]
21
22project[
23
24 css-test: cmd[ Theme .aqua style.css.stk: css[ StackTalk .load-file ] /l ]
25 build: cmd[
26 Array .new >pages
27 "**/*.pstk" Directory .glob each[
28 if[ dup .file? :then pages .push :else void ]
29 ]
30 "@pages/web.stk" StackTalk .load-file
31 #page: module/extend[ style.css.stk: ^[ Theme .aqua css[ StackTalk .load-file ] ] >style ]
32 #markup: module/extend[
33 link: fryn[ " " write @link> " " write ]
34 ]
35
36 source-of: fn[ .[ Path .[ "." of[ path name ] relative ] ] ]
37 dest-of: fn[ .[
38 Path .[
39 "." of[ path name Path .parse .name ".html" + ] relative
40 "content/" "site/" String .replace ] ] ]
41 NB[ Directory .[ try[ site: rmr :catch void ] static: site: copy ] ]
42
43 Set .of[ pages each[ dest-of Path .parse .dir ] ] >destFolders
44
45 destFolders each[ Directory .ensure ]
46 pages each[ >p p. dest-of p> source-of /t StackTalk .load-file ]
47 ]
48]
49