1
0
Fork 0
mirror of https://github.com/jashkenas/coffeescript.git synced 2022-11-09 12:23:24 -05:00

Embed CSS; a bit unorthodox, but we’re a single page so there’s no point in separate .css files and their separate HTTP requests

This commit is contained in:
Geoffrey Booth 2016-12-06 22:27:08 -08:00
parent 0145bf397a
commit 2392a91033
5 changed files with 504 additions and 4 deletions

View file

@ -129,6 +129,9 @@ task 'build:browser', 'rebuild the merged script for inclusion in the browser',
task 'doc:site', 'watch and continually rebuild the documentation for the website', ->
# Helpers
css = fs.readFileSync('./documentation/css/docs.css', 'utf-8') + '\n' +
fs.readFileSync('./documentation/css/tomorrow.css', 'utf-8')
logo = fs.readFileSync './documentation/images/logo.svg', 'utf-8'
codeFor = ->
@ -220,6 +223,7 @@ task 'doc:site', 'watch and continually rebuild the documentation for the websit
do renderIndex = ->
render = _.template fs.readFileSync(indexFile, 'utf-8')
output = render
css: css
logo: logo
codeFor: codeFor()
releaseHeader: releaseHeader

File diff suppressed because one or more lines are too long

View file

@ -5,8 +5,6 @@
<title>CoffeeScript</title>
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="canonical" href="http://coffeescript.org" />
<link rel="stylesheet" type="text/css" href="v1/css/docs.css" />
<link rel="stylesheet" type="text/css" href="v1/css/tomorrow.css" />
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png">
<link rel="icon" type="image/png" href="/favicon-32x32.png" sizes="32x32">
@ -14,6 +12,10 @@
<link rel="manifest" href="/manifest.json">
<link rel="mask-icon" href="/safari-pinned-tab.svg" color="#5bbad5">
<meta name="theme-color" content="#ffffff">
<style>
<%= css %>
</style>
</head>
<body>