Skip to content

Commit 790ea13

Browse files
committed
chore: MAJ LibDoc v0.7.1
1 parent 9e280e5 commit 790ea13

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+3340
-1340
lines changed

.eleventy.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ export default function(eleventyConfig) {
2525
eleventyConfig.addAsyncFilter("dateString", libdocFunctions.filters.dateString);
2626
eleventyConfig.addAsyncFilter("datePrefixText", libdocFunctions.filters.datePrefixText);
2727
eleventyConfig.addAsyncFilter("toc", libdocFunctions.filters.toc);
28+
eleventyConfig.addAsyncFilter("sanitizeJSON", libdocFunctions.filters.sanitizeJson);
2829
// END FILTERS
2930

3031
// START COLLECTIONS

_data/libdocConfig.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,5 +41,7 @@ export default {
4141
"css"
4242
],
4343
roundedImagesCorners: userConfig.roundedImagesCorners ?? true,
44-
editThisPageRootUrl: userConfig.editThisPageRootUrl ?? false
44+
editThisPageRootUrl: userConfig.editThisPageRootUrl ?? false,
45+
imgBgColorLightMode: userConfig.imgBgColorLightMode ?? 'transparent',
46+
imgBgColorDarkMode: userConfig.imgBgColorDarkMode ?? 'transparent'
4547
};

_data/libdocFunctions.js

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,13 @@ export default {
5656
}
5757
},
5858
filters: {
59+
sanitizeJson: async function(value) {
60+
// Remove back slashes
61+
value = value.replaceAll('\\', '');
62+
// Remove extra spaces
63+
value = value.replace(/\s+/g, ' ').trim();
64+
return value;
65+
},
5966
autoids: async function(content) {
6067
let i = 0;
6168
const anchorsIds = [];
@@ -242,7 +249,7 @@ export default {
242249
}
243250
markup = `
244251
<aside class="widget widget-iconCard">
245-
<p class="d-flex gap-5 | p-5 m-0 | brad-3 bc-neutral-100 bwidth-1 bstyle-dashed bcolor-neutral-500">
252+
<p class="d-flex gap-5 | p-5 m-0 | brad-3 bwidth-1 bstyle-dashed bcolor-neutral-500">
246253
<span class="icon-${finalIconName} fs-10 | c-primary-500" fs-8="xs"></span>
247254
<span class="d-flex fd-column gap-1">
248255
<strong class="fvs-wght-700 fs-6">${mainText}</strong>
@@ -319,16 +326,16 @@ export default {
319326
title="${libdocMessages.openInANewTab[libdocConfig.lang]}"
320327
class="d-flex ai-center gap-1 | p-0 | fvs-wght-400 fs-2 tt-uppercase td-none | sandbox__permalink"
321328
fs-2="xs">
322-
<span class="fvs-wght-400 | c-neutral-300">${libdocMessages.open[libdocConfig.lang]}</span>
323-
<span class="icon-arrow-square-out c-neutral-500"></span>
329+
<span class="fvs-wght-400">${libdocMessages.open[libdocConfig.lang]}</span>
330+
<span class="icon-arrow-square-out"></span>
324331
</a>
325332
<div class="d-flex gap-7">
326333
<button type="button"
327-
class="d-flex ai-center | p-0 | fvs-wght-400 fs-2 tt-uppercase | bc-0 c-neutral-300 b-0 cur-pointer | sandbox__reload">
334+
class="d-flex ai-center | p-0 | fvs-wght-400 fs-2 tt-uppercase | bc-0 b-0 cur-pointer | sandbox__reload">
328335
<span class="o-hidden | to-ellipsis ws-nowrap">${libdocMessages.reload[libdocConfig.lang]}</span>
329336
</button>
330337
<button type="button"
331-
class="d-flex ai-center | p-0 | fvs-wght-400 fs-2 tt-uppercase | bc-0 c-neutral-300 b-0 cur-pointer | sandbox__copy_url">
338+
class="d-flex ai-center | p-0 | fvs-wght-400 fs-2 tt-uppercase | bc-0 b-0 cur-pointer | sandbox__copy_url">
332339
<span class="o-hidden | to-ellipsis ws-nowrap">${libdocMessages.copyURL[libdocConfig.lang]}</span>
333340
</button>
334341
</div>

_data/libdocMessages.json

Lines changed: 41 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,34 @@
77
"en": "Code",
88
"fr": "Code"
99
},
10+
"colorSchemes": {
11+
"en": "Color schemes",
12+
"fr": "Modes d’apparences"
13+
},
14+
"colorSchemeAuto": {
15+
"en": "Automatic",
16+
"fr": "Automatique"
17+
},
18+
"colorSchemeDescriptionAuto": {
19+
"en": "Based on you operating system preference",
20+
"fr": "Basé sur les règles d’affichage de votre système"
21+
},
22+
"colorSchemeLight": {
23+
"en": "Light",
24+
"fr": "Clair"
25+
},
26+
"colorSchemeDescriptionLight": {
27+
"en": "Always apply light mode",
28+
"fr": "Toujours appliquer le mode clair"
29+
},
30+
"colorSchemeDark": {
31+
"en": "Dark",
32+
"fr": "Sombre"
33+
},
34+
"colorSchemeDescriptionDark": {
35+
"en": "Always apply dark mode",
36+
"fr": "Toujours appliquer le mode sombre"
37+
},
1038
"copied": {
1139
"en": "Copied",
1240
"fr": "Copié"
@@ -63,6 +91,10 @@
6391
"en": "Menu",
6492
"fr": "Menu"
6593
},
94+
"noscriptAlert": {
95+
"en": "It seems that your browser JavaScript is disabled, LibDoc is set to fallback mode with reduced features.",
96+
"fr": "Il semble que JavaScript soit désactivé de votre naviigateur, LibDoc est en mode restreint avec des fonctionnalités réduites."
97+
},
6698
"open": {
6799
"en": "Open",
68100
"fr": "Ouvrir"
@@ -83,6 +115,10 @@
83115
"en": "Pages tagged",
84116
"fr": "Pages taguées"
85117
},
118+
"preferences": {
119+
"en": "Preferences",
120+
"fr": "Préférences"
121+
},
86122
"reload": {
87123
"en": "Reload",
88124
"fr": "Recharger"
@@ -145,7 +181,11 @@
145181
},
146182
"tableOfContent": {
147183
"en": "Table of content",
148-
"fr": "Table des matières"
184+
"fr": "Sommaire"
185+
},
186+
"tableOfContentAbbr": {
187+
"en": "TOC",
188+
"fr": "Sommaire"
149189
},
150190
"tag": {
151191
"en": "Tag",

_data/libdocSystem.json

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,5 +28,26 @@
2828
}
2929
}
3030
},
31-
"productionUrl": "eleventy-libdoc.netlify.app"
31+
"productionUrl": "eleventy-libdoc.netlify.app",
32+
"preferences": {
33+
"colorSchemes": {
34+
"choices": [
35+
{
36+
"value": "auto",
37+
"labelMainKey": "colorSchemeAuto",
38+
"labelHelpKey": "colorSchemeDescriptionAuto"
39+
},
40+
{
41+
"value": "light",
42+
"labelMainKey": "colorSchemeLight",
43+
"labelHelpKey": "colorSchemeDescriptionLight"
44+
},
45+
{
46+
"value": "dark",
47+
"labelMainKey": "colorSchemeDark",
48+
"labelHelpKey": "colorSchemeDescriptionDark"
49+
}
50+
]
51+
}
52+
}
3253
}

_data/libdocUtils.js

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -80,31 +80,31 @@ export default {
8080
pr-9="md"
8181
pl-5="xs,sm"
8282
pr-5="xs,sm">
83-
<div class="d-flex | p-1 | bc-primary-200 brad-2"
83+
<div class="d-flex | p-1 o-hidden | brad-2 | sandbox__tabs"
8484
d-none="md">
8585
<button type="button"
86-
class="d-flex | pt-2 pb-2 pl-5 pr-5 | fvs-wght-400 fs-2 tt-uppercase | c-primary-900 bc-0 b-0 cur-pointer | sandbox__tab"
86+
class="d-flex | pt-2 pb-2 pl-5 pr-5 | fvs-wght-400 fs-2 tt-uppercase | b-0 brad-1 cur-pointer | sandbox__tab"
8787
data-name="code">
8888
${libdocMessages.code[libdocConfig.lang]}
8989
</button>
9090
<button type="button"
91-
class="d-flex | pt-2 pb-2 pl-5 pr-5 | fvs-wght-400 fs-2 tt-uppercase | c-primary-900 bc-neutral-100 b-0 brad-1 cur-pointer | sandbox__tab"
91+
class="d-flex | pt-2 pb-2 pl-5 pr-5 | fvs-wght-400 fs-2 tt-uppercase | b-0 brad-1 cur-pointer | sandbox__tab __active"
9292
data-name="iframe">
9393
${libdocMessages.result[libdocConfig.lang]}
9494
</button>
9595
</div>
96-
<div class="d-flex fd-column d-none--xs d-none--sm | o-hidden | bc-neutral-900 c-neutral-200 brad-3 bwidth-1 bstyle-solid bcolor-neutral-900 | sandbox__code_wrapper"
96+
<div class="d-flex fd-column d-none--xs d-none--sm | o-hidden | brad-3 | sandbox__code_wrapper"
9797
w-50="md"
9898
w-100="xs,sm"
9999
bradtr-0="md"
100100
bradbr-0="md">
101101
<header class="d-flex jc-space-between | pl-5" style="height: 58px">
102-
<p class="d-flex ai-center | m-0 | fvs-wght-400 fs-3 lh-1 | c-neutral-600"
102+
<p class="d-flex ai-center | m-0 | fvs-wght-400 fs-3 lh-1"
103103
fs-2="xs">
104104
${title}
105105
</p>
106106
<button type="button"
107-
class="d-flex ai-center | pl-5 pr-5 | fvs-wght-400 fs-2 tt-uppercase | bc-0 c-neutral-300 b-0 cur-pointer | sandbox__copy_code"
107+
class="d-flex ai-center | pl-5 pr-5 | fvs-wght-400 fs-2 tt-uppercase | bc-0 b-0 cur-pointer | sandbox__copy_code"
108108
title="${libdocMessages.copyHTML[libdocConfig.lang]}">
109109
<span class="o-hidden | to-ellipsis ws-nowrap">${libdocMessages.copy[libdocConfig.lang]}</span>
110110
</button>
@@ -130,24 +130,24 @@ export default {
130130
</label>
131131
</div>
132132
</div>
133-
<div class="d-flex gap-2 | m-0 pt-1 pb-1 pl-0 | fvs-wght-400 fs-2 lh-1 | c-neutral-500 ls-none"
133+
<div class="d-flex gap-2 | m-0 pt-1 pb-1 pl-0 | fvs-wght-400 fs-2 lh-1 | ls-none"
134134
pl-2="xs,sm">
135135
&nbsp;
136136
</div>
137137
</div>
138-
<button class="pos-relative | p-0 | bc-neutral-800 c-neutral-500 b-0 | sandbox__resizer"
138+
<button class="pos-relative | p-0 | b-0 | sandbox__resizer"
139139
title="${libdocMessages.sandboxResizeHelper[libdocConfig.lang]}"
140140
d-none="xs,sm">
141141
<span class="icon-dots-six-vertical fs-5"></span>
142142
</button>
143-
<div class="d-flex fd-column | pos-relative | o-hidden | bc-neutral-900 c-neutral-200 brad-3 bwidth-1 bstyle-solid bcolor-neutral-900 | sandbox__iframe_wrapper"
143+
<div class="d-flex fd-column | pos-relative | o-hidden | brad-3 | sandbox__iframe_wrapper"
144144
w-50="md"
145145
w-100="xs,sm"
146146
bradtl-0="md"
147147
bradbl-0="md"
148148
style="box-sizing: content-box">${iframeCommands}
149149
<div class="d-flex | pos-relative">
150-
<iframe ${iframeAttribute} loading="lazy" class="w-100 h-500px | b-0 bc-neutral-100 | sandbox__iframe"></iframe>
150+
<iframe ${iframeAttribute} loading="lazy" class="w-100 h-500px | b-0 | sandbox__iframe" style="background:white"></iframe>
151151
<div class="d-flex jc-center ai-center | pos-absolute top-0 left-0 | w-100 h-100 | sandbox__enable_wrapper"
152152
style="background-color: rgba(0,0,0,0.5)">
153153
<input type="checkbox"
@@ -161,7 +161,7 @@ export default {
161161
</label>
162162
</div>
163163
</div>
164-
<ul class="d-flex gap-2 | m-0 pt-1 pb-1 pl-2 | fvs-wght-400 fs-2 lh-1 | c-neutral-500 ls-none">
164+
<ul class="d-flex gap-2 | m-0 pt-1 pb-1 pl-2 | fvs-wght-400 fs-2 lh-1 | ls-none">
165165
<li>${libdocMessages.width[libdocConfig.lang]}: <span class="sandbox__monitor__iframe_width">-</span>px</li>
166166
<li>${libdocMessages.height[libdocConfig.lang]}: <span class="sandbox__monitor__iframe_height">-</span>px</li>
167167
</ul>

_includes/libdoc_before_html.liquid

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@
7878
{%- assign editThisPageRootUrl = '' -%}
7979
{%- endif -%}
8080

81-
{%- if pagePathUrl[1] == libdocConfig.blogSlug and pagePathUrl[2] == null -%}
81+
{%- if pagePathUrl[1] == libdocConfig.blogSlug -%}
8282
{%- assign editThisPageRootUrl = '' -%}
8383
{%- endif -%}
8484

_includes/libdoc_breadcrumb.liquid

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<ul class="d-flex ai-center gap-2 | p-0 m-0 | fs-2 lh-3 | ls-none">
1+
<ul class="d-flex ai-center gap-2 | p-0 m-0 | fs-2 lh-3 | ls-none" style="width: calc(100% - 42px)">
22
<li class="d-flex ai-center gap-2">
33
<a href="/"
44
class="pos-relative | p-5 | fs-4 td-none | brad-4 bc-neutral-100 bwidth-1 bstyle-dashed bcolor-neutral-500 __hover-1 __soft-shadow"

0 commit comments

Comments
 (0)