Add favicon

This commit is contained in:
Shadowfacts 2019-01-04 13:36:40 -05:00
parent 7e5ed41011
commit 78ca9ebfba
Signed by untrusted user: 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 copy from "./copy";
import css from "./css";
import homepage from "./homepage";
import missing from "./missing";
@ -9,6 +10,7 @@ import tutorials from "./tutorials";
export = {
categories,
copy,
css,
homepage,
missing,

View File

@ -1,6 +1,7 @@
import generators = require("./generate");
async function generate() {
generators.copy();
generators.css();
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 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">
<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>
(() => {
let theme = localStorage.getItem("theme");