first commit

This commit is contained in:
/usr/bin/nano
2017-04-15 01:34:36 +03:00
commit c715e2a604
5325 changed files with 329700 additions and 0 deletions
Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

+16
View File
@@ -0,0 +1,16 @@
Built May 2014, starting with source from:
http://purecss.io/layouts/side-menu/
The hard part was done by the YUI and Normalise.js developers.
This skin's page on PmWiki.org:
http://www.pmwiki.org/wiki/PmWiki/Skins/Adapt
The CMS Mode recipe works well with this skin:
http://www.pmwiki.org/wiki/Cookbook/CMSMode
Install by copying the directory to pub/skins/ and putting
this in your config.php configuration file:
## Use the Adapt Skin
$Skin = 'adapt';
Enjoy.
+203
View File
@@ -0,0 +1,203 @@
body { color: #333; }
.pure-img-responsive { max-width: 100%; height: auto; }
/*
Add transition to containers so they can push in and out.
*/
#layout, #menu, .menu-link {
-webkit-transition: all 0.2s ease-out;
-moz-transition: all 0.2s ease-out;
-ms-transition: all 0.2s ease-out;
-o-transition: all 0.2s ease-out;
transition: all 0.2s ease-out;
}
/*
This is the parent `<div>` that contains the menu and the content area.
Hamburger Menu styles are first, wider @media styles are below.
*/
#layout { position: relative; padding-left: 0; }
#layout.active { position: relative; left: 180px; }
#layout.active #menu { left: 180px; width: 180px; }
#layout.active .menu-link { left: 180px; }
/*
The content `<div>` is where all your content goes.
*/
.content { margin: 0 auto; padding: 0 2em; max-width: 800px;
margin-bottom: 50px; line-height: 1.6em; }
.content a { max-width:100%; height:auto; } /*TODO wiki needs to style it*/
/* Wiki page actions */
#wikicmds { float:right; white-space:nowrap; font-size:90%; }
#wikicmds ul { list-style:none; margin:0px; padding:0px; }
#wikicmds li { display:inline; margin:0px 5px; }
#wikicmds li a { text-decoration:none; color:#333; border:none; }
#wikicmds li a.createlink { display:none; }
#wikicmds li a:hover { text-decoration:underline; color:blue; }
/* The headerlogo element is (Site|Group).HeaderLogo TODO */
.headerlogo { border-bottom:1px #ccc solid; }
/* Wiki Header - Logo and Search box */
#wikihead { position:absolute; right:10px; top:10px; font-size:85%; }
#wikihead form { display:none; }
#wikihead input { font-size:85%; }
/* The #wikilogo element is the logo from $PageLogoFmt */
#wikilogo { padding:10px 2em 6px 75px; text-align:right;
background: #eee; border-bottom:1px #ccc solid; }
/* Wiki page title */
.title { margin: 0 auto; color: #000; padding: 1em 2em 0.5em;
max-width: 800px; border-bottom: 1px solid #eee; }
.title h1 { margin: 0em 0; font-size: 2em; font-weight: 300; }
/*TODO Wikify this*/
.content-subhead { margin: 50px 0 20px 0; font-weight: 300; color: #888;}
/* Edit Form */
#wikiedit form { margin:0px; width:100%; line-height:1.1em; }
#wikiedit textarea { margin:0px; width:99.5%; height:18em; }
#wikiedit input[type=text] { margin:0px; width:99.5%; }
h2.wikiaction { margin:0px }
.wikimessage { margin-top:3px; margin-bottom:3px; font-style:italic;
color:black; background-color:#ffffcc; padding:2px; }
/* For the (Site.)Search page */
.searchbox { margin-right:2px; max-width:100%; }
#wikifoot { font-size:80%; padding-top:2em; text-align:center; }
.footnav a { text-decoration:none; color:black; }
.footnav a:hover { text-decoration:underline; color:blue; }
.lastmod { color:#999; }
/*
The `#menu` `<div>` is the parent `<div>` that contains the `.pure-menu` that
appears on the left side of the page.
*/
#menu {
margin-left: -180px; /* "#menu" width */
width: 180px;
position: fixed;
top: 0;
left: 0;
bottom: 0;
z-index: 1000; /* so the menu or its navicon stays above all content */
overflow-y: auto;
-webkit-overflow-scrolling: touch;
background: #eee;
border-right: 1px solid #ccc;
}
/* All anchors inside the menu should be styled like this. */
#menu a { color: #000; border: none; padding: 0.6em 0 0.3em 0.6em; }
/* Sidebar Headings too TODO */
#menu .sidehead { color: #000; border: none; padding: 0.6em 0 0.3em 0.6em; }
/* Remove all background/borders, since we are applying them to #menu.*/
#menu .pure-menu,
#menu .pure-menu ul {
border: none; background: transparent; }
/* Add that light border to separate items into groups. */
#menu .pure-menu ul,
#menu .pure-menu .menu-item-divided {
padding-top: 0.5em; }
/* Change color of the anchor links on hover/focus. */
#menu .pure-menu li a:hover,
#menu .pure-menu li a:focus {
background: #ccc; }
/* This styles the selected menu item `<li>`. */
#menu .pure-menu-selected,
#menu .pure-menu-heading {
background: #1f8dd6; }
/* This styles a link within a selected menu item `<li>`. */
#menu .pure-menu-selected a { color: #444; }
/* This styles the menu heading. */
#menu .pure-menu-heading {
font-size: 110%; color: #444; margin: 0; }
/* Sidebar headings */
#menu .sidehead {
color: #000; border: none; padding: 0.6em 0 0 0.6em; background: #eee; }
#menu .sidehead a { color:#000; }
#menu .sidehead a:hover { text-decoration:underline; }
/* Side menu search form TODO */
#menu .sidesearch {
background: #eee; color: #000; padding-bottom: 0.2em; padding-top: 0.5em; }
#menu .sidesearch a:hover {
text-decoration:underline; }
/* -- Dynamic Button For Responsive Menu -------------------------------------*/
/*
The button to open/close the Menu is custom-made and not part of Pure. Here's
how it works:
*/
/*
`.menu-link` represents the responsive menu toggle that shows/hides on
small screens.
*/
.menu-link {
position: fixed;
display: block; /* show this only on small screens */
top: 0;
left: 0; /* "#menu width" */
background: #000;
background: rgba(0,0,0,0.7);
font-size: 10px; /* change this value to increase/decrease button size */
z-index: 10;
width: 2em;
height: auto;
padding: 2.1em 1.6em;
}
.menu-link:hover,
.menu-link:focus {
background: #000;
}
.menu-link span {
position: relative;
display: block;
}
.menu-link span,
.menu-link span:before,
.menu-link span:after {
background-color: #fff;
width: 100%;
height: 0.2em;
}
.menu-link span:before,
.menu-link span:after {
position: absolute;
margin-top: -0.6em;
content: " ";
}
.menu-link span:after {
margin-top: 0.6em;
}
/*
Responsive Styles (Media Queries)
These styles are activated when the display is wider; the Hamburger
will disappear and the Side Menu for larger displays will be visible.
/* Hide the menu at `48em`, but modify this based on your app's needs. */
#menu .sidesearch { display: none; }
#wikilogo { padding-left: 1em; text-align:left; }
#wikihead form { margin-top: 0.3em; display:block; }
.title,
.content { padding-left: 2em; padding-right: 2em; }
/* width of the left (menu) column */
#layout { padding-left: 180px; left: 0; }
#menu { left: 180px; }
.menu-link {
position: fixed; left: 180px; display: none; }
#layout.active .menu-link { left: 180px; }
+219
View File
@@ -0,0 +1,219 @@
body { color: #333; }
.pure-img-responsive { max-width: 100%; height: auto; }
/*
Add transition to containers so they can push in and out.
*/
#layout, #menu, .menu-link {
-webkit-transition: all 0.2s ease-out;
-moz-transition: all 0.2s ease-out;
-ms-transition: all 0.2s ease-out;
-o-transition: all 0.2s ease-out;
transition: all 0.2s ease-out;
}
/*
This is the parent `<div>` that contains the menu and the content area.
Hamburger Menu styles are first, wider @media styles are below.
*/
#layout { position: relative; padding-left: 0; }
#layout.active { position: relative; left: 175px; }
#layout.active #menu { left: 175px; width: 175px; }
#layout.active .menu-link { left: 175px; }
/*
The content `<div>` is where all your content goes.
*/
.content { margin: 0 auto; padding: 0 2em; max-width: 800px;
margin-bottom: 50px; line-height: 1.6em; }
.content img { max-width:100%; height:auto; } /*TODO wiki needs to style it*/
/* links in the content area */
.content a { font-weight:bold; color:#0055bb; text-decoration:none; }
.content a:visited { font-weight:bold; color:#003399; text-decoration:none; }
.content a:hover {color:#0066cc; text-decoration:underline; }
.content a:active { color#9c0606; }
/* Wiki page actions */
#wikicmds { float:right; white-space:nowrap; font-size:90%; }
#wikicmds ul { list-style:none; margin:0px; padding:0px; }
#wikicmds li { display:inline; margin:0px 5px; }
#wikicmds li a { text-decoration:none; color:#333; border:none; }
#wikicmds li a.createlink { display:none; }
#wikicmds li a:hover { text-decoration:underline; color:blue; }
/* The headerlogo element is (Site|Group).HeaderLogo TODO */
.headerlogo { border-bottom:1px #ccc solid; }
/* Wiki Header - Logo and Search box */
#wikihead { position:absolute; right:10px; top:10px; font-size:85%; }
#wikihead form { display:none; }
#wikihead input { font-size:85%; }
/* The #wikilogo element is the logo from $PageLogoFmt */
#wikilogo { padding:10px 2em 6px 75px; text-align:right;
background: #eee; border-bottom:1px #ccc solid; }
/* Wiki page title */
.title { margin: 0 auto; color: #000; padding: 1em 2em 0.5em;
max-width: 800px; border-bottom: 1px solid #eee; }
.title h1 { margin: 0em 0; font-size: 2em; font-weight: 300; }
/*TODO Wikify this*/
.content-subhead { margin: 50px 0 20px 0; font-weight: 300; color: #888;}
/* Edit Form */
#wikiedit form { margin:0px; width:100%; line-height:1.1em; }
#wikiedit textarea { margin:0px; width:99.5%; height:18em; }
#wikiedit input[type=text] { margin:0px; width:99.5%; }
h2.wikiaction { margin:0px }
.wikimessage { margin-top:3px; margin-bottom:3px; font-style:italic;
color:black; background-color:#ffffcc; padding:2px; }
/* For the (Site.)Search page */
.searchbox { margin-right:2px; max-width:100%; }
#wikifoot { font-size:80%; padding-top:2em; text-align:center; }
.footnav a,
.footnav a:visited {
font-weight:normal; text-decoration:none; color:black; }
.footnav a:hover { text-decoration:underline; color:blue; }
.lastmod { color:#999; }
/*
The `#menu` `<div>` is the parent `<div>` that contains the `.pure-menu` that
appears on the left side of the page.
*/
#menu {
margin-left: -175px; /* "#menu" width */
width: 175px;
position: fixed;
top: 0;
left: 0;
bottom: 0;
z-index: 1000; /* so the menu or its navicon stays above all content */
overflow-y: auto;
-webkit-overflow-scrolling: touch;
background: #eee;
border-right: 1px solid #ccc;
}
/* All anchors inside the menu should be styled like this. */
#menu a { color: #000; border: none; padding: 0.6em 0 0.3em 0.6em; font-size:85%; }
/* Sidebar Headings too TODO */
#menu .sidehead { color: #000; border: none; padding: 0.6em 0 0.3em 0.6em; }
/* Remove all background/borders, since we are applying them to #menu.*/
#menu .pure-menu,
#menu .pure-menu ul {
border: none; background: transparent; }
/* Add that light border to separate items into groups. */
#menu .pure-menu ul,
#menu .pure-menu .menu-item-divided {
padding-top: 0.5em; }
/* Change color of the anchor links on hover/focus. */
#menu .pure-menu li a:hover,
#menu .pure-menu li a:focus {
background: #ccc; }
/* This styles the selected menu item `<li>`. */
#menu .pure-menu-selected,
#menu .pure-menu-heading {
background: #1f8dd6; }
/* This styles a link within a selected menu item `<li>`. */
#menu .pure-menu-selected a { color: #444; }
/* This styles the menu heading. */
#menu .pure-menu-heading {
font-size: 110%; color: #444; margin: 0; }
/* Sidebar headings */
#menu .sidehead {
color: #000; border: none; padding: 0.6em 0 0 0.6em; background: #eee; }
#menu .sidehead a { color:#000; }
#menu .sidehead a:hover { text-decoration:underline; }
/* Side menu search form TODO */
#menu .sidesearch {
background: #eee; color: #000; padding-bottom: 0.2em; padding-top: 0.5em; }
#menu .sidesearch a:hover {
text-decoration:underline; }
/* -- Dynamic Button For Responsive Menu -------------------------------------*/
/*
The button to open/close the Menu is custom-made and not part of Pure. Here's
how it works:
*/
/*
`.menu-link` represents the responsive menu toggle that shows/hides on
small screens.
*/
.menu-link {
position: fixed;
display: block; /* show this only on small screens */
top: 0;
left: 0; /* "#menu width" */
background: #000;
background: rgba(0,0,0,0.7);
font-size: 10px; /* change this value to increase/decrease button size */
z-index: 10;
width: 2em;
height: auto;
padding: 2.1em 1.6em;
}
.menu-link:hover,
.menu-link:focus {
background: #000;
}
.menu-link span {
position: relative;
display: block;
}
.menu-link span,
.menu-link span:before,
.menu-link span:after {
background-color: #fff;
width: 100%;
height: 0.2em;
}
.menu-link span:before,
.menu-link span:after {
position: absolute;
margin-top: -0.6em;
content: " ";
}
.menu-link span:after {
margin-top: 0.6em;
}
/*
Responsive Styles (Media Queries)
These styles are activated when the display is wider; the Hamburger
will disappear and the Side Menu for larger displays will be visible.
/* Hide the menu at `48em`, but modify this based on your app's needs. */
@media (min-width: 48em) {
#menu .sidesearch { display: none; }
#wikilogo { padding-left: 1em; text-align:left; }
#wikihead form { margin-top: 0.3em; display:block; }
.title,
.content { padding-left: 2em; padding-right: 2em; }
/* width of the left (menu) column */
#layout { padding-left: 175px; left: 0; }
#menu { left: 175px; }
.menu-link {
position: fixed; left: 175px; display: none; }
#layout.active .menu-link { left: 175px; }
}
@media print {
#menu, #wikihead, #wikilogo { display:none; }
.headerlogo, .content, .title {
margin-left: -175px; }
}
+101
View File
@@ -0,0 +1,101 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>{$Title} | $WikiTitle $ActionTitle </title></title>
<link rel="stylesheet" href="$SkinDirUrl/pure-min.css">
<!--[if lte IE 8]>
<link rel="stylesheet" href="$SkinDirUrl/adapt-old-ie.css">
<![endif]-->
<!--[if gt IE 8]><!-->
<link rel="stylesheet" href="$SkinDirUrl/adapt.css">
<!--<![endif]-->
<!--[if lt IE 9]>
<script src="$SkinDirUrl/html5shiv.js"></script>
<![endif]-->
<!--HTMLHeader-->
</head>
<body>
<div id="layout">
<!--PageLeftFmt-->
<!-- HeaderLogo Menu toggle -->
<a href="#menu" id="menuLink" class="menu-link">
<!-- Hamburger icon -->
<span></span>
</a>
<div id="menu">
<div class="pure-menu pure-menu-open">
<div class='sidesearch'><a href='http://www.haganfox.net/Site/Search'>Search</a></div>
<!--wiki:{$Group}.AdaptSideBar {$SiteGroup}.AdaptSideBar-->
<!--wiki:{$Group}.SideBar {$SiteGroup}.SideBar-->
</div>
</div>
<!--/PageLeftFmt-->
<div id="main">
<!--PageHeaderFmt-->
<div id='wikilogo'><a href='{$HeaderLink}'><img src='$PageLogoUrl'
alt='$WikiTitle' border='0' /></a></div>
<div id='wikihead'>
<form action='{$ScriptUrl}'>
<span class='headnav'><a href='{$ScriptUrl}/$[{$Group}/RecentChanges]'
accesskey='$[ak_recentchanges]'>$[Recent Changes]</a> -</span>
<input type='hidden' name='n' value='{$FullName}' />
<input type='hidden' name='action' value='search' />
<a href='{$ScriptUrl}/$[{$SiteGroup}/Search]'>$[Search]</a>:
<input type='text' name='q' value='' class='inputbox searchbox' />
<input type='submit' class='inputbutton searchbutton'
value='$[Go]' /></form></div>
<!--PageActionFmt-->
<div id='wikicmds'><!--wiki:{$Group}.PageActions {$SiteGroup}.PageActions--></div>
<!--PageTitleFmt-->
<div class="title">
<div class='pagegroup'><a href='{$ScriptUrl}/{$Group}'>{$Group}</a> /</div>
<h1 class='pagetitle'>{$Title}</h1>
</div>
<!--/PageTitleFmt-->
<div class="content">
<!--PageText-->
<!--PageFooterFmt-->
<div id='wikifoot'><div class='footnav'>
<a rel="nofollow" href='{$PageUrl}?action=edit'>$[Edit]</a> -
<a rel="nofollow" href='{$PageUrl}?action=diff'>$[History]</a> -
<a rel="nofollow" href='{$PageUrl}?action=print' target='_blank'>$[Print]</a> -
<a href='{$ScriptUrl}/$[{$Group}/RecentChanges]'>$[Recent Changes]</a> -
<a href='{$ScriptUrl}/$[{$SiteGroup}/Search]'>$[Search]</a></div>
<div class='lastmod'>$[Page last modified on {$LastModified}]</div>
</div>
<!--/PageFooterFmt-->
</div>
</div>
</div>
<script src="$SkinDirUrl/ui.js"></script>
<!--HTMLFooter-->
<!-- Yandex.Metrika counter -->
<script type="text/javascript">
(function (d, w, c) {
(w[c] = w[c] || []).push(function() {
try {
w.yaCounter25827098 = new Ya.Metrika({id:25827098,
clickmap:true,
accurateTrackBounce:true});
} catch(e) { }
});
var n = d.getElementsByTagName("script")[0],
s = d.createElement("script"),
f = function () { n.parentNode.insertBefore(s, n); };
s.type = "text/javascript";
s.async = true;
s.src = (d.location.protocol == "https:" ? "https:" : "http:") + "//mc.yandex.ru/metrika/watch.js";
if (w.opera == "[object Opera]") {
d.addEventListener("DOMContentLoaded", f, false);
} else { f(); }
})(document, window, "yandex_metrika_callbacks");
</script>
<noscript><div><img src="//mc.yandex.ru/watch/25827098" style="position:absolute; left:-9999px;" alt="" /></div></noscript>
<!-- /Yandex.Metrika counter -->
</body>
</html>
+301
View File
@@ -0,0 +1,301 @@
/**
* @preserve HTML5 Shiv v3.7.0 | @afarkas @jdalton @jon_neal @rem | MIT/GPL2 Licensed
*/
;(function(window, document) {
/*jshint evil:true */
/** version */
var version = '3.7.0';
/** Preset options */
var options = window.html5 || {};
/** Used to skip problem elements */
var reSkip = /^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i;
/** Not all elements can be cloned in IE **/
var saveClones = /^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i;
/** Detect whether the browser supports default html5 styles */
var supportsHtml5Styles;
/** Name of the expando, to work with multiple documents or to re-shiv one document */
var expando = '_html5shiv';
/** The id for the the documents expando */
var expanID = 0;
/** Cached data for each document */
var expandoData = {};
/** Detect whether the browser supports unknown elements */
var supportsUnknownElements;
(function() {
try {
var a = document.createElement('a');
a.innerHTML = '<xyz></xyz>';
//if the hidden property is implemented we can assume, that the browser supports basic HTML5 Styles
supportsHtml5Styles = ('hidden' in a);
supportsUnknownElements = a.childNodes.length == 1 || (function() {
// assign a false positive if unable to shiv
(document.createElement)('a');
var frag = document.createDocumentFragment();
return (
typeof frag.cloneNode == 'undefined' ||
typeof frag.createDocumentFragment == 'undefined' ||
typeof frag.createElement == 'undefined'
);
}());
} catch(e) {
// assign a false positive if detection fails => unable to shiv
supportsHtml5Styles = true;
supportsUnknownElements = true;
}
}());
/*--------------------------------------------------------------------------*/
/**
* Creates a style sheet with the given CSS text and adds it to the document.
* @private
* @param {Document} ownerDocument The document.
* @param {String} cssText The CSS text.
* @returns {StyleSheet} The style element.
*/
function addStyleSheet(ownerDocument, cssText) {
var p = ownerDocument.createElement('p'),
parent = ownerDocument.getElementsByTagName('head')[0] || ownerDocument.documentElement;
p.innerHTML = 'x<style>' + cssText + '</style>';
return parent.insertBefore(p.lastChild, parent.firstChild);
}
/**
* Returns the value of `html5.elements` as an array.
* @private
* @returns {Array} An array of shived element node names.
*/
function getElements() {
var elements = html5.elements;
return typeof elements == 'string' ? elements.split(' ') : elements;
}
/**
* Returns the data associated to the given document
* @private
* @param {Document} ownerDocument The document.
* @returns {Object} An object of data.
*/
function getExpandoData(ownerDocument) {
var data = expandoData[ownerDocument[expando]];
if (!data) {
data = {};
expanID++;
ownerDocument[expando] = expanID;
expandoData[expanID] = data;
}
return data;
}
/**
* returns a shived element for the given nodeName and document
* @memberOf html5
* @param {String} nodeName name of the element
* @param {Document} ownerDocument The context document.
* @returns {Object} The shived element.
*/
function createElement(nodeName, ownerDocument, data){
if (!ownerDocument) {
ownerDocument = document;
}
if(supportsUnknownElements){
return ownerDocument.createElement(nodeName);
}
if (!data) {
data = getExpandoData(ownerDocument);
}
var node;
if (data.cache[nodeName]) {
node = data.cache[nodeName].cloneNode();
} else if (saveClones.test(nodeName)) {
node = (data.cache[nodeName] = data.createElem(nodeName)).cloneNode();
} else {
node = data.createElem(nodeName);
}
// Avoid adding some elements to fragments in IE < 9 because
// * Attributes like `name` or `type` cannot be set/changed once an element
// is inserted into a document/fragment
// * Link elements with `src` attributes that are inaccessible, as with
// a 403 response, will cause the tab/window to crash
// * Script elements appended to fragments will execute when their `src`
// or `text` property is set
return node.canHaveChildren && !reSkip.test(nodeName) ? data.frag.appendChild(node) : node;
}
/**
* returns a shived DocumentFragment for the given document
* @memberOf html5
* @param {Document} ownerDocument The context document.
* @returns {Object} The shived DocumentFragment.
*/
function createDocumentFragment(ownerDocument, data){
if (!ownerDocument) {
ownerDocument = document;
}
if(supportsUnknownElements){
return ownerDocument.createDocumentFragment();
}
data = data || getExpandoData(ownerDocument);
var clone = data.frag.cloneNode(),
i = 0,
elems = getElements(),
l = elems.length;
for(;i<l;i++){
clone.createElement(elems[i]);
}
return clone;
}
/**
* Shivs the `createElement` and `createDocumentFragment` methods of the document.
* @private
* @param {Document|DocumentFragment} ownerDocument The document.
* @param {Object} data of the document.
*/
function shivMethods(ownerDocument, data) {
if (!data.cache) {
data.cache = {};
data.createElem = ownerDocument.createElement;
data.createFrag = ownerDocument.createDocumentFragment;
data.frag = data.createFrag();
}
ownerDocument.createElement = function(nodeName) {
//abort shiv
if (!html5.shivMethods) {
return data.createElem(nodeName);
}
return createElement(nodeName, ownerDocument, data);
};
ownerDocument.createDocumentFragment = Function('h,f', 'return function(){' +
'var n=f.cloneNode(),c=n.createElement;' +
'h.shivMethods&&(' +
// unroll the `createElement` calls
getElements().join().replace(/[\w\-]+/g, function(nodeName) {
data.createElem(nodeName);
data.frag.createElement(nodeName);
return 'c("' + nodeName + '")';
}) +
');return n}'
)(html5, data.frag);
}
/*--------------------------------------------------------------------------*/
/**
* Shivs the given document.
* @memberOf html5
* @param {Document} ownerDocument The document to shiv.
* @returns {Document} The shived document.
*/
function shivDocument(ownerDocument) {
if (!ownerDocument) {
ownerDocument = document;
}
var data = getExpandoData(ownerDocument);
if (html5.shivCSS && !supportsHtml5Styles && !data.hasCSS) {
data.hasCSS = !!addStyleSheet(ownerDocument,
// corrects block display not defined in IE6/7/8/9
'article,aside,dialog,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}' +
// adds styling not present in IE6/7/8/9
'mark{background:#FF0;color:#000}' +
// hides non-rendered elements
'template{display:none}'
);
}
if (!supportsUnknownElements) {
shivMethods(ownerDocument, data);
}
return ownerDocument;
}
/*--------------------------------------------------------------------------*/
/**
* The `html5` object is exposed so that more elements can be shived and
* existing shiving can be detected on iframes.
* @type Object
* @example
*
* // options can be changed before the script is included
* html5 = { 'elements': 'mark section', 'shivCSS': false, 'shivMethods': false };
*/
var html5 = {
/**
* An array or space separated string of node names of the elements to shiv.
* @memberOf html5
* @type Array|String
*/
'elements': options.elements || 'abbr article aside audio bdi canvas data datalist details dialog figcaption figure footer header hgroup main mark meter nav output progress section summary template time video',
/**
* current version of html5shiv
*/
'version': version,
/**
* A flag to indicate that the HTML5 style sheet should be inserted.
* @memberOf html5
* @type Boolean
*/
'shivCSS': (options.shivCSS !== false),
/**
* Is equal to true if a browser supports creating unknown/HTML5 elements
* @memberOf html5
* @type boolean
*/
'supportsUnknownElements': supportsUnknownElements,
/**
* A flag to indicate that the document's `createElement` and `createDocumentFragment`
* methods should be overwritten.
* @memberOf html5
* @type Boolean
*/
'shivMethods': (options.shivMethods !== false),
/**
* A string to describe the type of `html5` object ("default" or "default print").
* @memberOf html5
* @type String
*/
'type': 'default',
// shivs the document according to the specified `html5` object options
'shivDocument': shivDocument,
//creates a shived element
createElement: createElement,
//creates a shived documentFragment
createDocumentFragment: createDocumentFragment
};
/*--------------------------------------------------------------------------*/
// expose html5
window.html5 = html5;
// shiv the document
shivDocument(document);
}(this, document));
+52
View File
@@ -0,0 +1,52 @@
Software License Agreement (BSD License)
========================================
Copyright 2014 Yahoo! Inc. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
* Neither the name of the Yahoo! Inc. nor the
names of its contributors may be used to endorse or promote products
derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL YAHOO! INC. BE LIABLE FOR ANY
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Normalize.css License
=====================
Copyright (c) Nicolas Gallagher and Jonathan Neal
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
File diff suppressed because one or more lines are too long
+35
View File
@@ -0,0 +1,35 @@
(function (window, document) {
var layout = document.getElementById('layout'),
menu = document.getElementById('menu'),
menuLink = document.getElementById('menuLink');
function toggleClass(element, className) {
var classes = element.className.split(/\s+/),
length = classes.length,
i = 0;
for(; i < length; i++) {
if (classes[i] === className) {
classes.splice(i, 1);
break;
}
}
// The className is not found
if (length === classes.length) {
classes.push(className);
}
element.className = classes.join(' ');
}
menuLink.onclick = function (e) {
var active = 'active';
e.preventDefault();
toggleClass(layout, active);
toggleClass(menu, active);
toggleClass(menuLink, active);
};
}(this, this.document));