yumaikas gist felülvizsgálása 4 days ago. Revízióhoz ugrás
2 files changed, 87 insertions
junglecoder.css.st(fájl létrehozva)
| @@ -0,0 +1,39 @@ | |||
| 1 | + | body: {[ | |
| 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 | + | ||
| 10 | + | body,input,textarea: {[ | |
| 11 | + | background: Theme .bg | |
| 12 | + | color: Theme .fg | |
| 13 | + | ] | |
| 14 | + | ||
| 15 | + | blockquote: {[ | |
| 16 | + | font-style: italic: | |
| 17 | + | ] | |
| 18 | + | td: {[ margin: 5px: ] | |
| 19 | + | a: {[ color: Theme .a ] | |
| 20 | + | ||
| 21 | + | a:visited: {[ color: Theme .av ] | |
| 22 | + | pre:has(code): {[ | |
| 23 | + | padding: 5px: | |
| 24 | + | border: %s[ 1px teal solid ] | |
| 25 | + | ] | |
| 26 | + | ||
| 27 | + | code: {[ | |
| 28 | + | color: burlywood: | |
| 29 | + | white-space: nowrap: | |
| 30 | + | ] | |
| 31 | + | ||
| 32 | + | "pre code" {[ | |
| 33 | + | white-space: unset: | |
| 34 | + | ] | |
| 35 | + | ||
| 36 | + | h2,h3,h4,h5,h6: {[ | |
| 37 | + | margin-top: 40px: | |
| 38 | + | ] | |
| 39 | + | ||
junglecoder.project.st(fájl létrehozva)
| @@ -0,0 +1,48 @@ | |||
| 1 | + | css: 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 | + | ||
| 13 | + | Theme: 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 | + | ||
| 22 | + | project[ | |
| 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 | + | ] | |
Újabb
Régebbi