From 6860a62ba514242dd44631409d74a5f8f5571d41 Mon Sep 17 00:00:00 2001 From: Pomax Date: Sat, 26 Sep 2020 09:37:38 -0700 Subject: [PATCH] rss icon --- docs/images/rss.png | Bin 0 -> 1737 bytes docs/index.html | 6 ++++-- docs/ja-JP/index.html | 6 ++++-- docs/news/2020-09-18.html | 21 ++++++++++++--------- docs/news/2020-09-18.md | 8 ++++---- docs/news/index.html | 2 +- docs/news/rss.xml | 10 +++++----- docs/style.css | 6 ++++++ docs/zh-CN/index.html | 6 ++++-- src/html/index.template.html | 2 +- 10 files changed, 41 insertions(+), 26 deletions(-) create mode 100644 docs/images/rss.png diff --git a/docs/images/rss.png b/docs/images/rss.png new file mode 100644 index 0000000000000000000000000000000000000000..d64c669c7589d3a886682dbd1f3c83b716a420f5 GIT binary patch literal 1737 zcmV;)1~&PLP)sAF&N>2z!Fdr4Imm26om*2a>%jE0(;Kv%yf78|JB{oGfPNxX8x(_?yCCg`;V_$ zXsz+vi(@PROR2wt+9on+`tt9tz79KlSO2H>IyGO>#kRR$cU=`Hmyc#J&lVDyanqor z1tA1LcZEeQ^@U{`(^^*e%-kna7Wft+z>JVkoMv=$6&UWDkQ$<2lKHssGAf!lTvqVr4)B+FQFUkn06c#WX1OxA_5 z;;t4x27iQdkQg)F7+O{!f8h`chd+YqxfC)gbK_tz9fLAfFeIEn@r7e^t8mW`EtHtl zf~sX-Ks>w(zD$JfL<}?-ObbNSqyoSo8EhI@Me*$0_W}BkY=u=l5_at*Bqz>Bs-YQ{ zos4mvG?H^x!JY63{2$(dmAw(OgDBN4r@D?n>1$kSvMo%1n@ne~L*#Ej+@`@-enjuF z&(K|SKhjN0k!f56nXE1WtNKQG3pT>t|2pJAM+hc@!uQ#Vl>I(@D{D3pxKswlb>~tD zb^TOW4Rc`CjDzjiNDWa)=dPf5=zVl-eHJ}`?5*&!96k~1@ekpr?gI+6@IV)I-%YZ1 z=-v+aWGLp%CKUe#s$sz;wpp^;mX)Y(TnOzI;dNa_{>&cebNk>B1K00F_Tam4Z(qQO zd23_Pq2no`*2DW|3GJHdIgFd8T4NJhnrn;yjGBaL&ff6-AOJ$zP&E^gesm2|&uoXB zvj$EwiHzuj`}0P$f4kO{ObL|Si{@9rxo7|l7_S!?%oAqFYC^>-3Q9eduY7-u)FfIoCHc?ZV)@-|{<8PO#m0!q@K`h=j&~-o;Qk3aNwz=j=|n zt*@f@(}n2RJRjZ1wpX$pMoIGICP*h?K<~6}fS2ozSx$Zo7}Z$8j=^Jwto#h>^+V-5 z;CNj~*)B4qf2rJg3h)YcC8lmRCX=+ze4R)W{Rjv-OrYtP6i`tkW#ZBZo zAquzQ)1pNRc%A~zt)gVgBrSNqe~I>8uMwtO7Oxi|M?C$Fs^Ts74UpfJM^h3sV?wMW0WJehh2{~g4ogxB$XB+z3 zj>dqsQ-JDmG0PG|RvIr$F{C4kCg$jP$}HFbr*4{YjY!qNUc40!F-=kycOU+QnB?Mx z8|Kk4n-6^So&Tjm@IeU{f$7jOq0(5vX+iOD$&HEn>6Ln&9A*v|n??7|MdU7@C{vjR z$f_|A5hO^O4ut*#ZxgtJGkT`cL-*i%v!F$w>{{>2ab(X< zB7{67ze4nP(?WE=r;}pbYUptK=i7b_Vo0DObgB4h*)ZMw#4Moef;n1P)m$$SapFyk zgn28|VG$Q8#!==OS!68?6Qk&A<31f;^D`aBP}NOF+u83;43FmqXr@XA^@G5zL#R|Z z-6OEbB$o=0VUJMXVpoM`Q5^X>w^j&dHb$?C`9O1za}2k1oIVYauA>==_^=F>L6=L^ zy)3G=Vq5~I&uoz(IUI+sizYAj3Qn3MPY>NxTc2EAJ9P$ - + @@ -117,7 +117,9 @@
-

A Primer on Bézier Curves

+

+ A Primer on Bézier Curves +

A free, online book for when you really need to know how to do Bézier things.

Read this in your own language:
    diff --git a/docs/ja-JP/index.html b/docs/ja-JP/index.html index 7245b39c..766323a6 100644 --- a/docs/ja-JP/index.html +++ b/docs/ja-JP/index.html @@ -33,7 +33,7 @@ - + @@ -119,7 +119,9 @@
    -

    ベジェ曲線入門

    +

    + ベジェ曲線入門 +

    A free, online book for when you really need to know how to do Bézier things.

    Read this in your own language:
      diff --git a/docs/news/2020-09-18.html b/docs/news/2020-09-18.html index a01101b2..671092a3 100644 --- a/docs/news/2020-09-18.html +++ b/docs/news/2020-09-18.html @@ -27,7 +27,7 @@ - + @@ -121,10 +121,10 @@ something, several years later you have quite the monster, and a single HTML file becomes intractible.

      - So, in 2016, when React.js exploded onto the scene, I rewrote the primer as a React app, and it became a lot easier to - maintain. Like, a lot a lot. However, there was a downside: no JS meant no content. Sure, server-side rendering sort of existed, but - not really, and because the Primer is hosted through github, there was no "server" to run. Plus, trying to rehydrate an app the size of the - Primer from a giant HTML file had truly dire performance. + So, in 2016, when React.js exploded onto the scene, I rewrote the primer as a React app, and it became a + lot easier to maintain. Like, a lot a lot. However, there was a downside: no JS meant no content. Sure, server-side rendering sort of + existed, but not really, and because the Primer is hosted through github, there was no "server" to run. Plus, trying to rehydrate an app the + size of the Primer from a giant HTML file had truly dire performance.

      So I left it a regular React app, and every time I thought "wouldn't it be nice if it was just... a web page again?" the browser landscape @@ -146,7 +146,10 @@ Chapter content written as easy to read and write markdown format: view this blog post's source file.

    • A custom <graphics-element> element that turns a src="blah.js" into an interactive canvas graphic...
    • -
    • ...with that same source code being read in and run by Node.js on a canvas to generate fallback images.
    • +
    • + ...with that same source code being read in and run by Node.js on a canvas to generate fallback images so that even without JS, + graphics work. +
    @@ -160,8 +163,8 @@
    • - Real LaTeX code, that gets compiled into optimized SVG using xelatex, pdfcrop, pdf2svg, and - svgo: + Real LaTeX code, that gets saved as .tex file, so it can be compiled into optimized SVG using xelatex, + pdfcrop, pdf2svg, and svgo:
    @@ -249,7 +252,7 @@ draw() { you know where to go.

    See you in the next post!

    -

    — Pomax

    +

    Pomax


    diff --git a/docs/news/2020-09-18.md b/docs/news/2020-09-18.md index 73a4fef8..2c50de26 100644 --- a/docs/news/2020-09-18.md +++ b/docs/news/2020-09-18.md @@ -2,7 +2,7 @@ Once upon a time, I needed to draw some Bezier curves because I was trying to create a Japanese kanji composition system that turned strokes into outlines, and that required knowing how to offset Bezier curves and... at the time (2011, time flies) there was no good single source of information for Bezier curves on the web. So I made one. Sure it started small, but it turns out that if you just keep adding bits to something, several years later you have quite the monster, and a single HTML file becomes intractible. -So, in 2016, when [React.js]() exploded onto the scene, I rewrote the primer as a React app, and it became a lot easier to maintain. Like, _a lot_ a lot. However, there was a downside: no JS meant no content. Sure, server-side rendering sort of existed, but not really, and because the Primer is hosted through github, there was no "server" to run. Plus, trying to rehydrate an app the size of the Primer from a giant HTML file had truly _dire_ performance. +So, in 2016, when [React.js](https://reactjs.org/) exploded onto the scene, I rewrote the primer as a React app, and it became a lot easier to maintain. Like, _a lot_ a lot. However, there was a downside: no JS meant no content. Sure, server-side rendering sort of existed, but not really, and because the Primer is hosted through github, there was no "server" to run. Plus, trying to rehydrate an app the size of the Primer from a giant HTML file had truly _dire_ performance. So I left it a regular React app, and every time I thought "wouldn't it be nice if it was just... a web page again?" the browser landscape just hadn't caught up. Finally, in 2020, things are different: with a global pandemic, and some vacation time, and something random causing me to look up the state of HTML custom elements, everything was pointing at it being time to finally, _finally_, turn the Primer back into a normal web page. @@ -15,13 +15,13 @@ To give a bit of a teaser, some of the things I'll be writing about: - Using modern ES module code that runs in both the browser and Node.js. - Chapter content written as easy to read and write markdown format: view this blog post's source file. - A custom `<graphics-element>` element that turns a `src="blah.js"` into an interactive canvas graphic... -- ...with that same source code being read in and run by Node.js _on a canvas_ to generate fallback images. +- ...with that same source code being read in and run by Node.js _on a canvas_ to generate fallback images so that even without JS, graphics work.
    -- Real LaTeX code, that gets compiled into optimized SVG using `xelatex`, `pdfcrop`, `pdf2svg`, and `svgo`: +- Real LaTeX code, that gets saved as `.tex` file, so it can be compiled into optimized SVG using `xelatex`, `pdfcrop`, `pdf2svg`, and `svgo`:
    \[ @@ -65,4 +65,4 @@ Enjoy [The new Primer on Bézier Curves](https://pomax.github.io/bezierinfo), an See you in the next post! -— Pomax +— [Pomax](https://twitter.com/TheRealPomax) diff --git a/docs/news/index.html b/docs/news/index.html index b52df321..42c968ea 100644 --- a/docs/news/index.html +++ b/docs/news/index.html @@ -26,7 +26,7 @@ - + diff --git a/docs/news/rss.xml b/docs/news/rss.xml index 3abc199f..fdd9baaf 100644 --- a/docs/news/rss.xml +++ b/docs/news/rss.xml @@ -6,7 +6,7 @@ News updates for the primer on Bézier Curves by Pomax en-GB - Fri Sep 25 2020 21:26:45 +00:00 + Sat Sep 26 2020 09:36:40 +00:00 https://pomax.github.io/bezierinfo/images/og-image.png A Primer on Bézier Curves @@ -19,7 +19,7 @@ <p>Once upon a time, I needed to draw some Bezier curves because I was trying to create a Japanese kanji composition system that turned strokes into outlines, and that required knowing how to offset Bezier curves and... at the time (2011, time flies) there was no good single source of information for Bezier curves on the web. So I made one. Sure it started small, but it turns out that if you just keep adding bits to something, several years later you have quite the monster, and a single HTML file becomes intractible.</p> -<p>So, in 2016, when <a href="">React.js</a> exploded onto the scene, I rewrote the primer as a React app, and it became a lot easier to maintain. Like, <em>a lot</em> a lot. However, there was a downside: no JS meant no content. Sure, server-side rendering sort of existed, but not really, and because the Primer is hosted through github, there was no "server" to run. Plus, trying to rehydrate an app the size of the Primer from a giant HTML file had truly <em>dire</em> performance.</p> +<p>So, in 2016, when <a href="https://reactjs.org/">React.js</a> exploded onto the scene, I rewrote the primer as a React app, and it became a lot easier to maintain. Like, <em>a lot</em> a lot. However, there was a downside: no JS meant no content. Sure, server-side rendering sort of existed, but not really, and because the Primer is hosted through github, there was no "server" to run. Plus, trying to rehydrate an app the size of the Primer from a giant HTML file had truly <em>dire</em> performance.</p> <p>So I left it a regular React app, and every time I thought "wouldn't it be nice if it was just... a web page again?" the browser landscape just hadn't caught up. Finally, in 2020, things are different: with a global pandemic, and some vacation time, and something random causing me to look up the state of HTML custom elements, everything was pointing at it being time to finally, <em>finally</em>, turn the Primer back into a normal web page.</p> <p>The new tech stack is, frankly, pretty amazing. It does some things that weren't possible even half a year before I started the rewrite, let alone being possible in 2016, and so because so much has changed, this post will be the first in a series of posts on how the new tech stack works.</p> <p>To give a bit of a teaser, some of the things I'll be writing about:</p> @@ -29,7 +29,7 @@ <li>Using modern ES module code that runs in both the browser and Node.js.</li> <li>Chapter content written as easy to read and write markdown format: <a href="./news/2020-09-18.md">view this blog post's source file</a>.</li> <li>A custom <code>&lt;graphics-element&gt;</code> element that turns a <code>src="blah.js"</code> into an interactive canvas graphic...</li> -<li>...with that same source code being read in and run by Node.js <em>on a canvas</em> to generate fallback images.</li> +<li>...with that same source code being read in and run by Node.js <em>on a canvas</em> to generate fallback images so that even without JS, graphics work.</li> </ul> <blockquote> <graphics-element title="An example graphic" width="275" height="275" src="./news/example.js" > @@ -41,7 +41,7 @@ </blockquote> <ul> -<li>Real LaTeX code, that gets compiled into optimized SVG using <code>xelatex</code>, <code>pdfcrop</code>, <code>pdf2svg</code>, and <code>svgo</code>:</li> +<li>Real LaTeX code, that gets saved as <code>.tex</code> file, so it can be compiled into optimized SVG using <code>xelatex</code>, <code>pdfcrop</code>, <code>pdf2svg</code>, and <code>svgo</code>:</li> </ul> <blockquote> <img class="LaTeX SVG" src="./images/news/2020-09-18.html/15225da473048d8c7b5b473b89de0b66.svg" width="401px" height="97px" loading="lazy"> @@ -91,7 +91,7 @@ draw() { <p>It's going to take me a while to detail the entire tech stack, but ultimately what matters is that you get a Primer that is a normal "vanilla" HTML, CSS, and JS page again, that "just works" even with JS disabled.</p> <p>Enjoy <a href="https://pomax.github.io/bezierinfo">The new Primer on Bézier Curves</a>, and if you find any problems, <a href="https://github.com/Pomax/BezierInfo-2/issues">you know where to go</a>.</p> <p>See you in the next post!</p> -<p>— Pomax</p> +<p>— <a href="https://twitter.com/TheRealPomax">Pomax</a></p> Thu Sep 17 2020 17:00:00 +00:00 diff --git a/docs/style.css b/docs/style.css index c45ac266..b7132e57 100644 --- a/docs/style.css +++ b/docs/style.css @@ -436,3 +436,9 @@ table.code tr td:first-child { cursor: default; border-right: 1px solid red; } + +a.rss-link { + position: relative; + z-index: 10; + float: right; +} diff --git a/docs/zh-CN/index.html b/docs/zh-CN/index.html index 057e06ec..69116701 100644 --- a/docs/zh-CN/index.html +++ b/docs/zh-CN/index.html @@ -33,7 +33,7 @@ - + @@ -119,7 +119,9 @@
    -

    贝塞尔曲线底漆

    +

    + 贝塞尔曲线底漆 +

    A free, online book for when you really need to know how to do Bézier things.

    Read this in your own language:
      diff --git a/src/html/index.template.html b/src/html/index.template.html index a383ed2b..19fababc 100644 --- a/src/html/index.template.html +++ b/src/html/index.template.html @@ -44,7 +44,7 @@
      {% block header %} -

      {{ title }}

      +

      {{ title }}

      {{ subtitle }}

      {{ langSwitchLabel }}
        {{ langSwitcher }}