diff --git a/LICENSE b/LICENSE index cb9b058..d36b19d 100644 --- a/LICENSE +++ b/LICENSE @@ -1,121 +1,9 @@ -Creative Commons Legal Code +The MIT License (MIT) -CC0 1.0 Universal +Copyright © 2023 Eric Woodward - CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE - LEGAL SERVICES. DISTRIBUTION OF THIS DOCUMENT DOES NOT CREATE AN - ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS - INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES - REGARDING THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS - PROVIDED HEREUNDER, AND DISCLAIMS LIABILITY FOR DAMAGES RESULTING FROM - THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS PROVIDED - HEREUNDER. +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: -Statement of Purpose +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. -The laws of most jurisdictions throughout the world automatically confer -exclusive Copyright and Related Rights (defined below) upon the creator -and subsequent owner(s) (each and all, an "owner") of an original work of -authorship and/or a database (each, a "Work"). - -Certain owners wish to permanently relinquish those rights to a Work for -the purpose of contributing to a commons of creative, cultural and -scientific works ("Commons") that the public can reliably and without fear -of later claims of infringement build upon, modify, incorporate in other -works, reuse and redistribute as freely as possible in any form whatsoever -and for any purposes, including without limitation commercial purposes. -These owners may contribute to the Commons to promote the ideal of a free -culture and the further production of creative, cultural and scientific -works, or to gain reputation or greater distribution for their Work in -part through the use and efforts of others. - -For these and/or other purposes and motivations, and without any -expectation of additional consideration or compensation, the person -associating CC0 with a Work (the "Affirmer"), to the extent that he or she -is an owner of Copyright and Related Rights in the Work, voluntarily -elects to apply CC0 to the Work and publicly distribute the Work under its -terms, with knowledge of his or her Copyright and Related Rights in the -Work and the meaning and intended legal effect of CC0 on those rights. - -1. Copyright and Related Rights. A Work made available under CC0 may be - protected by copyright and related or neighboring rights ("Copyright and - Related Rights"). Copyright and Related Rights include, but are not - limited to, the following: - -i. the right to reproduce, adapt, distribute, perform, display, -communicate, and translate a Work; -ii. moral rights retained by the original author(s) and/or performer(s); -iii. publicity and privacy rights pertaining to a person's image or -likeness depicted in a Work; -iv. rights protecting against unfair competition in regards to a Work, -subject to the limitations in paragraph 4(a), below; -v. rights protecting the extraction, dissemination, use and reuse of data -in a Work; -vi. database rights (such as those arising under Directive 96/9/EC of the -European Parliament and of the Council of 11 March 1996 on the legal -protection of databases, and under any national implementation -thereof, including any amended or successor version of such -directive); and -vii. other similar, equivalent or corresponding rights throughout the -world based on applicable law or treaty, and any national -implementations thereof. - -2. Waiver. To the greatest extent permitted by, but not in contravention - of, applicable law, Affirmer hereby overtly, fully, permanently, - irrevocably and unconditionally waives, abandons, and surrenders all of - Affirmer's Copyright and Related Rights and associated claims and causes - of action, whether now known or unknown (including existing as well as - future claims and causes of action), in the Work (i) in all territories - worldwide, (ii) for the maximum duration provided by applicable law or - treaty (including future time extensions), (iii) in any current or future - medium and for any number of copies, and (iv) for any purpose whatsoever, - including without limitation commercial, advertising or promotional - purposes (the "Waiver"). Affirmer makes the Waiver for the benefit of each - member of the public at large and to the detriment of Affirmer's heirs and - successors, fully intending that such Waiver shall not be subject to - revocation, rescission, cancellation, termination, or any other legal or - equitable action to disrupt the quiet enjoyment of the Work by the public - as contemplated by Affirmer's express Statement of Purpose. - -3. Public License Fallback. Should any part of the Waiver for any reason - be judged legally invalid or ineffective under applicable law, then the - Waiver shall be preserved to the maximum extent permitted taking into - account Affirmer's express Statement of Purpose. In addition, to the - extent the Waiver is so judged Affirmer hereby grants to each affected - person a royalty-free, non transferable, non sublicensable, non exclusive, - irrevocable and unconditional license to exercise Affirmer's Copyright and - Related Rights in the Work (i) in all territories worldwide, (ii) for the - maximum duration provided by applicable law or treaty (including future - time extensions), (iii) in any current or future medium and for any number - of copies, and (iv) for any purpose whatsoever, including without - limitation commercial, advertising or promotional purposes (the - "License"). The License shall be deemed effective as of the date CC0 was - applied by Affirmer to the Work. Should any part of the License for any - reason be judged legally invalid or ineffective under applicable law, such - partial invalidity or ineffectiveness shall not invalidate the remainder - of the License, and in such case Affirmer hereby affirms that he or she - will not (i) exercise any of his or her remaining Copyright and Related - Rights in the Work or (ii) assert any associated claims and causes of - action with respect to the Work, in either case contrary to Affirmer's - express Statement of Purpose. - -4. Limitations and Disclaimers. - -a. No trademark or patent rights held by Affirmer are waived, abandoned, -surrendered, licensed or otherwise affected by this document. -b. Affirmer offers the Work as-is and makes no representations or -warranties of any kind concerning the Work, express, implied, -statutory or otherwise, including without limitation warranties of -title, merchantability, fitness for a particular purpose, non -infringement, or the absence of latent or other defects, accuracy, or -the present or absence of errors, whether or not discoverable, all to -the greatest extent permissible under applicable law. -c. Affirmer disclaims responsibility for clearing rights of other persons -that may apply to the Work or any use thereof, including without -limitation any person's Copyright and Related Rights in the Work. -Further, Affirmer disclaims responsibility for obtaining any necessary -consents, permissions or other rights required for any use of the -Work. -d. Affirmer understands and acknowledges that Creative Commons is not a -party to this document and has no duty or obligation with respect to -this CC0 or use of the Work. +THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/lib/build.js b/lib/build.js index 86e7c0a..d3232be 100644 --- a/lib/build.js +++ b/lib/build.js @@ -7,17 +7,17 @@ module.exports = async (config) => { ejs = require("ejs"), frontMatter = require("front-matter"), glob = require("glob"), - hljs = require("highlight.js"), + dictionary = { + "/astral/vessels.html": ["vessel", "vessels"], + "/campaign/timeline.html": ["last session"], + "https://oldschoolessentials.necroticgnome.com/srd/index.php/Structures": + ["stronghold"], + "/astral/timeline.html": ["CAC", "BAC", "Common Astral Calendar"], + "/astral/adventuring.html#portals": ["portal", "portals"], + "/astral/adventuring.html#outposts": ["outpost", "outposts"], + "/astral/adventuring.html#fragments": ["island", "islands"], + }, md = require("markdown-it")({ - highlight: (str, lang) => { - if (lang && hljs.getLanguage(lang)) { - try { - return hljs.highlight(str, { language: lang }).value; - } catch (__) {} - } - - return ""; // use external default escaping - }, html: true, linkify: true, typographer: true, @@ -36,8 +36,12 @@ module.exports = async (config) => { headerless: true, multibody: true, aotolabel: true, + }) + .use(require("markdown-it-emoji")) + .use(require("markdown-it-mark")) + .use(require("markdown-it-auto-crosslinker"), { + dictionary, }), - emoji = require("markdown-it-emoji"), // { readJsonIfExists } = require("./utils"), { build, isRebuild, logFunction: log = () => {} } = config || {}, { outputPath, journalsPerPage = 5, srcPath } = build, @@ -201,8 +205,7 @@ module.exports = async (config) => { } }; - md.use(emoji); - + // md.use(emoji); log(`${isRebuild ? "Reb" : "B"}uilding...`); // clear destination folder @@ -241,7 +244,8 @@ module.exports = async (config) => { }, pages = files .map(({ page }) => ({ ...page })) - .filter(({ is_draft }) => !is_draft) + .filter(({ is_draft = false }) => !is_draft) + .filter(({ status }) => status !== "draft") .sort(sortByPubDate), tagCloud = pages.reduce((acc, curr) => { const { tags } = curr; diff --git a/lib/serve.js b/lib/serve.js index 2bf7728..e2cfccf 100644 --- a/lib/serve.js +++ b/lib/serve.js @@ -1,26 +1,27 @@ module.exports = async (config) => { - let isReady = false; - const - http = require('http'), + let isReady = false; + const http = require("http"), + address = require("network-address"), + handler = require("serve-handler"), + build = require("./build"), + { + build: buildOpts, + logFunction: log = () => {}, + serve: serveOpts, + } = config || {}, + { outputPath, srcPath } = buildOpts || {}, + { port = 5000 } = serveOpts || {}, + server = http.createServer((request, response) => { + // You pass two more arguments for config and middleware + // More details here: https://github.com/vercel/serve-handler#options + return handler(request, response, { public: outputPath }); + }); - address = require('network-address'), - handler = require('serve-handler'), + await build(config); - build = require('./build'), - - { build: buildOpts, logFunction: log = () => {}, serve: serveOpts } = config || {}, - { outputPath, srcPath } = buildOpts || {}, - { port = 5000 } = serveOpts || {}, - - server = http.createServer((request, response) => { - // You pass two more arguments for config and middleware - // More details here: https://github.com/vercel/serve-handler#options - return handler(request, response, { public: outputPath }); - }); - - await build(config); - - server.listen(port, async () => { - log(`Running at http://${address()}:${port} / http://localhost:${port}`); - }); -}; \ No newline at end of file + server.listen(port, async () => { + log( + `Running at http://${address()}:${port} / http://localhost:${port}` + ); + }); +}; diff --git a/package-lock.json b/package-lock.json index 12661de..8f10986 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,25 +1,30 @@ { "name": "planar-vagabond", - "version": "0.9.1", + "version": "0.9.3", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "planar-vagabond", - "version": "0.9.1", - "license": "ISC", + "version": "0.9.3", + "license": "CC0-1.0", "dependencies": { "chalk": "^4.1.2", "chokidar": "^3.4.3", "dotenv": "^16.0.1", "highlight.js": "^11.3.1", "json5": "^2.1.3", + "livereload": "^0.9.3", "markdown-it": "^13.0.1", "markdown-it-anchor": "^8.6.7", + "markdown-it-auto-crosslinker": "^1.0.1", "markdown-it-emoji": "^2.0.0", "markdown-it-footnote": "^3.0.3", + "markdown-it-linkify-images": "^4.0.0", + "markdown-it-mark": "^3.0.1", "markdown-it-multimd-table": "^4.2.0", "markdown-it-table-of-contents": "^0.6.0", + "markdown-it-task-lists": "^2.1.1", "network-address": "^1.1.2", "serve-handler": "^6.1.3" }, @@ -1018,6 +1023,28 @@ "uc.micro": "^1.0.1" } }, + "node_modules/livereload": { + "version": "0.9.3", + "resolved": "https://registry.npmjs.org/livereload/-/livereload-0.9.3.tgz", + "integrity": "sha512-q7Z71n3i4X0R9xthAryBdNGVGAO2R5X+/xXpmKeuPMrteg+W2U8VusTKV3YiJbXZwKsOlFlHe+go6uSNjfxrZw==", + "dependencies": { + "chokidar": "^3.5.0", + "livereload-js": "^3.3.1", + "opts": ">= 1.2.0", + "ws": "^7.4.3" + }, + "bin": { + "livereload": "bin/livereload.js" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/livereload-js": { + "version": "3.4.1", + "resolved": "https://registry.npmjs.org/livereload-js/-/livereload-js-3.4.1.tgz", + "integrity": "sha512-5MP0uUeVCec89ZbNOT/i97Mc+q3SxXmiUGhRFOTmhrGPn//uWVQdCvcLJDy64MSBR5MidFdOR7B9viumoavy6g==" + }, "node_modules/markdown-it": { "version": "13.0.1", "resolved": "https://registry.npmjs.org/markdown-it/-/markdown-it-13.0.1.tgz", @@ -1042,6 +1069,11 @@ "markdown-it": "*" } }, + "node_modules/markdown-it-auto-crosslinker": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/markdown-it-auto-crosslinker/-/markdown-it-auto-crosslinker-1.0.1.tgz", + "integrity": "sha512-DWxUxCrphlxrex17tx4FlTZFCTAp3UMK8dE6E0svU1NsmpFemifhdtTrFDOmOdFTPOerQx6Rt8UvLWdjH75IUg==" + }, "node_modules/markdown-it-emoji": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/markdown-it-emoji/-/markdown-it-emoji-2.0.2.tgz", @@ -1052,6 +1084,19 @@ "resolved": "https://registry.npmjs.org/markdown-it-footnote/-/markdown-it-footnote-3.0.3.tgz", "integrity": "sha512-YZMSuCGVZAjzKMn+xqIco9d1cLGxbELHZ9do/TSYVzraooV8ypsppKNmUJ0fVH5ljkCInQAtFpm8Rb3eXSrt5w==" }, + "node_modules/markdown-it-linkify-images": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/markdown-it-linkify-images/-/markdown-it-linkify-images-4.0.0.tgz", + "integrity": "sha512-MCMCpaCp0ZuURZXpt5jMsjM3tueL9VepOqWIRQFu8JBE4Qwf06dbSAZLALCbMwlGrq6Fkjr9dCcCVuIn0cHriw==", + "dependencies": { + "markdown-it": "^13.0.1" + } + }, + "node_modules/markdown-it-mark": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/markdown-it-mark/-/markdown-it-mark-3.0.1.tgz", + "integrity": "sha512-HyxjAu6BRsdt6Xcv6TKVQnkz/E70TdGXEFHRYBGLncRE9lBFwDNLVtFojKxjJWgJ+5XxUwLaHXy+2sGBbDn+4A==" + }, "node_modules/markdown-it-multimd-table": { "version": "4.2.0", "resolved": "https://registry.npmjs.org/markdown-it-multimd-table/-/markdown-it-multimd-table-4.2.0.tgz", @@ -1065,6 +1110,11 @@ "node": ">6.4.0" } }, + "node_modules/markdown-it-task-lists": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/markdown-it-task-lists/-/markdown-it-task-lists-2.1.1.tgz", + "integrity": "sha512-TxFAc76Jnhb2OUu+n3yz9RMu4CwGfaT788br6HhEDlvWfdeJcLUsxk1Hgw2yJio0OXsxv7pyIPmvECY7bMbluA==" + }, "node_modules/markdown-it/node_modules/argparse": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", @@ -1208,6 +1258,11 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/opts": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/opts/-/opts-2.0.2.tgz", + "integrity": "sha512-k41FwbcLnlgnFh69f4qdUfvDQ+5vaSDnVPFI/y5XuhKRq97EnVVneO9F1ESVCdiVu4fCS2L8usX3mU331hB7pg==" + }, "node_modules/path-is-inside": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/path-is-inside/-/path-is-inside-1.0.2.tgz", @@ -1647,6 +1702,26 @@ "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", "dev": true }, + "node_modules/ws": { + "version": "7.5.9", + "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.9.tgz", + "integrity": "sha512-F+P9Jil7UiSKSkppIiD94dN07AwvFixvLIj1Og1Rl9GGMuNipJnV9JzjD6XuqmAeiswGvUmNLjr5cFuXwNS77Q==", + "engines": { + "node": ">=8.3.0" + }, + "peerDependencies": { + "bufferutil": "^4.0.1", + "utf-8-validate": "^5.0.2" + }, + "peerDependenciesMeta": { + "bufferutil": { + "optional": true + }, + "utf-8-validate": { + "optional": true + } + } + }, "node_modules/y18n": { "version": "5.0.8", "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", @@ -1657,9 +1732,9 @@ } }, "node_modules/yargs": { - "version": "17.7.0", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.0.tgz", - "integrity": "sha512-dwqOPg5trmrre9+v8SUo2q/hAwyKoVfu8OC1xPHKJGNdxAvPl4sKxL4vBnh3bQz/ZvvGAFeA5H3ou2kcOY8sQQ==", + "version": "17.7.1", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.1.tgz", + "integrity": "sha512-cwiTb08Xuv5fqF4AovYacTFNxk62th7LKJ6BL9IGUpTJrWoU7/7WdQGTP2SjKf1dUNBGzDd28p/Yfs/GI6JrLw==", "dev": true, "dependencies": { "cliui": "^8.0.1", diff --git a/package.json b/package.json index ce95b90..e38bdcc 100755 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "planar-vagabond", - "version": "0.9.3", + "version": "0.9.4", "description": "", "main": "index.js", "scripts": { @@ -11,7 +11,7 @@ }, "keywords": [], "author": "", - "license": "CC0-1.0", + "license": "MIT", "dependencies": { "chalk": "^4.1.2", "chokidar": "^3.4.3", @@ -20,10 +20,14 @@ "json5": "^2.1.3", "markdown-it": "^13.0.1", "markdown-it-anchor": "^8.6.7", + "markdown-it-auto-crosslinker": "^1.0.1", "markdown-it-emoji": "^2.0.0", "markdown-it-footnote": "^3.0.3", + "markdown-it-linkify-images": "^4.0.0", + "markdown-it-mark": "^3.0.1", "markdown-it-multimd-table": "^4.2.0", "markdown-it-table-of-contents": "^0.6.0", + "markdown-it-task-lists": "^2.1.1", "network-address": "^1.1.2", "serve-handler": "^6.1.3" }, diff --git a/src/assets/styles/styles.css b/src/assets/styles/styles.css index 5312652..198a9da 100644 --- a/src/assets/styles/styles.css +++ b/src/assets/styles/styles.css @@ -1,22 +1,11 @@ /**************************************************************************** - * Planar Vagabond's Playground (planarvagabond.com) + * Planar Vagabond's Guide to the Multiverse (planarvagabond.com) * * Copyright 2023 Eric Woodward * Source released under CC0 Public Domain License v1.0 * http://creativecommons.org/publicdomain/zero/1.0/ ****************************************************************************/ -/* - Old Palette - color: #9aa8bc - bg: #0d1852 - link: 049c74 - border: 25baba - big-font: 25baba - black: 040308 - other: 094192 -*/ - /* New Palette color: #e7a07f @@ -38,6 +27,7 @@ body { font-family: sans-serif; font-size: 100%; line-height: 1.5em; + font-family: "raleway", "Optima", arial, helvetica, sans-serif; } a { @@ -47,8 +37,10 @@ a { font-weight: bold; padding: 0 0.2rem; text-decoration: none; - -webkit-transition: 0.3s background-color, 0.3s color, 0.3s border-radius; - transition: 0.3s background-color, 0.3s color, 0.3s border-radius; + -webkit-transition: 0.3s background-color, 0.3s color, 0.3s border-radius, + 0.3s font-weight; + transition: 0.3s background-color, 0.3s color, 0.3s border-radius, + 0.3s font-weight; } a[target="_blank"]::after { @@ -84,6 +76,12 @@ blockquote { padding: 0 1em; } +blockquote cite { + display: block; + text-align: right; + font-style: italic; +} + code, kbd { background-color: #7c4c52; @@ -93,6 +91,46 @@ kbd { padding: 0.25em; } +details { + max-height: 4rem; + transition: 0.3s max-height; +} + +details[open] { + max-height: 100rem; +} + +details > summary { + cursor: pointer; + display: block; + font-weight: bold; + list-style: none; + padding: 1rem 1rem 1rem 2rem; + position: relative; + user-select: none; +} + +details[open] > summary::before { + transform: rotate(90deg); +} + +details summary::-webkit-details-marker { + display: none; +} + +details summary:before { + content: ""; + border-width: 0.4rem; + border-style: solid; + border-color: transparent transparent transparent #38b1b6; + position: absolute; + top: 1.3rem; + left: 1rem; + transform: rotate(0); + transform-origin: 0.2rem 50%; + transition: 0.3s transform ease; +} + figcaption { font-size: 0.9em; } @@ -105,19 +143,25 @@ figure { h1 { color: #c33f3d; - font-size: 2em; + font-size: 1.5em; line-height: 1.2em; + margin-top: 3rem; +} + +h1 svg { + scale: 0.75; } h2 { + background-color: rgba(37, 40, 55, 0.6); color: #c33f3d; - font-size: 1.5em; + font-size: 1.3em; line-height: 1.2em; } h3 { color: #c33f3d; - font-size: 1.25em; + font-size: 1.2em; line-height: 1.2em; background-color: rgba(37, 40, 55, 0.6); padding-left: 0.25rem; @@ -140,6 +184,22 @@ h6 { font-size: 1em; } +h1, +h1 a, +h2, +h2 a, +h3, +h3 a, +h4, +h4 a, +h5, +h5 a, +h6, +h6 a { + font-family: "unbounded", "Luminari", impact, arial, helvetica, sans-serif; + font-weight: 500; +} + iframe { max-width: 100%; } @@ -163,6 +223,10 @@ main img { max-width: 100%; } +nav { + max-width: 90%; +} + ol, ul { padding-left: 1.2em; @@ -206,6 +270,8 @@ table th { padding: 0.5rem; } +/* Classes */ + .headlessTableWrapper thead { display: none; } @@ -230,14 +296,291 @@ table th { padding: 0.5rem; } +.feature hr { + border: 1px 0 0 0; + border-color: #7c4c52; + border-style: solid; + color: #7c4c52; + max-width: 90%; +} + +a.hiddenLink { + border-bottom: transparent; + color: #e7a07f; + font-weight: normal; +} + +a.hiddenLink:hover { + color: #c33f3d; + font-weight: bold; +} + .levelTable table thead tr:first-child th { border-bottom-style: dashed; } -.timelineTableWrapper td:first-child { +.menu-icon { + display: block; + position: absolute; + top: 0.5rem; + left: 0; + width: 26px; + height: 26px; + padding-top: 1rem; + cursor: pointer; + z-index: 9; +} +.menu-icon > span, +.menu-icon > span::before, +.menu-icon > span::after { + display: block; + position: absolute; + width: 100%; + height: 2px; + background-color: #616161; + transition-duration: 0.25s; +} +.menu-icon > span::before { + content: ""; + top: -8px; +} +.menu-icon > span::after { + content: ""; + top: 8px; +} + +.menu-label { + display: block; + position: absolute; + top: 0.5rem; + left: 1rem; + padding-top: 1rem; + cursor: pointer; + z-index: 9; +} + +.menu-text { + position: absolute; + left: 2.25rem; + top: 0.75rem; + text-transform: uppercase; + z-index: 1; + transition: 0.3s all; +} + +#menu-toggle { + display: block; + opacity: 0; + margin-top: -1rem; +} + +#menu-toggle:checked + .menu-label { + position: fixed; +} + +#menu-toggle:checked + .menu-label .menu-icon > span { + transform: rotate(45deg); +} + +#menu-toggle:checked + .menu-label .menu-icon > span::before { + top: 0; + transform: rotate(0deg); +} + +#menu-toggle:checked + .menu-label .menu-icon > span::after { + top: 0; + transform: rotate(90deg); +} + +#menu-toggle:checked ~ .navMenu { + left: 0; +} +#menu-toggle:checked + .menu-label .menu-text { + transform: rotate(90deg); + left: -1rem; + top: 4rem; +} +/* Prevents close toggle from scrolling offscreen */ +#menu-toggle:checked + .menu__btn { + position: fixed; + top: 1rem; +} + +.menubar { + background: #282c32; + display: static; + max-height: 1px; +} + +.navBar { + background: #282c32; + display: none; +} + +.navBar ul { + display: flex; + flex-direction: row; + justify-content: space-between; + list-style: none; + margin: -0.5rem 0 0; + padding: 0 1rem; +} + +.navBar li { + display: flex; + margin-bottom: 0; +} + +.navBar a { + border-bottom: transparent; + color: #38b1b6; + display: flex; + padding: 0.5rem; + width: 100%; +} +.navBar a:visited { + color: #38b1b6; +} + +.navBar a:hover { + color: #c33f3d; +} + +.navMenu { + align-items: center; + background: #252837; + box-shadow: 2px 2px 6px rgba(0, 0, 0, 0.4); + display: flex; + flex-direction: column; + justify-content: center; + height: 100%; + left: -100%; + margin: 0; + padding: 0; + position: fixed; + top: 0; + transition-duration: 0.25s; +} + +.navMenu a { + border: 1px solid transparent; + display: flex; + padding: 0.5rem 1rem; + text-decoration: none; + width: 100%; +} + +.navMenu a:visited { + color: #38b1b6; +} + +.navMenu li { + margin-bottom: 0; + position: relative; + text-decoration: none; + transition-duration: 0.5s; white-space: nowrap; } +.navMenu > ul > li.hasSubMenu > a { + border: 1px solid #c33f3d; +} + +.navMenu li.hasSubMenu:hover, +.navMenu li.hasSubMenu:focus-within { + background-color: rgba(195, 63, 61, 0.5); +} + +.navMenu ul li ul li.hasSubMenu:hover, +.navMenu ul li ul li.hasSubMenu:focus-within { + background-color: transparent; +} + +.navMenu li.hasSubMenu:hover a, +.navMenu li.hasSubMenu:hover a:visited { + color: #38b1b6; +} + +.navMenu li.hasSubMenu:hover a:hover, +.navMenu li.hasSubMenu:hover a:visited:hover { + color: #c33f3d; +} + +.navMenu li:focus-within a { + outline: none; +} + +.navMenu ul { + display: flex; + flex-direction: column; + list-style: none; + margin: 0; + padding-left: 0; +} + +.navMenu > ul { + padding: 1rem 2rem 1rem 4rem; + overflow-y: auto; +} +.navMenu > ul > li { + margin-top: 1rem; +} +.navMenu > ul > li:first-child { + margin-top: 0; +} +.navMenu ul li ul { + align-items: stretch; + display: flex; + left: 0; + flex-direction: column; + margin-top: 0; + min-width: 5rem; + opacity: 1; + position: relative; + transition: all 0.5s ease; + visibility: visible; +} + +.navMenu ul li ul li { + clear: both; + width: 100%; +} + +.navMenu ul li ul li.hasSubMenu a { + padding-left: 2rem; +} + +.navMenu ul li ul li.hasSubMenu > a { + padding-left: 1rem; +} + +/* +.navMenu ul li ul li.hasSubMenu > a::after { + content: "▶"; + position: absolute; + right: 1rem; +} +*/ + +.navMenu-list-link.isCurrentSection { + background-color: #38b1b6; + border: 1px solid #c33f3d; + border-radius: 0.3rem; + color: #1a0608; + text-decoration: none; +} + +.navMenu-list-link.isCurrentSection:hover { + background-color: #c33f3d; +} + +.navMenu-list-item { + display: inline-block; + line-height: 2em; + margin: 0 0.25em; + text-align: center; +} + .page { background: #372734; background: rgba(55, 39, 52, 0.9); @@ -252,6 +595,63 @@ table th { position: relative; } +.pageFooter { + margin: 0 auto; + padding: 0.5em 1em; + width: 100%; +} + +.pageFooter a { + text-decoration: none; +} + +.pageFooter-inner { + font-size: 0.8em; + text-align: center; + width: 100%; +} + +.pageFooter-inner p { + text-align: left; +} + +.pageHeader { + width: 100%; +} + +.pageHeader-titleBlock { + width: 100%; +} + +.pageMain { + min-height: 28em; + padding: 1em; +} + +a.pageTitle-link, +a.pageTitle-link:visited { + color: #c33f3d; + border-bottom: none; + margin-left: -0.25rem; +} + +.pageTitle-link:active, +.pageTitle-link:hover { + border: 1px solid #c33f3d; +} + +.siteTitle-text { + max-width: 60%; +} + +.timelineTableWrapper td:first-child { + white-space: nowrap; +} + +.siteTitle-text { + text-align: left; +} + .table-of-contents { border: 1px dashed #e8a384; display: inline-block; @@ -294,6 +694,101 @@ table th { font-weight: bold; } +/**************************************************************************** + * JS Overrides + ****************************************************************************/ + +.js .pubDate.isDone { + -webkit-transition: 0.3s visibility; + transition: 0.3s visibility; + visibility: visible; +} + +.no-js .pubDate { + visibility: visible; +} + +/* +.searchBox { + margin-left: auto; + white-space: nowrap; +} +*/ +.searchBox { + position: absolute; + top: 0; + right: 0; + padding: 1rem; + width: 100%; + text-align: right; +} + +.searchBox-query { + background-color: #3d81a5; + border-radius: 0.3rem; + color: #fff; + width: 10em; +} + +.siteTitle { + text-align: center; + width: 100%; +} + +.siteTitle-link, +.siteTitle-link:visited { + align-items: center; + border: 1px solid transparent; + color: #38b1b6; + border-radius: 1rem; + display: flex; + flex-direction: row; + font-style: normal; + margin: auto; + max-width: 42rem; + padding: 0.2em; + position: relative; +} + +.siteTitle-shipIcon { + max-width: 10rem; + fill: #c33f3d; + fill-opacity: 0.5; + -webkit-transition: 0.3s fill, 0.3s fill-opacity; + transition: 0.3s fill, 0.3s fill-opacity; +} + +.siteTitle-link:hover .siteTitle-shipIcon { + fill: #1a0608; + fill-opacity: 0.7; +} + +.siteTitle-text { + max-width: 48rem; +} + +.topAnchor { + border: none; + height: 0; + margin: 0; + padding: 0; +} + +.topLink { + border: 1px solid #726f6a; + border-radius: 0.3em; + display: inline-block; + margin: 1em auto; + padding: 0.25em; + text-align: center; +} + +/*************************************************************************************************************************** + * * + * TODO: Remove the unnecessary styles below this line + * * + ***************************************************************************************************************************/ + .asideBio { line-height: 1.35em; padding: 0.5em; @@ -622,159 +1117,6 @@ table th { display: none; } -.menubar { - background: #282c32; - display: static; -} - -#menu__toggle, -.menu__btn { - display: none; -} - -.navMenu { - align-items: center; - display: flex; - flex-direction: row-reverse; - justify-content: center; -} - -.navMenu a { - border: 1px solid transparent; - display: flex; - padding: 0.5rem 1rem; - text-decoration: none; - width: 100%; -} - -.navMenu a:visited { - color: #38b1b6; -} - -.navMenu ul { - display: flex; - list-style: none; - margin: 0; - padding-left: 0; -} - -.navMenu li { - display: flex; - margin-bottom: 0; - position: relative; - text-decoration: none; - transition-duration: 0.5s; - white-space: nowrap; -} - -.navMenu li.hasSubMenu:hover, -.navMenu li.hasSubMenu:focus-within { - background: #c33f3d; -} - -.navMenu li.hasSubMenu:hover a, -.navMenu li.hasSubMenu:hover a:visited { - color: #38b1b6; -} - -.navMenu li.hasSubMenu:hover a:hover, -.navMenu li.hasSubMenu:hover a:visited:hover { - color: #c33f3d; -} - -.navMenu li:focus-within a { - outline: none; -} - -.navMenu ul li ul { - background: #252837; - background: rgba(37, 40, 55, 0.9); - visibility: hidden; - opacity: 0; - min-width: 5rem; - position: absolute; - transition: all 0.5s ease; - margin-top: 2.75rem; - left: 0; - display: none; - z-index: 1; -} - -.navMenu ul li:hover > ul, -.navMenu ul li:focus-within > ul, -.navMenu ul li ul:hover, -.navMenu ul li ul:focus { - display: flex; - flex-direction: column; - align-items: stretch; - opacity: 1; - visibility: visible; -} - -.navMenu ul li ul li { - clear: both; - width: 100%; -} - -.navMenu-list-link.isCurrentSection { - background-color: #38b1b6; - border: 1px solid #c33f3d; - border-radius: 0.3rem; - color: #1a0608; - text-decoration: none; -} - -.navMenu-list-link.isCurrentSection:hover { - background-color: #c33f3d; -} - -.navMenu-list-item { - display: inline-block; - line-height: 2em; - margin: 0 0.25em; - text-align: center; -} - -.navMenu-search-fieldset { - border: none; - font-size: 0.8em; - padding: 0; -} - -.pageFooter { - border-top: 1px solid #04778f; - margin: 0 auto; - padding: 0.5em 1em; - width: 100%; -} - -.pageFooter a { - text-decoration: none; -} - -.pageFooter-inner { - font-size: 0.8em; - text-align: center; - width: 100%; -} - -.pageFooter-inner p { - text-align: left; -} - -.pageHeader { - width: 100%; -} - -.pageHeader-titleBlock { - width: 100%; -} - -.pageMain { - min-height: 28em; - padding: 1em; -} - .pageMenu { clear: both; margin: 0 auto 2.5em; @@ -951,28 +1293,6 @@ table th { font-size: 1.75em; } -/* -.searchBox { - margin-left: auto; - white-space: nowrap; -} -*/ -.searchBox { - position: absolute; - top: 0; - right: 0; - padding: 1rem; - width: 100%; - text-align: right; -} - -.searchBox-query { - background-color: #3d81a5; - border-radius: 0.3rem; - color: #fff; - width: 10em; -} - .sectionBackLink { border: 1px solid #726f6a; border-radius: 0.3em; @@ -986,43 +1306,6 @@ table th { text-align: center; } -.siteTitle { - text-align: center; - width: 100%; -} - -.siteTitle-link, -.siteTitle-link:visited { - align-items: center; - border: 1px solid transparent; - color: #38b1b6; - border-radius: 1rem; - display: flex; - flex-direction: row; - font-style: normal; - margin: auto; - max-width: 42rem; - padding: 0.2em; - position: relative; -} - -.siteTitle-shipIcon { - max-width: 10rem; - fill: #c33f3d; - fill-opacity: 0.5; - -webkit-transition: 0.3s fill, 0.3s fill-opacity; - transition: 0.3s fill, 0.3s fill-opacity; -} - -.siteTitle-link:hover .siteTitle-shipIcon { - fill: #1a0608; - fill-opacity: 0.7; -} - -.siteTitle-text { - max-width: 48rem; -} - .spellTable { margin-left: -1em; } @@ -1063,34 +1346,6 @@ table th { padding: 0.25em 0.5em; } -a.pageTitle-link, -a.pageTitle-link:visited { - color: #c33f3d; - border-bottom: none; - margin-left: -0.25rem; -} - -.pageTitle-link:active, -.pageTitle-link:hover { - border: 1px solid #c33f3d; -} - -.topAnchor { - border: none; - height: 0; - margin: 0; - padding: 0; -} - -.topLink { - border: 1px solid #726f6a; - border-radius: 0.3em; - display: inline-block; - margin: 1em auto; - padding: 0.25em; - text-align: center; -} - .twitter-tweet { margin: 0; } @@ -1189,34 +1444,6 @@ a.pageTitle-link:visited { display: none; } -.feature hr { - border: 1px 0 0 0; - border-color: #7c4c52; - border-style: solid; - color: #7c4c52; - max-width: 90%; -} - -body { - font-family: "raleway", "Optima", arial, helvetica, sans-serif; -} - -h1, -h1 a, -h2, -h2 a, -h3, -h3 a, -h4, -h4 a, -h5, -h5 a, -h6, -h6 a { - font-family: "unbounded", "Luminari", impact, arial, helvetica, sans-serif; - font-weight: 500; -} - .pageMenu-link.isCurrent .pageMenu-text { background-color: #38b1b6; background-color: rgba(4, 156, 116, 0.8); @@ -1247,202 +1474,122 @@ h6 a { background-color: #151222; } -/**************************************************************************** - * JS Overrides - ****************************************************************************/ - -.js .pubDate.isDone { - -webkit-transition: 0.3s visibility; - transition: 0.3s visibility; - visibility: visible; -} - -.no-js .pubDate { - visibility: visible; -} - /**************************************************************************** * Media Queries ****************************************************************************/ +@media all and (min-width: 320px) { + nav { + max-width: 100%; + } +} + +@media all and (min-width: 600px) { + h1 { + margin-top: 2rem; + } + + .menubar { + height: auto; + } + + .navBar { + display: block; + } + + .siteTitle-text { + text-align: center; + } +} + @media all and (min-width: 960px) { html { font-size: 18px; } - .page { - max-width: 960px; - } -} -@media all and (max-width: 960px) { - h1 { - font-size: 1.5em; - } - h2 { - font-size: 1.3em; - } - - h3 { - font-size: 1.2em; - } - - h1 svg { - scale: 0.75; - } - - .menubar { - max-height: 1px; - } - #menu__toggle, - .menu__btn { - display: block; - } - - #menu__toggle { - opacity: 0; - } - #menu__toggle:checked + .menu__btn > span { - transform: rotate(45deg); - } - #menu__toggle:checked + .menu__btn > span::before { - top: 0; - transform: rotate(0deg); - } - #menu__toggle:checked + .menu__btn > span::after { - top: 0; - transform: rotate(90deg); - } - #menu__toggle:checked ~ .navMenu { - left: 0 !important; - } - .menu__btn { - position: absolute; - top: 0.5rem; - left: 1rem; - width: 26px; - height: 26px; - padding-top: 1rem; - cursor: pointer; - z-index: 9; - } - .menu__btn > span, - .menu__btn > span::before, - .menu__btn > span::after { - display: block; - position: absolute; - width: 100%; - height: 2px; - background-color: #616161; - transition-duration: 0.25s; - } - .menu__btn > span::before { - content: ""; - top: -8px; - } - .menu__btn > span::after { - content: ""; - top: 8px; - } - - /* Prevents close toggle from scrolling offscreen */ - #menu__toggle:checked + .menu__btn { - position: fixed; - top: 1rem; - } - - .navMenu { - background: #252837; - display: flex; - position: fixed; - top: 0; - left: -100%; - height: 100%; - margin: 0; - padding: 0; - box-shadow: 2px 2px 6px rgba(0, 0, 0, 0.4); - transition-duration: 0.25s; - flex-direction: column; - } - .navMenu ul { - flex-direction: column; - } - .navMenu > ul { - padding: 1rem 2rem 1rem 4rem; - overflow-y: auto; - } - .navMenu > ul > li { - margin-top: 1rem; - } - .navMenu > ul > li > a { - border: 1px solid #c33f3d; - font-size: 1.25rem; - } - .navMenu > ul > li:first-child { - margin-top: 0; - } - .navMenu li { - display: block; - float: none; - } - .navMenu ul li ul { - display: flex; - margin-top: 0; - opacity: 1; - position: relative; - visibility: visible; - } - .siteTitle-text { - max-width: 60%; - } -} - -/* -@media all and (max-width: 900px) { - html { - font-size: 14px; - } - h1 { - font-size: 1.5em; - } - h2 { - font-size: 1.3em; - } - - h3 { - font-size: 1.2em; - } - - h1 svg { - scale: 0.75; - } - - .siteTitle-text { - max-width: 60%; - } -} -*/ - -@media all and (max-width: 600px) { h1 { + color: #c33f3d; + font-size: 2em; + line-height: 1.2em; margin-top: 3rem; } - .siteTitle-text { - text-align: left; + h2 { + background-color: transparent; + color: #c33f3d; + font-size: 1.5em; + line-height: 1.2em; + } + + h3 { + color: #c33f3d; + font-size: 1.25em; + line-height: 1.2em; + background-color: rgba(37, 40, 55, 0.6); + padding-left: 0.25rem; + } + + h4 { + color: #c33f3d; + font-size: 1.12em; + line-height: 1.2em; + } + + h5 { + color: #c33f3d; + font-size: 1.06em; + line-height: 1.2em; + } + + h6 { + color: #c33f3d; + font-size: 1em; + } + + #menu-toggle:checked + .menu-label { + position: absolute; + } + + #menu-toggle:checked + .menu-label .menu-text { + transform: none; + left: 2.25rem; + top: 0.75rem; + } + + .navMenu > ul { + padding: 4rem 2rem 1rem 2rem; + } + + .navMenu-list-item { + display: inline-block; + line-height: 2em; + margin: 0 0.25em; + text-align: center; + } + + .navMenu-search-fieldset { + border: none; + font-size: 0.8em; + padding: 0; + } + + .page { + max-width: 960px; + } + + .siteTitle { + margin-top: 3rem; } } -@media all and (max-width: 320px) { - nav { - max-width: 90%; - } -} - -@media all and (min-width: 1000px) { - .menubar { - position: relative; - } - .searchBox { - top: -3rem; +@media all and (min-width: 1200px) { + #menu-toggle:checked + .menu-label .menu-text { + background: rgba(37, 40, 55, 0.9); + border-radius: 0.3rem; + padding: 0.5rem; + position: fixed; + transform: none; + left: 1.25rem; + top: 0.75rem; } } diff --git a/src/layouts/partials/navmain.ejs b/src/layouts/partials/navmain.ejs index 9fc254a..519884c 100644 --- a/src/layouts/partials/navmain.ejs +++ b/src/layouts/partials/navmain.ejs @@ -2,11 +2,21 @@
- - -| **4644 CAC**