Support Google Font dependencies
Allow downloading fonts from Google Font at install time. Closes GitLab issue #595, thanks to Martin (@efelon) for the report. Closes re-opened GitLab issue #343. Remove included Lato font. Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
This commit is contained in:
@@ -2,15 +2,31 @@ from __future__ import unicode_literals
|
||||
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
|
||||
from mayan.apps.dependencies.classes import JavaScriptDependency
|
||||
from mayan.apps.dependencies.classes import (
|
||||
GoogleFontDependency, JavaScriptDependency
|
||||
)
|
||||
|
||||
GoogleFontDependency(
|
||||
label=_('Lato font'), module=__name__, name='lato',
|
||||
url='https://fonts.googleapis.com/css?family=Lato:400,700,400italic'
|
||||
)
|
||||
JavaScriptDependency(
|
||||
label=_('Bootstrap'), module=__name__, name='bootstrap',
|
||||
version_string='=3.4.1'
|
||||
)
|
||||
JavaScriptDependency(
|
||||
label=_('Bootswatch'), module=__name__, name='bootswatch',
|
||||
version_string='=3.4.1'
|
||||
replace_list = [
|
||||
{
|
||||
'filename_pattern': '*.css',
|
||||
'content_patterns': [
|
||||
{
|
||||
'search': '"https://fonts.googleapis.com/css?family=Lato:400,700,400italic"',
|
||||
'replace': '../../../google_fonts/lato/import.css',
|
||||
}
|
||||
]
|
||||
}
|
||||
], version_string='=3.4.1'
|
||||
)
|
||||
JavaScriptDependency(
|
||||
label=_('Fancybox'), module=__name__, name='@fancyapps/fancybox',
|
||||
|
||||
@@ -11,44 +11,6 @@
|
||||
url('../fonts/IM_Fell_English_SC.ttf') format('truetype');
|
||||
}
|
||||
|
||||
/* Flatly fonts */
|
||||
@font-face {
|
||||
font-family: 'Lato';
|
||||
font-style: normal;
|
||||
font-weight: 400;
|
||||
src:
|
||||
local('Lato Regular'),
|
||||
local('Lato-Regular'),
|
||||
url('../fonts/Lato_400.eot?#iefix') format('embedded-opentype'),
|
||||
url('../fonts/Lato_400.woff') format('woff'),
|
||||
url('../fonts/Lato_400.svg#Lato') format('svg'),
|
||||
url('../fonts/Lato_400.ttf') format('truetype');
|
||||
}
|
||||
@font-face {
|
||||
font-family: 'Lato';
|
||||
font-style: normal;
|
||||
font-weight: 700;
|
||||
src:
|
||||
local('Lato Bold'),
|
||||
local('Lato-Bold'),
|
||||
url('../fonts/Lato_700.eot?#iefix') format('embedded-opentype'),
|
||||
url('../fonts/Lato_700.woff') format('woff'),
|
||||
url('../fonts/Lato_700.svg#Lato') format('svg'),
|
||||
url('../fonts/Lato_700.ttf') format('truetype');
|
||||
}
|
||||
@font-face {
|
||||
font-family: 'Lato';
|
||||
font-style: italic;
|
||||
font-weight: 400;
|
||||
src:
|
||||
local('Lato Italic'),
|
||||
local('Lato-Italic'),
|
||||
url('../fonts/Lato_400italic.eot?#iefix') format('embedded-opentype'),
|
||||
url('../fonts/Lato_400italic.woff') format('woff'),
|
||||
url('../fonts/Lato_400italic.svg#Lato') format('svg'),
|
||||
url('../fonts/Lato_400italic.ttf') format('truetype');
|
||||
}
|
||||
|
||||
body {
|
||||
padding-top: 70px;
|
||||
}
|
||||
|
||||
Binary file not shown.
File diff suppressed because it is too large
Load Diff
|
Before Width: | Height: | Size: 231 KiB |
Binary file not shown.
Binary file not shown.
Binary file not shown.
File diff suppressed because it is too large
Load Diff
|
Before Width: | Height: | Size: 226 KiB |
Binary file not shown.
Binary file not shown.
Binary file not shown.
File diff suppressed because it is too large
Load Diff
|
Before Width: | Height: | Size: 244 KiB |
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user