From cf2e195d63da48b985371a0b264a1fe2c25bf760 Mon Sep 17 00:00:00 2001
From: Lars Bilke <lars.bilke@ufz.de>
Date: Mon, 5 Mar 2018 16:57:11 +0100
Subject: [PATCH] [web] Added books section with 3 entries.

- BMB 2
- BMB 3
- Groundwaterflow 1
---
 Documentation/bibliography.bib                | 31 ++++++++++++++++++-
 .../{benchmark.md => benchmark.pandoc}        |  0
 web/archetypes/books.pandoc                   | 27 ++++++++++++++++
 web/archetypes/default.md                     |  3 --
 web/archetypes/default.pandoc                 |  4 +++
 web/config.toml                               | 16 ++++++++++
 web/content/books/BMB-2-Cover.png             |  3 ++
 web/content/books/BMB-3-Cover.jpg             |  3 ++
 .../books/Computation-Hydrology-I-Cover.png   |  3 ++
 web/content/books/_index.md                   |  5 +++
 web/content/books/bmb-2.pandoc                | 29 +++++++++++++++++
 web/content/books/bmb-3.pandoc                | 27 ++++++++++++++++
 ...drology-i-groundwater-flow-modeling.pandoc | 31 +++++++++++++++++++
 web/layouts/books/single.html                 |  8 +++++
 web/layouts/section/books.html                | 16 ++++++++++
 web/layouts/shortcodes/bib.html               |  7 +++--
 16 files changed, 207 insertions(+), 6 deletions(-)
 rename web/archetypes/{benchmark.md => benchmark.pandoc} (100%)
 create mode 100644 web/archetypes/books.pandoc
 delete mode 100644 web/archetypes/default.md
 create mode 100644 web/archetypes/default.pandoc
 create mode 100644 web/content/books/BMB-2-Cover.png
 create mode 100644 web/content/books/BMB-3-Cover.jpg
 create mode 100644 web/content/books/Computation-Hydrology-I-Cover.png
 create mode 100644 web/content/books/_index.md
 create mode 100644 web/content/books/bmb-2.pandoc
 create mode 100644 web/content/books/bmb-3.pandoc
 create mode 100644 web/content/books/computational-hydrology-i-groundwater-flow-modeling.pandoc
 create mode 100644 web/layouts/books/single.html
 create mode 100644 web/layouts/section/books.html

diff --git a/Documentation/bibliography.bib b/Documentation/bibliography.bib
index 6b8b429b7b2..51fba30fdf4 100644
--- a/Documentation/bibliography.bib
+++ b/Documentation/bibliography.bib
@@ -152,4 +152,33 @@
     address     = {Stockholm},
     number      = {2008:45},
     year = 2008
-}
\ No newline at end of file
+}
+
+% Tutorials
+@Book{Sachse:2015,
+  Title                    = {{Computational Hydrology I: Groundwater Flow Modeling}},
+  Author                   = {Sachse, Agnes and Rink, Karsten and He, Wenkui and Kolditz, Olaf},
+  Publisher                = {Springer International Publishing},
+  Year                     = {2015},
+  doi = "10.1007/978-3-319-13335-5",
+  isbn = "978-3-319-13334-8"
+}
+
+% Benchmark Books
+@Book{Kolditz:2015,
+  Title                    = {{Thermo-Hydro-Mechanical-Chemical Processes in Fractured Porous Media: Modelling and Benchmarking -- Closed-Form Solutions}},
+  Author                   = {Kolditz, Olaf and Shao, Hua and Wang, Wenqing and Bauer Sebastian},
+  Publisher                = {Springer International Publishing},
+  Year                     = {2015},
+  doi = "10.1007/978-3-319-11894-9",
+  isbn = "978-3-319-11893-2"
+}
+
+@Book{Kolditz:2016,
+  Title                    = {{Thermo-Hydro-Mechanical-Chemical Processes in Fractured Porous Media: Modelling and Benchmarking -- Benchmarking Initiatives}},
+  Author                   = {Kolditz, Olaf and Görke, Uwe-Jenks and Shao, Hua and Wang, Wenqing and Bauer Sebastian},
+  Publisher                = {Springer International Publishing},
+  Year                     = {2016},
+  doi = "10.1007/978-3-319-29224-3",
+  isbn = "978-3-319-29223-6"
+}
diff --git a/web/archetypes/benchmark.md b/web/archetypes/benchmark.pandoc
similarity index 100%
rename from web/archetypes/benchmark.md
rename to web/archetypes/benchmark.pandoc
diff --git a/web/archetypes/books.pandoc b/web/archetypes/books.pandoc
new file mode 100644
index 00000000000..441a873d73b
--- /dev/null
+++ b/web/archetypes/books.pandoc
@@ -0,0 +1,27 @@
++++
+title = "{{ replace .Name "-" " " | title }}"
+subtitle = "[OPTIONAL]"
+date = {{ .Date }}
+author = "[TODO]"
+
+book_type = "[Book | Tutorial]"
+book_cover = "[TODO]"
+
++++
+
+[<i class="fas fa-file-pdf"></i> Download this book as PDF](https://ogsstorage.blob.core.windows.net/web/Books/TODO-DONWLOAD-LINK.pdf) 
+
+TODO DESCRIPTION
+
+::: {.clearfix}
+:::
+
+::: {.note}
+### <i class="fas fa-download"></i> Downloads
+- [<i class="fas fa-file-archive"></i> TODO LINK DESCRIPTION](https://ogsstorage.blob.core.windows.net/web/Books/TODO-DOWNLOAD-LINK)  
+:::
+
+::: {.note}
+### <i class="fas fa-book"></i> Bibliography
+{{< bib id="TODO-BIB-ID" >}}
+:::
diff --git a/web/archetypes/default.md b/web/archetypes/default.md
deleted file mode 100644
index af20d6e13b8..00000000000
--- a/web/archetypes/default.md
+++ /dev/null
@@ -1,3 +0,0 @@
-+++
-author = ""
-+++
diff --git a/web/archetypes/default.pandoc b/web/archetypes/default.pandoc
new file mode 100644
index 00000000000..932cd75f3a4
--- /dev/null
+++ b/web/archetypes/default.pandoc
@@ -0,0 +1,4 @@
++++
+title: "{{ replace .Name "-" " " | title }}"
+date: {{ .Date }}
++++
diff --git a/web/config.toml b/web/config.toml
index c129e700cb7..8810c1bf201 100644
--- a/web/config.toml
+++ b/web/config.toml
@@ -20,6 +20,11 @@ news = "news"
   url = "/news/"
   weight = 1
 # Menu entry defined in about.md
+[[menu.main]]
+  name = "Books"
+  url = "/books/"
+  identifier = "books"
+  weight = 2
 [[menu.main]]
   name = "Docs"
   url = "/docs/"
@@ -96,3 +101,14 @@ news = "news"
   name = "Basics"
   identifier = "basics"
   weight = 1
+
+# Tools sidebar top-level categories
+[[menu.tools]]
+  name = "Getting Started"
+  identifier = "getting-started"
+  weight = 1
+
+[[menu.tools]]
+  name = "Meshing"
+  identifier = "meshing"
+  weight = 2
diff --git a/web/content/books/BMB-2-Cover.png b/web/content/books/BMB-2-Cover.png
new file mode 100644
index 00000000000..eab66cc5aae
--- /dev/null
+++ b/web/content/books/BMB-2-Cover.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:105017b2c383b131201d8c612af908c35bae6c351b3b2d238f1cf55ca7d32268
+size 623330
diff --git a/web/content/books/BMB-3-Cover.jpg b/web/content/books/BMB-3-Cover.jpg
new file mode 100644
index 00000000000..ac8f5160c7a
--- /dev/null
+++ b/web/content/books/BMB-3-Cover.jpg
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:08e56b54156cee475275207bd91cbf8932a4bfd589978ce64745b16fde4bffa7
+size 199799
diff --git a/web/content/books/Computation-Hydrology-I-Cover.png b/web/content/books/Computation-Hydrology-I-Cover.png
new file mode 100644
index 00000000000..24d488abb23
--- /dev/null
+++ b/web/content/books/Computation-Hydrology-I-Cover.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:7cdca6a1fb3cfd8b8f1592b577ca2f1dbaa2d22265a8c1fcc6a73a7608ecb836
+size 387765
diff --git a/web/content/books/_index.md b/web/content/books/_index.md
new file mode 100644
index 00000000000..4ce5e22867d
--- /dev/null
+++ b/web/content/books/_index.md
@@ -0,0 +1,5 @@
++++
+Title = "Books & Tutorials"
++++
+
+We publish a series of books and tutorials on OpenGeoSys. The books contain comprehensive benchmark descriptions and can be seen as a reference to what is possible with OGS. The tutorials focus on specific topics such as [Groundwater Flow Modeling]({{< relref "computational-hydrology-i-groundwater-flow-modeling">}}) or [Thermochemical Heat Storage]() with step-by-step instructions giving the user a good introduction into modeling and simulation with OGS. Most of the tutorials can be downloaded as PDF! See the detail page on each tutorial.
diff --git a/web/content/books/bmb-2.pandoc b/web/content/books/bmb-2.pandoc
new file mode 100644
index 00000000000..94dd6d3f062
--- /dev/null
+++ b/web/content/books/bmb-2.pandoc
@@ -0,0 +1,29 @@
++++
+title = "Thermo-Hydro-Mechanical-Chemical Processes in Fractured Porous Media: Modelling and Benchmarking"
+subtitle = "Closed Form Solutions"
+date = 2018-03-02T12:49:25+01:00
+author = "Lars Bilke"
+
+book_type = "Book"
+book_cover = "BMB-2-Cover.png"
+
++++
+
+The second book in the OpenGeoSys benchmarking series provides guidance to understanding complicated coupled processes based on the experimental data available and implementation of developed algorithms in numerical codes. Results of selected test cases in the fields of closed-form solutions (e.g., deformation processes), single processes (such as groundwater flow) as well as coupled processes are presented. It is part of the [OpenGeoSys initiative](http://www.opengeosys.org/) - an open source project to share knowledge and experience in environmental analysis and scientific computation with the community.
+
+The second volume mainly is dedicated to “closed form solutions” developed and provided by Dr. Peter Vogel (BGR). You will find the packed input files for Chapter 2 as an attachment. Inside take a look at the file Chapter#Files.txt referring to the corresponding names of the input files for each book section.
+
+Also have a look at [Volume 1](http://www.springer.com/de/book/9783642271762) of this book series.
+
+::: {.clearfix}
+:::
+
+::: {.note}
+### <i class="fas fa-download"></i> Downloads
+- [<i class="fas fa-file-archive"></i> Benchmarks Chapter 2](https://ogsstorage.blob.core.windows.net/web/Books/Benchmark-Book-2/Chapter-02.zip)  
+:::
+
+::: {.note}
+### <i class="fas fa-book"></i> Bibliography
+{{< bib id="Kolditz:2015" >}}
+:::
diff --git a/web/content/books/bmb-3.pandoc b/web/content/books/bmb-3.pandoc
new file mode 100644
index 00000000000..98471358a5f
--- /dev/null
+++ b/web/content/books/bmb-3.pandoc
@@ -0,0 +1,27 @@
++++
+title = "Thermo-Hydro-Mechanical Chemical Processes in Fractured Porous Media: Modelling and Benchmarking"
+subtitle = "Benchmarking Initiatives"
+date = 2018-03-05T16:27:48+01:00
+author = "Lars Bilke"
+
+book_type = "Book"
+book_cover = "BMB-3-Cover.jpg"
+
++++
+
+[<i class="fas fa-file-pdf"></i> Download this book as PDF](https://ogsstorage.blob.core.windows.net/web/Books/Benchmark-Book-3/BMB3_final_version-opt.pdf)  
+
+This book presents a new suite of benchmarks for and examples of porous media mechanics collected over the last two years. It continues the assembly of benchmarks and examples for porous media mechanics published in 2014. The book covers various applications in the geosciences, geotechnics, geothermal energy, and geological waste deposition. The analysis of thermo-hydro-mechanical-chemical (THMC) processes is essential to many applications in environmental engineering, such as geological waste deposition, geothermal energy utilisation, carbon capture and storage, water resources management, hydrology, and even climate change. In order to assess the feasibility and safety of geotechnical applications, process-based modelling is the only tool that can effectively quantify future scenarios, a fact which also creates a huge burden of responsibility concerning the reliability of computational tools. The book shows that benchmarking offers a suitable methodology for verifying the quality of modelling tools based on best practices, and together with code comparison fosters community efforts. It also  provides a brief introduction to the DECOVALEX, SeSBench and MOMAS initiatives. This benchmark book is part of the OpenGeoSys initiative – an open source project designed to share knowledge and experience in environmental analysis and scientific computation.
+
+::: {.clearfix}
+:::
+
+::: {.note}
+### <i class="fas fa-download"></i> Downloads
+- [<i class="fas fa-file-archive"></i> Input files Chapter 4.7.8](https://ogsstorage.blob.core.windows.net/web/Books/Benchmark-Book-3/Input-files-Vogel-Chapter-4_7_8.zip)  
+:::
+
+::: {.note}
+### <i class="fas fa-book"></i> Bibliography
+{{< bib id="Kolditz:2016" >}}
+:::
diff --git a/web/content/books/computational-hydrology-i-groundwater-flow-modeling.pandoc b/web/content/books/computational-hydrology-i-groundwater-flow-modeling.pandoc
new file mode 100644
index 00000000000..167b847edae
--- /dev/null
+++ b/web/content/books/computational-hydrology-i-groundwater-flow-modeling.pandoc
@@ -0,0 +1,31 @@
++++
+title = "Computational Hydrology: I Groundwater Flow Modeling"
+date = 2018-03-01T15:51:37+01:00
+author = "Lars Bilke"
+
+book_type = "Tutorial"
+book_cover = "Computation-Hydrology-I-Cover.png"
+
++++
+
+[<i class="fas fa-file-pdf"></i> Download this book as PDF](https://ogsstorage.blob.core.windows.net/web/Books/Computational-Hydrology-I/OGS.Tutorial-Computational.Hydrology.I-Groundwater.Flow.Modelling.pdf)  
+
+This tutorial on the application of the open-source software OpenGeoSys (OGS) in computational hydrology is based on a one-week HIGRADE-course at the Helmholtz Centre for Environmental Research in Leipzig, Germany. The book contains general information regarding hydrological and groundwater flow modelling and the pre-processing and step-by-step model set-up of a case study with OGS and related components such as the OGS Data Explorer. In addition, it also illustrates the application of pre- and post-processing tools such as ArcGIS or ParaView for the preparation of input data as well as the optimal presentation of simulation results.
+
+This OGS tutorial is the result of close cooperation of the Helmholtz Centre for Environmental Research (UFZ) with partner universities (Technische Universität Dresden, Christian-Albrechts University Kiel, University of Potsdam, University of Tübingen) in the field of hydrological modelling. The UFZ Departments of Environmental Informatics (ENVINF), Catchment Hydrology (CATHYD) and Computational Hydrosystems (CHS) have been involved in the preparation of this OpenGeoSys Tutorial. These voluntary contributions are highly acknowledged.
+
+This book is intended primarily for graduate students and applied scientists who deal with hydrological system analysis and hydrological modelling. It is also a valuable source of information for professional hydrologists wishing to advance their knowledge in numerical modelling of coupled hydrological-hydrogeological systems. As such, this book will be a valuable aid in training of hydrosystem modelling.
+
+::: {.clearfix}
+:::
+
+::: {.note}
+### <i class="fas fa-download"></i> Downloads
+- [<i class="fas fa-file-archive"></i> Linux Input Files](https://ogsstorage.blob.core.windows.net/web/Books/Computational-Hydrology-I/input_files_linux.zip)  
+- [<i class="fas fa-file-archive"></i> Windows Input Files](https://ogsstorage.blob.core.windows.net/web/Books/Computational-Hydrology-I/input_files_win.zip)
+:::
+
+::: {.note}
+### <i class="fas fa-book"></i> Bibliography
+{{< bib id="Sachse:2015" >}}
+:::
diff --git a/web/layouts/books/single.html b/web/layouts/books/single.html
new file mode 100644
index 00000000000..1a755d6be45
--- /dev/null
+++ b/web/layouts/books/single.html
@@ -0,0 +1,8 @@
+{{ define "main" }}
+
+  <h1>{{ .Title }} {{ if .Params.subtitle }}<span class="text-regular text-grey-dark">– {{ .Params.subtitle }}</span>{{ end }}</h1>
+
+  <img class="w-1/6 float-left mr-4 mb-2 shadow-md" src="../{{ .Params.book_cover }}" alt="">
+  {{ .Content }}
+
+{{ end }}
diff --git a/web/layouts/section/books.html b/web/layouts/section/books.html
new file mode 100644
index 00000000000..38291087d8f
--- /dev/null
+++ b/web/layouts/section/books.html
@@ -0,0 +1,16 @@
+{{ define "main" }}
+    <h1>{{ .Title }}</h1>
+    {{ .Content }}
+    {{ range .Data.Pages }}
+      <div class="mb-8 border-b">
+        <div class="w-1/6 float-left mr-4 mb-2">
+          <img src="/books/{{ .Params.book_cover }}" alt="Cover">
+        </div>
+        <p class="text-sm text-grey-dark mb-1">{{ .Params.book_type }}</p>
+        <a class="text-black font-bold text-xl mb-2" href="{{ .Permalink }}">{{ .Title }}</a> <span class="text-sm text-grey-dark">{{ .Params.subtitle }}</span>
+        <p class="text-grey-darker text-sm">{{ .Content | truncate 500 }}</p>
+        <p><a href="{{.Permalink}}">Show details <i class="fas fa-arrow-right"></i></a></p>
+        <div style="clear: both; font-size: 0;">&nbsp;</div>
+      </div>
+    {{ end }}
+{{ end }}
diff --git a/web/layouts/shortcodes/bib.html b/web/layouts/shortcodes/bib.html
index 74abe7e84c2..ec66241ce51 100644
--- a/web/layouts/shortcodes/bib.html
+++ b/web/layouts/shortcodes/bib.html
@@ -2,8 +2,9 @@
 	<p>
 		{{ $id := .Get "id" }}
 		{{ range where .Site.Data.bibliography "id" $id }}
-			{{ range .author }}
-				{{ .family }}, {{ .given}}
+      {{ $len := (len .author) }}
+			{{ range $index, $element := .author }}
+				{{ $element.family }}, {{ $element.given}} {{ if ne (add $index 1) $len }}and{{ end }}
 			{{ end }}
 			({{ range .issued }}
 				{{ range . }}
@@ -18,6 +19,8 @@
 			{{ if isset . "issue" }}{{ .issue }},{{ end }}
 			{{ if isset . "volume" }}vol. {{ .volume }},{{ end }}
 			{{ if isset . "page" }}p. {{ .page }},{{ end }}
+      {{ if isset . "DOI" }}DOI: <a href="https://doi.org/{{ .DOI }}">{{ .DOI }}</a>,{{ end }}
+      {{ if isset . "ISBN" }}ISBN: {{ .ISBN }},{{ end }}
 			{{ .publisher }}
 		{{ end }}
 	</p>
-- 
GitLab