- Commit
- c4d7345fa81bfa6d451b92dd3b1b2798a6d69df9
- Parent
- bfa14940aed0da732da212d17e8451e0a337deca
- Author
- Pablo <pablo-pie@riseup.net>
- Date
Grouped the HTML source files
Also added a paragraph in outro.html on the tikz-gallery-generator tool
Custum build of stapix for tikz.pablopie.xyz
Grouped the HTML source files
Also added a paragraph in outro.html on the tikz-gallery-generator tool
7 files changed, 68 insertions, 63 deletions
| Status | Name | Changes | Insertions | Deletions |
| Added | src/html/intro.html | 1 file changed | 9 | 0 |
| Added | src/html/license.html | 1 file changed | 12 | 0 |
| Added | src/html/outro.html | 1 file changed | 40 | 0 |
| Deleted | src/intro.html | 1 file changed | 0 | 9 |
| Deleted | src/license.html | 1 file changed | 0 | 12 |
| Modified | src/main.rs | 2 files changed | 7 | 7 |
| Deleted | src/outro.html | 1 file changed | 0 | 35 |
diff --git /dev/null b/src/html/intro.html @@ -0,0 +1,9 @@ +<h1>TikZ gallery</h1> +<p> +A gallery with ready-made mathematical drawings for use in LaTeX documents and +Beamer presentations — as well as their source code! Other than a +platform for distributing the figures themselves, this gallery is also supposed +to be an educational resource on +<a href="https://github.com/pgf-tikz/pgf">TikZ</a>, allowing users to inspect +and modify the source code of the drawings to fit their needs. +</p>
diff --git /dev/null b/src/html/license.html @@ -0,0 +1,12 @@ +<!-- This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see <https://www.gnu.org/licenses/>. -->
diff --git /dev/null b/src/html/outro.html @@ -0,0 +1,40 @@ +<section id="using"> +<h2>using this gallery</h2> +<p> +For details on a figure in this gallery please access its entry page, where you +will find information such as captions and pointers the original source, if +available. In this page you may also find pointers to the author, as well +licensing information. +</p> +<p> +Most (<strong><em>but not all</em></strong>) of the drawings in here are +licensed under free <a href="https://creativecommons.org/">Creative Commons</a> +licenses, allowing users to modify and distribute their source code. Please +verify the license terms of each specific figure before using it in your +documents. See <a href="./include.html">including the figures</a> for +instructions on how to include a given picture in your documents. +</p> +</section> + +<section id="contributing"> +<h2>contributing</h2> +<p> +As of now, this gallery is run by <a href="https://www.math.univ-toulouse.fr/~tbrevide/">Thiago Brevidelli</a>. If +you would like to add your drawings to here please contact +<a href="mailto:thiago.brevidelli_garcia@math.univ-toulouse.fr">thiago.brevidelli_garcia@math.univ-toulouse.fr</a>. +</p> + +<p> +This gallery is powered by +<a href="https://git.pablopie.xyz/tikz-gallery-generator/">tikz_gallery_generator</a>. +</p> +</section> + +<section id="other-galleries"> +<h2>other galleries</h2> +<ul> +<li><a href="https://texample.net/tikz/examples/">TeXample.net</a></li> +<li><a href="https://tikz.net/">TikZ.net</a></li> +<li><a href="https://tikz.fr/">TikZ.fr</a></li> +</ul> +</section>
diff --git a/src/intro.html /dev/null @@ -1,9 +0,0 @@ -<h1>TikZ gallery</h1> -<p> -A gallery with ready-made mathematical drawings for use in LaTeX documents and -Beamer presentations — as well as their source code! Other than a -platform for distributing the figures themselves, this gallery is also supposed -to be an educational resource on -<a href="https://github.com/pgf-tikz/pgf">TikZ</a>, allowing users to inspect -and modify the source code of the drawings to fit their needs. -</p>
diff --git a/src/license.html /dev/null @@ -1,12 +0,0 @@ -<!-- This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see <https://www.gnu.org/licenses/>. -->
diff --git a/src/main.rs b/src/main.rs @@ -167,7 +167,7 @@ fn render_gallery( } } - // ======================================================================== + // ========================================================================== if !jobs.is_empty() { infoln!("Rendering HTML files..."); } @@ -190,7 +190,7 @@ fn render_gallery( log::job_finished(&HtmlFileName(&pic.file_name)); } - // ======================================================================== + // ========================================================================== for Job { pic_id, image_path, .. } in &jobs { let pic = &pics[*pic_id]; copy(&pic.path, image_path)?; @@ -198,7 +198,7 @@ fn render_gallery( infoln!("Copied image files to the target directory"); - // ======================================================================== + // ========================================================================== infoln!("Rendering thumbnails..."); // TODO: log something while compiling the TeX? @@ -228,7 +228,7 @@ fn render_gallery( // ========================================================================== if skipped > 1 { warnln!("Skipped {skipped}/{total} entries. Use {FULL_BUILD_OPT} to overwrite", - total = pics.len()); + total = pics.len()); } log::finished(start.elapsed()); @@ -262,7 +262,7 @@ fn render_index(pics: &Vec) -> io::Result<()> { writeln!(f, "<body>")?; writeln!(f, "<main>")?; - const INTRO_MSG: &str = include_str!("intro.html"); + const INTRO_MSG: &str = include_str!("html/intro.html"); writeln!(f, "{}", INTRO_MSG)?; writeln!(f, "<div id=\"gallery\" role=\"feed\">")?; @@ -285,7 +285,7 @@ fn render_index(pics: &Vec) -> io::Result<()> { writeln!(f, "</div>")?; - const OUTRO_MSG: &str = include_str!("outro.html"); + const OUTRO_MSG: &str = include_str!("html/outro.html"); writeln!(f, "{}", OUTRO_MSG)?; writeln!(f, "</main>")?; writeln!(f, "</body>")?; @@ -412,7 +412,7 @@ fn write_head(f: &mut File, pic_page: bool) -> io::Result<()> { /// Prints a HTML comment with GPL licensing info fn write_license(f: &mut File) -> io::Result<()> { - const LICENSE_COMMENT: &str = include_str!("license.html"); + const LICENSE_COMMENT: &str = include_str!("html/license.html"); writeln!(f, "{}", LICENSE_COMMENT) }
diff --git a/src/outro.html /dev/null @@ -1,35 +0,0 @@ -<section id="using"> -<h2>using this gallery</h2> -<p> -For details on a figure in this gallery please access its entry page, where you -will find information such as captions and pointers the original source, if -available. In this page you may also find pointers to the author, as well -licensing information. -</p> -<p> -Most (<strong><em>but not all</em></strong>) of the drawings in here are -licensed under free <a href="https://creativecommons.org/">Creative Commons</a> -licenses, allowing users to modify and distribute their source code. Please -verify the license terms of each specific figure before using it in your -documents. See <a href="./include.html">including the figures</a> for -instructions on how to include a given picture in your documents. -</p> -</section> - -<section id="contributing"> -<h2>contributing</h2> -<p> -As of now, this gallery is run by <a href="https://www.math.univ-toulouse.fr/~tbrevide/">Thiago Brevidelli</a>. If -you would like to add your drawings to here please contact -<a href="mailto:thiago.brevidelli_garcia@math.univ-toulouse.fr">thiago.brevidelli_garcia@math.univ-toulouse.fr</a>. -</p> -</section> - -<section id="other-galleries"> -<h2>other galleries</h2> -<ul> -<li><a href="https://texample.net/tikz/examples/">TeXample.net</a></li> -<li><a href="https://tikz.net/">TikZ.net</a></li> -<li><a href="https://tikz.fr/">TikZ.fr</a></li> -</ul> -</section>