mirror of
https://github.com/nunocoracao/blowfish.git
synced 2026-01-30 15:31:52 +00:00
Merge pull request #2593 from nunocoracao/a11y
🐛 Fix(a11y): conditionally create disable_images button
This commit is contained in:
+1
-1
@@ -32,7 +32,7 @@ article:
|
|||||||
a11y:
|
a11y:
|
||||||
title: "Accessibility settings"
|
title: "Accessibility settings"
|
||||||
disable_blur: "Disable blur"
|
disable_blur: "Disable blur"
|
||||||
disable_images: "Disable images"
|
disable_images: "Disable background image"
|
||||||
show_link_underline: "Show link underline"
|
show_link_underline: "Show link underline"
|
||||||
font_size: "Font size"
|
font_size: "Font size"
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -32,7 +32,7 @@ article:
|
|||||||
a11y:
|
a11y:
|
||||||
title: "アクセシビリティ設定"
|
title: "アクセシビリティ設定"
|
||||||
disable_blur: "ぼかしを無効にする"
|
disable_blur: "ぼかしを無効にする"
|
||||||
disable_images: "画像を無効にする"
|
disable_images: "背景画像を無効にする"
|
||||||
show_link_underline: "リンクの下線を表示する"
|
show_link_underline: "リンクの下線を表示する"
|
||||||
font_size: "フォントサイズ"
|
font_size: "フォントサイズ"
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -32,7 +32,7 @@ article:
|
|||||||
a11y:
|
a11y:
|
||||||
title: "无障碍设定"
|
title: "无障碍设定"
|
||||||
disable_blur: "禁用模糊效果"
|
disable_blur: "禁用模糊效果"
|
||||||
disable_images: "禁用图片"
|
disable_images: "禁用背景图片"
|
||||||
show_link_underline: "显示链接下划线"
|
show_link_underline: "显示链接下划线"
|
||||||
font_size: "字体大小"
|
font_size: "字体大小"
|
||||||
|
|
||||||
|
|||||||
+2
-2
@@ -31,8 +31,8 @@ article:
|
|||||||
|
|
||||||
a11y:
|
a11y:
|
||||||
title: "無障礙設定"
|
title: "無障礙設定"
|
||||||
disable_blur: "停用模糊效果"
|
disable_blur: "停用背景模糊"
|
||||||
disable_images: "停用圖片"
|
disable_images: "移除背景圖片"
|
||||||
show_link_underline: "顯示連結底線"
|
show_link_underline: "顯示連結底線"
|
||||||
font_size: "字體大小"
|
font_size: "字體大小"
|
||||||
|
|
||||||
|
|||||||
@@ -200,11 +200,20 @@
|
|||||||
<div class="space-y-5">
|
<div class="space-y-5">
|
||||||
{{ $toggles := slice }}
|
{{ $toggles := slice }}
|
||||||
{{ $shouldDisableBlur := or site.Params.homepage.layoutBackgroundBlur site.Params.article.layoutBackgroundBlur site.Params.list.layoutBackgroundBlur }}
|
{{ $shouldDisableBlur := or site.Params.homepage.layoutBackgroundBlur site.Params.article.layoutBackgroundBlur site.Params.list.layoutBackgroundBlur }}
|
||||||
|
{{ $shouldDisableBackgroundImage := or
|
||||||
|
(eq site.Params.homepage.layout "background")
|
||||||
|
(eq site.Params.article.heroStyle "background")
|
||||||
|
(eq site.Params.list.heroStyle "background")
|
||||||
|
(eq site.Params.taxonomy.heroStyle "background")
|
||||||
|
(eq site.Params.term.heroStyle "background")
|
||||||
|
}}
|
||||||
{{ if $shouldDisableBlur }}
|
{{ if $shouldDisableBlur }}
|
||||||
{{ $toggles = $toggles | append (dict "id" (print $prefix "disable-blur") "label" (i18n "a11y.disable_blur")) }}
|
{{ $toggles = $toggles | append (dict "id" (print $prefix "disable-blur") "label" (i18n "a11y.disable_blur")) }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
{{ if $shouldDisableBackgroundImage }}
|
||||||
|
{{ $toggles = $toggles | append (dict "id" (print $prefix "disable-images") "label" (i18n "a11y.disable_images")) }}
|
||||||
|
{{ end }}
|
||||||
{{- $toggles = $toggles | append
|
{{- $toggles = $toggles | append
|
||||||
(dict "id" (print $prefix "disable-images") "label" (i18n "a11y.disable_images"))
|
|
||||||
(dict "id" (print $prefix "underline-links") "label" (i18n "a11y.show_link_underline"))
|
(dict "id" (print $prefix "underline-links") "label" (i18n "a11y.show_link_underline"))
|
||||||
(dict "id" (print $prefix "zen-mode") "label" (i18n "article.zen_mode_title.enable"))
|
(dict "id" (print $prefix "zen-mode") "label" (i18n "article.zen_mode_title.enable"))
|
||||||
-}}
|
-}}
|
||||||
|
|||||||
Reference in New Issue
Block a user