mirror of https://github.com/onweru/compose.git

weru
01.33.2022 e51d42c92a92d850e52b42a1be682537c8400365
make icons dir configurable #69

Signed-off-by: weru <fromweru@gmail.com>
3 files modified
6 ■■■■ changed files
assets/js/functions.js 2 ●●● patch | view | raw | blame | history
assets/js/variables.js 1 ●●●● patch | view | raw | blame | history
exampleSite/config/_default/params.toml 3 ●●●●● patch | view | raw | blame | history
assets/js/functions.js
@@ -173,7 +173,7 @@
  }
}
function loadSvg(file, parent, path = 'icons/') {
function loadSvg(file, parent, path = iconsPath) {
  const link = new URL(`${path}${file}.svg`, rootURL).href;
  fetch(link)
  .then((response) => {
assets/js/variables.js
@@ -10,6 +10,7 @@
// config defined values
const codeBlockConfig = JSON.parse('{{ partial "functions/getCodeConfig" . }}');
const iconsPath = `{{ partialCached "functions/getIconPath" . }}`;
// defined in i18n / translation files
const quickLinks = '{{ T "quick_links" }}';
exampleSite/config/_default/params.toml
@@ -16,6 +16,9 @@
# disable showing line numbers by default. Switch to `true` if you'd rather have them on.
codeLineNumbers = false
# By default the template will look for icons under the icons directory. In some situations you might wanna change that. edit the line below
# iconsPath = 'icons/'
# Site logo
[logo]
  lightMode = "images/compose.svg"