From a7abc7328e8eabf5c863fd8bd55620e4d78d96e8 Mon Sep 17 00:00:00 2001 From: Breck Yunits Date: Sun, 1 Dec 2024 12:53:40 -1000 Subject: [PATCH] --- external/gazette.css | 16 +++--- external/prestige.css | 111 +++++++++++++++++++++++++++++++++++++++++ external/slideshow.js | 6 +-- external/tufte.css | 6 +-- package.json | 2 +- parsers/author.parsers | 2 +- parsers/date.parsers | 5 +- parsers/dinkus.parsers | 2 +- parsers/text.parsers | 2 +- parsers/theme.parsers | 2 +- parsers/title.parsers | 2 +- readme.scroll | 2 +- releaseNotes.scroll | 10 ++++ tests/prestige.scroll | 11 ++++ 14 files changed, 158 insertions(+), 21 deletions(-) create mode 100644 external/prestige.css create mode 100644 tests/prestige.scroll diff --git a/external/gazette.css b/external/gazette.css index cb34e2b07..3197816ac 100644 --- a/external/gazette.css +++ b/external/gazette.css @@ -69,12 +69,12 @@ figure { float: left; } -.dinkus { +.abstractDinkusParser { text-align: center; padding: 1rem; } -.dinkus span { +.abstractDinkusParser span { vertical-align: sub; } @@ -313,7 +313,7 @@ h4 { font-size: 1rem; } -h1.scrollTitle { +h1.printTitleParser { text-align: center; margin: auto; margin-bottom: 0.15625rem; @@ -322,11 +322,15 @@ h1.scrollTitle { max-width: calc(100vw - 2 * (1.5625rem + 1.875rem)); } -h1.scrollTitle a { +h1.printTitleParser a { color: var(--scrollColorText); } -.scrollDateline { +.printDateParser { + text-align: center; +} +.scrollDateline, +.printDateParser { font-style: italic; line-height: 1.4rem; font-size: 0.75rem; @@ -435,7 +439,7 @@ h4.scrollQuestion { white-space: unset; } -.scrollByLine { +.printAuthorsParser { font-size: 0.875rem; font-style: italic; margin: 0.25rem 0; diff --git a/external/prestige.css b/external/prestige.css new file mode 100644 index 000000000..83948456a --- /dev/null +++ b/external/prestige.css @@ -0,0 +1,111 @@ +:root { + /* Base Colors */ + --scrollTextBase: 51, 51, 51; /* Based on #333333 */ + --scrollSurfaceRgb: 204, 204, 204; /* Based on #cccccc */ + --scrollLinkBase: 0, 0, 0; /* Based on #000000 for links */ + + /* Semantic Colors */ + --scrollColorBackground: rgb(250, 250, 250); /* #fafafa */ + --scrollColorText: rgba(var(--scrollTextBase), 1); + --scrollColorLink: rgb(var(--scrollLinkBase), 1); + --scrollColorSubdued: rgb(102, 102, 102); /* #666666 */ + + /* Typography */ + --scrollFontPrimary: "Georgia", "Times New Roman", serif; + --scrollFontUi: "Baskerville", "Times New Roman", serif; + --scrollFontMono: monospace; + --scrollBaseFontSize: 17.6px; /* Equivalent to 1.1rem from paragraphs */ +} + +/* General Styles */ +body { + font-family: var(--scrollFontPrimary); + background-color: var(--scrollColorBackground); + color: var(--scrollColorText); + line-height: 1.8; + margin: 0; + padding: 2rem; +} + +/* Title Styling */ +h1 { + font-family: var(--scrollFontUi); + font-size: 2.5rem; + text-align: center; + text-transform: uppercase; + letter-spacing: 0.1em; + color: var(--scrollColorLink); + margin-bottom: 1rem; +} + +/* Subtitle Styling */ +h2, +.printDateParser, +.printAuthorsParser { + font-size: 1.25rem; + text-align: center; + text-transform: uppercase; + letter-spacing: 0.08em; + color: #555555; + margin-bottom: 1rem; +} + +.printAuthorsParser { + font-weight: bold; +} + +.printTitleParser a { + text-decoration: none; + color: var(--scrollColorLink); +} + +a { + color: var(--scrollColorLink); + text-decoration-color: transparent; +} +a:hover { + text-decoration-color: unset; +} + +/* Drop Cap Styling */ +.dropcap::first-letter { + font-family: var(--scrollFontPrimary); + font-size: 4rem; + float: left; + line-height: 0.8; + margin-right: 0.5rem; + margin-top: 0.2rem; + font-weight: bold; + color: var(--scrollColorLink); +} + +/* Paragraph Styling */ +p { + font-size: var(--scrollBaseFontSize); + text-align: justify; + margin-bottom: 1.5rem; +} + +/* Blockquote Styling */ +blockquote { + font-style: italic; + color: var(--scrollColorSubdued); + border-left: 4px solid rgba(var(--scrollSurfaceRgb), 1); + padding-left: 1rem; + margin: 1.5rem 0; +} + +/* Additional Fine-Tuning */ +h1, +h2 { + margin-top: 0; +} + +.abstractDinkusParser { + text-align: center; + padding: 1rem; +} + +.abstractDinkusParser span { + vertical-align: sub; +} diff --git a/external/slideshow.js b/external/slideshow.js index d8cdc04b2..88ca0b44f 100644 --- a/external/slideshow.js +++ b/external/slideshow.js @@ -10,7 +10,7 @@ class SlideShow { renderSlide() { jQuery(this.slides[this.page - 1]).show() - jQuery(".dinkus").hide() + jQuery(".abstractDinkusParser").hide() } hideAll() { @@ -18,9 +18,9 @@ class SlideShow { } get slides() { - return jQuery(".dinkus") + return jQuery(".abstractDinkusParser") .map(function () { - return jQuery(this).prevUntil(".dinkus").addBack().prev() + return jQuery(this).prevUntil(".abstractDinkusParser").addBack().prev() }) .get() .slice(1) diff --git a/external/tufte.css b/external/tufte.css index 5e9922b9d..f88ae18aa 100644 --- a/external/tufte.css +++ b/external/tufte.css @@ -9,11 +9,11 @@ figure { display: block; float: left; } -.dinkus { +.abstractDinkusParser { text-align: center; padding: 1rem; } -.dinkus span { +.abstractDinkusParser span { vertical-align: sub; } details { @@ -119,7 +119,7 @@ h1 { font-size: 2.4rem; line-height: 1; } -.scrollTitle a { +.printTitleParser a { text-decoration: none; font-size: 3.2rem; } diff --git a/package.json b/package.json index 7c3a1cede..bab80f9f2 100644 --- a/package.json +++ b/package.json @@ -51,7 +51,7 @@ "image-size": "^1.0.2", "lodash": "^4.17.21", "minimist": "^1.2.5", - "scrollsdk": "^99.0.0" + "scrollsdk": "^99.1.0" }, "devDependencies": { "prettier": "^2.8.8", diff --git a/parsers/author.parsers b/parsers/author.parsers index de3c08bcc..f61a62a2f 100644 --- a/parsers/author.parsers +++ b/parsers/author.parsers @@ -48,4 +48,4 @@ authorsParser buildTxt() { return "" } - defaultClassName = "scrollByLine" \ No newline at end of file + defaultClassName = "printAuthorsParser" \ No newline at end of file diff --git a/parsers/date.parsers b/parsers/date.parsers index 1fb74cc53..fc96b58ec 100644 --- a/parsers/date.parsers +++ b/parsers/date.parsers @@ -1,4 +1,5 @@ -dateParser +scrollDateParser + cue date popularity 0.006680 catchAllAtomType dateAtom description Set published date. @@ -36,7 +37,7 @@ printDateParser boolean isPopular true javascript buildHtml() { - return `
${this.day}
` + return `
${this.day}
` } get day() { let day = this.content || this.root.date diff --git a/parsers/dinkus.parsers b/parsers/dinkus.parsers index 7bbe2e8b0..5809c5139 100644 --- a/parsers/dinkus.parsers +++ b/parsers/dinkus.parsers @@ -5,7 +5,7 @@ abstractDinkusParser buildHtml() { return `
${this.dinkus}
` } - defaultClass = "dinkus" + defaultClass = "abstractDinkusParser" buildTxt() { return this.dinkus } diff --git a/parsers/text.parsers b/parsers/text.parsers index d883f105c..51c0f1b98 100644 --- a/parsers/text.parsers +++ b/parsers/text.parsers @@ -41,7 +41,7 @@ printFormatLinksParser buildHtml() { const permalink = this.root.permalink.replace(".html", "") // hacky - const particle = this.appendSibling(`HTML | TXT`, `class scrollDateline\nlink ${permalink}.html HTML\nlink ${permalink}.txt TXT\nstyle text-align:center;`) + const particle = this.appendSibling(`HTML | TXT`, `class printDateParser\nlink ${permalink}.html HTML\nlink ${permalink}.txt TXT\nstyle text-align:center;`) const html = particle.buildHtml() particle.destroy() return html diff --git a/parsers/theme.parsers b/parsers/theme.parsers index 4db5f4c8c..ef3d38362 100644 --- a/parsers/theme.parsers +++ b/parsers/theme.parsers @@ -1,5 +1,5 @@ scrollThemeAtom - enum roboto gazette dark tufte + enum roboto gazette dark tufte prestige paint constant scrollThemeParser diff --git a/parsers/title.parsers b/parsers/title.parsers index debfad08f..a059d140b 100644 --- a/parsers/title.parsers +++ b/parsers/title.parsers @@ -48,5 +48,5 @@ printTitleParser get originalText() { return this.content ?? this.root.title ?? "" } - defaultClassName = "scrollTitle" + defaultClassName = "printTitleParser" tag = "h1" diff --git a/readme.scroll b/readme.scroll index 8d0558df1..945164542 100644 --- a/readme.scroll +++ b/readme.scroll @@ -5,7 +5,7 @@ header.scroll # Scroll is a language for scientists of all ages style font-weight: 300; font-size: 200%; - class scrollTitle + class printTitleParser ## Publish and evolve your most intelligent ideas style font-weight: 300; diff --git a/releaseNotes.scroll b/releaseNotes.scroll index 847606766..4f1999e28 100644 --- a/releaseNotes.scroll +++ b/releaseNotes.scroll @@ -22,6 +22,16 @@ ciBadges.scroll br thinColumns +📦 161.0.0 12/01/2024 +🎉 added new theme `prestige` +🎉 upgrade ScrollSDK +🎉 scroll theme cleanup: +⚠️ BREAKING: .dinkus is now .abstractDinkusParser +⚠️ BREAKING: .scrollTitle is now .printTitleParser +⚠️ BREAKING: .scrollByLine is now .printAuthorsParser +⚠️ BREAKING: .scrollDateline is now .printDateParser +⚠️ BREAKING: dateParser is now scrollDateParser + 📦 160.0.0 11/30/2024 🎉 upgrade ScrollSDK diff --git a/tests/prestige.scroll b/tests/prestige.scroll new file mode 100644 index 000000000..d3a46e197 --- /dev/null +++ b/tests/prestige.scroll @@ -0,0 +1,11 @@ +buildHtml +theme prestige +container 600px +## Julius Caesar +printTitle +loremIpsum +*** +loremIpsum +*** +loremIpsum +**** \ No newline at end of file