mirror of
https://github.com/lrsjng/h5ai.git
synced 2025-05-30 06:55:16 -04:00
Cosmetics.
This commit is contained in:
parent
7494491637
commit
c71f891af2
311 changed files with 55 additions and 46 deletions
66
src/_h5ai/server/php/index.php.jade
Normal file
66
src/_h5ai/server/php/index.php.jade
Normal file
|
@ -0,0 +1,66 @@
|
|||
|<?php
|
||||
| header("Content-type: text/html;{{pkg.name}}={{pkg.version}}");
|
||||
| $h5ai_php = str_replace("\\", "/", dirname(__FILE__)) . "/inc/H5ai.php";
|
||||
| if (!file_exists($h5ai_php)) {
|
||||
| function find_h5ai($path, $h5ai) {
|
||||
| if (file_exists($path . $h5ai)) { return $path . $h5ai; }
|
||||
| $parent = str_replace("\\", "/", dirname($path));
|
||||
| if ($parent !== $path) { return find_h5ai($parent, $h5ai); }
|
||||
| error_log("h5ai not found: " . __FILE__);
|
||||
| }
|
||||
| $h5ai_php = find_h5ai(str_replace("\\", "/", dirname(__FILE__)), "/_{{pkg.name}}/server/php/inc/H5ai.php");
|
||||
| }
|
||||
| require_once($h5ai_php);
|
||||
| $h5ai = new H5ai(__FILE__);
|
||||
| $h5aiAbsHref = $h5ai->getH5aiAbsHref();
|
||||
| $isHeadRequest = stripos($_SERVER["REQUEST_METHOD"], "HEAD");
|
||||
|?>
|
||||
|
||||
- var appHref = "<?php echo $h5aiAbsHref; ?>client"
|
||||
- var json = "<?php if (!$isHeadRequest) { echo $h5ai->getGenericJson(); }?>"
|
||||
- var fallback = "<?php if (!$isHeadRequest) { echo $h5ai->getNoJsFallback(); }?>"
|
||||
- var config = "<?php if (!$isHeadRequest) { echo $h5ai->getCustomConfig(); }?>"
|
||||
|
||||
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 {{pkg.name}} {{pkg.version}}
|
||||
meta( name="description", content="Directory index styled with {{pkg.name}} {{pkg.version}} ({{pkg.url}})" )
|
||||
meta( name="viewport", content="width=device-width" )
|
||||
link( rel="shortcut icon", href!="#{appHref}/images/app-16x16.ico" )
|
||||
link( rel="apple-touch-icon", type="image/png", href!="#{appHref}/images/app-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!="#{appHref}/css/styles.css" )
|
||||
script( src!="#{appHref}/js/scripts.js", data-config!="#{config}" )
|
||||
|
||||
body#h5ai-main
|
||||
|
||||
div#topbar.clearfix
|
||||
ul#navbar
|
||||
|
||||
div#content
|
||||
div#extended.clearfix
|
||||
|
||||
div#bottombar.clearfix
|
||||
span.left
|
||||
a#h5ai-reference( href="{{pkg.url}}", title="{{pkg.name}} project page" )
|
||||
| {{pkg.name}} {{pkg.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}
|
Loading…
Add table
Add a link
Reference in a new issue