commit 36f6a2b34771ec284cdc542d96b58637ee1dee18 Author: Brian Rogers Date: Fri Aug 19 11:49:00 2022 -0600 initial commit diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..a5e5763 --- /dev/null +++ b/.gitignore @@ -0,0 +1,26 @@ +### Project Specific +# Files +/assets/jsconfig.json +hugo_stats.json +.hugo_build.lock + +# Directories +/public/ +/resources/_gen/ + +### Editor Specific +# Files +/*.sublime-project +/*.sublime-workspace + +# Directories +/.idea +/.vscode + +### System Specific +# Files +.DS_Store +Thumbs.db + +# Directories +__MACOSX diff --git a/archetypes/default.md b/archetypes/default.md new file mode 100644 index 0000000..00e77bd --- /dev/null +++ b/archetypes/default.md @@ -0,0 +1,6 @@ +--- +title: "{{ replace .Name "-" " " | title }}" +date: {{ .Date }} +draft: true +--- + diff --git a/config.toml b/config.toml new file mode 100644 index 0000000..7d0d7db --- /dev/null +++ b/config.toml @@ -0,0 +1,4 @@ +baseURL = "https://mygamesdb.ditoforge.com/" +languageCode = "en-us" +title = "My Games DB" +theme = "gamesdb" diff --git a/content/consoles/index.md b/content/consoles/index.md new file mode 100644 index 0000000..8d14041 --- /dev/null +++ b/content/consoles/index.md @@ -0,0 +1,7 @@ +--- +title: "Consoles" +date: 2022-08-19T11:46:57-06:00 +draft: false +--- + +All the consoles. diff --git a/content/consoles/show.md b/content/consoles/show.md new file mode 100644 index 0000000..cbd0b7f --- /dev/null +++ b/content/consoles/show.md @@ -0,0 +1,7 @@ +--- +title: "Show" +date: 2022-08-19T11:47:01-06:00 +draft: false +--- + +Details about a console. diff --git a/content/games/index.md b/content/games/index.md new file mode 100644 index 0000000..c9e37d4 --- /dev/null +++ b/content/games/index.md @@ -0,0 +1,7 @@ +--- +title: "Games" +date: 2022-08-19T11:47:09-06:00 +draft: false +--- + +All the games. diff --git a/content/games/show.md b/content/games/show.md new file mode 100644 index 0000000..0813331 --- /dev/null +++ b/content/games/show.md @@ -0,0 +1,7 @@ +--- +title: "Show" +date: 2022-08-19T11:47:11-06:00 +draft: false +--- + +Details about a game. diff --git a/content/index.md b/content/index.md new file mode 100644 index 0000000..7ef5773 --- /dev/null +++ b/content/index.md @@ -0,0 +1,9 @@ +--- +title: "Main Page" +date: 2022-08-18T11:17:43-06:00 +draft: false +--- + +# The title page + +This is the title page, you should know what that means diff --git a/data/consoles.json b/data/consoles.json new file mode 100644 index 0000000..18d006a --- /dev/null +++ b/data/consoles.json @@ -0,0 +1,37 @@ +{ + "nes": { + "title": "Nintendo", + "slug": "nes", + "releaseDate": "1985-10-18", + }, + "snes": { + "title": "Super Nintendo", + "slug": "snes", + "releaseDate": "1991-09-09", + }, + "n64": { + "title": "Nintendo 64", + "slug": "n64", + "releaseDate": "1996-09-29", + }, + "gbc": { + "title": "Game Boy Color", + "slug": "gbc", + "releaseDate": "1998-11-18", + }, + "switch": { + "title": "Nintendo Switch", + "slug": "switch", + "releaseDate": "2017-03-03", + }, + "ps1": { + "title": "Playstation", + "slug": "ps1", + "releaseDate": "1995-09-01", + }, + "ps2": { + "title": "Playstation 2", + "slug": "ps2", + "releaseDate": "2000-10-26", + }, +} \ No newline at end of file diff --git a/notes.txt b/notes.txt new file mode 100644 index 0000000..62db024 --- /dev/null +++ b/notes.txt @@ -0,0 +1,5 @@ +hugo new pages/something.md + +hugo --printUnusedTemplates --printPathWarnings --printI18nWarnings --enableGitInfo --debug server + +hugo --debug --buildDrafts --cleanDestinationDir --config config.toml --enableGitInfo --gc --printI18nWarnings --printMemoryUsage --printPathWarnings --printUnusedTemplates --templateMetrics --templateMetricsHints --watch server \ No newline at end of file diff --git a/static/css/app.css b/static/css/app.css new file mode 100644 index 0000000..6de61ed --- /dev/null +++ b/static/css/app.css @@ -0,0 +1,165 @@ +/** +--------------------------------+ **/ +/** | Sans font faces | **/ +/** +--------------------------------+ **/ + +@font-face { + font-family: "Barlow"; + src: url(/fonts/Barlow/Barlow-Regular.woff2) format("woff2"); + font-weight: 400; + font-style: normal; + font-display: swap; +} + +@font-face { + font-family: "Barlow"; + src: url(/fonts/Barlow/Barlow-Italic.woff2) format("woff2"); + font-weight: 400; + font-style: italic; + font-display: swap; +} + +@font-face { + font-family: "Barlow"; + src: url(/fonts/Barlow/Barlow-Medium.woff2) format("woff2"); + font-weight: 500; + font-style: normal; + font-display: swap; +} + +@font-face { + font-family: "Barlow"; + src: url(/fonts/Barlow/Barlow-MediumItalic.woff2) format("woff2"); + font-weight: 500; + font-style: italic; + font-display: swap; +} + +@font-face { + font-family: "Barlow"; + src: url(/fonts/Barlow/Barlow-SemiBold.woff2) format("woff2"); + font-weight: 600; + font-style: normal; + font-display: swap; +} + +@font-face { + font-family: "Barlow"; + src: url(/fonts/Barlow/Barlow-SemiBoldItalic.woff2) format("woff2"); + font-weight: 600; + font-style: italic; + font-display: swap; +} + +@font-face { + font-family: "Barlow"; + src: url(/fonts/Barlow/Barlow-Bold.woff2) format("woff2"); + font-weight: 700; + font-style: normal; + font-display: swap; +} + +@font-face { + font-family: "Barlow"; + src: url(/fonts/Barlow/Barlow-BoldItalic.woff2) format("woff2"); + font-weight: 700; + font-style: italic; + font-display: swap; +} + +/** +--------------------------------+ **/ +/** | Sans Serif font faces | **/ +/** +--------------------------------+ **/ + +@font-face { + font-family: "Merriweather"; + src: url(/fonts/Merriweather/Merriweather-Regular.woff2) format("woff2"); + font-weight: 400; + font-style: normal; + font-display: swap; +} + +@font-face { + font-family: "Merriweather"; + src: url(/fonts/Merriweather/Merriweather-Italic.woff2) format("woff2"); + font-weight: 400; + font-style: italic; + font-display: swap; +} + +@font-face { + font-family: "Merriweather"; + src: url(/fonts/Merriweather/Merriweather-Bold.woff2) format("woff2"); + font-weight: 700; + font-style: normal; + font-display: swap; +} + +@font-face { + font-family: "Merriweather"; + src: url(/fonts/Merriweather/Merriweather-BoldItalic.woff2) format("woff2"); + font-weight: 700; + font-style: italic; + font-display: swap; +} + +/** +--------------------------------+ **/ +/** | Monospace font faces | **/ +/** +--------------------------------+ **/ + +/**/ + +/** +--------------------------------+ **/ +/** | Font family classes | **/ +/** +--------------------------------+ **/ + +.font-sans { + font-family: Barlow, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; +} + +.font-serif { + font-family: Merriweather, ui-serif, Georgia, Cambria, "Times New Roman", Times, serif; +} + +.font-mono, .font-monospace { + font-family: ui-monospace, "Liberation Mono", SFMono-Regular, Menlo, Monaco, Consolas, "Courier New", monospace; +} + + +.page-grid-container { + display: grid; + grid-template-columns: 1fr; + grid-template-rows: max-content 1fr max-content; + gap: 0em 0em; + grid-auto-flow: row; + grid-template-areas: + "page-header" + "page-content" + "page-footer"; +} + +.page-header { + grid-area: page-header; +} + +.masthead { + display: grid; + grid-auto-flow: column; + grid-template-columns: max-content 1fr max-content; + gap: 0rem 2em; + align-items: stretch; + min-height: 65px; +} + +.nav-link { + display: grid; + align-items: center; + padding: 0em 0.75em; +} + +.page-content { + grid-area: page-content; +} + +.page-footer { + grid-area: page-footer; +} diff --git a/static/css/print.css b/static/css/print.css new file mode 100644 index 0000000..9d6f459 --- /dev/null +++ b/static/css/print.css @@ -0,0 +1 @@ +/**/ diff --git a/static/js/app.js b/static/js/app.js new file mode 100644 index 0000000..131d9d1 --- /dev/null +++ b/static/js/app.js @@ -0,0 +1,27 @@ +import { createApp } from 'vue' + +const htmlRoot = document.documentElement + +const app = createApp({ + data() { + return { + darkModeActive: false, + } + }, + + methods: { + activateDarkMode: function () { + this.darkModeActive = true + htmlRoot.classList.add('dark') + localStorage.theme = "dark" + }, + + deactivateDarkMode: function () { + this.darkModeActive = false + htmlRoot.classList.remove('dark') + localStorage.theme = "light" + }, + }, +}) + +app.mount('#app') diff --git a/static/js/vendor/vue.esm-browser.js b/static/js/vendor/vue.esm-browser.js new file mode 100644 index 0000000..969ac62 --- /dev/null +++ b/static/js/vendor/vue.esm-browser.js @@ -0,0 +1,15948 @@ +/** + * Make a map and return a function for checking if a key + * is in that map. + * IMPORTANT: all calls of this function must be prefixed with + * \/\*#\_\_PURE\_\_\*\/ + * So that rollup can tree-shake them if necessary. + */ +function makeMap(str, expectsLowerCase) { + const map = Object.create(null); + const list = str.split(','); + for (let i = 0; i < list.length; i++) { + map[list[i]] = true; + } + return expectsLowerCase ? val => !!map[val.toLowerCase()] : val => !!map[val]; +} + +/** + * dev only flag -> name mapping + */ +const PatchFlagNames = { + [1 /* TEXT */]: `TEXT`, + [2 /* CLASS */]: `CLASS`, + [4 /* STYLE */]: `STYLE`, + [8 /* PROPS */]: `PROPS`, + [16 /* FULL_PROPS */]: `FULL_PROPS`, + [32 /* HYDRATE_EVENTS */]: `HYDRATE_EVENTS`, + [64 /* STABLE_FRAGMENT */]: `STABLE_FRAGMENT`, + [128 /* KEYED_FRAGMENT */]: `KEYED_FRAGMENT`, + [256 /* UNKEYED_FRAGMENT */]: `UNKEYED_FRAGMENT`, + [512 /* NEED_PATCH */]: `NEED_PATCH`, + [1024 /* DYNAMIC_SLOTS */]: `DYNAMIC_SLOTS`, + [2048 /* DEV_ROOT_FRAGMENT */]: `DEV_ROOT_FRAGMENT`, + [-1 /* HOISTED */]: `HOISTED`, + [-2 /* BAIL */]: `BAIL` +}; + +/** + * Dev only + */ +const slotFlagsText = { + [1 /* STABLE */]: 'STABLE', + [2 /* DYNAMIC */]: 'DYNAMIC', + [3 /* FORWARDED */]: 'FORWARDED' +}; + +const GLOBALS_WHITE_LISTED = 'Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,' + + 'decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,' + + 'Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt'; +const isGloballyWhitelisted = /*#__PURE__*/ makeMap(GLOBALS_WHITE_LISTED); + +const range = 2; +function generateCodeFrame(source, start = 0, end = source.length) { + // Split the content into individual lines but capture the newline sequence + // that separated each line. This is important because the actual sequence is + // needed to properly take into account the full line length for offset + // comparison + let lines = source.split(/(\r?\n)/); + // Separate the lines and newline sequences into separate arrays for easier referencing + const newlineSequences = lines.filter((_, idx) => idx % 2 === 1); + lines = lines.filter((_, idx) => idx % 2 === 0); + let count = 0; + const res = []; + for (let i = 0; i < lines.length; i++) { + count += + lines[i].length + + ((newlineSequences[i] && newlineSequences[i].length) || 0); + if (count >= start) { + for (let j = i - range; j <= i + range || end > count; j++) { + if (j < 0 || j >= lines.length) + continue; + const line = j + 1; + res.push(`${line}${' '.repeat(Math.max(3 - String(line).length, 0))}| ${lines[j]}`); + const lineLength = lines[j].length; + const newLineSeqLength = (newlineSequences[j] && newlineSequences[j].length) || 0; + if (j === i) { + // push underline + const pad = start - (count - (lineLength + newLineSeqLength)); + const length = Math.max(1, end > count ? lineLength - pad : end - start); + res.push(` | ` + ' '.repeat(pad) + '^'.repeat(length)); + } + else if (j > i) { + if (end > count) { + const length = Math.max(Math.min(end - count, lineLength), 1); + res.push(` | ` + '^'.repeat(length)); + } + count += lineLength + newLineSeqLength; + } + } + break; + } + } + return res.join('\n'); +} + +/** + * On the client we only need to offer special cases for boolean attributes that + * have different names from their corresponding dom properties: + * - itemscope -> N/A + * - allowfullscreen -> allowFullscreen + * - formnovalidate -> formNoValidate + * - ismap -> isMap + * - nomodule -> noModule + * - novalidate -> noValidate + * - readonly -> readOnly + */ +const specialBooleanAttrs = `itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly`; +const isSpecialBooleanAttr = /*#__PURE__*/ makeMap(specialBooleanAttrs); +/** + * Boolean attributes should be included if the value is truthy or ''. + * e.g. `