aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Powers <markppowers0@gmail.com>2020-11-22 19:37:10 -0600
committerMark Powers <markppowers0@gmail.com>2020-11-22 19:37:10 -0600
commitc18dd9ef6c9b3407862db7f01372bc65bb1c3721 (patch)
treee4dfd6e1dfb744b0266b97679059712875ef741c
parent63668ca89f055b2233a8aa6caf4213853918d68d (diff)
Add svg favicon
-rw-r--r--src/icon/favicon.svg1
-rw-r--r--src/server.js1
-rw-r--r--src/templates.js3
-rw-r--r--src/templates/blog-single.html6
-rw-r--r--src/templates/blog.html6
-rw-r--r--src/templates/bread.html7
-rw-r--r--src/templates/header.html5
-rw-r--r--src/templates/index.html6
-rw-r--r--src/templates/misc.html6
-rw-r--r--src/templates/projects.html5
10 files changed, 21 insertions, 25 deletions
diff --git a/src/icon/favicon.svg b/src/icon/favicon.svg
new file mode 100644
index 0000000..ad339b8
--- /dev/null
+++ b/src/icon/favicon.svg
@@ -0,0 +1 @@
+<svg xmlns="http://www.w3.org/2000/svg" version="1.1" height="16" width="16"><path d="m1 4h14v12h-14z"/><path d="m2 1h12v3h-12z"/><g fill="#d8d8d8"><path d="m1.5 13h13v2.5h-13z"/><path d="m1.5 4.5h13v8h-13z"/><path d="m2.5 1.5h11v2h-11z"/></g><path d="m2.5 6h11v5h-11z"/><path d="m4 4.75h9v1h-9z" fill="#333"/><path d="m5 2h6v1h-6z" fill="#333" stroke-width="3.051294"/><path d="m6 2h4v1h-4z" fill="#fff" stroke-width=".917679"/><path d="m7 2h2v1h-2z" fill="#f00" stroke-width="1.004995"/></svg>
diff --git a/src/server.js b/src/server.js
index e82fc12..2198923 100644
--- a/src/server.js
+++ b/src/server.js
@@ -355,6 +355,7 @@ function setUpRoutes(models, jwtFunctions, database, templates) {
server.get('/favicon.ico', (req, res) => res.sendFile(__dirname + "/icon/favicon.ico"))
+ server.get('/favicon.svg', (req, res) => res.sendFile(__dirname + "/icon/favicon.svg"))
server.get('/css/:id', (req, res) => {
res.sendFile(__dirname + "/css/" + req.params.id);
});
diff --git a/src/templates.js b/src/templates.js
index 293f0e4..05f117a 100644
--- a/src/templates.js
+++ b/src/templates.js
@@ -15,6 +15,7 @@ function setUpTemplates(){
loadPartial("navigation", path.join(__dirname, "templates/navigation.html"))
loadPartial("footer", path.join(__dirname, "templates/footer.html"))
loadPartial("feed", path.join(__dirname, "templates/feed.html"))
+ loadPartial("header", path.join(__dirname, "templates/header.html"))
let templates = {};
loadTemplate(templates, "index", path.join(__dirname, 'templates/index.html'))
@@ -30,4 +31,4 @@ function setUpTemplates(){
module.exports = {
setUpTemplates
-} \ No newline at end of file
+}
diff --git a/src/templates/blog-single.html b/src/templates/blog-single.html
index 8622007..10012b6 100644
--- a/src/templates/blog-single.html
+++ b/src/templates/blog-single.html
@@ -3,10 +3,8 @@
<head>
<title>Mark's Kitchen - Blog</title>
- <meta charset="UTF-8">
- <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<link rel="stylesheet" type="text/css" href="/css/styles.css">
- <link rel="shortcut icon" href="/favicon.ico">
+ {{> header}}
</head>
<body>
@@ -20,4 +18,4 @@
{{> footer}}
</body>
-</html> \ No newline at end of file
+</html>
diff --git a/src/templates/blog.html b/src/templates/blog.html
index 40b86f5..1c097c0 100644
--- a/src/templates/blog.html
+++ b/src/templates/blog.html
@@ -3,10 +3,8 @@
<head>
<title>Mark's Kitchen - Blog</title>
- <meta charset="UTF-8">
- <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<link rel="stylesheet" type="text/css" href="/css/styles.css">
- <link rel="shortcut icon" href="/favicon.ico">
+ {{> header}}
</head>
<body>
@@ -19,4 +17,4 @@
{{> footer}}
</body>
-</html> \ No newline at end of file
+</html>
diff --git a/src/templates/bread.html b/src/templates/bread.html
index b5d02ed..88a5528 100644
--- a/src/templates/bread.html
+++ b/src/templates/bread.html
@@ -1,12 +1,9 @@
<!doctype html>
<html lang="en">
-
<head>
<title>Mark's Kitchen - Bread</title>
- <meta charset="UTF-8">
- <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
+ {{> header}}
<link rel="stylesheet" type="text/css" href="/css/styles.css">
- <link rel="shortcut icon" href="/favicon.ico">
</head>
<body>
@@ -20,4 +17,4 @@
{{> footer}}
</body>
-</html> \ No newline at end of file
+</html>
diff --git a/src/templates/header.html b/src/templates/header.html
new file mode 100644
index 0000000..2ceebfd
--- /dev/null
+++ b/src/templates/header.html
@@ -0,0 +1,5 @@
+<meta charset="UTF-8">
+<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
+<link rel="icon" href="/favicon.svg">
+<link rel="alternate icon" href="/favicon.ico">
+
diff --git a/src/templates/index.html b/src/templates/index.html
index efb7369..6ba3d5a 100644
--- a/src/templates/index.html
+++ b/src/templates/index.html
@@ -3,11 +3,9 @@
<head>
<title>Mark's Kitchen</title>
- <meta charset="UTF-8">
- <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<link rel="stylesheet" type="text/css" href="/css/styles.css">
- <link rel="shortcut icon" href="/favicon.ico">
<link rel="alternate" type="application/rss+xml" title="RSS Feed for marks.kitchen" href="/feed.xml" />
+ {{> header}}
</head>
<body>
@@ -17,4 +15,4 @@
{{> footer}}
</body>
-</html> \ No newline at end of file
+</html>
diff --git a/src/templates/misc.html b/src/templates/misc.html
index 9fb376a..ee641d1 100644
--- a/src/templates/misc.html
+++ b/src/templates/misc.html
@@ -3,10 +3,8 @@
<head>
<title>Mark's Kitchen</title>
- <meta charset="UTF-8">
- <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<link rel="stylesheet" type="text/css" href="/css/styles.css">
- <link rel="shortcut icon" href="/favicon.ico">
+ {{> header}}
</head>
<body>
@@ -27,4 +25,4 @@
</nav>
</body>
-</html> \ No newline at end of file
+</html>
diff --git a/src/templates/projects.html b/src/templates/projects.html
index cf3361a..0ca8efa 100644
--- a/src/templates/projects.html
+++ b/src/templates/projects.html
@@ -3,9 +3,8 @@
<head>
<title>Mark's Kitchen - Projects</title>
- <meta charset="UTF-8">
- <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<link rel="stylesheet" type="text/css" href="/css/styles.css">
+ {{> header}}
</head>
<body>
@@ -284,4 +283,4 @@
</div>
</body>
-</html> \ No newline at end of file
+</html>