Skip to content

Commit

Permalink
#55 add documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
tbela99 committed Sep 23, 2019
1 parent ad598ad commit 20c7535
Show file tree
Hide file tree
Showing 33 changed files with 2,494 additions and 606 deletions.
1,103 changes: 1,103 additions & 0 deletions Docs/dist/index.html

Large diffs are not rendered by default.

Binary file added Docs/images/Server-Timing.PNG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Docs/images/background-sync-settings.PNG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Docs/images/bg-filter.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Docs/images/cache-settings.PNG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Docs/images/cdn-settings.PNG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Docs/images/content-security-policy-settings.PNG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Docs/images/critical-css-settings.PNG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Docs/images/css-settings.PNG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Docs/images/general-settings.PNG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Docs/images/http-settings.PNG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Docs/images/images-settings.PNG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Docs/images/javascript-settings.PNG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Docs/images/network-settings.PNG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Docs/images/security-settings.PNG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Docs/images/service-worker-settings.PNG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Docs/images/web-share-target-settings.PNG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
534 changes: 0 additions & 534 deletions Docs/index.md

This file was deleted.

39 changes: 39 additions & 0 deletions Docs/src/filter.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
#!/usr/bin/env php
<?php
#
# format the side bar
#
# TODO: Fix duplicate ids

$input = file_get_contents('php://stdin');

function process($node, $level = 1) {

$node['class'] = 'nav bd-sidenav nav-level-'.$level;

foreach($node->xpath('./li/a') as $link) {

$link['class'] = 'bd-toc-link';

foreach ($link->xpath('..') as $parent) {

$parent['class'] = 'bd-toc-item';
}

foreach ($link->xpath('./following-sibling::ul') as $ul) {

process($ul, $level + 1);
}
}

return $node;
}

// add class to the toc elements
echo preg_replace_callback('#(<nav class="side-bar"[^>]+>)(.*?)(<\/nav>)#s', function ($matches) {

$xml = simplexml_load_string('<?xml version="1.0" encoding="utf-8"?>'. $matches[2]);

return $matches[1].str_replace('<?xml version="1.0" encoding="utf-8"?>', '', process($xml, 1)->asXML()).$matches[3];

}, $input);
Loading

0 comments on commit 20c7535

Please sign in to comment.