Skip to content

Instantly share code, notes, and snippets.

View semiarthanoian's full-sized avatar

Semi Art semiarthanoian

  • Hanoi, Vietnam
View GitHub Profile
@semiarthanoian
semiarthanoian / main.js
Created May 2, 2022 13:18
public/js/main.js
void function(...args) {
const readMonth = function(monthIndex) {
if (monthIndex == 0) return "January";
if (monthIndex == 1) return "February";
if (monthIndex == 2) return "March";
if (monthIndex == 3) return "April";
if (monthIndex == 4) return "May";
if (monthIndex == 5) return "June";
if (monthIndex == 6) return "July";
@semiarthanoian
semiarthanoian / topnav.css
Last active May 2, 2022 13:36
public/css/component/topnav.css
/* --- Colors */
#topnav {
background: white;
box-shadow: 0 0 27px 9px lightgray;
}
#topnav .logo {
color: white;
background: black;
@semiarthanoian
semiarthanoian / topnav.css
Created May 2, 2022 13:16
public/css/component/topnav.css
/* --- Reset CSS */
* {
box-sizing: border-box;
margin: 0;
padding: 0;
}
/* --- Basic Typography */
const readAllRecordIds = require("../sub-procedure/read-all-record-ids--async-throw");
const selectArticleById = require("./select-by-id--async-throw");
const Article = require("../../type/Article");
module.exports = async (
in_categoryId = "",
out_selected = [],
in_top = Infinity,
in_order = "default" /* default | reversed */
) => {
const fsPromises = require('fs/promises');
const path = require('path');
const handleHomeRequest = function(request, response) {
var indexHtml = path.join(__dirname, 'static', 'index.html');
fsPromises.readFile(indexHtml)
.then(function(data) {
response.setHeader('content-type', textType.html);
response.writeHead(200);