mirror of
https://github.com/esphome/esphome.git
synced 2025-09-25 22:52:20 +01:00
Local Material Icons (#703)
Remove external dependence on fonts.googleapis.com by vendoring MDI fonts and CSS.
This commit is contained in:
committed by
Brandon Davidson
parent
a0b3d861fe
commit
15b87af8ed
BIN
esphome/dashboard/static/fonts/MaterialIcons-Regular.eot
Normal file
BIN
esphome/dashboard/static/fonts/MaterialIcons-Regular.eot
Normal file
Binary file not shown.
BIN
esphome/dashboard/static/fonts/MaterialIcons-Regular.ttf
Normal file
BIN
esphome/dashboard/static/fonts/MaterialIcons-Regular.ttf
Normal file
Binary file not shown.
BIN
esphome/dashboard/static/fonts/MaterialIcons-Regular.woff
Normal file
BIN
esphome/dashboard/static/fonts/MaterialIcons-Regular.woff
Normal file
Binary file not shown.
BIN
esphome/dashboard/static/fonts/MaterialIcons-Regular.woff2
Normal file
BIN
esphome/dashboard/static/fonts/MaterialIcons-Regular.woff2
Normal file
Binary file not shown.
12
esphome/dashboard/static/fonts/README.md
Normal file
12
esphome/dashboard/static/fonts/README.md
Normal file
@@ -0,0 +1,12 @@
|
||||
The recommended way to use the Material Icons font is by linking to the web font hosted on Google Fonts:
|
||||
|
||||
```html
|
||||
<link href="https://fonts.googleapis.com/icon?family=Material+Icons"
|
||||
rel="stylesheet">
|
||||
```
|
||||
|
||||
Read more in our full usage guide:
|
||||
http://google.github.io/material-design-icons/#icon-font-for-the-web
|
||||
|
||||
Source:
|
||||
https://github.com/google/material-design-icons
|
36
esphome/dashboard/static/fonts/material-icons.css
Normal file
36
esphome/dashboard/static/fonts/material-icons.css
Normal file
@@ -0,0 +1,36 @@
|
||||
@font-face {
|
||||
font-family: 'Material Icons';
|
||||
font-style: normal;
|
||||
font-weight: 400;
|
||||
src: url(MaterialIcons-Regular.eot); /* For IE6-8 */
|
||||
src: local('Material Icons'),
|
||||
local('MaterialIcons-Regular'),
|
||||
url(MaterialIcons-Regular.woff2) format('woff2'),
|
||||
url(MaterialIcons-Regular.woff) format('woff'),
|
||||
url(MaterialIcons-Regular.ttf) format('truetype');
|
||||
}
|
||||
|
||||
.material-icons {
|
||||
font-family: 'Material Icons';
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
font-size: 24px; /* Preferred icon size */
|
||||
display: inline-block;
|
||||
line-height: 1;
|
||||
text-transform: none;
|
||||
letter-spacing: normal;
|
||||
word-wrap: normal;
|
||||
white-space: nowrap;
|
||||
direction: ltr;
|
||||
|
||||
/* Support for all WebKit browsers. */
|
||||
-webkit-font-smoothing: antialiased;
|
||||
/* Support for Safari and Chrome. */
|
||||
text-rendering: optimizeLegibility;
|
||||
|
||||
/* Support for Firefox. */
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
|
||||
/* Support for IE. */
|
||||
font-feature-settings: 'liga';
|
||||
}
|
@@ -3,7 +3,7 @@
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>ESPHome Dashboard</title>
|
||||
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
|
||||
<link rel="stylesheet" href="{{ get_static_file_url('fonts/material-icons.css') }}">
|
||||
<link rel="stylesheet" href="{{ get_static_file_url('materialize.min.css') }}">
|
||||
<link rel="stylesheet" href="{{ get_static_file_url('materialize-stepper.min.css') }}">
|
||||
<link rel="stylesheet" href="{{ get_static_file_url('esphome.css') }}">
|
||||
|
@@ -2,10 +2,10 @@
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>ESPHome Dashboard</title>
|
||||
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
|
||||
<title>ESPHome Dashboard</title>
|
||||
<link rel="stylesheet" href="{{ get_static_file_url('fonts/material-icons.css') }}">
|
||||
<link rel="stylesheet" href="{{ get_static_file_url('materialize.min.css') }}">
|
||||
<link href="{{ get_static_file_url('esphome.css') }}" rel="stylesheet">
|
||||
<link rel="stylesheet" href="{{ get_static_file_url('esphome.css') }}">
|
||||
<link rel="shortcut icon" href="{{ get_static_file_url('favicon.ico') }}">
|
||||
|
||||
<script src="{{ get_static_file_url('materialize.min.js') }}"></script>
|
||||
|
Reference in New Issue
Block a user