Add favicon

This commit is contained in:
Shadowfacts 2019-01-04 13:36:40 -05:00
parent 7e5ed41011
commit 78ca9ebfba
Signed by: shadowfacts
GPG Key ID: 94A5AB95422746E5
6 changed files with 20 additions and 0 deletions

7
lib/generate/copy.ts Normal file
View File

@ -0,0 +1,7 @@
import { promises as fs } from "fs";
import * as util from "../util";
export default async function copy() {
util.write("favicon.ico", await fs.readFile("site/favicon.ico"));
util.write("favicon-152.png", await fs.readFile("site/favicon-152.png"));
}

View File

@ -1,4 +1,5 @@
import categories from "./categories"; import categories from "./categories";
import copy from "./copy";
import css from "./css"; import css from "./css";
import homepage from "./homepage"; import homepage from "./homepage";
import missing from "./missing"; import missing from "./missing";
@ -9,6 +10,7 @@ import tutorials from "./tutorials";
export = { export = {
categories, categories,
copy,
css, css,
homepage, homepage,
missing, missing,

View File

@ -1,6 +1,7 @@
import generators = require("./generate"); import generators = require("./generate");
async function generate() { async function generate() {
generators.copy();
generators.css(); generators.css();
generators.missing(); generators.missing();

BIN
site/favicon-152.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.8 KiB

BIN
site/favicon.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

View File

@ -4,7 +4,17 @@
<meta charset="UTF-8"> <meta charset="UTF-8">
<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0"> <meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge"> <meta http-equiv="X-UA-Compatible" content="ie=edge">
<title><%= metadata.title %></title> <title><%= metadata.title %></title>
<link rel="canonical" href="https://shadowfacts.net<%= metadata.permalink %>">
<link rel="alternate" type="application/rss+xml" title="Shadowfacts" href="https://shadowfacts.net/feed.xml">
<link rel="icon" href="/favicon.ico">
<link rel="apple-touch-icon-precomposed" href="/favicon-152.png">
<meta name="msapplication-TileColor" content="#F9C72F">
<meta name="msapplication-TileImage" content="/favicon-152.png">
<script> <script>
(() => { (() => {
let theme = localStorage.getItem("theme"); let theme = localStorage.getItem("theme");