From 02537b7ccff71791ac6c0d4957eca31eb8d36c71 Mon Sep 17 00:00:00 2001
From: Nico Graebling <graeblin>
Date: Tue, 11 Jul 2023 23:16:52 +0200
Subject: [PATCH] Add left and right orientation for Landing Page entries +
 fixed typo

---
 visgroup/content/_index.md                                | 7 ++++++-
 .../layouts/shortcodes/subpage-preview.html               | 8 ++++++++
 2 files changed, 14 insertions(+), 1 deletion(-)

diff --git a/visgroup/content/_index.md b/visgroup/content/_index.md
index b3b5dc7..4103d99 100644
--- a/visgroup/content/_index.md
+++ b/visgroup/content/_index.md
@@ -9,14 +9,16 @@ description: Helmholtz Centre for Environmental Research GmbH (UFZ)
 {{< subpage-preview
 	title="Our Projects"
 	image="pr_moses.jpg"
+	imagePosition="right"
 	background="white"
 	link="[View our projects]( {{< ref \"/content/projects.md\" >}} )"
-	text="We work on a variety of visualization and data integration projects in different fields of appication. This covers for example Hydrosystems, Energy Systems & Geotechnics."
+	text="We work on a variety of visualisation and data integration projects in different fields of appication. This covers for example Hydrosystems, Energy Systems & Geotechnics."
 	>}}
 
 {{< subpage-preview
 	title="Data Integration"
 	image="pr_moses.jpg"
+	imagePosition="left"
 	background="mid-grey"
 	link="[See our workflows for data integration]( {{< ref \"/content/dataIntegration.md\" >}} )"
 	text="Description to be added!"
@@ -25,6 +27,7 @@ description: Helmholtz Centre for Environmental Research GmbH (UFZ)
 {{< subpage-preview
 	title="The Way We Work"
 	image="pr_moses.jpg"
+	imagePosition="right"
 	background="white"
 	link="[Find out how we work]( {{< ref \"/content/wayWeWork.md\" >}} )"
 	text="Description to be added!"
@@ -33,6 +36,7 @@ description: Helmholtz Centre for Environmental Research GmbH (UFZ)
 {{< subpage-preview
 	title="The Team"
 	image="pr_moses.jpg"
+	imagePosition="left"
 	background="mid-grey"
 	link="[Get to know the team]( {{< ref \"/content/team.md\" >}} )"
 	text="The Visualisation and Data Integration Group is led by Dr. Karsten Rink and consists of five members, whose different research interests complement each other perfectly."
@@ -41,6 +45,7 @@ description: Helmholtz Centre for Environmental Research GmbH (UFZ)
 {{< subpage-preview
 	title="Publications"
 	image="pr_moses.jpg"
+	imagePosition="right"
 	background="white"
 	link="[Study our publication list]( {{< ref \"/content/publications.md\" >}} )"
 	text="Our work on scientific visualisation and data integration is frequently published in peer reviewed journals and presented at conferences. Our latest publication is: TO BE ADDED!"
diff --git a/visgroup/themes/ananke-adapted/layouts/shortcodes/subpage-preview.html b/visgroup/themes/ananke-adapted/layouts/shortcodes/subpage-preview.html
index 55344fb..29b8813 100644
--- a/visgroup/themes/ananke-adapted/layouts/shortcodes/subpage-preview.html
+++ b/visgroup/themes/ananke-adapted/layouts/shortcodes/subpage-preview.html
@@ -1,6 +1,11 @@
 
 <div style="background-color: {{.Get "background"}}; width: 100%; padding: 2rem; display: flex;">
 
+{{ if eq (.Get "imagePosition") "left" }}
+	<div style="width:50%;">
+		<img style="width:70%;" src="{{ .Get "image" }}" alt="{{ .Get "name" }}" />
+	</div>
+{{ end }}
 
 	<div style="width:50%; text-align:left;">
 		<h2>{{.Get "title"}}</h2>
@@ -9,9 +14,12 @@
 		{{.Get "link" | .Page.RenderString}}
 	</div>
 
+
+{{ if not (eq (.Get "imagePosition") "left") }}
 	<div style="width:50%;">
 		<img style="width:70%;" src="{{ .Get "image" }}" alt="{{ .Get "name" }}" />
 	</div>
+{{ end }}
 
 
 </div>
-- 
GitLab