Skip to content

Commit

Permalink
docs: add PDF printing instructions, close #13, #16
Browse files Browse the repository at this point in the history
  • Loading branch information
Renovamen committed Jul 5, 2024
1 parent 5c6f0c6 commit 9224fdb
Show file tree
Hide file tree
Showing 7 changed files with 75 additions and 27 deletions.
4 changes: 2 additions & 2 deletions site/src/components/editor/toolbar/CorrectCase.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@
<UiAlert>
<UiAlertTitle>{{ $t("toolbar.correct_case.example.title") }}</UiAlertTitle>
<UiAlertDescription>
{{ $t("toolbar.correct_case.example.desc") }}
{{ $t("toolbar.correct_case.example.content") }}
</UiAlertDescription>
</UiAlert>

<UiAlert variant="info" class="mt-3">
<UiAlertTitle>{{ $t("toolbar.correct_case.note.title") }}</UiAlertTitle>
<UiAlertDescription>
{{ $t("toolbar.correct_case.note.desc") }}
{{ $t("toolbar.correct_case.note.content") }}
</UiAlertDescription>
</UiAlert>

Expand Down
35 changes: 26 additions & 9 deletions site/src/components/editor/toolbar/file/Export.vue
Original file line number Diff line number Diff line change
@@ -1,13 +1,30 @@
<template>
<UiButton
class="gap-x-1.5 w-full h-8 justify-start"
variant="ghost"
size="sm"
@click="exportPDF"
>
<span i-mdi:file-pdf text-base />
{{ $t("toolbar.file.export_pdf") }}
</UiButton>
<UiTooltipProvider :delay-duration="0">
<UiTooltip>
<UiTooltipTrigger as-child>
<UiButton
class="gap-x-1.5 w-full h-8 justify-start"
variant="ghost"
size="sm"
@click="exportPDF"
>
<span i-mdi:file-pdf text-base />
{{ $t("toolbar.file.export_pdf.title") }}
</UiButton>
</UiTooltipTrigger>
<UiTooltipContent side="bottom" class="w-54 p-0 rounded border-destructive/60">
<UiAlert variant="destructive" class="border-none rounded-none">
<UiAlertTitle>
{{ $t("toolbar.file.export_pdf.alert.title") }}
<span class="text-foreground font-normal text-xs">
(<SharedIssueLink issue="13" />, <SharedIssueLink issue="16" />)
</span>
</UiAlertTitle>
<UiAlertDescription v-html="$t('toolbar.file.export_pdf.alert.content')" />
</UiAlert>
</UiTooltipContent>
</UiTooltip>
</UiTooltipProvider>

<UiButton
class="gap-x-1.5 w-full h-8 justify-start"
Expand Down
19 changes: 19 additions & 0 deletions site/src/components/shared/IssueLink.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<template>
<a
:class="cn('hover:underline', props.class)"
:href="`https://github.com/Renovamen/oh-my-cv/issues/${issue}`"
target="_blank"
rel=" noopener"
>#{{ issue }}</a
>
</template>

<script lang="ts" setup>
import type { HTMLAttributes } from "vue";
import { cn } from "~/utils/shadcn";
const props = defineProps<{
issue: string | number;
class?: HTMLAttributes["class"];
}>();
</script>
6 changes: 3 additions & 3 deletions site/src/components/ui/alert/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ export const alertVariants = cva(
variant: {
default: "bg-accent/30 text-foreground",
destructive:
"border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive",
"border-destructive/60 bg-destructive/5 [&>h5]:text-destructive [&>svg]:text-destructive",
success:
"border-success/60 bg-success/5 [&>svg]:text-success [&>h5]:text-success",
info: "border-info/60 bg-info/5 [&>svg]:text-info [&>h5]:text-info"
"border-success/60 bg-success/5 [&>h5]:text-success [&>svg]:text-success",
info: "border-info/60 bg-info/5 [&>h5]:text-info [&>svg]:text-info"
}
},
defaultVariants: {
Expand Down
11 changes: 7 additions & 4 deletions site/src/i18n/en.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,18 +41,21 @@ toolbar:
header: Import a Markdown file
from_local: Drag your file here, or click here to choose a file
from_url: Paste file URL
export_pdf: Export PDF
export_pdf:
title: Export PDF
alert:
title: Heads up!
content: When printing on Windows, please select "Save as PDF" in the print settings popup, <b>not</b> "Microsoft Print to PDF".
export_md: Export Markdown
correct_case:
title: Correct Case
example:
title: Example
desc: |
content: |
"Github" → "GitHub"
note:
title: Note
desc: |
Words that are only in uppercase or lowercase ("GITHUB" or "github") will be left untouched.
content: Words that are only in uppercase or lowercase ("GITHUB" or "github") will be left untouched.
btn : Correct it!
paper_size: Paper Size
theme_color: Theme Color
Expand Down
14 changes: 10 additions & 4 deletions site/src/i18n/sp.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
lang: Idioma

toggle_theme: Cambiar tema claro/oscuro
open_toolbar: Abrir barra de herramientas
close_toolbar: Cerrar barra de herramientas

head:
title: Oh My CV! - Generador de CV online GRATUITO!!
Expand Down Expand Up @@ -38,18 +41,21 @@ toolbar:
header: Importar un archivo Markdown
from_local: Subir archivo
from_url: Pegar desde URL
export_pdf: Exportar PDF
export_pdf:
title: Exportar PDF
alert:
title: ¡Atención!
content: Al imprimir en Windows, seleccione "Guardar como PDF" en la ventana emergente de configuración de impresión, <b>no</b> "Microsoft Print to PDF".
export_md: Exportar Markdown
correct_case:
title: Corregir Mayusculas
example:
title: Ejemplo
desc: |
content: |
"Github" → "GitHub"
note:
title: Nota
desc: |
No se modificarán las palabras que sólo contengan mayúsculas o minúsculas ("GITHUB" or "github").
content: No se modificarán las palabras que sólo contengan mayúsculas o minúsculas ("GITHUB" or "github").
btn : Corrígelo!
paper_size: Tamaño de hoja
theme_color: Color y tema
Expand Down
13 changes: 8 additions & 5 deletions site/src/i18n/zh-cn.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,18 +41,21 @@ toolbar:
header: 上传一个 Markdown 文件
from_local: 将文件拖拽至这里,或点击这里以选择文件
from_url: 粘贴文件 URL
export_pdf: 导出为 PDF
export_pdf:
title: 导出为 PDF
alert:
title: 注意
content: 在 Windows 上打印时,请在打印设置弹窗中选择“另存为 PDF”,而<b>不是</b>“Microsoft Print to PDF”。
export_md: 导出为 Markdown
correct_case:
title: 专有名词大小写修正
example:
title: 例子
desc: |
content: |
"Github" → "GitHub"
note:
title: 注意
desc: |
不会修正全为大写或小写字母的单词(如 "GITHUB" 或 "github")。
title: 解释
content: 不会修正全为大写或小写字母的单词(如“GITHUB”或“github”)。
btn : 修正
paper_size: 纸张尺寸
theme_color: 主题色
Expand Down

0 comments on commit 9224fdb

Please sign in to comment.