Skip to content

Commit

Permalink
Add initial version of html/pdf documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
YarikTH committed Jan 4, 2024
1 parent 143a160 commit bd7e5d3
Show file tree
Hide file tree
Showing 14 changed files with 2,688 additions and 0 deletions.
34 changes: 34 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ all:
@echo "Supported targets:"
@echo "* pretty_check - check if all cmake and c++ files are properly formatted"
@echo "* pretty - prettify all cmake and c++ files"
@echo "* docs - generate documentation in doc/html"
@echo "* docs_deploy - deploy documentation to gh-pages"
@echo "* amalgamated - generate ureact_amalgamated.hpp (does prettify first)"
@echo "* integration_check - check library integrations"
@echo "* integration_update - generate integration files"
Expand Down Expand Up @@ -50,6 +52,38 @@ pretty:
@./support/venv.sh $(PRETTY_PY_COMMAND) $(PRETTY_PY_OPTIONS) -


##########################################################################
# Documentation
##########################################################################
ASCIIDOCTOR_COMMON_ARGS = --source-dir ./doc
ASCIIDOCTOR_COMMON_ARGS += --destination-dir ./doc/html

ASCIIDOCTOR_HTML_ARGS = --out-file "index.html"
ASCIIDOCTOR_HTML_ARGS += --backend "html5"
ASCIIDOCTOR_HTML_ARGS += --doctype "article"
ASCIIDOCTOR_HTML_ARGS += --attribute "stylesheet=zajo-dark.css"
ASCIIDOCTOR_HTML_ARGS += --attribute "linkcss"

ASCIIDOCTOR_PDF_ARGS = --out-file "ureact.pdf"
ASCIIDOCTOR_PDF_ARGS += --backend "pdf"
ASCIIDOCTOR_PDF_ARGS += --doctype "book"
ASCIIDOCTOR_PDF_ARGS += --require "asciidoctor-pdf"
ASCIIDOCTOR_PDF_ARGS += --attribute "pdf-themesdir=./doc"
ASCIIDOCTOR_PDF_ARGS += --attribute "pdf-theme=ureact"

# generate documentation in doc/html
docs:
@asciidoctor $(ASCIIDOCTOR_COMMON_ARGS) $(ASCIIDOCTOR_HTML_ARGS) ./doc/readme.adoc
@asciidoctor $(ASCIIDOCTOR_COMMON_ARGS) $(ASCIIDOCTOR_PDF_ARGS) ./doc/readme.adoc
@cp ./doc/skin.png ./doc/zajo-light.css ./doc/rouge-github.css ./doc/html

# deploy documentation to gh-pages
# See https://gist.github.com/cobyism/4730490
docs_deploy:
@echo "Deploying documentation to GitHub pages. Make sure latest documentation is already committed"
@git push origin :gh-pages && git subtree push --prefix doc/html/ origin gh-pages


##########################################################################
# Amalgamated
##########################################################################
Expand Down
19 changes: 19 additions & 0 deletions doc/docinfo.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<meta name="keywords" content="c++,functional-reactive-programming,frp,open source">
<meta name="description" content="Generic C++ library for working with Quaternions, Vectors and Matrices">
<link rel="alternate stylesheet" href="./zajo-light.css">
<script>
function switch_style() {
// See https://stackoverflow.com/a/19844757
const links = document.getElementsByTagName("link");
for (let i = 0; i < links.length; i++) {
const link = links[i];
if (link.rel.indexOf("stylesheet") !== -1 && link.href.includes("zajo-")) {
if (link.rel === "stylesheet") {
link.rel = "alternate stylesheet";
} else {
link.rel = "stylesheet";
}
}
}
}
</script>
240 changes: 240 additions & 0 deletions doc/html/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,240 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="generator" content="Asciidoctor 2.0.16">
<meta name="author" content="Functional Reactive Programming library written in C++17">
<title>µReact</title>
<link rel="stylesheet" href="./zajo-dark.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<link rel="stylesheet" href="./rouge-github.css">
<meta name="keywords" content="c++,functional-reactive-programming,frp,open source">
<meta name="description" content="Generic C++ library for working with Quaternions, Vectors and Matrices">
<link rel="alternate stylesheet" href="./zajo-light.css">
<script>
function switch_style() {
// See https://stackoverflow.com/a/19844757
const links = document.getElementsByTagName("link");
for (let i = 0; i < links.length; i++) {
const link = links[i];
if (link.rel.indexOf("stylesheet") !== -1 && link.href.includes("zajo-")) {
if (link.rel === "stylesheet") {
link.rel = "alternate stylesheet";
} else {
link.rel = "stylesheet";
}
}
}
}
</script>
</head>
<body class="article toc2 toc-left">
<div id="header">
<h1>µReact <div style="z-index: 3; bottom:-9px; right:4px; position:fixed"><input width="32" height="32" type="image" alt="Skin" src="./skin.png" onclick="this.blur();switch_style();return false;"/></div></h1>
<div class="details">
<span id="author" class="author">Functional Reactive Programming library written in C++17</span><br>
</div>
<div id="toc" class="toc2">
<div id="toctitle"></div>
<ul class="sectlevel1">
<li><a href="#_overview">Overview</a>
<ul class="sectlevel2">
<li><a href="#_description">Description</a></li>
<li><a href="#_dependencies">Dependencies</a></li>
<li><a href="#_supported_compilers">Supported Compilers</a></li>
</ul>
</li>
<li><a href="#_tutorial">Tutorial</a>
<ul class="sectlevel2">
<li><a href="#_introduction">Introduction</a></li>
<li><a href="#_essential">Essential</a></li>
<li><a href="#_advanced">Advanced</a></li>
</ul>
</li>
<li><a href="#_reference">Reference</a></li>
</ul>
</div>
</div>
<div id="content">
<div id="preamble">
<div class="sectionbody">
<div class="paragraph text-right">
<p><a href="https://github.com/YarikTH/ureact">GitHub</a> | <a href="https://YarikTH.github.io/ureact/ureact.pdf">PDF</a></p>
</div>
<div class="listingblock">
<div class="content">
<pre class="rouge highlight nowrap"><code data-lang="c++"><span class="k">class</span> <span class="nc">Shape</span>
<span class="p">{</span>
<span class="nl">public:</span>
<span class="kt">int</span> <span class="n">width</span> <span class="o">=</span> <span class="mi">1</span><span class="p">;</span> <i class="conum" data-value="1"></i><b>(1)</b>
<span class="kt">int</span> <span class="n">height</span> <span class="o">=</span> <span class="mi">1</span><span class="p">;</span>
<span class="p">};</span></code></pre>
</div>
</div>
<div class="colist arabic">
<table>
<tr>
<td><i class="conum" data-value="1"></i><b>1</b></td>
<td>dfgsd</td>
</tr>
</table>
</div>
</div>
</div>
<div class="sect1">
<h2 id="_overview">Overview</h2>
<div class="sectionbody">
<div class="admonitionblock note">
<table>
<tr>
<td class="icon">
<i class="fa icon-note" title="Note"></i>
</td>
<td class="content">
add docs
</td>
</tr>
</table>
</div>
<div class="sect2">
<h3 id="_description">Description</h3>
<div class="admonitionblock note">
<table>
<tr>
<td class="icon">
<i class="fa icon-note" title="Note"></i>
</td>
<td class="content">
add docs
</td>
</tr>
</table>
</div>
</div>
<div class="sect2">
<h3 id="_dependencies">Dependencies</h3>
<div class="admonitionblock note">
<table>
<tr>
<td class="icon">
<i class="fa icon-note" title="Note"></i>
</td>
<td class="content">
add docs
</td>
</tr>
</table>
</div>
</div>
<div class="sect2">
<h3 id="_supported_compilers">Supported Compilers</h3>
<div class="admonitionblock note">
<table>
<tr>
<td class="icon">
<i class="fa icon-note" title="Note"></i>
</td>
<td class="content">
add docs
</td>
</tr>
</table>
</div>
</div>
</div>
</div>
<div class="sect1">
<h2 id="_tutorial">Tutorial</h2>
<div class="sectionbody">
<div class="admonitionblock note">
<table>
<tr>
<td class="icon">
<i class="fa icon-note" title="Note"></i>
</td>
<td class="content">
add docs
</td>
</tr>
</table>
</div>
<div class="sect2">
<h3 id="_introduction">Introduction</h3>
<div class="admonitionblock note">
<table>
<tr>
<td class="icon">
<i class="fa icon-note" title="Note"></i>
</td>
<td class="content">
add docs
</td>
</tr>
</table>
</div>
</div>
<div class="sect2">
<h3 id="_essential">Essential</h3>
<div class="admonitionblock note">
<table>
<tr>
<td class="icon">
<i class="fa icon-note" title="Note"></i>
</td>
<td class="content">
add docs
</td>
</tr>
</table>
</div>
</div>
<div class="sect2">
<h3 id="_advanced">Advanced</h3>
<div class="admonitionblock note">
<table>
<tr>
<td class="icon">
<i class="fa icon-note" title="Note"></i>
</td>
<td class="content">
add docs
</td>
</tr>
</table>
</div>
</div>
</div>
</div>
<div class="sect1">
<h2 id="_reference">Reference</h2>
<div class="sectionbody">
<div class="admonitionblock note">
<table>
<tr>
<td class="icon">
<i class="fa icon-note" title="Note"></i>
</td>
<td class="content">
add docs
</td>
</tr>
</table>
</div>
<hr>
<div class="paragraph text-right">
<p>Documentation rendered by <a href="https://asciidoctor.org/">Asciidoctor</a> with <a href="https://github.com/boostorg/qvm/tree/develop/doc">these customizations</a> that are based on <a href="https://github.com/zajo/asciidoctor_skin">these customizations</a>.</p>
</div>
<div class="paragraph text-right">
<p>Copyright 2014-2017 Sebastian Jeckel, 2020-2024 Yaroslav Krylov.</p>
</div>
</div>
</div>
</div>
<div id="footer">
<div id="footer-text">
</div>
</div>
</body>
</html>
Loading

0 comments on commit bd7e5d3

Please sign in to comment.