ArthurSlog我的網站上線了~css
ArthurSloghtml
| | -- index.html -- index.js -- style.css -- background.jpg -- node_modules -- package.json -- package-lock.json --README.md
index.html前端
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>ArthurSlog</title> <link rel="stylesheet" type="text/css" href="style.css" > </head> <body> <p>我的技術分享</p> <footer> <a href="http://www.miitbeian.gov.cn">粵ICP備18088522號-1</a> </footer> </body> </html>
style.cssnode
body{ background-image:url('background.jpg'); background-repeat:no-repeat; background-position:50% -10%; } p{ font-size: 48px; position: relative; left: calc(50% - 144px); } footer { font-size: .8rem; position: absolute; bottom: 10px; left: calc(50% - 80px); }
index.jsgit
const serve = require('koa-static'); const Koa = require('koa'); const app = new Koa(); // $ GET /package.json app.use(serve('.')); app.listen(80); console.log('listening on port 80');
package.jsongithub
{ "name": "nodeserver", "version": "1.0.0", "description": "", "main": "index.js", "dependencies": { "koa": "^2.5.2", "koa-static": "^5.0.0" }, "devDependencies": {}, "scripts": { "test": "echo \"Error: no test specified\" && exit 1" }, "repository": { "type": "git", "url": "git+https://github.com/BlessedChild/ArthurSlog.com.git" }, "author": "", "license": "ISC", "bugs": { "url": "https://github.com/BlessedChild/ArthurSlog.com/issues" }, "homepage": "https://github.com/BlessedChild/ArthurSlog.com#readme" }
README.mdweb
# This is ArthurSlog.com