diff --git a/assets/js/main.js b/assets/js/main.js index d892e1c..1c8e586 100644 --- a/assets/js/main.js +++ b/assets/js/main.js @@ -1,2 +1,3 @@ import "./theme"; import "./style"; +import "./selectable"; \ No newline at end of file diff --git a/assets/js/selectable.js b/assets/js/selectable.js new file mode 100644 index 0000000..dc2def5 --- /dev/null +++ b/assets/js/selectable.js @@ -0,0 +1,4 @@ +const selectable = '{{ .Site.Params.selectable }}' +if (selectable === 'false') { + document.documentElement.style = 'user-select:none' +} \ No newline at end of file diff --git a/assets/sass/atom.scss b/assets/sass/atom.scss index 8059163..b3ecbfa 100644 --- a/assets/sass/atom.scss +++ b/assets/sass/atom.scss @@ -1,7 +1,6 @@ * { line-height: 1; -webkit-tap-highlight-color: rgba(0,0,0,0); - user-select: none; outline: none; } diff --git a/exampleSite/config.toml b/exampleSite/config.toml index cf12701..9b4c7b8 100644 --- a/exampleSite/config.toml +++ b/exampleSite/config.toml @@ -32,8 +32,10 @@ comment = "disqus" timeformat = "Jan 2, 2006" # switch for turning on/off lights. switch = ["🌚", "🌝"] -# if true, date of posts will be displayed in the homepage +# if true, date of posts will be displayed in the homepage. displayDate = true +# if true, users can select text from your post. +selectable = false # OvO is a comment plugin written by the author of Minima.