mirror of https://github.com/jpanther/congo.git
Compare commits
28 Commits
dbcce22f12
...
eef991c77b
Author | SHA1 | Date |
---|---|---|
Wolf Noble | eef991c77b | |
James Panther | 9c54b590ec | |
James Panther | 99618781bc | |
James Panther | 928aa0ed51 | |
James Panther | 6cfbf4d946 | |
James Panther | 2001d17a55 | |
James Panther | 84a99f1f34 | |
James Panther | 313ed046e8 | |
James Panther | 0083219c59 | |
Wen Junhua | f0288c6106 | |
James Panther | 6cb5dde1dd | |
Wen Junhua | 9a91dd93ce | |
Wen Junhua | aa3a3c6504 | |
Wen Junhua | 9f7047e662 | |
Wen Junhua | 444f3175aa | |
Wen Junhua | 3219dfac76 | |
James Panther | 0ac3f0e9d2 | |
Wen Junhua | baada03dd9 | |
Wen Junhua | f3125a6e75 | |
Wen Junhua | cb37292b9f | |
Wen Junhua | 2b63687c51 | |
Wen Junhua | 4aa27418b1 | |
Ryan Gibson | 00ac16f3ad | |
dependabot[bot] | b314c40312 | |
dependabot[bot] | 747c995c04 | |
sussan0416 | dea1975e33 | |
Denis Koshelev | da0ea762d0 | |
Wolf Noble | ea7d67c735 |
|
@ -1,6 +1,7 @@
|
||||||
i18n:
|
i18n:
|
||||||
- i18n/*
|
- changed-files:
|
||||||
|
- any-glob-to-any-file: i18n/*
|
||||||
|
|
||||||
documentation:
|
documentation:
|
||||||
- "*.md"
|
- changed-files:
|
||||||
- exampleSite/content/*
|
- any-glob-to-any-file: '**/*.md'
|
||||||
|
|
|
@ -12,7 +12,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
||||||
- Automatic support for WebP images ([#693](https://github.com/jpanther/congo/pull/693))
|
- Automatic support for WebP images ([#693](https://github.com/jpanther/congo/pull/693))
|
||||||
- Warning when building if links to Markdown files cannot be resolved ([#691](https://github.com/jpanther/congo/pull/691))
|
- Warning when building if links to Markdown files cannot be resolved ([#691](https://github.com/jpanther/congo/pull/691))
|
||||||
- Ability to share articles to Telegram and Line ([#719](https://github.com/jpanther/congo/pull/719))
|
- Ability to share articles to Telegram and Line ([#719](https://github.com/jpanther/congo/pull/719))
|
||||||
- New icon for `line`([#719](https://github.com/jpanther/congo/pull/719))
|
- New icons for `line` and `google-scholar` ([#719](https://github.com/jpanther/congo/pull/719), [#755](https://github.com/jpanther/congo/pull/755))
|
||||||
|
- Table of contents will now scroll if taller than the browser height ([#733](https://github.com/jpanther/congo/pull/733))
|
||||||
- Korean translation ([#731](https://github.com/jpanther/congo/pull/731))
|
- Korean translation ([#731](https://github.com/jpanther/congo/pull/731))
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
|
@ -21,11 +22,13 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
||||||
- ⚠️ Author params block in language configuration has been moved to `params.author` ([#704](https://github.com/jpanther/congo/pull/704))
|
- ⚠️ Author params block in language configuration has been moved to `params.author` ([#704](https://github.com/jpanther/congo/pull/704))
|
||||||
- Refactored image logic into a new `picture.html` partial ([#693](https://github.com/jpanther/congo/pull/693))
|
- Refactored image logic into a new `picture.html` partial ([#693](https://github.com/jpanther/congo/pull/693))
|
||||||
- Upgrade to ChartJS v4.4.1 ([#736](https://github.com/jpanther/congo/pull/736))
|
- Upgrade to ChartJS v4.4.1 ([#736](https://github.com/jpanther/congo/pull/736))
|
||||||
- Upgrade to Tailwind v3.3.6 ([#737](https://github.com/jpanther/congo/pull/737))
|
- Upgrade to Tailwind v3.3.7 ([#737](https://github.com/jpanther/congo/pull/737), [#752](https://github.com/jpanther/congo/pull/752))
|
||||||
|
- Updated Japanese translation ([#750](https://github.com/jpanther/congo/pull/750))
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
|
|
||||||
- Hamburger menu is not dismissed when links are clicked ([#705](https://github.com/jpanther/congo/pull/705))
|
- Hamburger menu is not dismissed when links are clicked ([#705](https://github.com/jpanther/congo/pull/705))
|
||||||
|
- KaTeX, table and code elements wider than the page are not formatted correctly ([#753](https://github.com/jpanther/congo/pull/753))
|
||||||
|
|
||||||
### Removed
|
### Removed
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*! Congo v2.7.6 | MIT License | https://github.com/jpanther/congo */
|
/*! Congo v2.7.6 | MIT License | https://github.com/jpanther/congo */
|
||||||
|
|
||||||
/*! tailwindcss v3.3.6 | MIT License | https://tailwindcss.com */
|
/*! tailwindcss v3.3.7 | MIT License | https://tailwindcss.com */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
1. Prevent padding and border from affecting element width. (https://github.com/mozdevs/cssremedy/issues/4)
|
1. Prevent padding and border from affecting element width. (https://github.com/mozdevs/cssremedy/issues/4)
|
||||||
|
@ -1137,6 +1137,12 @@ body:has(#menu-controller:checked) {
|
||||||
|
|
||||||
/* Table of Contents */
|
/* Table of Contents */
|
||||||
|
|
||||||
|
.toc {
|
||||||
|
max-height: 100vh;
|
||||||
|
overflow-y: auto;
|
||||||
|
padding-bottom: 50px;
|
||||||
|
}
|
||||||
|
|
||||||
.toc ul,
|
.toc ul,
|
||||||
.toc li {
|
.toc li {
|
||||||
list-style-type: none;
|
list-style-type: none;
|
||||||
|
@ -1182,8 +1188,8 @@ body:has(#menu-controller:checked) {
|
||||||
.copy-button {
|
.copy-button {
|
||||||
visibility: hidden;
|
visibility: hidden;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
right: 0px;
|
|
||||||
top: 0px;
|
top: 0px;
|
||||||
|
right: 0px;
|
||||||
z-index: 10;
|
z-index: 10;
|
||||||
width: 5rem;
|
width: 5rem;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
|
@ -1231,6 +1237,28 @@ body:has(#menu-controller:checked) {
|
||||||
opacity: 0.05;
|
opacity: 0.05;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Fix long KaTeX equations on mobile (see https://katex.org/docs/issues.html#css-customization) */
|
||||||
|
|
||||||
|
.katex-display {
|
||||||
|
overflow: auto hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Fix long tables breaking out of article on mobile */
|
||||||
|
|
||||||
|
table {
|
||||||
|
display: block;
|
||||||
|
overflow: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Fix long inline code sections breaking out of article on mobile */
|
||||||
|
|
||||||
|
code {
|
||||||
|
word-wrap: break-word;
|
||||||
|
/* All browsers since IE 5.5+ */
|
||||||
|
overflow-wrap: break-word;
|
||||||
|
/* Renamed property in CSS3 draft spec */
|
||||||
|
}
|
||||||
|
|
||||||
/* -- Chroma Highlight -- */
|
/* -- Chroma Highlight -- */
|
||||||
|
|
||||||
/* Background */
|
/* Background */
|
||||||
|
|
|
@ -59,9 +59,15 @@ body:has(#menu-controller:checked) {
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Table of Contents */
|
/* Table of Contents */
|
||||||
|
.toc {
|
||||||
|
max-height: 100vh;
|
||||||
|
overflow-y: auto;
|
||||||
|
padding-bottom: 50px;
|
||||||
|
}
|
||||||
|
|
||||||
.toc ul,
|
.toc ul,
|
||||||
.toc li {
|
.toc li {
|
||||||
@apply list-none px-0 leading-snug;
|
@apply px-0 leading-snug list-none;
|
||||||
}
|
}
|
||||||
.toc ul ul {
|
.toc ul ul {
|
||||||
@apply ps-4;
|
@apply ps-4;
|
||||||
|
@ -84,7 +90,7 @@ body:has(#menu-controller:checked) {
|
||||||
@apply visible;
|
@apply visible;
|
||||||
}
|
}
|
||||||
.copy-button {
|
.copy-button {
|
||||||
@apply invisible absolute right-0 top-0 z-10 w-20 cursor-pointer whitespace-nowrap rounded-bl-md rounded-tr-md bg-neutral-200 py-1 font-mono text-sm text-neutral-700 opacity-90 dark:bg-neutral-600 dark:text-neutral-200;
|
@apply absolute top-0 right-0 z-10 invisible w-20 py-1 font-mono text-sm cursor-pointer whitespace-nowrap rounded-bl-md rounded-tr-md bg-neutral-200 text-neutral-700 opacity-90 dark:bg-neutral-600 dark:text-neutral-200;
|
||||||
}
|
}
|
||||||
.copy-button:hover,
|
.copy-button:hover,
|
||||||
.copy-button:focus,
|
.copy-button:focus,
|
||||||
|
@ -96,23 +102,40 @@ body:has(#menu-controller:checked) {
|
||||||
@apply absolute -z-10 opacity-5;
|
@apply absolute -z-10 opacity-5;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Fix long KaTeX equations on mobile (see https://katex.org/docs/issues.html#css-customization) */
|
||||||
|
.katex-display {
|
||||||
|
overflow: auto hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Fix long tables breaking out of article on mobile */
|
||||||
|
table {
|
||||||
|
display: block;
|
||||||
|
overflow: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Fix long inline code sections breaking out of article on mobile */
|
||||||
|
code {
|
||||||
|
word-wrap: break-word; /* All browsers since IE 5.5+ */
|
||||||
|
overflow-wrap: break-word; /* Renamed property in CSS3 draft spec */
|
||||||
|
}
|
||||||
|
|
||||||
/* -- Chroma Highlight -- */
|
/* -- Chroma Highlight -- */
|
||||||
/* Background */
|
/* Background */
|
||||||
.chroma {
|
.chroma {
|
||||||
@apply rounded-md bg-neutral-50 py-3 text-neutral-700 dark:bg-neutral-700 dark:text-neutral-200;
|
@apply py-3 rounded-md bg-neutral-50 text-neutral-700 dark:bg-neutral-700 dark:text-neutral-200;
|
||||||
}
|
}
|
||||||
.chroma pre {
|
.chroma pre {
|
||||||
@apply m-0 p-0;
|
@apply p-0 m-0;
|
||||||
}
|
}
|
||||||
/* LineTable */
|
/* LineTable */
|
||||||
.chroma .lntable {
|
.chroma .lntable {
|
||||||
@apply m-0 block w-auto overflow-auto text-base;
|
@apply block w-auto m-0 overflow-auto text-base;
|
||||||
}
|
}
|
||||||
/* LineNumbersTable */
|
/* LineNumbersTable */
|
||||||
/* LineNumbers */
|
/* LineNumbers */
|
||||||
.chroma .lnt,
|
.chroma .lnt,
|
||||||
.chroma .ln {
|
.chroma .ln {
|
||||||
@apply mr-2 px-2 text-neutral-600 dark:text-neutral-300;
|
@apply px-2 mr-2 text-neutral-600 dark:text-neutral-300;
|
||||||
}
|
}
|
||||||
.chroma .lntd {
|
.chroma .lntd {
|
||||||
@apply p-0 align-top;
|
@apply p-0 align-top;
|
||||||
|
@ -274,7 +297,7 @@ body:has(#menu-controller:checked) {
|
||||||
}
|
}
|
||||||
/* CommentHashbang */
|
/* CommentHashbang */
|
||||||
.chroma .ch {
|
.chroma .ch {
|
||||||
@apply font-semibold italic text-neutral-500 dark:text-neutral-400;
|
@apply italic font-semibold text-neutral-500 dark:text-neutral-400;
|
||||||
}
|
}
|
||||||
/* GenericEmph */
|
/* GenericEmph */
|
||||||
.chroma .ge {
|
.chroma .ge {
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" height="16" width="16" viewBox="0 0 512 512"><!--!Font Awesome Free 6.5.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2023 Fonticons, Inc.--><path fill="currentColor" d="M390.9 298.5c0 0 0 .1 .1 .1c9.2 19.4 14.4 41.1 14.4 64C405.3 445.1 338.5 512 256 512s-149.3-66.9-149.3-149.3c0-22.9 5.2-44.6 14.4-64h0c1.7-3.6 3.6-7.2 5.6-10.7c4.4-7.6 9.4-14.7 15-21.3c27.4-32.6 68.5-53.3 114.4-53.3c33.6 0 64.6 11.1 89.6 29.9c9.1 6.9 17.4 14.7 24.8 23.5c5.6 6.6 10.6 13.8 15 21.3c2 3.4 3.8 7 5.5 10.5zm26.4-18.8c-30.1-58.4-91-98.4-161.3-98.4s-131.2 40-161.3 98.4L0 202.7 256 0 512 202.7l-94.7 77.1z"/></svg>
|
After Width: | Height: | Size: 689 B |
|
@ -59,4 +59,5 @@ title = "Congo"
|
||||||
# { whatsapp = "https://wa.me/phone-number" },
|
# { whatsapp = "https://wa.me/phone-number" },
|
||||||
# { x-twitter = "https://twitter.com/username" },
|
# { x-twitter = "https://twitter.com/username" },
|
||||||
# { youtube = "https://youtube.com/username" },
|
# { youtube = "https://youtube.com/username" },
|
||||||
|
# { google-scholar = "https://scholar.google.com/citations?user=user-id"}
|
||||||
# ]
|
# ]
|
||||||
|
|
|
@ -7,6 +7,11 @@
|
||||||
|
|
||||||
colorScheme = "congo"
|
colorScheme = "congo"
|
||||||
defaultAppearance = "light" # valid options: light or dark
|
defaultAppearance = "light" # valid options: light or dark
|
||||||
|
[divineRGBVals]
|
||||||
|
debug = false
|
||||||
|
themeColorMap = "congo"
|
||||||
|
tailwindMap = "twcolormap"
|
||||||
|
|
||||||
autoSwitchAppearance = true
|
autoSwitchAppearance = true
|
||||||
|
|
||||||
enableSearch = false
|
enableSearch = false
|
||||||
|
|
|
@ -0,0 +1,52 @@
|
||||||
|
{
|
||||||
|
"themeColors": [
|
||||||
|
{ "cherry": {
|
||||||
|
"neutral": "neutral",
|
||||||
|
"primary": "rose",
|
||||||
|
"secondary": "green"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{ "congo": {
|
||||||
|
"neutral": "gray",
|
||||||
|
"primary": "violet",
|
||||||
|
"secondary": "fuchsia"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{ "fire": {
|
||||||
|
"neutral": "stone",
|
||||||
|
"primary": "orange",
|
||||||
|
"secondary": "rose"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{ "ocean": {
|
||||||
|
"neutral": "slate",
|
||||||
|
"primary": "blue",
|
||||||
|
"secondary": "cyan"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{ "sapphire": {
|
||||||
|
"neutral": "slate",
|
||||||
|
"primary": "indigo",
|
||||||
|
"secondary": "pink"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{ "avocado": {
|
||||||
|
"neutral": "stone",
|
||||||
|
"primary": "lime",
|
||||||
|
"secondary": "emerald"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{ "slate": {
|
||||||
|
"neutral": "gray",
|
||||||
|
"primary": "slate",
|
||||||
|
"secondary": "gray"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"colorWeights": {
|
||||||
|
"neutral": "400",
|
||||||
|
"primary": "600",
|
||||||
|
"secondary": "400"
|
||||||
|
},
|
||||||
|
"fallbackWeight": "100"
|
||||||
|
}
|
|
@ -0,0 +1,310 @@
|
||||||
|
[
|
||||||
|
{
|
||||||
|
"slate": {
|
||||||
|
"50": "#f8fafc",
|
||||||
|
"100": "#f1f5f9",
|
||||||
|
"200": "#e2e8f0",
|
||||||
|
"300": "#cbd5e1",
|
||||||
|
"400": "#94a3b8",
|
||||||
|
"500": "#64748b",
|
||||||
|
"600": "#475569",
|
||||||
|
"700": "#334155",
|
||||||
|
"800": "#1e293b",
|
||||||
|
"900": "#0f172a"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"gray": {
|
||||||
|
"50": "#f9fafb",
|
||||||
|
"100": "#f3f4f6",
|
||||||
|
"200": "#e5e7eb",
|
||||||
|
"300": "#d1d5db",
|
||||||
|
"400": "#9ca3af",
|
||||||
|
"500": "#6b7280",
|
||||||
|
"600": "#4b5563",
|
||||||
|
"700": "#374151",
|
||||||
|
"800": "#1f2937",
|
||||||
|
"900": "#111827"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"zinc": {
|
||||||
|
"50": "#fafafa",
|
||||||
|
"100": "#f4f4f5",
|
||||||
|
"200": "#e4e4e7",
|
||||||
|
"300": "#d4d4d8",
|
||||||
|
"400": "#a1a1aa",
|
||||||
|
"500": "#71717a",
|
||||||
|
"600": "#52525b",
|
||||||
|
"700": "#3f3f46",
|
||||||
|
"800": "#27272a",
|
||||||
|
"900": "#18181b"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"neutral": {
|
||||||
|
"50": "#fafafa",
|
||||||
|
"100": "#f5f5f5",
|
||||||
|
"200": "#e5e5e5",
|
||||||
|
"300": "#d4d4d4",
|
||||||
|
"400": "#a3a3a3",
|
||||||
|
"500": "#737373",
|
||||||
|
"600": "#525252",
|
||||||
|
"700": "#404040",
|
||||||
|
"800": "#262626",
|
||||||
|
"900": "#171717"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"stone": {
|
||||||
|
"50": "#fafaf9",
|
||||||
|
"100": "#f5f5f4",
|
||||||
|
"200": "#e7e5e4",
|
||||||
|
"300": "#d6d3d1",
|
||||||
|
"400": "#a8a29e",
|
||||||
|
"500": "#78716c",
|
||||||
|
"600": "#57534e",
|
||||||
|
"700": "#44403c",
|
||||||
|
"800": "#292524",
|
||||||
|
"900": "#1c1917"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"red": {
|
||||||
|
"50": "#fef2f2",
|
||||||
|
"100": "#fee2e2",
|
||||||
|
"200": "#fecaca",
|
||||||
|
"300": "#fca5a5",
|
||||||
|
"400": "#f87171",
|
||||||
|
"500": "#ef4444",
|
||||||
|
"600": "#dc2626",
|
||||||
|
"700": "#b91c1c",
|
||||||
|
"800": "#991b1b",
|
||||||
|
"900": "#7f1d1d"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"orange": {
|
||||||
|
"50": "#fff7ed",
|
||||||
|
"100": "#ffedd5",
|
||||||
|
"200": "#fed7aa",
|
||||||
|
"300": "#fdba74",
|
||||||
|
"400": "#fb923c",
|
||||||
|
"500": "#f97316",
|
||||||
|
"600": "#ea580c",
|
||||||
|
"700": "#c2410c",
|
||||||
|
"800": "#9a3412",
|
||||||
|
"900": "#7c2d12"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"amber": {
|
||||||
|
"50": "#fffbeb",
|
||||||
|
"100": "#fef3c7",
|
||||||
|
"200": "#fde68a",
|
||||||
|
"300": "#fcd34d",
|
||||||
|
"400": "#fbbf24",
|
||||||
|
"500": "#f59e0b",
|
||||||
|
"600": "#d97706",
|
||||||
|
"700": "#b45309",
|
||||||
|
"800": "#92400e",
|
||||||
|
"900": "#78350f"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"yellow": {
|
||||||
|
"50": "#fefce8",
|
||||||
|
"100": "#fef9c3",
|
||||||
|
"200": "#fef08a",
|
||||||
|
"300": "#fde047",
|
||||||
|
"400": "#facc15",
|
||||||
|
"500": "#eab308",
|
||||||
|
"600": "#ca8a04",
|
||||||
|
"700": "#a16207",
|
||||||
|
"800": "#854d0e",
|
||||||
|
"900": "#713f12"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"lime": {
|
||||||
|
"50": "#f7fee7",
|
||||||
|
"100": "#ecfccb",
|
||||||
|
"200": "#d9f99d",
|
||||||
|
"300": "#bef264",
|
||||||
|
"400": "#a3e635",
|
||||||
|
"500": "#84cc16",
|
||||||
|
"600": "#65a30d",
|
||||||
|
"700": "#4d7c0f",
|
||||||
|
"800": "#3f6212",
|
||||||
|
"900": "#365314"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"green": {
|
||||||
|
"50": "#f0fdf4",
|
||||||
|
"100": "#dcfce7",
|
||||||
|
"200": "#bbf7d0",
|
||||||
|
"300": "#86efac",
|
||||||
|
"400": "#4ade80",
|
||||||
|
"500": "#22c55e",
|
||||||
|
"600": "#16a34a",
|
||||||
|
"700": "#15803d",
|
||||||
|
"800": "#166534",
|
||||||
|
"900": "#14532d"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"emerald": {
|
||||||
|
"50": "#ecfdf5",
|
||||||
|
"100": "#d1fae5",
|
||||||
|
"200": "#a7f3d0",
|
||||||
|
"300": "#6ee7b7",
|
||||||
|
"400": "#34d399",
|
||||||
|
"500": "#10b981",
|
||||||
|
"600": "#059669",
|
||||||
|
"700": "#047857",
|
||||||
|
"800": "#065f46",
|
||||||
|
"900": "#064e3b"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"teal": {
|
||||||
|
"50": "#f0fdfa",
|
||||||
|
"100": "#ccfbf1",
|
||||||
|
"200": "#99f6e4",
|
||||||
|
"300": "#5eead4",
|
||||||
|
"400": "#2dd4bf",
|
||||||
|
"500": "#14b8a6",
|
||||||
|
"600": "#0d9488",
|
||||||
|
"700": "#0f766e",
|
||||||
|
"800": "#115e59",
|
||||||
|
"900": "#134e4a"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cyan": {
|
||||||
|
"50": "#ecfeff",
|
||||||
|
"100": "#cffafe",
|
||||||
|
"200": "#a5f3fc",
|
||||||
|
"300": "#67e8f9",
|
||||||
|
"400": "#22d3ee",
|
||||||
|
"500": "#06b6d4",
|
||||||
|
"600": "#0891b2",
|
||||||
|
"700": "#0e7490",
|
||||||
|
"800": "#155e75",
|
||||||
|
"900": "#164e63"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"sky": {
|
||||||
|
"50": "#f0f9ff",
|
||||||
|
"100": "#e0f2fe",
|
||||||
|
"200": "#bae6fd",
|
||||||
|
"300": "#7dd3fc",
|
||||||
|
"400": "#38bdf8",
|
||||||
|
"500": "#0ea5e9",
|
||||||
|
"600": "#0284c7",
|
||||||
|
"700": "#0369a1",
|
||||||
|
"800": "#075985",
|
||||||
|
"900": "#0c4a6e"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"blue": {
|
||||||
|
"50": "#eff6ff",
|
||||||
|
"100": "#dbeafe",
|
||||||
|
"200": "#bfdbfe",
|
||||||
|
"300": "#93c5fd",
|
||||||
|
"400": "#60a5fa",
|
||||||
|
"500": "#3b82f6",
|
||||||
|
"600": "#2563eb",
|
||||||
|
"700": "#1d4ed8",
|
||||||
|
"800": "#1e40af",
|
||||||
|
"900": "#1e3a8a"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"indigo": {
|
||||||
|
"50": "#eef2ff",
|
||||||
|
"100": "#e0e7ff",
|
||||||
|
"200": "#c7d2fe",
|
||||||
|
"300": "#a5b4fc",
|
||||||
|
"400": "#818cf8",
|
||||||
|
"500": "#6366f1",
|
||||||
|
"600": "#4f46e5",
|
||||||
|
"700": "#4338ca",
|
||||||
|
"800": "#3730a3",
|
||||||
|
"900": "#312e81"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"violet": {
|
||||||
|
"50": "#f5f3ff",
|
||||||
|
"100": "#ede9fe",
|
||||||
|
"200": "#ddd6fe",
|
||||||
|
"300": "#c4b5fd",
|
||||||
|
"400": "#a78bfa",
|
||||||
|
"500": "#8b5cf6",
|
||||||
|
"600": "#7c3aed",
|
||||||
|
"700": "#6d28d9",
|
||||||
|
"800": "#5b21b6",
|
||||||
|
"900": "#4c1d95"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"purple": {
|
||||||
|
"50": "#faf5ff",
|
||||||
|
"100": "#f3e8ff",
|
||||||
|
"200": "#e9d5ff",
|
||||||
|
"300": "#d8b4fe",
|
||||||
|
"400": "#c084fc",
|
||||||
|
"500": "#a855f7",
|
||||||
|
"600": "#9333ea",
|
||||||
|
"700": "#7e22ce",
|
||||||
|
"800": "#6b21a8",
|
||||||
|
"900": "#581c87"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fuchsia": {
|
||||||
|
"50": "#fdf4ff",
|
||||||
|
"100": "#fae8ff",
|
||||||
|
"200": "#f5d0fe",
|
||||||
|
"300": "#f0abfc",
|
||||||
|
"400": "#e879f9",
|
||||||
|
"500": "#d946ef",
|
||||||
|
"600": "#c026d3",
|
||||||
|
"700": "#a21caf",
|
||||||
|
"800": "#86198f",
|
||||||
|
"900": "#701a75"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"pink": {
|
||||||
|
"50": "#fdf2f8",
|
||||||
|
"100": "#fce7f3",
|
||||||
|
"200": "#fbcfe8",
|
||||||
|
"300": "#f9a8d4",
|
||||||
|
"400": "#f472b6",
|
||||||
|
"500": "#ec4899",
|
||||||
|
"600": "#db2777",
|
||||||
|
"700": "#be185d",
|
||||||
|
"800": "#9d174d",
|
||||||
|
"900": "#831843"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"rose": {
|
||||||
|
"50": "#fff1f2",
|
||||||
|
"100": "#ffe4e6",
|
||||||
|
"200": "#fecdd3",
|
||||||
|
"300": "#fda4af",
|
||||||
|
"400": "#fb7185",
|
||||||
|
"500": "#f43f5e",
|
||||||
|
"600": "#e11d48",
|
||||||
|
"700": "#be123c",
|
||||||
|
"800": "#9f1239",
|
||||||
|
"900": "#881337"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
|
@ -40,6 +40,7 @@ Die vollständige Liste der integrierten Icons und ihre entsprechenden Namen fin
|
||||||
| gitlab | {{< icon gitlab >}} |
|
| gitlab | {{< icon gitlab >}} |
|
||||||
| globe | {{< icon globe >}} |
|
| globe | {{< icon globe >}} |
|
||||||
| google | {{< icon google >}} |
|
| google | {{< icon google >}} |
|
||||||
|
| google-scholar | {{< icon google-scholar >}} |
|
||||||
| hashnode | {{< icon hashnode >}} |
|
| hashnode | {{< icon hashnode >}} |
|
||||||
| instagram | {{< icon instagram >}} |
|
| instagram | {{< icon instagram >}} |
|
||||||
| keybase | {{< icon keybase >}} |
|
| keybase | {{< icon keybase >}} |
|
||||||
|
|
|
@ -40,6 +40,7 @@ La lista completa de íconos incorporados y sus nombres correspondientes se pued
|
||||||
| gitlab | {{< icon gitlab >}} |
|
| gitlab | {{< icon gitlab >}} |
|
||||||
| globe | {{< icon globe >}} |
|
| globe | {{< icon globe >}} |
|
||||||
| google | {{< icon google >}} |
|
| google | {{< icon google >}} |
|
||||||
|
| google-scholar | {{< icon google-scholar >}} |
|
||||||
| hashnode | {{< icon hashnode >}} |
|
| hashnode | {{< icon hashnode >}} |
|
||||||
| instagram | {{< icon instagram >}} |
|
| instagram | {{< icon instagram >}} |
|
||||||
| keybase | {{< icon keybase >}} |
|
| keybase | {{< icon keybase >}} |
|
||||||
|
|
|
@ -40,6 +40,7 @@ Congo は[FontAwesome 6](https://fontawesome.com/icons)のアイコンをサポ
|
||||||
| gitlab | {{< icon gitlab >}} |
|
| gitlab | {{< icon gitlab >}} |
|
||||||
| globe | {{< icon globe >}} |
|
| globe | {{< icon globe >}} |
|
||||||
| google | {{< icon google >}} |
|
| google | {{< icon google >}} |
|
||||||
|
| google-scholar | {{< icon google-scholar >}} |
|
||||||
| hashnode | {{< icon hashnode >}} |
|
| hashnode | {{< icon hashnode >}} |
|
||||||
| instagram | {{< icon instagram >}} |
|
| instagram | {{< icon instagram >}} |
|
||||||
| keybase | {{< icon keybase >}} |
|
| keybase | {{< icon keybase >}} |
|
||||||
|
|
|
@ -40,6 +40,7 @@ The full list of built-in icons and their corresponding names can referenced bel
|
||||||
| gitlab | {{< icon gitlab >}} |
|
| gitlab | {{< icon gitlab >}} |
|
||||||
| globe | {{< icon globe >}} |
|
| globe | {{< icon globe >}} |
|
||||||
| google | {{< icon google >}} |
|
| google | {{< icon google >}} |
|
||||||
|
| google-scholar | {{< icon google-scholar >}} |
|
||||||
| hashnode | {{< icon hashnode >}} |
|
| hashnode | {{< icon hashnode >}} |
|
||||||
| instagram | {{< icon instagram >}} |
|
| instagram | {{< icon instagram >}} |
|
||||||
| keybase | {{< icon keybase >}} |
|
| keybase | {{< icon keybase >}} |
|
||||||
|
|
|
@ -47,7 +47,7 @@ sharing:
|
||||||
email: " Eメールを送る"
|
email: " Eメールを送る"
|
||||||
facebook: "Facebookでシェアする"
|
facebook: "Facebookでシェアする"
|
||||||
linkedin: "LinkedInでシェアする"
|
linkedin: "LinkedInでシェアする"
|
||||||
# mastodon: "Toot on Mastodon"
|
mastodon: "Mastodonに投稿する"
|
||||||
pinterest: "Pinterestでピンする"
|
pinterest: "Pinterestでピンする"
|
||||||
reddit: "Redditに投稿する"
|
reddit: "Redditに投稿する"
|
||||||
twitter: "Twitterに投稿する"
|
twitter: "Twitterに投稿する"
|
||||||
|
|
|
@ -0,0 +1,273 @@
|
||||||
|
{{- /* util/divineRGBVal consume a tailwind color name and weight, return RGB val in hex format. */ -}}
|
||||||
|
{{- $rgbItchy := newScratch -}}
|
||||||
|
{{- $themeColors := newScratch -}}
|
||||||
|
{{- $debug := (site.Params.divineRGBVals.debug|default false) -}}
|
||||||
|
{{- $rgbItchy.Set "logPrefix" "[util/divineRGBVal.html] " -}}
|
||||||
|
{{- $rgbItchy.Set "debugPrefix" (print "[DEBUG]" ( $rgbItchy.Get "logPrefix" )) -}}
|
||||||
|
{{- if $debug -}}
|
||||||
|
{{- warnf "%s Debug enabled" ( $rgbItchy.Get "debugPrefix") -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- $rgbItchy.Set "needThemeLookup" false -}}
|
||||||
|
{{- $rgbItchy.Set "twLookupSource" (site.Params.divineRGBVals.tailwindMap |default nil ) -}}
|
||||||
|
{{- $rgbItchy.Set "returnVal" "#000000" -}}
|
||||||
|
{{- $rgbItchy.Set "themeSource" (site.Params.divineRGBVals.themeColorMap|default "site.Data.congo") -}}
|
||||||
|
{{- $rgbItchy.Set "twLookupSource" (site.Params.divineRGBVals.tailwindMap |default nil ) -}}
|
||||||
|
{{- $rgbItchy.Set "schemeColors" nil -}}
|
||||||
|
{{- $rgbItchy.Set "primary" (site.Params.divineRGBVals.primary |default nil) -}}
|
||||||
|
{{- $rgbItchy.Set "secondary" (site.Params.divineRGBVals.secondary |default nil) -}}
|
||||||
|
{{- $rgbItchy.Set "neutral" (site.Params.divineRGBVals.neutral |default nil) -}}
|
||||||
|
{{- $colorSchemeName := $rgbItchy.Get "scheme" -}}
|
||||||
|
{{- $ctx := .context -}}
|
||||||
|
{{- $color := (.color|default nil) -}}
|
||||||
|
{{- $shade := (.shade|default nil) -}}
|
||||||
|
{{- $scheme := (.scheme |default nil ) -}}
|
||||||
|
{{- $return := (.return |default "RGB" ) -}}
|
||||||
|
{{- $validReturns := slice "RGB" "TWColor" "TWColorShade" -}}
|
||||||
|
{{- if in $validReturns $return -}}
|
||||||
|
{{- if and $debug (ne $return "RGB") -}}
|
||||||
|
{{- warnf "%s ---- Return set to: %s " ( $rgbItchy.Get "debugPrefix") (string $return) -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- $rgbItchy.Set "return" $return -}}
|
||||||
|
{{- else -}}
|
||||||
|
{{- warnf "%s xxxx Unsupported value of %s set for return. Setting to 'RGB' instead." ($rgbItchy.Get "logPrefix") $return -}}
|
||||||
|
{{- $rgbItchy.Set "return" "RGB" -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- if $scheme -}}
|
||||||
|
{{- $rgbItchy.Set "scheme" $scheme -}}
|
||||||
|
{{- if ne $scheme ( site.Params.colorScheme ) -}}
|
||||||
|
{{- $rgbItchy.Set "needThemeLookup" true -}}
|
||||||
|
{{- if $debug -}}
|
||||||
|
{{- warnf "%s ..-. Requested colorScheme '%s' differs from scheme '%s' read from site.Params.colorScheme. Lookup will be necessary." ( $rgbItchy.Get "debugPrefix") ($rgbItchy.Get "scheme") (site.Params.colorScheme) -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- else -}}
|
||||||
|
{{- $rgbItchy.Set "scheme" ( site.Params.colorScheme ) -}}
|
||||||
|
{{- if $debug -}}
|
||||||
|
{{- warnf "%s ..-. Theme colorScheme not provided on invocation. Read '%s' from site.Params.colorScheme." ( $rgbItchy.Get "debugPrefix") ($rgbItchy.Get "scheme") -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- if $shade -}}
|
||||||
|
{{- if $debug -}}
|
||||||
|
{{- warnf "%s .+.. Shade given: %s " ( $rgbItchy.Get "debugPrefix") (string $shade) -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- if (strings.HasSuffix $shade "0") -}}
|
||||||
|
{{- $rgbItchy.Set "shade" (string $shade) -}}
|
||||||
|
{{- if $debug -}}
|
||||||
|
{{- warnf "%s .-.. Shade ends with 0 : %s " ($rgbItchy.Get "debugPrefix") ($rgbItchy.Get "shade") -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- if $color -}}
|
||||||
|
{{- if $debug -}}
|
||||||
|
{{- warnf "%s +... Color given: %s " ( $rgbItchy.Get "debugPrefix") $color -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- if and ( strings.Contains $color "-" ) (strings.HasSuffix $color "0") -}}
|
||||||
|
{{- if $debug -}}
|
||||||
|
{{- warnf "%s -... Color %s seems to be a tailwind-style (color)-(shade)" ( $rgbItchy.Get "debugPrefix") $color -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- /* TODO: There has to be a better way to achieve this ????? */ -}}
|
||||||
|
{{- $c := strings.Split $color "-" -}}
|
||||||
|
{{- $col := delimit (first 1 $c) "" -}}
|
||||||
|
{{- $shd := delimit ( last 1 $c) "" -}}
|
||||||
|
{{- if $debug -}}
|
||||||
|
{{- warnf "%s --.. Color/Shade: %s %s " ( $rgbItchy.Get "debugPrefix") $col $shd -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- if and ($shade) (ne $shd (string $shade)) -}}
|
||||||
|
{{- warnf "%s --.. We were fed a tailwind-style color-shade ( %s ) and a shade (%s). %s and %s are not the same value. Please provide one or the other. " ( $rgbItchy.Get "logPrefix") $color (string $shade) $shd (string $shade) -}}
|
||||||
|
{{- else -}}
|
||||||
|
{{- $rgbItchy.Set "color" $col -}}
|
||||||
|
{{- $rgbItchy.Set "shade" $shd -}}
|
||||||
|
{{- if $debug -}}
|
||||||
|
{{- warnf "%s ++.. Set Scratch vars Color: %s Shade: %s " ( $rgbItchy.Get "debugPrefix") ( $rgbItchy.Get "color") ( $rgbItchy.Get "shade") -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- else -}}
|
||||||
|
{{- if $debug -}}
|
||||||
|
{{- warnf "%s --.. Color '%s' doesn't seem to be a tailwind-style (color)-(shade) combo. " ( $rgbItchy.Get "debugPrefix") $color -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- $rgbItchy.Set "color" $color -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- if in ( slice "primary" "secondary" "neutral") ($rgbItchy.Get "color") -}}
|
||||||
|
{{- if $debug -}}
|
||||||
|
{{- warnf "%s -.-. Color '%s' references a theme-abstracted value. Further divination required" ( $rgbItchy.Get "debugPrefix") ($rgbItchy.Get "color") -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- $rgbItchy.Set "needThemeLookup" true -}}
|
||||||
|
{{- if not ($rgbItchy.Get "shade") -}}
|
||||||
|
{{- $rgbItchy.Set "shade" ($rgbItchy.Get "color") -}}
|
||||||
|
{{- if $debug -}}
|
||||||
|
{{- warnf "%s .--. Desired Shade unknown. Will lookup theme-value default for %s" ( $rgbItchy.Get "debugPrefix") ($rgbItchy.Get "color") -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- if ($rgbItchy.Get "shade") -}}
|
||||||
|
{{- if $debug -}}
|
||||||
|
{{- warnf "%s .+.. Desired Shade: %s" ( $rgbItchy.Get "debugPrefix") ($rgbItchy.Get "shade") -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- else -}}
|
||||||
|
{{- $rgbItchy.Set "needThemeLookup" true -}}
|
||||||
|
{{- $rgbItchy.Set "shade" ($rgbItchy.Get "color") -}}
|
||||||
|
{{- if $debug -}}
|
||||||
|
{{- warnf "%s .--. Desired Shade unknown. Will lookup default for %s" ( $rgbItchy.Get "logPrefix") ($rgbItchy.Get "shade") -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- /*
|
||||||
|
At this point, we should know if
|
||||||
|
- we need to lookup theme-specific colormap
|
||||||
|
- we need to lookup default shades
|
||||||
|
*/ -}}
|
||||||
|
{{- if ($rgbItchy.Get "needThemeLookup") -}}
|
||||||
|
{{- /* We need to lookup theme-specific information to return the requested color */ -}}
|
||||||
|
{{- if not (strings.HasSuffix ($rgbItchy.Get "shade") "0") -}}
|
||||||
|
{{- if $debug -}}
|
||||||
|
{{- warnf "%s .--? Shade not provided on invocation. Determining fallback value for '%s'." ( $rgbItchy.Get "debugPrefix") ($rgbItchy.Get "shade") -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- with $themeData := (index site.Data ($rgbItchy.Get "themeSource")) -}}
|
||||||
|
{{- range $wK, $wV := $themeData.colorWeights -}}
|
||||||
|
{{- if $debug -}}
|
||||||
|
{{- warnf "%s .--. Iterating default weights: %s %s" ( $rgbItchy.Get "debugPrefix") $wK ($rgbItchy.Get "shade") -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- if eq $wK ($rgbItchy.Get "shade") -}}
|
||||||
|
{{- $rgbItchy.Set "shade" $wV -}}
|
||||||
|
{{- if $debug -}}
|
||||||
|
{{- warnf "%s .+-. Found weight for K:%s. Set shade to:%s" ( $rgbItchy.Get "debugPrefix") $wK ($rgbItchy.Get "shade") -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- if not (strings.HasSuffix ($rgbItchy.Get "shade") "0") -}}
|
||||||
|
{{- if $debug -}}
|
||||||
|
{{- warnf "%s +--. Default shade for %s not found. Fetching fallback value." ( $rgbItchy.Get "debugPrefix") ($rgbItchy.Get "shade") -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- $rgbItchy.Set "shade" $themeData.fallbackWeight -}}
|
||||||
|
{{- warnf "%s .+-. Shade value set to fallback: %s." ( $rgbItchy.Get "debugPrefix") ($rgbItchy.Get "shade") -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- /* shade should be set no matter what now. */ -}}
|
||||||
|
{{- else -}}
|
||||||
|
{{- errorf "%s xxx. Theme DataFile %s not accessible, and color shade not provided. Sorry Charlie." ( $rgbItchy.Get "debugPrefix") ($rgbItchy.Get "themeSource") -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- if and (eq ($rgbItchy.Get "primary") nil) (eq ($rgbItchy.Get "secondary") nil) (eq ($rgbItchy.Get "neutral") nil) -}}
|
||||||
|
{{- /* we need to find the Tailwind colors for our theme. */ -}}
|
||||||
|
{{- if $debug -}}
|
||||||
|
{{- warnf "%s -.-? %s Scheme Color names unknown. Shortcut this by setting Site params.divineRGBVals.(primary,secondary,neutral) to the values discerned from divination." ( $rgbItchy.Get "debugPrefix") ($rgbItchy.Get "scheme") -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- with $themeData := (index site.Data ($rgbItchy.Get "themeSource")) -}}
|
||||||
|
{{- if $debug -}}
|
||||||
|
{{- warnf "%s ..-? Theme Datafile %s Accessible " ( $rgbItchy.Get "debugPrefix") ($rgbItchy.Get "themeSource") -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- range $tK, $tV := $themeData.themeColors -}}
|
||||||
|
{{- if and (reflect.IsMap $tV) (eq ($rgbItchy.Get "primary") nil) (eq ($rgbItchy.Get "secondary") nil) (eq ($rgbItchy.Get "neutral") nil) -}}
|
||||||
|
{{- if $debug -}}
|
||||||
|
{{- warnf "%s -.-? Iterating themeData: K:%d V:%s " ( $rgbItchy.Get "debugPrefix") $tK $tV -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- range $label, $blob := $tV -}}
|
||||||
|
{{- if $debug -}}
|
||||||
|
{{- warnf "%s ..-? Evaluating Scheme %d Name:%s " ( $rgbItchy.Get "debugPrefix") $tK $label -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- if eq $label ($rgbItchy.Get "scheme") -}}
|
||||||
|
{{- /* we got a match. assign the match to an element in our scratch object */ -}}
|
||||||
|
{{- $rgbItchy.Set "schemeColors" $blob -}}
|
||||||
|
{{- if $debug -}}
|
||||||
|
{{- warnf "%s ..*? Matched Scheme %s! P: %s, S: %s N: %s " ( $rgbItchy.Get "debugPrefix") ($rgbItchy.Get "scheme") ($rgbItchy.Get "schemeColors").primary ($rgbItchy.Get "schemeColors").secondary ($rgbItchy.Get "schemeColors").neutral }}
|
||||||
|
{{- end -}}
|
||||||
|
{{- range $colorRole, $colorName := $blob -}}
|
||||||
|
{{- $rgbItchy.Set $colorRole $colorName -}}
|
||||||
|
{{- if not ($themeColors.Get $colorRole) -}}
|
||||||
|
{{- $themeColors.Set $colorRole $colorName -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- if $debug -}}
|
||||||
|
{{- warnf "%s +.+? Setting the value of scratch object $rgbItchy.%s. Reading it Back to verify: %s" ( $rgbItchy.Get "debugPrefix") $colorRole ($rgbItchy.Get $colorRole) -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- break -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- else -}}
|
||||||
|
{{- break -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- else -}}
|
||||||
|
{{- /* We don't have the lookup file for the theme's colors. */ -}}
|
||||||
|
{{- errorf "%s ..x. Theme DataFile %s not accessible, but required to proceed. Sorry.." ( $rgbItchy.Get "debugPrefix") ($rgbItchy.Get "themeSource") -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- else -}}
|
||||||
|
{{- if $debug -}}
|
||||||
|
{{- range $colorRole := slice "primary" "secondary" "neutral" -}}
|
||||||
|
{{- warnf "%s +... %s color set in params as %s" ( $rgbItchy.Get "debugPrefix") $colorRole ($rgbItchy.Get $colorRole) -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- /* we have the Tailwind colors for the requested scheme. */ -}}
|
||||||
|
{{- range $colorRole := slice "primary" "secondary" "neutral" -}}
|
||||||
|
{{- if eq $colorRole ( $rgbItchy.Get "color") -}}
|
||||||
|
{{- $rgbItchy.Set "color" ($rgbItchy.Get $colorRole) -}}
|
||||||
|
{{- if $debug -}}
|
||||||
|
{{- warnf "%s +.+? Color %s disambiguated to %s" ( $rgbItchy.Get "debugPrefix") $colorRole ($rgbItchy.Get $colorRole) -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- if or (eq ($rgbItchy.Get "return") "TWColor") (eq ($rgbItchy.Get "return") "TWColorShade" ) -}}
|
||||||
|
{{- if $debug -}}
|
||||||
|
{{- warnf "%s +..+ Returning the Tailwind Color Name for %s %s requested: %s " ( $rgbItchy.Get "debugPrefix") ($rgbItchy.Get "scheme") $colorRole ($rgbItchy.Get "color") -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- if eq ($rgbItchy.Get "return") "TWColor" -}}
|
||||||
|
{{- $rgbItchy.Set "returnVal" (printf "%s" ($rgbItchy.Get "color") ) -}}
|
||||||
|
{{- if $debug -}}
|
||||||
|
{{- warnf "%s *.** returnVal set to color: %s " ( $rgbItchy.Get "debugPrefix") ($rgbItchy.Get "returnVal") -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- else if eq ($rgbItchy.Get "return") "TWColorShade" -}}
|
||||||
|
{{- $rgbItchy.Set "returnVal" (printf "%s-%s" ($rgbItchy.Get "color") ($rgbItchy.Get "shade") ) -}}
|
||||||
|
{{- if $debug -}}
|
||||||
|
{{- warnf "%s **** returnVal set to color-shade: %s " ( $rgbItchy.Get "debugPrefix") ($rgbItchy.Get "returnVal") -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- else if $debug -}}
|
||||||
|
{{- warnf "%s +.+? Role %s is %s" ( $rgbItchy.Get "debugPrefix") $colorRole ($rgbItchy.Get $colorRole) -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- else -}}
|
||||||
|
{{- /* the lookup in question doesn't need theme-scoped data. just tailwind. */ -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- if eq ( $rgbItchy.Get "return") "RGB" -}}
|
||||||
|
{{- with $tailwind := (index site.Data ($rgbItchy.Get "twLookupSource")) -}}{{- /* We have the map of tailwind colors to RGB Vals. */ -}}
|
||||||
|
{{- if $debug -}}
|
||||||
|
{{- warnf "%s ...- Tailwind ColorMap Datafile %s Accessible" ( $rgbItchy.Get "debugPrefix") ($rgbItchy.Get "twLookupSource") -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- $col := default nil -}}
|
||||||
|
{{- $shd := default nil -}}
|
||||||
|
{{- $val := default nil -}}
|
||||||
|
{{- range $tK, $tV := $tailwind -}}
|
||||||
|
{{- if not $col -}}
|
||||||
|
{{- range $cName, $cVals := $tV }}
|
||||||
|
{{- if $debug -}}
|
||||||
|
{{- warnf "%s *..- Evaluating Tailwind Mapdata %d:%s %s " ( $rgbItchy.Get "debugPrefix") $tK $cName ($rgbItchy.Get "color") -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- if eq $cName ($rgbItchy.Get "color") -}}
|
||||||
|
{{- if $debug -}}
|
||||||
|
{{- warnf "%s **.+ Found color %s %s" ( $rgbItchy.Get "debugPrefix") $tK ($rgbItchy.Get "color") -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- $col = $cVals -}}
|
||||||
|
{{- range $sNum, $sVal := $cVals }}
|
||||||
|
{{- if $debug -}}
|
||||||
|
{{- warnf "%s **.- Evaluating %d:%s Shades :%s %s " ( $rgbItchy.Get "debugPrefix") $tK $cName $sNum ($rgbItchy.Get "shade") -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- if eq $sNum ($rgbItchy.Get "shade") -}}
|
||||||
|
{{- if $debug -}}
|
||||||
|
{{- warnf "%s **.+ Found %s:%d RGBVal: %s" ( $rgbItchy.Get "debugPrefix") ($rgbItchy.Get "color") $sNum $sVal -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- $rgbItchy.Set "returnVal" $sVal -}}
|
||||||
|
{{- if $debug -}}
|
||||||
|
{{- warnf "%s **** ReturnVal set %s" ( $rgbItchy.Get "debugPrefix") ($rgbItchy.Get "returnVal") -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- /* return ( $rgbItchy.Get "returnVal" ) */ -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- else -}}
|
||||||
|
{{- /* We don't have the map of tailwind colors to RGB Vals. */ -}}
|
||||||
|
{{- errorf "%s ...x Tailwind ColorMap Datafile %s not accessible." ( $rgbItchy.Get "debugPrefix") ($rgbItchy.Get "twLookupSource") -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- return ( $rgbItchy.Get "returnVal" ) -}}
|
|
@ -20,7 +20,7 @@
|
||||||
"prettier-plugin-tailwindcss": "^0.5.9",
|
"prettier-plugin-tailwindcss": "^0.5.9",
|
||||||
"quicklink": "^2.3.0",
|
"quicklink": "^2.3.0",
|
||||||
"rimraf": "^5.0.5",
|
"rimraf": "^5.0.5",
|
||||||
"tailwindcss": "^3.3.6",
|
"tailwindcss": "^3.3.7",
|
||||||
"vendor-copy": "^3.0.1"
|
"vendor-copy": "^3.0.1"
|
||||||
},
|
},
|
||||||
"funding": {
|
"funding": {
|
||||||
|
@ -2896,9 +2896,9 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/tailwindcss": {
|
"node_modules/tailwindcss": {
|
||||||
"version": "3.3.6",
|
"version": "3.3.7",
|
||||||
"resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-3.3.6.tgz",
|
"resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-3.3.7.tgz",
|
||||||
"integrity": "sha512-AKjF7qbbLvLaPieoKeTjG1+FyNZT6KaJMJPFeQyLfIp7l82ggH1fbHJSsYIvnbTFQOlkh+gBYpyby5GT1LIdLw==",
|
"integrity": "sha512-pjgQxDZPvyS/nG3ZYkyCvsbONJl7GdOejfm24iMt2ElYQQw8Jc4p0m8RdMp7mznPD0kUhfzwV3zAwa80qI0zmQ==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@alloc/quick-lru": "^5.2.0",
|
"@alloc/quick-lru": "^5.2.0",
|
||||||
|
@ -5199,9 +5199,9 @@
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"tailwindcss": {
|
"tailwindcss": {
|
||||||
"version": "3.3.6",
|
"version": "3.3.7",
|
||||||
"resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-3.3.6.tgz",
|
"resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-3.3.7.tgz",
|
||||||
"integrity": "sha512-AKjF7qbbLvLaPieoKeTjG1+FyNZT6KaJMJPFeQyLfIp7l82ggH1fbHJSsYIvnbTFQOlkh+gBYpyby5GT1LIdLw==",
|
"integrity": "sha512-pjgQxDZPvyS/nG3ZYkyCvsbONJl7GdOejfm24iMt2ElYQQw8Jc4p0m8RdMp7mznPD0kUhfzwV3zAwa80qI0zmQ==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"@alloc/quick-lru": "^5.2.0",
|
"@alloc/quick-lru": "^5.2.0",
|
||||||
|
|
|
@ -39,7 +39,7 @@
|
||||||
"prettier-plugin-tailwindcss": "^0.5.9",
|
"prettier-plugin-tailwindcss": "^0.5.9",
|
||||||
"quicklink": "^2.3.0",
|
"quicklink": "^2.3.0",
|
||||||
"rimraf": "^5.0.5",
|
"rimraf": "^5.0.5",
|
||||||
"tailwindcss": "^3.3.6",
|
"tailwindcss": "^3.3.7",
|
||||||
"vendor-copy": "^3.0.1"
|
"vendor-copy": "^3.0.1"
|
||||||
},
|
},
|
||||||
"vendorCopy": [],
|
"vendorCopy": [],
|
||||||
|
|
Loading…
Reference in New Issue