From 6440f2c3392bd7f5a51bf3f1a47873f448788001 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=8C=97=E9=9B=81=20Cryolitia?= Date: Mon, 28 Aug 2023 00:00:24 +0800 Subject: [PATCH] Add watermark in css --- themes/mtfwiki-modified/assets/customize.scss | 16 ++++++++++++++++ .../layouts/shortcodes/watermark.html | 3 +++ 2 files changed, 19 insertions(+) create mode 100644 themes/mtfwiki-modified/layouts/shortcodes/watermark.html diff --git a/themes/mtfwiki-modified/assets/customize.scss b/themes/mtfwiki-modified/assets/customize.scss index 99d04988..fc0a4d96 100644 --- a/themes/mtfwiki-modified/assets/customize.scss +++ b/themes/mtfwiki-modified/assets/customize.scss @@ -227,3 +227,19 @@ div.hidden-photo { } } } +div.watermark { + display: grid; +} +div.watermark>img{ + grid-area: 1 / 1; +} +div.watermark::after { + grid-area: 1 / 1; + content: '仅供参考,勿作他用'; + color: #0000FF; + font-size: 50px; + text-align: center; + align-self: center; + opacity: 0.3; + transform: rotate(-45deg); +} \ No newline at end of file diff --git a/themes/mtfwiki-modified/layouts/shortcodes/watermark.html b/themes/mtfwiki-modified/layouts/shortcodes/watermark.html new file mode 100644 index 00000000..55f71a3d --- /dev/null +++ b/themes/mtfwiki-modified/layouts/shortcodes/watermark.html @@ -0,0 +1,3 @@ +
+ {{ .Get 1 }} +
\ No newline at end of file