Add a "Coming Soon" page to the Netlify site (#430)

This commit is contained in:
James Nylen 2018-06-09 02:35:26 -05:00 committed by GitHub
parent 5e6b71dcf8
commit c80a1776f5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 60 additions and 0 deletions

1
.gitignore vendored
View file

@ -1 +1,2 @@
node_modules/
site/build/

19
bin/build-site.js Executable file
View file

@ -0,0 +1,19 @@
#!/usr/bin/env node
const fs = require( 'fs' );
const path = require( 'path' );
const siteDir = path.join( __dirname, '..', 'site' );
const siteBuildDir = path.join( siteDir, 'build' );
if ( ! fs.existsSync( siteBuildDir ) ) {
fs.mkdirSync( siteBuildDir );
}
fs.writeFileSync(
path.join( siteBuildDir, 'index.html' ),
fs.readFileSync(
path.join( siteDir, 'coming-soon.html' ),
'utf8'
)
);

View file

@ -2,5 +2,8 @@
"devDependencies": {
"cheerio": "^1.0.0-rc.2",
"marked": "^0.3.12"
},
"scripts": {
"build": "bin/build-site.js"
}
}

37
site/coming-soon.html Normal file
View file

@ -0,0 +1,37 @@
<!DOCTYPE html>
<html>
<head>
<meta name="charset" value="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Remote Jobs</title>
<style type="text/css">
html {
height: 100%;
}
body {
padding: 0;
margin: 0;
display: flex;
align-items: center;
justify-content: center;
min-height: 100%;
font-family: Arial, sans-serif;
}
p {
margin-top: -8%;
text-align: center;
line-height: 1.5em;
}
</style>
</head>
<body>
<p>
This site (the Netlify site for
<a href="https://github.com/remoteintech/remote-jobs">remoteintech/remote-jobs</a>)
<br />
is still under construction. Check back later!
</p>
</body>
</html>