Sha256: fde995dc65d6b4436be0fc6c818d54340de01badcbc546163a8fde4c91e14d7f

Contents?: true

Size: 797 Bytes

Versions: 1

Compression:

Stored size: 797 Bytes

Contents

---
---
    let script = document.currentScript
const params = new URLSearchParams(window.location.search)
let type = params.get('fileName')
let jsonFileName = atob(type);

let folderName = script.dataset.foldername
let fileName = jsonFileName
let lang = script.dataset.lang


let home_h1 = document.querySelector(".home-top-h1")
let home_h2 = document.querySelector(".home-top-h2")
let home_img = document.querySelector(".home-img")
const jsonData = {{ site.data | jsonify }}
const seoData = jsonData[folderName][lang][fileName]

home_h1.innerHTML = seoData.h1
home_h2.innerHTML = seoData.h2

if(seoData.img){
home_img.src = seoData.img
home_img.setAttribute("alt",seoData.imgalt)
home_img.style.width = seoData.imgwidth
home_img.style.height = seoData.imgheight
}

document.title = seoData.TITLE

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
appscms-tools-theme-1.9.0 assets/js/homeResult.js