mirror of
https://github.com/lrsjng/h5ai.git
synced 2025-08-09 23:06:47 +02:00
Changed custom header and footer handling.
This commit is contained in:
@@ -24,7 +24,7 @@
|
|||||||
# hide h5ai folder and config files from index
|
# hide h5ai folder and config files from index
|
||||||
################################
|
################################
|
||||||
|
|
||||||
IndexIgnore h5ai h5ai.*
|
IndexIgnore h5ai h5ai.header.html h5ai.footer.html
|
||||||
|
|
||||||
|
|
||||||
################################
|
################################
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
<!-- generated code ends here -->
|
<!-- generated code ends here -->
|
||||||
</section>
|
</section>
|
||||||
<section id="icons"></section>
|
<section id="icons"></section>
|
||||||
<section id="bottom"></section>
|
<footer></footer>
|
||||||
</section>
|
</section>
|
||||||
<footer>
|
<footer>
|
||||||
<a id="html5" href="http://www.w3.org/html/logo/" target="_blank" title="HTML5 semantics, storage & CSS3">
|
<a id="html5" href="http://www.w3.org/html/logo/" target="_blank" title="HTML5 semantics, storage & CSS3">
|
||||||
|
@@ -18,7 +18,7 @@
|
|||||||
<div class="clearfix"></div>
|
<div class="clearfix"></div>
|
||||||
</nav>
|
</nav>
|
||||||
<section id="content">
|
<section id="content">
|
||||||
<section id="top"></section>
|
<header></header>
|
||||||
<section id="details">
|
<section id="details">
|
||||||
<!--
|
<!--
|
||||||
The following code was generated by apache's autoindex module. It is not valid HTML 5 for the
|
The following code was generated by apache's autoindex module. It is not valid HTML 5 for the
|
||||||
|
@@ -19,7 +19,7 @@ a:hover {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
nav {
|
body > nav {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
z-index: 1;
|
z-index: 1;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
@@ -32,7 +32,7 @@ nav {
|
|||||||
-moz-box-shadow: 0 0 30px #555;
|
-moz-box-shadow: 0 0 30px #555;
|
||||||
box-shadow: 0 0 30px #555;
|
box-shadow: 0 0 30px #555;
|
||||||
}
|
}
|
||||||
nav li {
|
body > nav li {
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
opacity: 0.7;
|
opacity: 0.7;
|
||||||
-webkit-transition: all 0.2s ease-in-out;
|
-webkit-transition: all 0.2s ease-in-out;
|
||||||
@@ -40,49 +40,47 @@ nav li {
|
|||||||
-o-transition: all 0.2s ease-in-out;
|
-o-transition: all 0.2s ease-in-out;
|
||||||
transition: all 0.2s ease-in-out;
|
transition: all 0.2s ease-in-out;
|
||||||
}
|
}
|
||||||
nav li:hover, nav li:hover a {
|
body > nav li:hover, body > nav li:hover a {
|
||||||
color: #e80;
|
color: #e80;
|
||||||
background-color: rgba(255,255,255,0.5);
|
background-color: rgba(255,255,255,0.5);
|
||||||
opacity: 1.0;
|
opacity: 1.0;
|
||||||
}
|
}
|
||||||
nav a {
|
body > nav a {
|
||||||
display: block;
|
display: block;
|
||||||
height: 30px;
|
height: 30px;
|
||||||
line-height: 30px;
|
line-height: 30px;
|
||||||
padding: 0 10px;
|
padding: 0 10px;
|
||||||
}
|
}
|
||||||
nav img {
|
body > nav img {
|
||||||
vertical-align: bottom;
|
vertical-align: bottom;
|
||||||
padding: 0 6px 6px 0;
|
padding: 0 6px 6px 0;
|
||||||
}
|
}
|
||||||
nav li.crumb {
|
body > nav li.crumb {
|
||||||
float: left;
|
float: left;
|
||||||
border-right: 1px dotted rgb(225,225,225);
|
border-right: 1px dotted rgb(225,225,225);
|
||||||
}
|
}
|
||||||
nav li.view {
|
body > nav li.view {
|
||||||
float: right;
|
float: right;
|
||||||
border-left: 1px dotted rgb(225,225,225);
|
border-left: 1px dotted rgb(225,225,225);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#top {
|
|
||||||
display: none;
|
|
||||||
padding-bottom: 10px;
|
|
||||||
margin-bottom: 80px;
|
|
||||||
border-bottom: 2px dashed #ddd;
|
|
||||||
}
|
|
||||||
#bottom {
|
|
||||||
display: none;
|
|
||||||
padding-top: 10px;
|
|
||||||
margin-top: 80px;
|
|
||||||
border-top: 2px dashed #ddd;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
#content {
|
#content {
|
||||||
max-width: 980px;
|
max-width: 980px;
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
}
|
}
|
||||||
|
#content > header {
|
||||||
|
display: none;
|
||||||
|
padding-bottom: 10px;
|
||||||
|
margin-bottom: 80px;
|
||||||
|
border-bottom: 2px dashed #ddd;
|
||||||
|
}
|
||||||
|
#content > footer {
|
||||||
|
display: none;
|
||||||
|
padding-top: 10px;
|
||||||
|
margin-top: 80px;
|
||||||
|
border-top: 2px dashed #ddd;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
#details {
|
#details {
|
||||||
@@ -199,7 +197,7 @@ nav li.view {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
footer {
|
body > footer {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
z-index: 1;
|
z-index: 1;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
@@ -215,14 +213,14 @@ footer {
|
|||||||
-moz-box-shadow: 0 0 30px #555;
|
-moz-box-shadow: 0 0 30px #555;
|
||||||
box-shadow: 0 0 30px #555;
|
box-shadow: 0 0 30px #555;
|
||||||
}
|
}
|
||||||
footer a, footer a:visited {
|
body > footer a, body > footer a:visited {
|
||||||
color: #555;
|
color: #555;
|
||||||
-webkit-transition: all 0.2s ease-in-out;
|
-webkit-transition: all 0.2s ease-in-out;
|
||||||
-moz-transition: all 0.2s ease-in-out;
|
-moz-transition: all 0.2s ease-in-out;
|
||||||
-o-transition: all 0.2s ease-in-out;
|
-o-transition: all 0.2s ease-in-out;
|
||||||
transition: all 0.2s ease-in-out;
|
transition: all 0.2s ease-in-out;
|
||||||
}
|
}
|
||||||
footer a:hover {
|
body > footer a:hover {
|
||||||
color: #e80;
|
color: #e80;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
46
h5ai/main.js
46
h5ai/main.js
@@ -10,7 +10,7 @@
|
|||||||
applyViewmode();
|
applyViewmode();
|
||||||
initBreadcrumb();
|
initBreadcrumb();
|
||||||
initViews();
|
initViews();
|
||||||
loadIncludes();
|
customize();
|
||||||
} );
|
} );
|
||||||
|
|
||||||
|
|
||||||
@@ -32,13 +32,8 @@
|
|||||||
ascending: "/h5ai/icons/ascending.png",
|
ascending: "/h5ai/icons/ascending.png",
|
||||||
descending: "/h5ai/icons/descending.png"
|
descending: "/h5ai/icons/descending.png"
|
||||||
},
|
},
|
||||||
globalPath: "/h5ai/global/",
|
customHeader: "h5ai.header.html",
|
||||||
localPrefix: "h5ai.",
|
customFooter: "h5ai.footer.html",
|
||||||
includes: {
|
|
||||||
top: "top.html",
|
|
||||||
bottom: "bottom.html",
|
|
||||||
include: "include.js"
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@@ -235,35 +230,26 @@
|
|||||||
|
|
||||||
|
|
||||||
/*******************************
|
/*******************************
|
||||||
* includes
|
* customize
|
||||||
*******************************/
|
*******************************/
|
||||||
|
|
||||||
function loadIncludes() {
|
|
||||||
|
|
||||||
$( "#top" ).load( config.localPrefix + config.includes.top, function( response, status ) {
|
function customize() {
|
||||||
if (status !== "error") {
|
$.ajax( {
|
||||||
$( "#top" ).show();
|
url: config.customHeader,
|
||||||
} else {
|
dataType: "html",
|
||||||
$( "#top" ).load( config.globalPath + config.includes.top, function( response, status ) {
|
success: function ( data ) {
|
||||||
if (status !== "error") {
|
$( "#content > header" ).append( $( data ) ).show();
|
||||||
$( "#top" ).show();
|
|
||||||
}
|
|
||||||
} );
|
|
||||||
}
|
}
|
||||||
} );
|
} );
|
||||||
$( "#bottom" ).load( config.localPrefix + config.includes.bottom, function( response, status ) {
|
$.ajax( {
|
||||||
if (status !== "error") {
|
url: config.customFooter,
|
||||||
$( "#bottom" ).show();
|
dataType: "html",
|
||||||
} else {
|
success: function ( data ) {
|
||||||
$( "#bottom" ).load( config.globalPath + config.includes.bottom, function( response, status ) {
|
$( "#content > footer" ).prepend( $( data ) ).show();
|
||||||
if (status !== "error") {
|
|
||||||
$( "#bottom" ).show();
|
|
||||||
}
|
|
||||||
} );
|
|
||||||
}
|
}
|
||||||
} );
|
} );
|
||||||
$.getScript( config.globalPath + config.includes.include );
|
|
||||||
$.getScript( config.localPrefix + config.includes.include );
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
} )( jQuery );
|
} )( jQuery );
|
||||||
|
Reference in New Issue
Block a user