Skip to content

Commit

Permalink
forester 4.0
Browse files Browse the repository at this point in the history
  • Loading branch information
tim-at-topos committed Apr 12, 2024
1 parent c9151ca commit 28555c1
Show file tree
Hide file tree
Showing 29 changed files with 528 additions and 438 deletions.
5 changes: 4 additions & 1 deletion .github/workflows/forester.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,16 @@ jobs:
ocaml-compiler: "5.1"

- name: Install dependencies
run: sudo apt install libev-dev

- name: Install Forester
run: opam install forester

- name: Update environment
run: eval $(opam env)

- name: Build forest
run: opam exec -- forester build trees/
run: opam exec -- forester build forest.toml

- name: Deploy to build branch
uses: JamesIves/[email protected]
Expand Down
4 changes: 4 additions & 0 deletions forest.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[forest]
trees = ["trees"]
root = "index"
base_url = "https://translations.thosgood.com/sga"
123 changes: 123 additions & 0 deletions theme/core.xsl
Original file line number Diff line number Diff line change
@@ -0,0 +1,123 @@
<?xml version="1.0"?>
<!-- SPDX-License-Identifier: CC0-1.0 -->
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:f="http://www.jonmsterling.com/jms-005P.xml"
xmlns:mml="http://www.w3.org/1998/Math/MathML"
xmlns:html="http://www.w3.org/1999/xhtml">

<!-- The following ensures that node not matched by a template will show up as an error. -->
<xsl:template match="node()|@*">
<xsl:copy>
<span style="background-color:red">
<xsl:text>[</xsl:text>
<xsl:value-of select="name(.)" />
<xsl:text>]</xsl:text>
</span>
<span style="background-color:red">
<xsl:apply-templates select="node()|@*" />
</span>
</xsl:copy>
</xsl:template>

<!-- HTML and MathML nodes should be copied with namespace prefixes stripped.-->
<xsl:template match="html:*">
<xsl:element namespace="http://www.w3.org/1999/xhtml" name="{local-name()}">
<xsl:apply-templates select="@* | node()" />
</xsl:element>
</xsl:template>

<xsl:template match="mml:*">
<xsl:element namespace="http://www.w3.org/1998/Math/MathML" name="{local-name()}">
<xsl:apply-templates select="@* | node()" />
</xsl:element>
</xsl:template>

<xsl:template match="f:p">
<p>
<xsl:apply-templates />
</p>
</xsl:template>

<xsl:template match="f:code">
<code>
<xsl:apply-templates />
</code>
</xsl:template>

<xsl:template match="f:pre">
<pre>
<xsl:apply-templates />
</pre>
</xsl:template>

<xsl:template match="f:em">
<em>
<xsl:apply-templates />
</em>
</xsl:template>

<xsl:template match="f:strong">
<strong>
<xsl:apply-templates />
</strong>
</xsl:template>

<xsl:template match="f:ol">
<ol>
<xsl:apply-templates />
</ol>
</xsl:template>

<xsl:template match="f:ul">
<ul>
<xsl:apply-templates />
</ul>
</xsl:template>

<xsl:template match="f:li">
<li>
<xsl:apply-templates />
</li>
</xsl:template>

<xsl:template match="f:blockquote">
<blockquote>
<xsl:apply-templates />
</blockquote>
</xsl:template>


<xsl:template match="f:embedded-tex">
<center>
<img src="resources/{@hash}.svg" />
</center>
</xsl:template>

<xsl:template match="f:error | f:info">
<span class="error">
<xsl:apply-templates />
</span>
</xsl:template>

<xsl:template match="f:info">
<span class="info">
<xsl:apply-templates />
</span>
</xsl:template>



<xsl:template match="f:tex[@display='block']">
<xsl:text>\[</xsl:text>
<xsl:value-of select="." />
<xsl:text>\]</xsl:text>
</xsl:template>

<xsl:template match="f:tex[not(@display='block')]">
<xsl:text>\(</xsl:text>
<xsl:value-of select="." />
<xsl:text>\)</xsl:text>
</xsl:template>

</xsl:stylesheet>
14 changes: 14 additions & 0 deletions theme/default.xsl
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<?xml version="1.0"?>
<!-- SPDX-License-Identifier: CC0-1.0 -->
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

<xsl:output method="html" encoding="utf-8" indent="yes" doctype-public="" doctype-system="" />

<xsl:include href="core.xsl" />
<xsl:include href="metadata.xsl" />
<xsl:include href="links.xsl" />
<xsl:include href="tree.xsl" />

<!-- <xsl:template match="pause"></xsl:template> -->

</xsl:stylesheet>
Binary file removed theme/fonts/KaTeX_AMS-Regular.woff2
Binary file not shown.
Binary file removed theme/fonts/KaTeX_Caligraphic-Regular.ttf
Binary file not shown.
Binary file removed theme/fonts/KaTeX_Caligraphic-Regular.woff2
Binary file not shown.
Binary file removed theme/fonts/KaTeX_Fraktur-Bold.ttf
Binary file not shown.
Binary file removed theme/fonts/KaTeX_Main-Bold.woff
Binary file not shown.
Binary file removed theme/fonts/KaTeX_Main-Bold.woff2
Binary file not shown.
Binary file removed theme/fonts/KaTeX_Main-BoldItalic.ttf
Binary file not shown.
Binary file removed theme/fonts/KaTeX_Main-BoldItalic.woff
Binary file not shown.
Binary file removed theme/fonts/KaTeX_Main-Italic.ttf
Binary file not shown.
Binary file removed theme/fonts/KaTeX_Main-Italic.woff
Binary file not shown.
Binary file removed theme/fonts/KaTeX_Main-Regular.woff
Binary file not shown.
Binary file removed theme/fonts/KaTeX_Math-Italic.ttf
Binary file not shown.
Binary file removed theme/fonts/KaTeX_SansSerif-Regular.ttf
Binary file not shown.
Binary file removed theme/fonts/KaTeX_SansSerif-Regular.woff
Binary file not shown.
Binary file removed theme/fonts/KaTeX_Size2-Regular.ttf
Binary file not shown.
Binary file removed theme/fonts/KaTeX_Size4-Regular.woff
Binary file not shown.
Binary file removed theme/fonts/KaTeX_Typewriter-Regular.ttf
Binary file not shown.
Binary file removed theme/fonts/KaTeX_Typewriter-Regular.woff
Binary file not shown.
Loading

0 comments on commit 28555c1

Please sign in to comment.