Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Apress
committed
Oct 14, 2016
0 parents
commit 0215b10
Showing
26 changed files
with
694 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,138 @@ | ||
<html> | ||
<head> | ||
<script type="text/javascript"> | ||
<!-- | ||
function rgbChange () { | ||
updateSample(); | ||
} | ||
|
||
function testVal(testField) { | ||
if(isNaN(testField)) { testField = 0; } | ||
if(testField<0) { testField = 0; } | ||
if(testField>255) { testField = 255; } | ||
return (testField); | ||
} | ||
|
||
function toHexStr(decVal) { | ||
if(decVal<16) strVal="0"; | ||
else strVal=""; | ||
strVal += (decVal-0).toString(16); | ||
return(strVal); | ||
} | ||
|
||
function updateSample() { | ||
//getObjectByID("sample").style.backgroundColor = '#FF0000'; | ||
r = testVal(document.frmRGB.R.value) | ||
g = testVal(document.frmRGB.G.value) | ||
b = testVal(document.frmRGB.B.value) | ||
hexStr = "#" + toHexStr(r) + toHexStr(g) + toHexStr(b); | ||
document.frmHex.hexVal.value = hexStr; | ||
document.bgColor=hexStr; | ||
} | ||
|
||
function convertHSB() { | ||
h = document.frmHSB.H.value/360 | ||
s = document.frmHSB.S.value/100 | ||
v = document.frmHSB.B.value/100 | ||
hi = parseInt(h*6); | ||
f=1; | ||
var_h = h * 6; | ||
var_i = Math.floor(hi); | ||
|
||
p = v*(1-s); | ||
q = v*(1-s*(var_h - var_i)); | ||
t = v*(1-s*(1 - (var_h - var_i))); | ||
|
||
switch(hi){ | ||
case 0: r=v; g=t; b=p; break; | ||
case 1: r=q; g=v; b=p; break; | ||
case 2: r=p; g=v; b=t; break; | ||
case 3: r=p; g=q; b=v; break; | ||
case 4: r=t; g=p; b=v; break; | ||
case 5: r=v; g=p; b=q; break; | ||
} | ||
document.frmRGB.R.value = Math.round(r*255); | ||
document.frmRGB.G.value = Math.round(g*255); | ||
document.frmRGB.B.value = Math.round(b*255); | ||
updateSample(); | ||
} | ||
|
||
function convertRGB() { | ||
r = testVal(document.frmRGB.R.value)/255 | ||
g = testVal(document.frmRGB.G.value)/255 | ||
b = testVal(document.frmRGB.B.value)/255 | ||
|
||
v = Math.max(r, g, b); | ||
myMin = Math.min(r, g, b); | ||
if(v==0) s=0; | ||
else s=1-(myMin/v); | ||
|
||
if(v==myMin) h=0; | ||
else | ||
switch(v){ | ||
case r: | ||
if(g>=b) h=60*((g-b)/(v-myMin)); | ||
else h=60*((g-b)/(v-myMin))+360; | ||
break; | ||
case g: | ||
h = 60*((b-r)/(v-myMin))+120; | ||
break; | ||
case b: | ||
h = 60*((r-g)/(v-myMin))+240; | ||
break; | ||
} | ||
document.frmHSB.H.value = Math.round(h); | ||
document.frmHSB.S.value = Math.round(s*100); | ||
document.frmHSB.B.value = Math.round(v*100); | ||
} | ||
--> | ||
</script> | ||
</head> | ||
<body> | ||
<h1>RGB/HSB Convert</h1> | ||
<table width="200" border="1" bgcolor="#FFFFFF"> | ||
<tr> <td> | ||
<form name="frmRGB" id="frmRGB"> | ||
<label>R (0-255) | ||
<input name="R" type="text" id="R" accesskey="R" | ||
onKeyUp =javascript:rgbChange(); value="255" size="5"> | ||
</label><p> | ||
<label>G (0-255) | ||
<input name="G" type="text" id="G" accesskey="R" | ||
onKeyUp =javascript:rgbChange(); value="0" size="5"> | ||
</label></p><p> | ||
<label>B (0-255) | ||
<input name="B" type="text" id="B" accesskey="R" | ||
onKeyUp =javascript:rgbChange(); value="0" size="5"> | ||
</label></p><p> | ||
<label> | ||
<input name="cmdConvertRGB" TYPE="button" | ||
value="Convert >" onclick="javascript:convertRGB();"> | ||
</label></p> | ||
</form></td><td> | ||
<form name="frmHSB" id="frmHSB"> | ||
<label>H | ||
<input name="H" type="text" id="H" size="5"> | ||
</label><p> | ||
<label>S | ||
<input name="S" type="text" id="S" size="5"> | ||
</label></p><p> | ||
<label>B | ||
<input name="B" type="text" id="B" size="5"> | ||
</label></p><p> | ||
<label> | ||
<input name="cmdConvertHSB" TYPE="button" | ||
value="Convert <" onclick=javascript:convertHSB()> | ||
</label></p> | ||
</form></td></tr> | ||
<tr><td> | ||
<form action="" method="post" name="frmHex" id="frmHex"> | ||
<label>Hex | ||
<input name="hexVal" type="text" id="hexVal"> | ||
</label> | ||
</form></td> | ||
<td> </td> | ||
</tr> | ||
</table> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<html> | ||
<head> | ||
<jdoc:include type="head" /> | ||
</head> | ||
<body> | ||
<jdoc:include type="message" /> | ||
<div class="center" align="center">Hello World!</div> | ||
<jdoc:include type="modules" name="debug" /> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<install version="1.5" type="template"> | ||
<name>Hello Joomla template</name> | ||
<description>Simplest template in the Joomla world.</description> | ||
<files> | ||
<filename>index.php</filename> | ||
<filename>templateDetails.xml</filename> | ||
</files> | ||
</install> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<html> | ||
<head> | ||
<jdoc:include type="head" /> | ||
</head> | ||
<body> | ||
<jdoc:include type="message" /> | ||
<div class="center" align="center">Hello World!</div> | ||
<jdoc:include type="modules" name="user1" style="xhtml" /> | ||
<jdoc:include type="component" /> | ||
<jdoc:include type="modules" name="debug" /> | ||
</body> | ||
</html> |
9 changes: 9 additions & 0 deletions
9
16421-1/Chapter06/tmplHelloJoomla_revision/templateDetails.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<install version="1.5" type="template"> | ||
<name>Hello Joomla template</name> | ||
<description>Simplest template in the Joomla world.</description> | ||
<files> | ||
<filename>index.php</filename> | ||
<filename>templateDetails.xml</filename> | ||
</files> | ||
</install> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
div#logo { | ||
width: 110%; height: 157px; | ||
margin-left: -10px; | ||
background: url(../images/EVlogo.png) left no-repeat; | ||
border: 1px solid #244223 ; | ||
padding: 20px; | ||
} | ||
|
||
#col1 { | ||
float:left;width:15%; | ||
background:#244223; | ||
padding: 10px; | ||
} | ||
#col2 { | ||
float:left;width:75%; | ||
border:3px solid #244223; | ||
background:#58a155; | ||
padding: 10px; | ||
} | ||
|
||
#page_bg { | ||
font-family: Verdana, Arial, Helvetica, sans-serif; | ||
height: 100%; | ||
background: black; | ||
} | ||
|
||
.moduletable_menu, .moduletable | ||
{ | ||
color: white; | ||
border-bottom: 1px solid #fff; | ||
margin-bottom: -1em; | ||
} | ||
|
||
.moduletable_menu h3 { | ||
border-bottom: 1px solid #FFFFFF; | ||
margin-bottom: 0px; | ||
} | ||
|
||
.moduletable_menu ul { | ||
margin-left: 10px; | ||
margin-top: 0px; | ||
padding: 10px; | ||
font-size: 80%; | ||
list-style-type: square; | ||
} | ||
|
||
.moduletable_menu a:link, .moduletable a:link { | ||
color:yellow; | ||
} | ||
|
||
.moduletable_menu a:visited, .moduletable a:visited { | ||
color:cornsilk; | ||
} | ||
|
||
.contentheading { | ||
border-bottom: 2px solid Black; | ||
border-right: 2px solid Black; | ||
border-left: 1px solid LightGreen; | ||
border-top: 1px solid LightGreen; | ||
background:#244223; | ||
color: white; | ||
padding: 10px; | ||
font-size:2em; | ||
} | ||
|
||
.contentpaneopen h1 { | ||
font-size:1.5em; | ||
border-bottom: 1px solid #244223; | ||
padding: 10px; | ||
} |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
<?php echo '<?xml version="1.0" encoding="utf-8"?' .'>'; ?> | ||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | ||
<html> | ||
<head> | ||
<jdoc:include type="head" /> | ||
<link rel="stylesheet" href="templates/_system/css/general.css" type="text/css" /> | ||
<link rel="stylesheet" href="templates/<?php echo $this->template ?>/css/template.css" type="text/css" /> | ||
</head> | ||
|
||
<body id="page_bg"> | ||
|
||
<jdoc:include type="message" /> | ||
<div id="logo"> </div> | ||
<div id="col1"> | ||
<jdoc:include type="modules" name="left" style="xhtml" /> | ||
</div> | ||
<div id="col2"> | ||
<jdoc:include type="component" /> | ||
</div> | ||
|
||
<jdoc:include type="modules" name="debug" /> | ||
|
||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<install version="1.5" type="template"> | ||
<name>Two Column template</name> | ||
<version>1.0</version> | ||
<creationDate>04/21/2009</creationDate> | ||
<author>Dan Rahmel</author> | ||
<authorEmail>admin@joomlaJumpstart.com</authorEmail> | ||
<authorUrl>http://www.joomlaJumpstart.com </authorUrl> | ||
<copyright>2009</copyright> | ||
<license>GNU/GPL</license> | ||
<description>Two CSS columns in the Joomla world.</description> | ||
<files> | ||
<filename>index.php</filename> | ||
<filename>templateDetails.xml</filename> | ||
<filename>images/LSlogo.jpg</filename> | ||
<filename>css/template.css</filename> | ||
</files> | ||
<positions> | ||
<position>left</position> | ||
</positions> | ||
</install> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
|
||
div#logo { | ||
width: 110%; height: 157px; | ||
margin-left: -10px; | ||
margin-bottom: 10px; | ||
background: url(../images/EVlogo.png) left no-repeat; | ||
border: 1px solid #244223 ; | ||
padding: 0px; | ||
} | ||
|
||
#col1 { | ||
float:left;width:20%; | ||
display:inline; | ||
background:#244223; | ||
padding: 10px; | ||
} | ||
|
||
#col2 { | ||
float:right;width:75%; | ||
display:inline; | ||
border:3px solid #244223; | ||
background:#58a155; | ||
padding: 10px; | ||
} | ||
|
||
#container { | ||
float:left;width:85%; | ||
display:inline; | ||
} | ||
|
||
#myclear { | ||
clear:both; | ||
} | ||
|
||
#page_bg { | ||
font-family: Verdana, Arial, Helvetica, sans-serif; | ||
height: 100%; | ||
background: black; | ||
} | ||
|
||
.moduletable_menu, .moduletable | ||
{ | ||
color: white; | ||
border-bottom: 1px solid #fff; | ||
margin-bottom: -1em; | ||
} | ||
|
||
.moduletable_menu h3 { | ||
border-bottom: 1px solid #FFFFFF; | ||
margin-bottom: 0px; | ||
} | ||
|
||
.moduletable_menu ul { | ||
margin-left: 10px; | ||
margin-top: 0px; | ||
padding: 10px; | ||
font-size: 80%; | ||
list-style-type: square; | ||
} | ||
|
||
.moduletable_menu a:link, .moduletable a:link { | ||
color:yellow; | ||
} | ||
|
||
.moduletable_menu a:visited, .moduletable a:visited { | ||
color:cornsilk; | ||
} | ||
|
||
.contentheading { | ||
border-bottom: 2px solid Black; | ||
border-right: 2px solid Black; | ||
border-left: 1px solid LightGreen; | ||
border-top: 1px solid LightGreen; | ||
background:#244223; | ||
color: white; | ||
padding: 10px; | ||
font-size:2em; | ||
} | ||
|
||
.contentpaneopen h1 { | ||
font-size:1.5em; | ||
border-bottom: 1px solid #244223; | ||
padding: 10px; | ||
} |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.