From 833430c5bc44da0a4b6b58dcd08dc5c82de178d1 Mon Sep 17 00:00:00 2001 From: Fabien Freling Date: Wed, 19 Jun 2019 13:37:04 +0200 Subject: [PATCH] Add year to projects --- Tuprules.tup | 11 ++++++ projects/dawnchaos/Tupfile | 2 +- projects/dawnchaos/index.md | 1 + projects/maestro/Tupfile | 2 +- projects/maestro/index.md | 1 + projects/oboy/Tupfile | 2 +- projects/oboy/index.md | 4 +- projects/trailr/Tupfile | 2 +- projects/trailr/index.md | 1 + projects/whereiscar/Tupfile | 2 +- projects/whereiscar/index.md | 1 + templates/project.html | 72 ++++++++++++++++++++++++++++++++++++ 12 files changed, 94 insertions(+), 7 deletions(-) create mode 100644 templates/project.html diff --git a/Tuprules.tup b/Tuprules.tup index 8e0f7b0..cdfe965 100644 --- a/Tuprules.tup +++ b/Tuprules.tup @@ -10,3 +10,14 @@ --include-after-body=&(root)/templates/footer.html \ %f | sed 's|%%webRoot%%|&(root)|g' > %o \ |> %B.html + +!project = | &(root)/templates/footer.html \ + |> ^ pandoc %f^ \ + pandoc --from markdown --to html \ + --template=&(root)/templates/project.html \ + --css &(root)/css/style.css \ + --include-in-header=&(root)/templates/header.html \ + --include-before-body=&(root)/templates/nav.html \ + --include-after-body=&(root)/templates/footer.html \ + %f | sed 's|%%webRoot%%|&(root)|g' > %o \ + |> %B.html diff --git a/projects/dawnchaos/Tupfile b/projects/dawnchaos/Tupfile index 18c0f16..0bc4145 100644 --- a/projects/dawnchaos/Tupfile +++ b/projects/dawnchaos/Tupfile @@ -1,3 +1,3 @@ include_rules -: foreach *.md |> !pandoc |> +: index.md |> !project |> diff --git a/projects/dawnchaos/index.md b/projects/dawnchaos/index.md index 8cdb507..44289fa 100644 --- a/projects/dawnchaos/index.md +++ b/projects/dawnchaos/index.md @@ -1,5 +1,6 @@ --- title: Dawn of Chaos +date: 2004 --- For the first of undergraduate study we have to develop a project in either diff --git a/projects/maestro/Tupfile b/projects/maestro/Tupfile index 18c0f16..0bc4145 100644 --- a/projects/maestro/Tupfile +++ b/projects/maestro/Tupfile @@ -1,3 +1,3 @@ include_rules -: foreach *.md |> !pandoc |> +: index.md |> !project |> diff --git a/projects/maestro/index.md b/projects/maestro/index.md index 5052d78..72d370b 100644 --- a/projects/maestro/index.md +++ b/projects/maestro/index.md @@ -1,5 +1,6 @@ --- title: Maestro +date: 2004 --- Maestro is an OMR, Optical Musicscore Recognition. You can think of it like a diff --git a/projects/oboy/Tupfile b/projects/oboy/Tupfile index 18c0f16..0bc4145 100644 --- a/projects/oboy/Tupfile +++ b/projects/oboy/Tupfile @@ -1,3 +1,3 @@ include_rules -: foreach *.md |> !pandoc |> +: index.md |> !project |> diff --git a/projects/oboy/index.md b/projects/oboy/index.md index fb84ee5..a62bc12 100644 --- a/projects/oboy/index.md +++ b/projects/oboy/index.md @@ -1,11 +1,11 @@ --- title: OBoy +date: 2015 +repository: https://gitlab.com/ffreling/oboy --- OBoy is a Game Boy emulator written in OCaml. -[GitLab repository](https://gitlab.com/ffreling/oboy) - This project explores the internals of the Game Boy, documenting it along the way. It is also an experiment of writing a low-level program in functional language. diff --git a/projects/trailr/Tupfile b/projects/trailr/Tupfile index 18c0f16..0bc4145 100644 --- a/projects/trailr/Tupfile +++ b/projects/trailr/Tupfile @@ -1,3 +1,3 @@ include_rules -: foreach *.md |> !pandoc |> +: index.md |> !project |> diff --git a/projects/trailr/index.md b/projects/trailr/index.md index b821193..edb1e01 100644 --- a/projects/trailr/index.md +++ b/projects/trailr/index.md @@ -1,5 +1,6 @@ --- title: Trailr +date: 2013 --- [Official website](http://www.ltutech.com/case/trailr/) diff --git a/projects/whereiscar/Tupfile b/projects/whereiscar/Tupfile index 18c0f16..0bc4145 100644 --- a/projects/whereiscar/Tupfile +++ b/projects/whereiscar/Tupfile @@ -1,3 +1,3 @@ include_rules -: foreach *.md |> !pandoc |> +: index.md |> !project |> diff --git a/projects/whereiscar/index.md b/projects/whereiscar/index.md index 968aa52..6bd09a8 100644 --- a/projects/whereiscar/index.md +++ b/projects/whereiscar/index.md @@ -1,5 +1,6 @@ --- title: Where is my car? +date: 2007 --- One of my first image processing based project done in 2007. It finds cars on a Google Maps diff --git a/templates/project.html b/templates/project.html new file mode 100644 index 0000000..38ae15c --- /dev/null +++ b/templates/project.html @@ -0,0 +1,72 @@ + + + + + + +$for(author-meta)$ + +$endfor$ +$if(date-meta)$ + +$endif$ +$if(keywords)$ + +$endif$ + $if(title-prefix)$$title-prefix$ – $endif$$pagetitle$ + +$if(highlighting-css)$ + +$endif$ +$for(css)$ + +$endfor$ +$if(math)$ + $math$ +$endif$ +$for(header-includes)$ + $header-includes$ +$endfor$ + + +$for(include-before)$ +$include-before$ +$endfor$ +$if(title)$ +
+

$title$

+$if(subtitle)$ +

$subtitle$

+$endif$ +$for(author)$ +

$author$

+$endfor$ +$if(date)$ +

Year: $date$

+$endif$ +$if(repository)$ +

Repository: $repository$

+$endif$ +
+$endif$ +$if(toc)$ + +$endif$ +$body$ +$for(include-after)$ +$include-after$ +$endfor$ + +