mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Make the reset CSS styles inline
This commit is contained in:
parent
1b413d27f9
commit
25b631efad
@ -6,7 +6,6 @@
|
||||
<meta name="robots" content="noindex">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<link rel="icon" type="image/png" href="favicon.png">
|
||||
<link rel="stylesheet" href="static/reset.css"></link>
|
||||
</head>
|
||||
<body>
|
||||
<div id="page_load_progress">
|
||||
@ -22,9 +21,16 @@
|
||||
}
|
||||
</style>
|
||||
</div>
|
||||
<!-- reset styles {{{ -->
|
||||
<style type="text/css">
|
||||
RESET_STYLES
|
||||
</style>
|
||||
<!-- }}} -->
|
||||
|
||||
<!-- SVG icon definitions {{{ -->
|
||||
ICONS
|
||||
<!-- }}} -->
|
||||
|
||||
<!-- main.js {{{ -->
|
||||
<script id="main_js">MAIN_JS</script>
|
||||
<!-- }}} -->
|
||||
|
@ -104,6 +104,8 @@ def compile_srv():
|
||||
g = {'__file__': iconf}
|
||||
execfile(iconf, g)
|
||||
icons = g['merge']().encode('utf-8')
|
||||
with lopen(os.path.join(base, 'resources', 'content-server', 'reset.css'), 'rb') as f:
|
||||
reset = f.read()
|
||||
rapydscript_dir = os.path.join(base, 'src', 'pyj')
|
||||
rb = os.path.join(base, 'src', 'calibre', 'srv', 'render_book.py')
|
||||
with lopen(rb, 'rb') as f:
|
||||
@ -113,7 +115,7 @@ def compile_srv():
|
||||
with lopen(fname, 'rb') as f:
|
||||
js = compile_pyj(f.read(), fname).replace('__RENDER_VERSION__', rv).encode('utf-8')
|
||||
with lopen(os.path.join(base, 'index.html'), 'rb') as f:
|
||||
html = f.read().replace(b'MAIN_JS', js).replace(b'ICONS', icons)
|
||||
html = f.read().replace(b'RESET_STYLES', reset, 1).replace(b'ICONS', icons, 1).replace(b'MAIN_JS', js, 1)
|
||||
with lopen(os.path.join(base, 'index-generated.html'), 'wb') as f:
|
||||
f.write(html)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user