favicon: security camera in orange/red circle

This is derived from the following icon:
https://thenounproject.com/term/security-camera/72530
by iconsmind.com. I paid for the royalty-free license.

Fixes #50.
This commit is contained in:
Scott Lamb 2018-03-12 22:11:45 -07:00
parent 0e365a23e1
commit 320374c6e9
4 changed files with 14 additions and 0 deletions

View File

@ -425,6 +425,8 @@ impl Service {
let (p, mime) = match e.file_name().to_str() { let (p, mime) = match e.file_name().to_str() {
Some(n) if n == "index.html" => ("/".to_owned(), mime::TEXT_HTML), Some(n) if n == "index.html" => ("/".to_owned(), mime::TEXT_HTML),
Some(n) if n.ends_with(".html") => (format!("/{}", n), mime::TEXT_HTML), Some(n) if n.ends_with(".html") => (format!("/{}", n), mime::TEXT_HTML),
Some(n) if n.ends_with(".ico") => (format!("/{}", n),
"image/vnd.microsoft.icon".parse().unwrap()),
Some(n) if n.ends_with(".js") => (format!("/{}", n), mime::TEXT_JAVASCRIPT), Some(n) if n.ends_with(".js") => (format!("/{}", n), mime::TEXT_JAVASCRIPT),
Some(n) if n.ends_with(".map") => (format!("/{}", n), mime::TEXT_JAVASCRIPT), Some(n) if n.ends_with(".map") => (format!("/{}", n), mime::TEXT_JAVASCRIPT),
Some(n) if n.ends_with(".png") => (format!("/{}", n), mime::IMAGE_PNG), Some(n) if n.ends_with(".png") => (format!("/{}", n), mime::IMAGE_PNG),

BIN
ui-src/favicon.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

View File

@ -5,6 +5,8 @@
// TODO: style: no globals? string literals? line length? fn comments? // TODO: style: no globals? string literals? line length? fn comments?
// TODO: live updating. // TODO: live updating.
import './favicon.ico';
import 'jquery-ui/themes/base/button.css'; import 'jquery-ui/themes/base/button.css';
import 'jquery-ui/themes/base/core.css'; import 'jquery-ui/themes/base/core.css';
import 'jquery-ui/themes/base/datepicker.css'; import 'jquery-ui/themes/base/datepicker.css';

View File

@ -29,6 +29,16 @@ module.exports = (env, args) => {
}, { }, {
test: /\.png$/, test: /\.png$/,
use: ['file-loader'], use: ['file-loader'],
}, {
test: /\.ico$/,
use: [
{
loader: 'file-loader',
options: {
name: '[name].[ext]'
}
}
]
}, { }, {
// Load css and then in-line in head // Load css and then in-line in head
test: /\.css$/, test: /\.css$/,