mirror of
https://github.com/jdan/98.css.git
synced 2025-08-14 18:04:06 +02:00
basic template setup
This commit is contained in:
2
.gitignore
vendored
Normal file
2
.gitignore
vendored
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
docs/index.html
|
||||||
|
node_modules/
|
22
build.js
Normal file
22
build.js
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
#!/usr/bin/env node
|
||||||
|
const ejs = require("ejs");
|
||||||
|
const fs = require("fs");
|
||||||
|
|
||||||
|
let id = 0;
|
||||||
|
function getNewId() {
|
||||||
|
return ++id;
|
||||||
|
}
|
||||||
|
function getCurrentId() {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
function buildDocs() {
|
||||||
|
const template = fs.readFileSync("./docs/index.html.ejs", "utf-8");
|
||||||
|
|
||||||
|
fs.writeFileSync(
|
||||||
|
"./docs/index.html",
|
||||||
|
ejs.render(template, { getNewId, getCurrentId })
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
buildDocs();
|
@@ -166,8 +166,8 @@
|
|||||||
</p>
|
</p>
|
||||||
|
|
||||||
<div class="example">
|
<div class="example">
|
||||||
<input type="checkbox" id="example1">
|
<input type="checkbox" id="example<%= getNewId() %>">
|
||||||
<label for="example1">This is a checkbox</label>
|
<label for="example<%= getCurrentId() %>">This is a checkbox</label>
|
||||||
|
|
||||||
<details>
|
<details>
|
||||||
<summary>Show code</summary>
|
<summary>Show code</summary>
|
||||||
@@ -188,8 +188,8 @@
|
|||||||
|
|
||||||
<div class="example">
|
<div class="example">
|
||||||
<div class="field-row">
|
<div class="field-row">
|
||||||
<input checked type="checkbox" id="example2">
|
<input checked type="checkbox" id="example<%= getNewId() %>">
|
||||||
<label for="example2">I am checked</label>
|
<label for="example<%= getCurrentId() %>">I am checked</label>
|
||||||
</div>
|
</div>
|
||||||
<div class="field-row">
|
<div class="field-row">
|
||||||
<input disabled type="checkbox" id="example3">
|
<input disabled type="checkbox" id="example3">
|
14
package-lock.json
generated
Normal file
14
package-lock.json
generated
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
{
|
||||||
|
"name": "98.css",
|
||||||
|
"version": "0.0.1",
|
||||||
|
"lockfileVersion": 1,
|
||||||
|
"requires": true,
|
||||||
|
"dependencies": {
|
||||||
|
"ejs": {
|
||||||
|
"version": "3.0.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/ejs/-/ejs-3.0.2.tgz",
|
||||||
|
"integrity": "sha512-IncmUpn1yN84hy2shb0POJ80FWrfGNY0cxO9f4v+/sG7qcBvAtVWUA1IdzY/8EYUmOVhoKJVdJjNd3AZcnxOjA==",
|
||||||
|
"dev": true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@@ -7,7 +7,8 @@
|
|||||||
"doc": "docs"
|
"doc": "docs"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"test": "echo \"Error: no test specified\" && exit 1"
|
"test": "echo \"Error: no test specified\" && exit 1",
|
||||||
|
"build": "./build.js"
|
||||||
},
|
},
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
@@ -22,5 +23,8 @@
|
|||||||
"bugs": {
|
"bugs": {
|
||||||
"url": "https://github.com/jdan/windows98.css/issues"
|
"url": "https://github.com/jdan/windows98.css/issues"
|
||||||
},
|
},
|
||||||
"homepage": "https://github.com/jdan/windows98.css#readme"
|
"homepage": "https://github.com/jdan/windows98.css#readme",
|
||||||
|
"devDependencies": {
|
||||||
|
"ejs": "^3.0.2"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user