Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 15 additions & 5 deletions app/components/Readme.vue
Original file line number Diff line number Diff line change
Expand Up @@ -62,13 +62,23 @@ function handleClick(event: MouseEvent) {
<article
class="readme prose prose-invert max-w-[70ch] lg:max-w-none px-1"
v-html="html"
:data-i18n-note="$t('package.readme.callout.note')"
:data-i18n-tip="$t('package.readme.callout.tip')"
:data-i18n-important="$t('package.readme.callout.important')"
:data-i18n-warning="$t('package.readme.callout.warning')"
:data-i18n-caution="$t('package.readme.callout.caution')"
Comment thread
wojtekmaj marked this conversation as resolved.
Outdated
@click="handleClick"
/>
Comment thread
wojtekmaj marked this conversation as resolved.
</template>

<style scoped>
/* README prose styling */
.readme {
--i18n-note: attr(data-i18n-note);
--i18n-tip: attr(data-i18n-tip);
--i18n-important: attr(data-i18n-important);
--i18n-warning: attr(data-i18n-warning);
--i18n-caution: attr(data-i18n-caution);
Comment thread
wojtekmaj marked this conversation as resolved.
Outdated
color: var(--fg-muted);
line-height: 1.75;
/* Prevent horizontal overflow on mobile */
Expand Down Expand Up @@ -333,7 +343,7 @@ function handleClick(event: MouseEvent) {
background: rgba(59, 130, 246, 0.05);
}
.readme :deep(blockquote[data-callout='note']::before) {
content: 'Note';
content: var(--i18n-note);
Comment thread
wojtekmaj marked this conversation as resolved.
Outdated
color: #3b82f6;
}
.readme :deep(blockquote[data-callout='note']::after) {
Expand All @@ -348,7 +358,7 @@ function handleClick(event: MouseEvent) {
background: rgba(34, 197, 94, 0.05);
}
.readme :deep(blockquote[data-callout='tip']::before) {
content: 'Tip';
content: var(--i18n-tip);
Comment thread
wojtekmaj marked this conversation as resolved.
Outdated
color: #22c55e;
}
.readme :deep(blockquote[data-callout='tip']::after) {
Expand All @@ -363,7 +373,7 @@ function handleClick(event: MouseEvent) {
background: rgba(168, 85, 247, 0.05);
}
.readme :deep(blockquote[data-callout='important']::before) {
content: 'Important';
content: var(--i18n-important);
Comment thread
wojtekmaj marked this conversation as resolved.
Outdated
color: var(--syntax-fn);
}
.readme :deep(blockquote[data-callout='important']::after) {
Expand All @@ -378,7 +388,7 @@ function handleClick(event: MouseEvent) {
background: rgba(234, 179, 8, 0.05);
}
.readme :deep(blockquote[data-callout='warning']::before) {
content: 'Warning';
content: var(--i18n-warning);
Comment thread
wojtekmaj marked this conversation as resolved.
Outdated
color: #eab308;
}
.readme :deep(blockquote[data-callout='warning']::after) {
Expand All @@ -393,7 +403,7 @@ function handleClick(event: MouseEvent) {
background: rgba(239, 68, 68, 0.05);
}
.readme :deep(blockquote[data-callout='caution']::before) {
content: 'Caution';
content: var(--i18n-caution);
Comment thread
wojtekmaj marked this conversation as resolved.
Outdated
color: #ef4444;
}
.readme :deep(blockquote[data-callout='caution']::after) {
Expand Down
7 changes: 4 additions & 3 deletions i18n/locales/pl-PL.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
"chat": "czat"
},
"search": {
"title": "Wyszukiwanie",
"label": "Szukaj pakietów npm",
"placeholder": "szukaj pakietów...",
"button": "szukaj",
Expand All @@ -28,6 +27,7 @@
"found_packages": "Nie znaleziono pakietów | Znaleziono 1 pakiet | Znaleziono {count} pakiety | Znaleziono {count} pakietów | Znaleziono {count} pakietów",
"updating": "(aktualizowanie...)",
"no_results": "Nie znaleziono pakietów dla \"{query}\"",
"title": "Wyszukiwanie",
"not_taken": "{name} jest wolne",
"claim_prompt": "Zajmij tę nazwę pakietu w npm",
"claim_button": "Zajmij \"{name}\"",
Expand Down Expand Up @@ -73,12 +73,12 @@
"theme_light": "Jasny",
"theme_dark": "Ciemny",
"theme_system": "Systemowy",
"background_themes": "Odcień tła",
"language": "Język",
"help_translate": "Pomóż tłumaczyć npmx",
"accent_colors": "Kolory akcentu",
"clear_accent": "Wyczyść kolor akcentu",
"translation_progress": "Postęp tłumaczenia"
"translation_progress": "Postęp tłumaczenia",
"background_themes": "Odcień tła"
},
"i18n": {
"missing_keys": "{count} brakujących tłumaczeń | {count} brakujące tłumaczenie | {count} brakujące tłumaczenia | {count} brakujących tłumaczeń | {count} brakujących tłumaczeń",
Expand Down Expand Up @@ -206,6 +206,7 @@
"view_on_github": "Zobacz na GitHub",
"toc_title": "Spis treści"
},
"provenance_section": {},
Comment thread
wojtekmaj marked this conversation as resolved.
"keywords_title": "Słowa kluczowe",
"compatibility": "Zgodność",
"card": {
Expand Down
7 changes: 4 additions & 3 deletions lunaria/files/pl-PL.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
"chat": "czat"
},
"search": {
"title": "Wyszukiwanie",
"label": "Szukaj pakietów npm",
"placeholder": "szukaj pakietów...",
"button": "szukaj",
Expand All @@ -28,6 +27,7 @@
"found_packages": "Nie znaleziono pakietów | Znaleziono 1 pakiet | Znaleziono {count} pakiety | Znaleziono {count} pakietów | Znaleziono {count} pakietów",
"updating": "(aktualizowanie...)",
"no_results": "Nie znaleziono pakietów dla \"{query}\"",
"title": "Wyszukiwanie",
"not_taken": "{name} jest wolne",
"claim_prompt": "Zajmij tę nazwę pakietu w npm",
"claim_button": "Zajmij \"{name}\"",
Expand Down Expand Up @@ -73,12 +73,12 @@
"theme_light": "Jasny",
"theme_dark": "Ciemny",
"theme_system": "Systemowy",
"background_themes": "Odcień tła",
"language": "Język",
"help_translate": "Pomóż tłumaczyć npmx",
"accent_colors": "Kolory akcentu",
"clear_accent": "Wyczyść kolor akcentu",
"translation_progress": "Postęp tłumaczenia"
"translation_progress": "Postęp tłumaczenia",
"background_themes": "Odcień tła"
},
"i18n": {
"missing_keys": "{count} brakujących tłumaczeń | {count} brakujące tłumaczenie | {count} brakujące tłumaczenia | {count} brakujących tłumaczeń | {count} brakujących tłumaczeń",
Expand Down Expand Up @@ -206,6 +206,7 @@
"view_on_github": "Zobacz na GitHub",
"toc_title": "Spis treści"
},
"provenance_section": {},
"keywords_title": "Słowa kluczowe",
"compatibility": "Zgodność",
"card": {
Expand Down
Loading