Skip to content
This repository was archived by the owner on Jan 31, 2020. It is now read-only.

Commit fe28bcd

Browse files
committedApr 17, 2019
feat: Laminas announcement
1 parent d189429 commit fe28bcd

18 files changed

+3263
-597
lines changed
 

‎404.html

+14-4
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
<title>Not Found - ZF Docs</title>
1313

14-
<link rel="stylesheet" href="/css/styles-e95dab66f8.css">
14+
<link rel="stylesheet" href="/css/styles-18b942728f.css">
1515
<link href="/css/site.css" rel="stylesheet">
1616
</head>
1717
<body id="page-top">
@@ -124,6 +124,17 @@ <h1 class="header__title">
124124
</header>
125125

126126

127+
<div class="laminas-announcement">
128+
<div class="container">
129+
<div class="row">
130+
<div class="col-xs-12">
131+
Zend Framework transitions to the Linux Foundation. <a href="https://getlaminas.org">Learn More.</a>
132+
</div>
133+
</div>
134+
</div>
135+
</div>
136+
137+
127138
<div class="container">
128139
<div class="row">
129140
<div class="col-md-9 col-xs-12 content" role="main">
@@ -291,9 +302,8 @@ <h4 class="footer__headline">Support</h4>
291302
var base_url = '..',
292303
siteName = 'ZF Docs';
293304
</script>
294-
<script src="/js/scripts-a978f1ec1a.js"></script>
295-
<script src="/search/require.js"></script>
296-
<script src="/search/search.js"></script>
305+
<script src="/js/scripts-0bcb0a3bb3.js"></script>
306+
<script src="/search/main.js"></script>
297307

298308

299309
<div class="modal" id="mkdocs_search_modal" tabindex="-1" role="dialog" aria-labelledby="Search Modal" aria-hidden="true">

‎css/styles-18b942728f.css

+12
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎css/styles-e95dab66f8.css

-12
This file was deleted.

‎index.html

+21-11
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@
1111

1212
<title>Home - ZF Docs</title>
1313

14-
<link rel="stylesheet" href="./css/styles-e95dab66f8.css">
15-
<link href="./css/site.css" rel="stylesheet">
14+
<link rel="stylesheet" href="./css/styles-18b942728f.css">
15+
<link href="css/site.css" rel="stylesheet">
1616
</head>
1717
<body id="page-top">
1818

@@ -67,7 +67,7 @@
6767

6868
<div class="subnavigation hidden-print">
6969
<h4 class="subnavigation__title">
70-
<a href=".">ZF Docs</a>
70+
<a href="">ZF Docs</a>
7171
</h4>
7272

7373
<h5 class="subnavigation__subtitle">Table of Contents</h5>
@@ -76,7 +76,7 @@ <h5 class="subnavigation__subtitle">Table of Contents</h5>
7676

7777

7878
<li class="subnavigation__list-item ">
79-
79+
<a href="404/" class="subnavigation__link">Not Found</a>
8080
</li>
8181

8282

@@ -124,6 +124,17 @@ <h1 class="header__title">
124124
</header>
125125

126126

127+
<div class="laminas-announcement">
128+
<div class="container">
129+
<div class="row">
130+
<div class="col-xs-12">
131+
Zend Framework transitions to the Linux Foundation. <a href="https://getlaminas.org">Learn More.</a>
132+
</div>
133+
</div>
134+
</div>
135+
</div>
136+
137+
127138
<div class="container">
128139
<div class="row">
129140
<div class="col-md-9 col-xs-12 content" role="main">
@@ -664,7 +675,7 @@ <h5 class="component-selector__subtitle">Find documentation…</h5>
664675

665676
<div class="subnavigation hidden-print">
666677
<h4 class="subnavigation__title">
667-
<a href=".">ZF Docs</a>
678+
<a href="">ZF Docs</a>
668679
</h4>
669680

670681
<h5 class="subnavigation__subtitle">Table of Contents</h5>
@@ -673,7 +684,7 @@ <h5 class="subnavigation__subtitle">Table of Contents</h5>
673684

674685

675686
<li class="subnavigation__list-item ">
676-
687+
<a href="404/" class="subnavigation__link">Not Found</a>
677688
</li>
678689

679690

@@ -751,9 +762,8 @@ <h4 class="footer__headline">Support</h4>
751762
var base_url = '.',
752763
siteName = 'ZF Docs';
753764
</script>
754-
<script src="./js/scripts-a978f1ec1a.js"></script>
755-
<script src="./search/require.js"></script>
756-
<script src="./search/search.js"></script>
765+
<script src="./js/scripts-0bcb0a3bb3.js"></script>
766+
<script src="search/main.js"></script>
757767

758768

759769
<div class="modal" id="mkdocs_search_modal" tabindex="-1" role="dialog" aria-labelledby="Search Modal" aria-hidden="true">
@@ -791,6 +801,6 @@ <h4 class="modal-title" id="exampleModalLabel">Search</h4>
791801
</html>
792802

793803
<!--
794-
MkDocs version : 0.17.3
795-
Build Date UTC : 2018-11-16 14:59:10
804+
MkDocs version : 1.0.4
805+
Build Date UTC : 2019-04-17 14:08:57
796806
-->

‎js/scripts-0bcb0a3bb3.js

+1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎js/scripts-a978f1ec1a.js

-10
This file was deleted.

‎search/lunr.js

+2,986
Large diffs are not rendered by default.

‎search/lunr.min.js

-7
This file was deleted.

‎search/main.js

+96
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
function getSearchTermFromLocation() {
2+
var sPageURL = window.location.search.substring(1);
3+
var sURLVariables = sPageURL.split('&');
4+
for (var i = 0; i < sURLVariables.length; i++) {
5+
var sParameterName = sURLVariables[i].split('=');
6+
if (sParameterName[0] == 'q') {
7+
return decodeURIComponent(sParameterName[1].replace(/\+/g, '%20'));
8+
}
9+
}
10+
}
11+
12+
function joinUrl (base, path) {
13+
if (path.substring(0, 1) === "/") {
14+
// path starts with `/`. Thus it is absolute.
15+
return path;
16+
}
17+
if (base.substring(base.length-1) === "/") {
18+
// base ends with `/`
19+
return base + path;
20+
}
21+
return base + "/" + path;
22+
}
23+
24+
function formatResult (location, title, summary) {
25+
return '<article><h3><a href="' + joinUrl(base_url, location) + '">'+ title + '</a></h3><p>' + summary +'</p></article>';
26+
}
27+
28+
function displayResults (results) {
29+
var search_results = document.getElementById("mkdocs-search-results");
30+
while (search_results.firstChild) {
31+
search_results.removeChild(search_results.firstChild);
32+
}
33+
if (results.length > 0){
34+
for (var i=0; i < results.length; i++){
35+
var result = results[i];
36+
var html = formatResult(result.location, result.title, result.summary);
37+
search_results.insertAdjacentHTML('beforeend', html);
38+
}
39+
} else {
40+
search_results.insertAdjacentHTML('beforeend', "<p>No results found</p>");
41+
}
42+
}
43+
44+
function doSearch () {
45+
var query = document.getElementById('mkdocs-search-query').value;
46+
if (query.length > 2) {
47+
if (!window.Worker) {
48+
displayResults(search(query));
49+
} else {
50+
searchWorker.postMessage({query: query});
51+
}
52+
} else {
53+
// Clear results for short queries
54+
displayResults([]);
55+
}
56+
}
57+
58+
function initSearch () {
59+
var search_input = document.getElementById('mkdocs-search-query');
60+
if (search_input) {
61+
search_input.addEventListener("keyup", doSearch);
62+
}
63+
var term = getSearchTermFromLocation();
64+
if (term) {
65+
search_input.value = term;
66+
doSearch();
67+
}
68+
}
69+
70+
function onWorkerMessage (e) {
71+
if (e.data.allowSearch) {
72+
initSearch();
73+
} else if (e.data.results) {
74+
var results = e.data.results;
75+
displayResults(results);
76+
}
77+
}
78+
79+
if (!window.Worker) {
80+
console.log('Web Worker API not supported');
81+
// load index in main thread
82+
$.getScript(joinUrl(base_url, "search/worker.js")).done(function () {
83+
console.log('Loaded worker');
84+
init();
85+
window.postMessage = function (msg) {
86+
onWorkerMessage({data: msg});
87+
};
88+
}).fail(function (jqxhr, settings, exception) {
89+
console.error('Could not load worker.js');
90+
});
91+
} else {
92+
// Wrap search in a web worker
93+
var searchWorker = new Worker(joinUrl(base_url, "search/worker.js"));
94+
searchWorker.postMessage({init: true});
95+
searchWorker.onmessage = onWorkerMessage;
96+
}

‎search/mustache.min.js

-1
This file was deleted.

‎search/require.js

-36
This file was deleted.

‎search/search-results-template.mustache

-4
This file was deleted.

‎search/search.js

-92
This file was deleted.

‎search/search_index.json

+1-19
Original file line numberDiff line numberDiff line change
@@ -1,19 +1 @@
1-
{
2-
"docs": [
3-
{
4-
"location": "/",
5-
"text": "",
6-
"title": "Home"
7-
},
8-
{
9-
"location": "/404/",
10-
"text": "Not Found\n\n\nThe page you were looking for cannot be found. Check the address, and try again.",
11-
"title": "Not Found"
12-
},
13-
{
14-
"location": "/404/#not-found",
15-
"text": "The page you were looking for cannot be found. Check the address, and try again.",
16-
"title": "Not Found"
17-
}
18-
]
19-
}
1+
{"config":{"lang":["en"],"prebuild_index":false,"separator":"[\\s\\-]+"},"docs":[{"location":"","text":"","title":"Home"},{"location":"404/","text":"Not Found The page you were looking for cannot be found. Check the address, and try again.","title":"Not Found"},{"location":"404/#not-found","text":"The page you were looking for cannot be found. Check the address, and try again.","title":"Not Found"}]}

‎search/text.js

-390
This file was deleted.

‎search/worker.js

+128
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,128 @@
1+
var base_path = 'function' === typeof importScripts ? '.' : '/search/';
2+
var allowSearch = false;
3+
var index;
4+
var documents = {};
5+
var lang = ['en'];
6+
var data;
7+
8+
function getScript(script, callback) {
9+
console.log('Loading script: ' + script);
10+
$.getScript(base_path + script).done(function () {
11+
callback();
12+
}).fail(function (jqxhr, settings, exception) {
13+
console.log('Error: ' + exception);
14+
});
15+
}
16+
17+
function getScriptsInOrder(scripts, callback) {
18+
if (scripts.length === 0) {
19+
callback();
20+
return;
21+
}
22+
getScript(scripts[0], function() {
23+
getScriptsInOrder(scripts.slice(1), callback);
24+
});
25+
}
26+
27+
function loadScripts(urls, callback) {
28+
if( 'function' === typeof importScripts ) {
29+
importScripts.apply(null, urls);
30+
callback();
31+
} else {
32+
getScriptsInOrder(urls, callback);
33+
}
34+
}
35+
36+
function onJSONLoaded () {
37+
data = JSON.parse(this.responseText);
38+
var scriptsToLoad = ['lunr.js'];
39+
if (data.config && data.config.lang && data.config.lang.length) {
40+
lang = data.config.lang;
41+
}
42+
if (lang.length > 1 || lang[0] !== "en") {
43+
scriptsToLoad.push('lunr.stemmer.support.js');
44+
if (lang.length > 1) {
45+
scriptsToLoad.push('lunr.multi.js');
46+
}
47+
for (var i=0; i < lang.length; i++) {
48+
if (lang[i] != 'en') {
49+
scriptsToLoad.push(['lunr', lang[i], 'js'].join('.'));
50+
}
51+
}
52+
}
53+
loadScripts(scriptsToLoad, onScriptsLoaded);
54+
}
55+
56+
function onScriptsLoaded () {
57+
console.log('All search scripts loaded, building Lunr index...');
58+
if (data.config && data.config.separator && data.config.separator.length) {
59+
lunr.tokenizer.separator = new RegExp(data.config.separator);
60+
}
61+
if (data.index) {
62+
index = lunr.Index.load(data.index);
63+
data.docs.forEach(function (doc) {
64+
documents[doc.location] = doc;
65+
});
66+
console.log('Lunr pre-built index loaded, search ready');
67+
} else {
68+
index = lunr(function () {
69+
if (lang.length === 1 && lang[0] !== "en" && lunr[lang[0]]) {
70+
this.use(lunr[lang[0]]);
71+
} else if (lang.length > 1) {
72+
this.use(lunr.multiLanguage.apply(null, lang)); // spread operator not supported in all browsers: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Spread_operator#Browser_compatibility
73+
}
74+
this.field('title');
75+
this.field('text');
76+
this.ref('location');
77+
78+
for (var i=0; i < data.docs.length; i++) {
79+
var doc = data.docs[i];
80+
this.add(doc);
81+
documents[doc.location] = doc;
82+
}
83+
});
84+
console.log('Lunr index built, search ready');
85+
}
86+
allowSearch = true;
87+
postMessage({allowSearch: allowSearch});
88+
}
89+
90+
function init () {
91+
var oReq = new XMLHttpRequest();
92+
oReq.addEventListener("load", onJSONLoaded);
93+
var index_path = base_path + '/search_index.json';
94+
if( 'function' === typeof importScripts ){
95+
index_path = 'search_index.json';
96+
}
97+
oReq.open("GET", index_path);
98+
oReq.send();
99+
}
100+
101+
function search (query) {
102+
if (!allowSearch) {
103+
console.error('Assets for search still loading');
104+
return;
105+
}
106+
107+
var resultDocuments = [];
108+
var results = index.search(query);
109+
for (var i=0; i < results.length; i++){
110+
var result = results[i];
111+
doc = documents[result.ref];
112+
doc.summary = doc.text.substring(0, 200);
113+
resultDocuments.push(doc);
114+
}
115+
return resultDocuments;
116+
}
117+
118+
if( 'function' === typeof importScripts ) {
119+
onmessage = function (e) {
120+
if (e.data.init) {
121+
init();
122+
} else if (e.data.query) {
123+
postMessage({ results: search(e.data.query) });
124+
} else {
125+
console.error("Worker - Unrecognized message: " + e);
126+
}
127+
};
128+
}

‎sitemap.xml

+4-11
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,13 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
3-
4-
53
<url>
6-
<loc>/</loc>
7-
<lastmod>2018-11-16</lastmod>
4+
<loc>None</loc>
5+
<lastmod>2019-04-17</lastmod>
86
<changefreq>daily</changefreq>
97
</url>
10-
11-
12-
138
<url>
14-
<loc>/404/</loc>
15-
<lastmod>2018-11-16</lastmod>
9+
<loc>None</loc>
10+
<lastmod>2019-04-17</lastmod>
1611
<changefreq>daily</changefreq>
1712
</url>
18-
19-
2013
</urlset>

‎sitemap.xml.gz

196 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)
This repository has been archived.