mirror of
https://gitlab.com/walljm/dynamicbible.git
synced 2025-07-23 23:39:50 -04:00
added settings code, increase/decrease font size, change font face, and switch panes.
This commit is contained in:
parent
66bf4a4cf6
commit
ad048e2926
@ -3,6 +3,16 @@ body {
|
|||||||
margin: 0;
|
margin: 0;
|
||||||
font-family: verdana;
|
font-family: verdana;
|
||||||
}
|
}
|
||||||
|
a
|
||||||
|
{
|
||||||
|
color: #000;
|
||||||
|
text-decoration:none;
|
||||||
|
border-bottom: 1px dotted darkgray;
|
||||||
|
_border-bottom: 1px solid lightgray; /* IE */
|
||||||
|
}
|
||||||
|
a:hover {
|
||||||
|
border-bottom: 1px solid maroon;
|
||||||
|
}
|
||||||
|
|
||||||
em {font-style: normal;}
|
em {font-style: normal;}
|
||||||
|
|
||||||
@ -94,6 +104,7 @@ h3 {
|
|||||||
font-size: 21px;
|
font-size: 21px;
|
||||||
font-family: Georgia, Serif;
|
font-family: Georgia, Serif;
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
|
border: 0px;
|
||||||
color: Maroon;
|
color: Maroon;
|
||||||
}
|
}
|
||||||
#searchresults ul a:hover
|
#searchresults ul a:hover
|
||||||
@ -120,16 +131,7 @@ h3 {
|
|||||||
padding: 0 12px 0 0;
|
padding: 0 12px 0 0;
|
||||||
line-height: 200%;
|
line-height: 200%;
|
||||||
}
|
}
|
||||||
#result a {
|
|
||||||
text-decoration: none;
|
|
||||||
border-bottom: 1px dotted darkgray;
|
|
||||||
_border-bottom: 1px solid lightgray; /* IE */
|
|
||||||
color: #000;
|
|
||||||
}
|
|
||||||
#result a:hover {
|
|
||||||
border-bottom: 1px solid blue;
|
|
||||||
color: blue;
|
|
||||||
}
|
|
||||||
.result
|
.result
|
||||||
{
|
{
|
||||||
display: block;
|
display: block;
|
||||||
|
24
index.html
24
index.html
@ -22,6 +22,26 @@
|
|||||||
Search($("#searchvalue").val());
|
Search($("#searchvalue").val());
|
||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
|
$("#growfont").click(function()
|
||||||
|
{
|
||||||
|
Settings.IncreaseResultFontSize();
|
||||||
|
return false;
|
||||||
|
});
|
||||||
|
$("#shrinkfont").click(function()
|
||||||
|
{
|
||||||
|
Settings.DecreaseResultFontSize();
|
||||||
|
return false;
|
||||||
|
});
|
||||||
|
$("#switch-panes").click(function()
|
||||||
|
{
|
||||||
|
Settings.SwitchPanes();
|
||||||
|
return false;
|
||||||
|
});
|
||||||
|
$("#changefont").change(function()
|
||||||
|
{
|
||||||
|
Settings.ChangeResultFont($("#changefont").val());
|
||||||
|
return false;
|
||||||
|
});
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
<style>@import "css/bible.css";</style>
|
<style>@import "css/bible.css";</style>
|
||||||
@ -42,6 +62,10 @@
|
|||||||
</table>
|
</table>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr><td colspan="3" id="settings" style="padding-top: 6px; text-align:right;">
|
||||||
|
<a href="javascript:void();" id="switch-panes">Switch Panes</a> | Select Font:
|
||||||
|
<select id="changefont"><option value="georgia" selected="selected">Georgia</option><option value="verdana">Verdana</option><option value="courier">Courier</option><option value="serif">Serif</option><option value="sans-serif">Sans Serif</option></select> |
|
||||||
|
<span style="letter-spacing:2px;"><a href="javascript:void();" id="shrinkfont">A<span style="font-size:12px;">A</span></a> | <a href="javascript:void();" id="growfont"><span style="font-size:12px;">A</span>A</a></span></td></tr>
|
||||||
</table>
|
</table>
|
||||||
<div id="resultwrap">
|
<div id="resultwrap">
|
||||||
<div id="result"></div>
|
<div id="result"></div>
|
||||||
|
78
js/common.js
78
js/common.js
@ -125,6 +125,62 @@ function Search(sv)
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
var Settings = {
|
||||||
|
SwitchPanes: function()
|
||||||
|
{
|
||||||
|
var s = $("#searchresultswrap");
|
||||||
|
var r = $("#resultwrap");
|
||||||
|
var v = s.css("float");
|
||||||
|
if (v == "right")
|
||||||
|
{
|
||||||
|
s.css("float", "left");
|
||||||
|
r.css("float", "left");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
s.css("float", "right");
|
||||||
|
r.css("float", "right");
|
||||||
|
}
|
||||||
|
},
|
||||||
|
IncreaseResultFontSize: function()
|
||||||
|
{
|
||||||
|
var s = $("#result").css("font-size");
|
||||||
|
$("#result").css("font-size", parseInt(s) + 1);
|
||||||
|
},
|
||||||
|
DecreaseResultFontSize: function()
|
||||||
|
{
|
||||||
|
var s = $("#result").css("font-size");
|
||||||
|
$("#result").css("font-size", parseInt(s) - 1);
|
||||||
|
},
|
||||||
|
ChangeResultFont: function(fontfamily)
|
||||||
|
{
|
||||||
|
$("#result").css("font-family", fontfamily);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
var Util = {
|
||||||
|
HandleLink: function(e)
|
||||||
|
{
|
||||||
|
Search($(e.target).text());
|
||||||
|
},
|
||||||
|
HandleHiddenLink: function(e)
|
||||||
|
{
|
||||||
|
Search($(e.target).find(".searchvalue").text());
|
||||||
|
},
|
||||||
|
RemoveResult: function(e)
|
||||||
|
{
|
||||||
|
$(e.target).parent().parent().remove();
|
||||||
|
},
|
||||||
|
HandleError: function(e)
|
||||||
|
{
|
||||||
|
// for now we're going to put the error in the main result div.
|
||||||
|
var t = $("<div class='strongsdef result'><a href='javascript:void();' class='removeresult' style='border: 0;'><img style='border: 0px;' src='images/delete.png' width='48' height='48' /></a><span class='resultbody'>" + e + "</span><br clear='all' /></div>");
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
var Bible = {
|
var Bible = {
|
||||||
DisplayPassage: function(vs, b, ch, sv, ev, testament)
|
DisplayPassage: function(vs, b, ch, sv, ev, testament)
|
||||||
{
|
{
|
||||||
@ -212,28 +268,6 @@ var Bible = {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var Util = {
|
|
||||||
HandleLink: function(e)
|
|
||||||
{
|
|
||||||
Search($(e.target).text());
|
|
||||||
},
|
|
||||||
HandleHiddenLink: function(e)
|
|
||||||
{
|
|
||||||
Search($(e.target).find(".searchvalue").text());
|
|
||||||
},
|
|
||||||
RemoveResult: function(e)
|
|
||||||
{
|
|
||||||
$(e.target).parent().parent().remove();
|
|
||||||
},
|
|
||||||
HandleError: function(e)
|
|
||||||
{
|
|
||||||
// for now we're going to put the error in the main result div.
|
|
||||||
var t = $("<div class='strongsdef result'><a href='javascript:void();' class='removeresult' style='border: 0;'><img style='border: 0px;' src='images/delete.png' width='48' height='48' /></a><span class='resultbody'>"+e+"</span><br clear='all' /></div>");
|
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
var Strongs = {
|
var Strongs = {
|
||||||
GetStrongs: function(sn, dict)
|
GetStrongs: function(sn, dict)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user