diff --git a/pages/article-make-regex-engine-1.typ b/pages/article-make-regex-engine-1.typ index baf1f54..9f5f138 100644 --- a/pages/article-make-regex-engine-1.typ +++ b/pages/article-make-regex-engine-1.typ @@ -17,7 +17,7 @@ ] #if is-web {section[ - Note that the #min-pdf-link[PDF Version] of this page might look a bit better styling wise. + Note that the #gen-min-pdf-link[PDF Version] of this page might look a bit better styling wise. ]} #section[ diff --git a/pages/compiler-pattern-matching.typ b/pages/compiler-pattern-matching.typ index 9b2dd9c..613a823 100644 --- a/pages/compiler-pattern-matching.typ +++ b/pages/compiler-pattern-matching.typ @@ -23,7 +23,7 @@ ] #if is-web {section[ - Note that the #min-pdf-link[PDF Version] of this page might look a bit better styling wise. + Note that the #gen-min-pdf-link[PDF Version] of this page might look a bit better styling wise. ]} #section[ diff --git a/pages/index.typ b/pages/index.typ index ec5e660..0163bbd 100644 --- a/pages/index.typ +++ b/pages/index.typ @@ -1,24 +1,6 @@ #import "../common.typ": * #import "../simple-page-layout.typ": * - -#let gen-page(content) = { - core-page-style[ - #if is-web { - table( - stroke: none, - columns: (25%, 50%, 25%), - [], - [ - #html-style("position: absolute; left: 28%; width: 100%")[ - #box(width: 50%, content) - ] - ], - ) - } else { - content - } - ] -} +#import "../core-page-style.typ": * #let tree-list(..elements) = { gen-tree-from-headings(elemfn: (content, x) => [ @@ -31,7 +13,11 @@ ], elements.pos()) } -#gen-page[ +#simple-page( + gen-table-of-contents: false, + gen-index-ref: false, + min-pdf-link: false, +)[ #br() #title[alex_s168] diff --git a/pages/project-etc-nand.typ b/pages/project-etc-nand.typ index 19494ca..262a094 100644 --- a/pages/project-etc-nand.typ +++ b/pages/project-etc-nand.typ @@ -18,7 +18,7 @@ ] #if is-web {section[ - Note that the #min-pdf-link[PDF Version] of this page might look a bit better styling wise. + Note that the #gen-min-pdf-link[PDF Version] of this page might look a bit better styling wise. You can click the PCB images to switch to the other side. ]} diff --git a/pub.sh b/pub.sh index 64acea2..6b95682 100755 --- a/pub.sh +++ b/pub.sh @@ -1,4 +1,4 @@ set -e ./build.sh scp -r build/* root@195.26.251.204:/srv/http/alex -scp -r res/* root@195.26.251.204:/srv/http/alex/res +#scp -r res/* root@195.26.251.204:/srv/http/alex/res diff --git a/simple-page-layout.typ b/simple-page-layout.typ index eabaf1c..0855d6a 100644 --- a/simple-page-layout.typ +++ b/simple-page-layout.typ @@ -7,13 +7,18 @@ } else { content }] } -#let min-pdf-link(content) = { +#let gen-min-pdf-link(content) = { [#context if is-html() { html.elem("a", attrs:(href:"#",onclick:"gotoMinPdf();"), content) } else { content }] } -#let simple-page(gen-table-of-contents: true, gen-index-ref: true, content) = { +#let simple-page( + gen-table-of-contents: true, + gen-index-ref: true, + min-pdf-link: true, + content) = { + core-page-style[ #if is-web { let off = 3; @@ -24,7 +29,9 @@ html-style(class:"sidebar", "", column-fixed( [#if gen-table-of-contents { [#table-of-contents()] }], - min-pdf-link("Minimal PDF Version"), + [#context if min-pdf-link and is-html() { + gen-min-pdf-link("Minimal PDF Version") + }], [#if gen-index-ref {[ #context br() #context html-href("index.html")[#html-bold[Website Home]]