Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/chipzoller/hugo-clarity.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIvan Boothe <git@rootwork.org>2022-06-11 00:18:13 +0300
committerIvan Boothe <git@rootwork.org>2022-06-11 00:18:13 +0300
commitb387006a1dcefb26a1546986c27ff90f3a3a2996 (patch)
treef8621f5df8eed631a36688885f197f7f56da2cda
parent939e9eb82323113a4578b8dc84ea00c129fb6c59 (diff)
Move header-link icon from JS to Sass to make it easier to override
Signed-off-by: Ivan Boothe <git@rootwork.org>
-rw-r--r--assets/js/index.js1
-rw-r--r--assets/sass/_components.sass1
2 files changed, 1 insertions, 1 deletions
diff --git a/assets/js/index.js b/assets/js/index.js
index cf8e74c..66f7277 100644
--- a/assets/js/index.js
+++ b/assets/js/index.js
@@ -105,7 +105,6 @@ function fileClosure(){
headingNodes.forEach(function(node){
link = createEl('a');
link.className = 'link icon';
- link.style.backgroundImage = `url(${baseURL}${iconsPath}link.svg)`;
id = node.getAttribute('id');
if(id) {
link.href = `${current}#${id}`;
diff --git a/assets/sass/_components.sass b/assets/sass/_components.sass
index 9b08dc6..56c7db4 100644
--- a/assets/sass/_components.sass
+++ b/assets/sass/_components.sass
@@ -410,6 +410,7 @@
position: relative
&_owner
.icon
+ background-image: url('#{$iconsPath}link.svg')
background-size: 100%
background-repeat: no-repeat
background-position: center right