For this site, I have a Xara approach that even a noobie can handle if they can use Notepad and move and rename images.
I'll have to rework a CMS I was building to make it fit but here goes: Blocks.xar
<style>
.one {
background: url('latest/ImageOne.png') no-repeat center center fixed;
}
.two {
background: url('latest/ImageTwo.png') no-repeat center center fixed;
}
.one, .two {
background-size: cover;
width: 100%;
height:100%;
}
</style>
- Each changing image is now a Placeholder with simple HTML code:
Code:<div class='one'></div>Code:<div class='two'></div>- Main & Variant(s) share this identical HTML - automatically in a Web Block
- The Website head has CSS that replaces the background of these Placeholder images:
I will deal with the changing Link after this detailCode:<style> .one { background: url('latest/ImageOne.png') no-repeat center center fixed; } .two { background: url('latest/ImageTwo.png') no-repeat center center fixed; } .one, .two { background-size: cover; width: 100%; height:100%; } </style>- You create a separate folder (latest) on the server at the same level as the published HTML files. Give the customer edit on this for changing:
- changelink.txt with contents - const latestlink = 'https://duckduckgo.com'; - advise the customer to only replace and save the web address (in bold)
- ImageOne.png - I used PNG to allow easy use of transparency - advise the customer to only replace the image but keep the exact same image filename; used images can be kept if renamed
- ImageTwo.png - I used PNG to allow easy use of transparency - advise the customer to only replace the image but keep the exact same image filename; used images can be kept if renamed
- [For testing - export locally to a folder. In this folder, add latest and its changing contents]
LINK
- <script src="latest/changelink.txt"></script>, also in Website Head, accesses changelink.txt and add a JavaScript variable, latestlink, into your rendered page.
- In Website Body:
Code:<script> document.querySelectorAll('a[href*="latest/changelink.txt"]').forEach( (link) => { link.href = latestlink; }); </script>- Last thing, make sure the Link is set to open in a new window/tab.
The customer is only shown details regarding Paragraph 5.
Acorn
Bookmarks