From 8c0d9c89b0f45ec40d9845274610b9c17eadad47 Mon Sep 17 00:00:00 2001
From: DongGyun Han <DongGyun.Han@rhul.ac.uk>
Date: Thu, 15 Dec 2022 14:35:35 +0000
Subject: [PATCH] Make all links to be opened in a new browser window/tab
 (Except for table of contents) Include `cs1822.css`

---
 templates/impress.cs/css/cs1822.css | 94 +++++++++++++++++++++++++++++
 templates/impress.cs/impress.cs.txt |  1 +
 templates/impress.cs/slides.html    |  2 +
 3 files changed, 97 insertions(+)
 create mode 100644 templates/impress.cs/css/cs1822.css

diff --git a/templates/impress.cs/css/cs1822.css b/templates/impress.cs/css/cs1822.css
new file mode 100644
index 0000000..da4a278
--- /dev/null
+++ b/templates/impress.cs/css/cs1822.css
@@ -0,0 +1,94 @@
+/**
+ * Custom styling for CS1822 files
+ */
+
+/**
+ * Aesthetics
+ */
+
+.step {
+    font-family: Sans;
+}
+
+.step.concept {
+    border-style: solid;
+    border-width: medium;
+    border-color: lightgray;
+}
+
+.concept h3:not(.rowtitle) {
+    border-bottom-style: solid;
+    border-bottom-width: medium;
+    border-bottom-color: #eb641e;
+    margin-bottom: 2ex;
+}
+
+h3.side-heading {
+    text-align: left;
+    padding-top: 2ex;
+    padding-bottom: 2ex;
+}
+
+img {
+    width: 70%;
+    display: block;
+    margin: auto;
+}
+
+p {
+    padding: .75ex;
+}
+
+ul {
+    list-style: none;
+    margin-left: 2ex;
+}
+
+li::before {
+    content: "○ "; 
+    color: #00a69e;
+}
+
+td {
+    vertical-align: middle;
+}
+
+.narrow {
+    width: 0px;
+    margin: 0px;
+    padding: 0px;
+}
+
+/**
+ * Invisible slide steps (contain answers to questions
+ */
+.slide_step.slide_step_hidden.invisible { 
+     opacity: 0;
+}
+
+code {
+    font-family: monospace;
+    font-size: 80%;
+    background-color: #efefef;
+}
+
+pre {
+    margin-left: 5%;
+    width: 90%;
+    border: 1pt dashed;
+    background-color: #efefef;
+}
+
+div.overview {
+    z-index: -100;
+}
+
+p.attribution {
+    float:right;
+    font-size: 33%;
+}
+
+.unclickable {
+    pointer-events: none;
+    z-index: -100;
+}
diff --git a/templates/impress.cs/impress.cs.txt b/templates/impress.cs/impress.cs.txt
index dba6bc9..9d713a6 100644
--- a/templates/impress.cs/impress.cs.txt
+++ b/templates/impress.cs/impress.cs.txt
@@ -19,6 +19,7 @@ __file__.html slides.html
 # impress.js core machinery
 
 css/style.css
+css/cs1822.css
 js/impress.js
 js/fabric.js
 js/slide-drawing.js
diff --git a/templates/impress.cs/slides.html b/templates/impress.cs/slides.html
index 699911a..e87d6a6 100644
--- a/templates/impress.cs/slides.html
+++ b/templates/impress.cs/slides.html
@@ -12,6 +12,7 @@
 <!doctype html>
 <html lang="en">
 <head>
+    <base target="_blank"/>
     <meta charset="utf-8">
     <meta name="viewport" content="width=1024">
     <meta name="apple-mobile-web-app-capable" content="yes">
@@ -87,6 +88,7 @@ MathJax.Hub.Config({
             const text = document.createTextNode(heading.textContent)
 
             a.href = "#" + id
+            a.target = "_self"
             a.appendChild(text)
             li.appendChild(a)
             toc.appendChild(li)
-- 
GitLab