Abstracts h5ai-index.php.

This commit is contained in:
Lars Jung 2012-08-15 22:05:52 +02:00
parent 5a017a0d5a
commit fd89ea1d90

View file

@ -1,44 +1,5 @@
|<?php header("Content-type: text/html;h5ai={{version}}"); ?>
doctype 5
//if lt IE 9
<html class="no-js oldie" lang="en">
//[if gt IE 8]><!
html.no-js( lang="en" )
//<![endif]
head
meta( charset="utf-8" )
meta( http-equiv="X-UA-Compatible", content="IE=edge,chrome=1" )
title Directory index · styled with h5ai {{version}}
meta( name="description", content="Directory index styled with h5ai {{version}} (http://larsjung.de/h5ai)" )
meta( name="viewport", content="width=device-width" )
link( rel="shortcut icon", type="image/png", href="/_h5ai/images/h5ai-16x16.png" )
link( rel="apple-touch-icon", type="image/png", href="/_h5ai/images/h5ai-48x48.png" )
link( rel="stylesheet", href="//fonts.googleapis.com/css?family=Ubuntu+Mono:400,700,400italic,700italic|Ubuntu:400,700,400italic,700italic" )
link( rel="stylesheet", href="/_h5ai/css/styles.css" )
script( src="/_h5ai/js/modernizr.js" )
body#h5ai-main
div#topbar.clearfix
ul#navbar
div#content
div#extended.clearfix
div#bottombar.clearfix
span.left
a#h5ai-reference( href="http://larsjung.de/h5ai", title="h5ai project page" ) h5ai {{version}}
span.hideOnJs.noJsMsg ⚡ JavaScript is disabled! ⚡
span.oldBrowser
| ⚡ Some features disabled! Works best in
a( href="http://browsehappy.com" ) modern browsers
| . ⚡
span.right
span.center
div#data-generic-json.hidden
|<?php if (stripos($_SERVER["REQUEST_METHOD"], "HEAD") === false) {
|<?php
| header("Content-type: text/html;h5ai={{version}}");
|
| $h5ai_php = str_replace("\\", "/", dirname(__FILE__)) . "/inc/H5ai.php";
|
@ -62,16 +23,57 @@ html.no-js( lang="en" )
| }
|
| require_once($h5ai_php);
|
| $h5ai = new H5ai(__FILE__);
| echo $h5ai->getGenericJson();
|}?>
div#data-php-no-js-fallback.hideOnJs
|<?php if (stripos($_SERVER["REQUEST_METHOD"], "HEAD") === false) {
|
| echo $h5ai->getNoJsFallback();
|}?>
| $h5aiAbsHref = $h5ai->getH5aiAbsHref();
| $isHeadRequest = stripos($_SERVER["REQUEST_METHOD"], "HEAD");
|?>
script( src="/_h5ai/config.js" )
script( src="/_h5ai/js/scripts.js" )
- var h5ai = "<?php echo $h5aiAbsHref; ?>"
- var json = "<?php if (!$isHeadRequest) { echo $h5ai->getGenericJson(); }?>"
- var fallback = "<?php if (!$isHeadRequest) { echo $h5ai->getNoJsFallback(); }?>"
doctype 5
//if lt IE 9
<html class="no-js oldie" lang="en">
//[if gt IE 8]><!
html.no-js( lang="en" )
//<![endif]
head
meta( charset="utf-8" )
meta( http-equiv="X-UA-Compatible", content="IE=edge,chrome=1" )
title Directory index · styled with h5ai {{version}}
meta( name="description", content="Directory index styled with h5ai {{version}} (http://larsjung.de/h5ai)" )
meta( name="viewport", content="width=device-width" )
link( rel="shortcut icon", type="image/png", href!="#{h5ai}images/h5ai-16x16.png" )
link( rel="apple-touch-icon", type="image/png", href!="#{h5ai}images/h5ai-48x48.png" )
link( rel="stylesheet", href="//fonts.googleapis.com/css?family=Ubuntu+Mono:400,700,400italic,700italic|Ubuntu:400,700,400italic,700italic" )
link( rel="stylesheet", href!="#{h5ai}css/styles.css" )
script( src!="#{h5ai}js/modernizr.js" )
body#h5ai-main
div#topbar.clearfix
ul#navbar
div#content
div#extended.clearfix
div#bottombar.clearfix
span.left
a#h5ai-reference( href="http://larsjung.de/h5ai", title="h5ai project page" ) h5ai {{version}}
span.hideOnJs.noJsMsg ⚡ JavaScript is disabled! ⚡
span.oldBrowser
| ⚡ Some features disabled! Works best in
a( href="http://browsehappy.com" ) modern browsers
| . ⚡
span.right
span.center
div#data-generic-json.hidden !{json}
div#data-php-no-js-fallback.hideOnJs !{fallback}
script( src!="#{h5ai}config.js" )
script( src!="#{h5ai}js/scripts.js" )