ddro3doff,
<!doctype html>
<html lang="ru">
<head>
<meta charset="UTF-8">
<title>Document</title>
<style type="text/css">
body.dark {
background-color: #000000;
color: #FFFFFF;
}
</style>
</head>
<body>
<script>
function setTheme(theme) {
document.body.classList.remove('dark', 'light');
if(!theme) theme = localStorage.getItem('theme') || 'dark';
else {localStorage.setItem('theme', theme) };
document.body.classList.add(theme)
}
setTheme();
</script>
<h1>test</h1>
<img style="cursor:pointer;" src="/templates/Default/images/off.png" onclick="setTheme('dark')">
<img style="cursor:pointer;" src="/templates/Default/images/on.png" onclick="setTheme('light')">
</body>
</html>