build script + editor + other things

This commit is contained in:
2023-06-16 19:20:44 +02:00
parent 15c33ce2c5
commit b6fb8ef294
8 changed files with 176 additions and 169 deletions

View File

@@ -145,6 +145,10 @@ nav a.router-link-exact-active {
'GRAD' 0,
'opsz' 48
}
.clr-open {
border: black solid 1px !important;
}
</style>
<script>

View File

@@ -11,7 +11,7 @@
<div id="stages" class="stages">
<div id="rectangular" v-if="shape == 'rectangular'" class="stages"></div>
<div id="trapezoid" v-else-if="shape == 'trapezoid'" class="stages"><div id="trapezoid-ingredient"></div></div>
<div id="circular" v-else-if="shape == 'circular'" class="stages">Stage</div>
<div id="circular" v-else-if="shape == 'circular'" class="stages"><div id="circular-ingredient"></div></div>
</div>
</template>
@@ -25,7 +25,7 @@
border: solid black 2px;
}
#trapezoid {
#trapezoid, #circular {
overflow: hidden;
}
@@ -38,6 +38,16 @@
top: 29vh;
right: 120vh;
}
#circular-ingredient {
border: solid black 2px;
border-radius: 100%;
height: 199%;
width: 199%;
position: relative;
top: 0;
right: 100%;
}
</style>
<script>

View File

@@ -11,7 +11,7 @@
<div id="stages">
<div id="rectangular" v-if="shape == 'rectangular'"></div>
<div id="trapezoid" v-if="shape == 'trapezoid'"></div>
<div id="circular" v-if="orishapegin == 'circular'"></div>
<div id="circular" v-if="origin == 'circular'"></div>
</div>
</template>

View File

@@ -17,15 +17,29 @@
</div>
<div class="ticket-settings">
<h3>Ticket Settings</h3>
<div class="category" v-for="category in event.categories">
<table class="category" v-for="category in event.categories">
{{ category.name }}:
<div v-for="price in category.price">
<tr v-for="price in category.price">
<td>
{{ price.name }}:
</td>
<td>
<input type="number" v-model="price.price">
</div>
{{ category.fg }}
{{ category.bg }}
</div>
</td>
</tr>
<tr>
<td>Foreground colour</td>
<td>
<input type="text" data-coloris v-model="category.fg" onkeydown="return false;">
</td>
</tr>
<tr>
<td>Background colour</td>
<td>
<input type="text" data-coloris v-model="category.bg" onkeydown="return false;">
</td>
</tr>
</table>
</div>
<div class="special-settings">
<h3>Special Settings</h3>

View File

@@ -7,19 +7,48 @@
*
*/
const prompt = require( 'prompt-sync' );
const markdownIt = require( 'markdown-it' );
const md2html = new markdownIt();
const fs = require( 'fs' );
const path = require( 'path' );
buildNav( buildDocs() );
if ( prompt( 'Do you want to rebuild the ' ).toLowercase === 'y' ) {
buildDocs();
buildNav();
}
function buildNav () {
function buildNav ( pathObject ) {
console.log( 'building nav ' + pathObject );
}
function buildDocs () {
md2html.render( '#Test' );
let directoriesToScan = [];
let files = fs.readdirSync( path.join( __dirname + '/src/' ) );
for ( let file in files ) {
if ( files[ file ].substring( files[ file ].length - 3 ) == '.md' ) {
handleMD( files[ file ] );
} else {
directoriesToScan.push( files[ file ] );
}
}
let count = directoriesToScan.length;
while ( count > 0 ) {
for ( let missing in directoriesToScan ) {
let files = fs.readdirSync( path.join( __dirname + '/src/' + directoriesToScan[ missing ] ) );
count -= 1;
for ( let file in files ) {
if ( files[ file ].substring( files[ file ].length - 3 ) == '.md' ) {
handleMD( files[ file ] );
} else {
directoriesToScan.push( directoriesToScan[ missing ] + '/' + files[ file ] );
count += 1;
}
}
}
}
md2html.render( '#Test' );
return 'Hi';
}
function handleMD ( path ) {
console.log( 'md file', path );
}

View File

@@ -9,16 +9,7 @@
"version": "1.0.0",
"license": "GPL-3.0-or-later",
"dependencies": {
"markdown-it": "^13.0.1",
"prompt-sync": "^4.2.0"
}
},
"node_modules/ansi-regex": {
"version": "4.1.1",
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.1.tgz",
"integrity": "sha512-ILlv4k/3f6vfQ4OoP2AGvirOktlQ98ZEL1k9FaQjxa3L1abBgbuTDAdPOpvbGncC0BTVQrl+OM8xZGK6tWXt7g==",
"engines": {
"node": ">=6"
"markdown-it": "^13.0.1"
}
},
"node_modules/argparse": {
@@ -65,25 +56,6 @@
"resolved": "https://registry.npmjs.org/mdurl/-/mdurl-1.0.1.tgz",
"integrity": "sha512-/sKlQJCBYVY9Ers9hqzKou4H6V5UWc/M59TH2dvkt+84itfnq7uFOMLpOiOS4ujvHP4etln18fmIxA5R5fll0g=="
},
"node_modules/prompt-sync": {
"version": "4.2.0",
"resolved": "https://registry.npmjs.org/prompt-sync/-/prompt-sync-4.2.0.tgz",
"integrity": "sha512-BuEzzc5zptP5LsgV5MZETjDaKSWfchl5U9Luiu8SKp7iZWD5tZalOxvNcZRwv+d2phNFr8xlbxmFNcRKfJOzJw==",
"dependencies": {
"strip-ansi": "^5.0.0"
}
},
"node_modules/strip-ansi": {
"version": "5.2.0",
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz",
"integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==",
"dependencies": {
"ansi-regex": "^4.1.0"
},
"engines": {
"node": ">=6"
}
},
"node_modules/uc.micro": {
"version": "1.0.6",
"resolved": "https://registry.npmjs.org/uc.micro/-/uc.micro-1.0.6.tgz",
@@ -91,11 +63,6 @@
}
},
"dependencies": {
"ansi-regex": {
"version": "4.1.1",
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.1.tgz",
"integrity": "sha512-ILlv4k/3f6vfQ4OoP2AGvirOktlQ98ZEL1k9FaQjxa3L1abBgbuTDAdPOpvbGncC0BTVQrl+OM8xZGK6tWXt7g=="
},
"argparse": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz",
@@ -131,22 +98,6 @@
"resolved": "https://registry.npmjs.org/mdurl/-/mdurl-1.0.1.tgz",
"integrity": "sha512-/sKlQJCBYVY9Ers9hqzKou4H6V5UWc/M59TH2dvkt+84itfnq7uFOMLpOiOS4ujvHP4etln18fmIxA5R5fll0g=="
},
"prompt-sync": {
"version": "4.2.0",
"resolved": "https://registry.npmjs.org/prompt-sync/-/prompt-sync-4.2.0.tgz",
"integrity": "sha512-BuEzzc5zptP5LsgV5MZETjDaKSWfchl5U9Luiu8SKp7iZWD5tZalOxvNcZRwv+d2phNFr8xlbxmFNcRKfJOzJw==",
"requires": {
"strip-ansi": "^5.0.0"
}
},
"strip-ansi": {
"version": "5.2.0",
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz",
"integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==",
"requires": {
"ansi-regex": "^4.1.0"
}
},
"uc.micro": {
"version": "1.0.6",
"resolved": "https://registry.npmjs.org/uc.micro/-/uc.micro-1.0.6.tgz",

View File

@@ -4,7 +4,7 @@
"description": "The website of libreevent",
"main": "build.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
"build": "node build.js"
},
"repository": {
"type": "git",
@@ -17,7 +17,6 @@
},
"homepage": "https://libreevent.janishutz.com",
"dependencies": {
"markdown-it": "^13.0.1",
"prompt-sync": "^4.2.0"
"markdown-it": "^13.0.1"
}
}

View File