2
0
mirror of https://github.com/boostorg/leaf.git synced 2026-01-19 04:22:08 +00:00

Skin switch image button

This commit is contained in:
Emil Dotchevski
2020-05-11 08:49:34 -07:00
parent 0e218745ba
commit 63b3052717
4 changed files with 4 additions and 4 deletions

View File

@@ -9,7 +9,7 @@ project doc/leaf ;
import asciidoctor ;
html index.html : leaf.adoc : <asciidoctor-attribute>stylesheet=zajo-dark.css <asciidoctor-attribute>linkcss ;
install html_ : index.html LEAF-1.png LEAF-2.png zajo-dark.css zajo-light.css : <location>out ;
install html_ : index.html LEAF-1.png LEAF-2.png skin.png zajo-dark.css zajo-light.css : <location>out ;
pdf leaf.pdf : leaf.adoc : <asciidoctor-doctype>book ;
install pdf_ : leaf.pdf : <location>out ;

View File

@@ -2,11 +2,11 @@
<meta name="description" content="Lightweight Error Augmentation Framework">
<link rel="stylesheet" href="./zajo-light.css" disabled=true>
<script>
function switch_style(which)
function switch_style()
{
var i, tag;
for( i=0, tag=document.getElementsByTagName("link"); i<tag.length; i++ )
if( tag[i].rel.indexOf("stylesheet")!=-1 && tag[i].href.includes("zajo-") )
tag[i].disabled = !tag[i].href.includes("zajo-"+which+".css");
tag[i].disabled = !tag[i].disabled;
}
</script>

View File

@@ -10,7 +10,7 @@ ifndef::backend-pdf[]
:source-highlighter: coderay
:toc: left
:toclevels: 3
:toc-title: pass:[<div style="float:right"><button type="button" style="border-color:white;background-color:black;color:white;font-size:.6em;" onclick="this.blur();switch_style('dark');return false;"><b>Dark</b></button>&nbsp;<button type="button" style="border-color:black;background-color:white;color:black;font-size:.6em;" onclick="this.blur();switch_style('light');return false;"><b>Light</b></button></div>]
:toc-title: pass:[<div style="float:right"><input width="32" height="32" type="image" alt="Skin" src="./skin.png" onclick="this.blur();switch_style();return false;"/></div>]
[.text-right]
https://github.com/zajo/leaf[GitHub] | https://travis-ci.org/zajo/leaf[Travis] | https://ci.appveyor.com/project/zajo/leaf[AppVeyor] | link:./leaf.pdf[PDF]

BIN
doc/skin.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.1 KiB