Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Open sidebar
redl
redeleitsystem
Commits
dd06fbae
Commit
dd06fbae
authored
Oct 08, 2015
by
Robin Sonnabend
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added local ttf for icon-font. Fixes
#1
parent
b96335f7
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
7 additions
and
3 deletions
+7
-3
server.py
server.py
+5
-1
static/font/icon-font.ttf
static/font/icon-font.ttf
+0
-0
templates/icon-font.css
templates/icon-font.css
+1
-1
templates/layout.html
templates/layout.html
+1
-1
No files found.
server.py
View file @
dd06fbae
#!/usr/bin/env python3
from
flask
import
Flask
,
g
,
current_app
,
request
,
session
,
flash
,
redirect
,
url_for
,
abort
from
flask
import
Flask
,
g
,
current_app
,
request
,
session
,
flash
,
redirect
,
url_for
,
abort
,
render_template
,
Response
from
flask.ext.login
import
login_user
,
logout_user
,
login_required
,
current_user
from
flask.ext.principal
import
Principal
,
Identity
,
AnonymousIdentity
,
identity_changed
,
identity_loaded
,
UserNeed
,
RoleNeed
from
flask.ext.script
import
Manager
...
...
@@ -116,6 +116,10 @@ def register():
return
redirect
(
url_for
(
".login"
))
return
render_layout
(
"register.html"
,
form
=
form
)
@
app
.
route
(
"/icon-font.css"
)
def
icon_font
():
return
Response
(
render_template
(
"icon-font.css"
),
mimetype
=
"text/css"
)
@
identity_loaded
.
connect_via
(
app
)
def
on_identity_loaded
(
sender
,
identity
):
# Set the identity user object
...
...
static/font/icon-font.ttf
0 → 100644
View file @
dd06fbae
File added
static/font
/icon-font.css
→
templates
/icon-font.css
View file @
dd06fbae
...
...
@@ -2,7 +2,7 @@
font-family
:
'Material Icons'
;
font-style
:
normal
;
font-weight
:
400
;
src
:
local
(
'Material Icons'
),
local
(
'MaterialIcons-Regular'
),
url(
https://fonts.gstatic.com/s/materialicons/v7/2fcrYFNaTjcS6g4U3t-Y5StnKWgpfO2iSkLzTz-AABg.ttf
)
format
(
'truetype'
);
src
:
local
(
'Material Icons'
),
local
(
'MaterialIcons-Regular'
),
url(
{{ url_for('static', filename='font/icon-font.ttf')
}
}
)
format
(
'truetype'
);
}
.material-icons
{
...
...
templates/layout.html
View file @
dd06fbae
...
...
@@ -7,7 +7,7 @@
<meta
name=
"mobile-web-app-capable"
content=
"yes"
>
<meta
name=
"description"
content=
"moderation tool for handling speaking order"
>
<link
rel=
"stylesheet"
href=
"{{ url_for('static', filename='css/material.red-blue.min.css') }}"
/>
<link
rel=
"stylesheet"
href=
"{{ url_for('
static', filename='font/icon-font.css
') }}"
>
<link
rel=
"stylesheet"
href=
"{{ url_for('
icon_font
') }}"
>
<link
rel=
"stylesheet"
href=
"{{ url_for('static', filename='css/style.css') }}"
/>
<script
src=
"{{ url_for('static', filename='js/material.min.js') }}"
></script>
<script
src=
"{{ url_for('static', filename='js/sorttable.js') }}"
></script>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment