Today I have chosen to dedicate all of the content I create for this blog to the public domain.
To let visitors know, I would like to add the creative commons CC0 logo to the footer of this jekyll website.
Step 1: Source the logo in SVG format
Here is is:
Step:2 Convert the SVG to Base64
I used this great tool: https://base64.guru/converter/encode/image/svg
Select the output format: CSS Background Image
Step 3: Modify Jekyll Now
First, in _config.yml
we will add creativecommons
element to the footer-links
dictionary:
Then we add the icon.
In _sass/svg-icons.scss
we will use the parent selector to add .creativecommons
suffix to .svg-icon
outer selector:
- Indent the line
- Parent selector
&
- Paste the output from Step 2.
- Change
.base4
to.creativecommons
- Add the following two properties to the element to keep the icon appropriately sized.
background-size: contain;``background-repeat: no-repeat;
Finally add the icon to the html by adding the following line to the bottom of _includes/svg-icons.html
.
Thanks and good night.