Fix the CoreOS Icon font in the non-CDN case
This commit is contained in:
parent
28bd9af4ff
commit
ee2736bb17
1 changed files with 10 additions and 0 deletions
|
@ -28,7 +28,10 @@ EXTERNAL_FONTS = [
|
|||
'netdna.bootstrapcdn.com/font-awesome/4.2.0/fonts/fontawesome-webfont.woff?v=4.2.0',
|
||||
'netdna.bootstrapcdn.com/font-awesome/4.2.0/fonts/fontawesome-webfont.ttf?v=4.2.0',
|
||||
'netdna.bootstrapcdn.com/font-awesome/4.2.0/fonts/fontawesome-webfont.svg?v=4.2.0',
|
||||
]
|
||||
|
||||
EXTERNAL_CSS_FONTS = [
|
||||
'cdn.core-os.net/icons/core-icons.eot',
|
||||
'cdn.core-os.net/icons/core-icons.woff',
|
||||
'cdn.core-os.net/icons/core-icons.ttf',
|
||||
'cdn.core-os.net/icons/core-icons.svg',
|
||||
|
@ -72,6 +75,13 @@ if __name__ == '__main__':
|
|||
with open(LOCAL_DIRECTORY + filename, 'w') as f:
|
||||
f.write(contents)
|
||||
|
||||
for url in EXTERNAL_CSS_FONTS:
|
||||
print 'Downloading %s' % url
|
||||
response = urllib2.urlopen('https://' + url)
|
||||
|
||||
filename = os.path.basename(url).split('?')[0]
|
||||
with open('static/ldn/' + filename, "wb") as local_file:
|
||||
local_file.write(response.read())
|
||||
|
||||
for url in EXTERNAL_FONTS:
|
||||
print 'Downloading %s' % url
|
||||
|
|
Reference in a new issue