captive-portal: Serve Ubuntu font files locally
authorMichael Tremer <michael.tremer@ipfire.org>
Wed, 4 Oct 2017 11:55:17 +0000 (12:55 +0100)
committerMichael Tremer <michael.tremer@ipfire.org>
Wed, 4 Oct 2017 11:55:17 +0000 (12:55 +0100)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
config/rootfiles/common/web-user-interface
html/html/captive/assets/captive.css
html/html/captive/template.html
lfs/web-user-interface

index 4a5cb6a..531f8bd 100644 (file)
@@ -96,6 +96,9 @@ srv/web/ipfire/cgi-bin/wlanap.cgi
 srv/web/ipfire/html/blob.gif
 #srv/web/ipfire/html/captive
 #srv/web/ipfire/html/captive/assets
+srv/web/ipfire/html/captive/assets/Ubuntu-L.ttf
+srv/web/ipfire/html/captive/assets/Ubuntu-M.ttf
+srv/web/ipfire/html/captive/assets/Ubuntu-R.ttf
 srv/web/ipfire/html/captive/assets/bootstrap-grid.min.css
 srv/web/ipfire/html/captive/assets/bootstrap-grid.min.css.map
 srv/web/ipfire/html/captive/assets/bootstrap-reboot.min.css
index f575f01..6f231bc 100644 (file)
@@ -1,3 +1,21 @@
+@font-face {
+       font-family: "Ubuntu";
+       font-weight: 300;
+       src: local("Ubuntu Light"), local("Ubuntu-Light"), url("Ubuntu-L.ttf") format("truetype");
+}
+
+@font-face {
+       font-family: "Ubuntu";
+       font-weight: 400;
+       src: local("Ubuntu Regular"), local("Ubuntu-Regular"), url("Ubuntu-R.ttf") format("truetype");
+}
+
+@font-face {
+       font-family: "Ubuntu";
+       font-weight: 500;
+       src: local("Ubuntu Medium"), local("Ubuntu-Medium"), url("Ubuntu-M.ttf") format("truetype");
+}
+
 body {
        background-image: url("../cgi-bin/logo.cgi");
        background-size: 100%;
index 3349bb0..04be2b1 100644 (file)
@@ -16,8 +16,6 @@
                        </style>
                </TMPL_IF>
 
-               <link href="https://fonts.googleapis.com/css?family=Ubuntu:300,400,500" rel="stylesheet">
-
                <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
        </head>
 
index 475bb68..3e9eb9a 100644 (file)
@@ -80,4 +80,12 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
        ln -svf --relative /usr/share/bootstrap/css/bootstrap-reboot.min.css.map \
                /srv/web/ipfire/html/captive/assets/bootstrap-reboot.min.css.map
 
+       # Captive Portal Fonts
+       ln -svf --relative /usr/share/fonts/Ubuntu-L.ttf \
+               /srv/web/ipfire/html/captive/assets/Ubuntu-L.ttf
+       ln -svf --relative /usr/share/fonts/Ubuntu-M.ttf \
+               /srv/web/ipfire/html/captive/assets/Ubuntu-M.ttf
+       ln -svf --relative /usr/share/fonts/Ubuntu-R.ttf \
+               /srv/web/ipfire/html/captive/assets/Ubuntu-R.ttf
+
        @$(POSTBUILD)