Skip to content

Commit

Permalink
🚚 Feat: migrate watermark feature to theme FixIt v0.2.12
Browse files Browse the repository at this point in the history
  • Loading branch information
Lruihao committed Jan 8, 2022
1 parent b7325e2 commit 1baa047
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 16 deletions.
14 changes: 1 addition & 13 deletions assets/js/_custom.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,18 +55,6 @@ const CustomJS = new (function () {
);
return this;
};
/**
* Render watermark.
* @link https://github.com/Lruihao/watermark
* @returns {CustomJS}
*/
this.renderWatermark = () => {
new Watermark({
content: '@Lruihao',
opacity: 0.02
});
return this;
};

/**
* Initialize.
Expand All @@ -78,7 +66,7 @@ const CustomJS = new (function () {
this.baiduStatistics().baiduPush();
}
// Custom infos.
this.renderWatermark().consoleInfo();
this.consoleInfo();
return this;
};
})();
Expand Down
2 changes: 1 addition & 1 deletion assets/js/_custom.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

25 changes: 24 additions & 1 deletion config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ theme = "FixIt"
dateFormat = "2006-01-02"
# website images for Open Graph and Twitter Cards
images = ["/logo.png"]
# enable PWA
# enable PWA sicne v0.2.12
enablePWA = true

# App icon config
Expand Down Expand Up @@ -484,6 +484,29 @@ theme = "FixIt"
# cursor duration after typing finishing (measured in milliseconds, "-1" means unlimited)
duration = -1

# Watermark config since v0.2.12
# Detail config see https://github.com/Lruihao/watermark#readme
[params.watermark]
enable = true
# watermark's text
content = '@Lruihao'
# watermark's transparency
opacity = 0.02
# parent of watermark's container
appendTo = '.wrapper>.main'
# watermark's width. unit: px
width = 150
# watermark's height. unit: px
height = 20
# row spacing of watermarks. unit: px
rowSpacing = 60
# col spacing of watermarks. unit: px
colSpacing = 30
# watermark's tangent angle. unit: deg
rotate = 15
# watermark's fontSize. unit: rem
fontSize = 0.85

# Site verification code config for Google/Bing/Yandex/Pinterest/Baidu
[params.verification]
google = ""
Expand Down
2 changes: 1 addition & 1 deletion themes/FixIt
Submodule FixIt updated from 80d63f to dcd190

0 comments on commit 1baa047

Please sign in to comment.