yhtml - html help viewer

master
Daniel Napora 2022-02-24 02:48:06 +01:00
parent 56d86d515b
commit bf2c335e82
2 changed files with 77 additions and 0 deletions

18
bin/yhtml 100755
View File

@ -0,0 +1,18 @@
#!/bin/bash
file=${1}
title=${2:-yhtml}
width=${3:-800}
height=${4:-600}
stdbuf -oL -e0 yad --title="${title}" --window-icon=mbcc --borders=0 \
--width=${width} --height=${height} \
--no-buttons --no-escape --html --uri="${1}" --print-uri \
| while read -r line; do
case ${line%:*} in
https) xdg-open "${line}" &;;
run) ${line##*/} &;;
config) geany "$HOME/${line#*//}" &;;
*) echo "No URI";;
esac
done

View File

@ -0,0 +1,59 @@
<!DOCTYPE html>
<html>
<head>
<style>
body{padding:0;margin:0;}
.grid-container {
display: grid;
grid-template-columns: auto auto auto;
gap: 1px;
background-color: #113344;
padding: 1px;
height:100vh;
}
.grid-container > div {
background-color: rgba(255, 255, 255, 0.8);
color: #113344;
text-align: center;
font-size: 20vh;
line-height: 33vh;
}
.grid-container > div.item5 {
background-color: rgba(255, 255, 255, 0.8);
color: #222222;
text-align: center;
font-size: 16px;
font-weight:bold;
line-height: 5vh;
position:relative;
}
.grid-container > div.item5 span {
position:absolute;
left: 50%;
transform: translate(-50%, 0);
width:100%;
}
.grid-container > div:hover {
background-color: #113344;
color: yellow;
}
</style>
</head>
<body>
<div class="grid-container">
<div class="item1">&nwarr;</div>
<div class="item2">&uarr;</div>
<div class="item3">&nearr;</div>
<div class="item4">&larr;</div>
<div class="item5"><span><br />hold <kbd>Ctrl+Shift</kbd><br />and click<br />in appropriate area<br />of any window</span></div>
<div class="item6">&rarr;</div>
<div class="item7">&swarr;</div>
<div class="item8">&darr;</div>
<div class="item8">&searr;</div>
</div>
</body>
</html>