git.s-ol.nu mmm / 9f20fe6
static/style: serve fonts locally s-ol 1 year, 4 months ago
15 changed file(s) with 50 addition(s) and 3 deletion(s). Raw diff Collapse all Expand all
155155 return [[<link rel="stylesheet" type="text/css" href="/static/style/:text/css" />]]
156156 end
157157 end)()
158 buf = buf .. [[<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:200,400,600" />]]
159158 buf = buf .. "\n " .. tostring(opts.meta) .. "\n " .. tostring(get_scripts(fileder)) .. "\n </head>\n <body>\n " .. tostring(gen_header()) .. "\n\n " .. tostring(content) .. "\n\n " .. tostring(footer)
160159 buf = buf .. (function()
161160 if STATIC then
116116 <html>
117117 <head>]]
118118 buf ..= if STATIC then STATIC.style else [[<link rel="stylesheet" type="text/css" href="/static/style/:text/css" />]]
119 buf ..= [[<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:200,400,600" />]]
120119 buf ..= "
121120 #{opts.meta}
122121 #{get_scripts fileder}
0 fonts
01 defs
12 reset
23 header
0 import tourl from (require "mmm.mmmfs.util") require "mmm.dom"
1
2 =>
3 link_font = (name) ->
4 "url('#{tourl @path, "#{name}: font/woff2"}') format('woff2'), url('#{tourl @path, "#{name}: font/woff"}') format('woff')"
5
6 "
7 /* source-sans-pro-200 - latin-ext_latin */
8 @font-face {
9 font-family: 'Source Sans Pro';
10 font-style: normal;
11 font-weight: 200;
12 src: local(''), #{link_font "sans_200"};
13 }
14
15 /* source-sans-pro-regular - latin-ext_latin */
16 @font-face {
17 font-family: 'Source Sans Pro';
18 font-style: normal;
19 font-weight: 400;
20 src: local(''), #{link_font "sans_400"};
21 }
22
23 /* source-sans-pro-italic - latin-ext_latin */
24 @font-face {
25 font-family: 'Source Sans Pro';
26 font-style: italic;
27 font-weight: 400;
28 src: local(''), #{link_font "sans_400i"};
29 }
30
31 /* source-sans-pro-600 - latin-ext_latin */
32 @font-face {
33 font-family: 'Source Sans Pro';
34 font-style: normal;
35 font-weight: 600;
36 src: local(''), #{link_font "sans_600"};
37 }
38
39 /* source-code-pro-regular - latin */
40 @font-face {
41 font-family: 'Source Code Pro';
42 font-style: normal;
43 font-weight: 400;
44 src: local(''), #{link_font "code_400"};
45 }
46 "
66 -moz-osx-font-smoothing: grayscale;
77 }
88
9 body { font-family: 'Source Sans Pro'; }
910 body, html, h1, h2, h3, h4, h5, h6 {
1011 margin: 0;
1112 padding: 0;
2324 color: graytext;
2425 }
2526 }
26 tt, code, kbd, samp { font-family: monospace; }
27 tt, code, kbd, samp { font-family: 'Source Code Pro', monospace; }
2728 code { font-size: 0.8em; }
2829 b, strong { font-weight: bold; }
2930 em, i { font-style: italic; }