Skip to content

Commit f1e7a87

Browse files
committed
feat(docs): add daux.io docs
1 parent 86f9861 commit f1e7a87

24 files changed

+9505
-59
lines changed

Diff for: .gitignore

+2-1
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,5 @@ bower_components
55
demo
66
.idea
77
.DS_Store
8-
release.txt
8+
release.txt
9+
static

Diff for: daux/templates/content.php

+41
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
<?php $this->layout('theme::layout/05_page') ?>
2+
<article class="Page">
3+
<?php if ($params['html']['date_modified']) {
4+
?>
5+
<div class="Page__header">
6+
<h1><?= $page['breadcrumbs'] ? $this->get_breadcrumb_title($page, $base_page) : $page['title'] ?></h1>
7+
</div>
8+
<?php
9+
10+
} else {
11+
?>
12+
<div class="Page__header">
13+
<h1><?= $page['breadcrumbs'] ? $this->get_breadcrumb_title($page, $base_page) : $page['title'] ?></h1>
14+
</div>
15+
<?php
16+
17+
} ?>
18+
19+
<div class="s-content">
20+
<?= $page['content']; ?>
21+
</div>
22+
23+
<?php if (!empty($page['prev']) || !empty($page['next'])) {
24+
?>
25+
<nav>
26+
<ul class="Pager">
27+
<?php if (!empty($page['prev'])) {
28+
?><li class=Pager--prev><a href="<?= $base_url . $page['prev']->getUrl() ?>">Previous</a></li><?php
29+
30+
} ?>
31+
<?php if (!empty($page['next'])) {
32+
?><li class=Pager--next><a href="<?= $base_url . $page['next']->getUrl() ?>">Next</a></li><?php
33+
34+
} ?>
35+
</ul>
36+
</nav>
37+
<?php
38+
39+
} ?>
40+
</article>
41+

Diff for: daux/templates/error.php

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<?php $this->layout('theme::layout/05_page') ?>
2+
3+
<article class="Page">
4+
<div class="Page__header">
5+
<h1><?= $page['title']; ?></h1>
6+
</div>
7+
8+
<div class="s-content">
9+
<?= $page['content']; ?>
10+
</div>
11+
</article>

Diff for: daux/templates/home.php

+85
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
<?php $this->layout('theme::layout/00_layout') ?>
2+
<div class="Navbar hidden-print">
3+
<div class="container">
4+
<?php $this->insert('theme::partials/navbar_content', ['params' => $params]); ?>
5+
</div>
6+
</div>
7+
8+
<?php if ($params['html']['repo']) {
9+
?>
10+
<a href="https://github.com/<?= $params['html']['repo']; ?>" target="_blank" id="github-ribbon" class="Github hidden-print"><img src="https://s3.amazonaws.com/github/ribbons/forkme_right_darkblue_121621.png" alt="Fork me on GitHub"></a>
11+
<?php
12+
13+
} ?>
14+
15+
<div class="Homepage">
16+
<div class="HomepageTitle container">
17+
<?php if ($params['tagline']) {
18+
echo '<h2>' . $params['tagline'] . '</h2>';
19+
} ?>
20+
</div>
21+
22+
<div class="HomepageImage container">
23+
<?php if ($params['image']) {
24+
echo '<img class="homepage-image img-responsive" src="' . $params['image'] . '" alt="' . $params['title'] . '">';
25+
} ?>
26+
</div>
27+
28+
<div class="HomepageButtons">
29+
<div class="container">
30+
<?php
31+
if ($params['html']['repo']) {
32+
echo '<a href="https://github.com/' . $params['html']['repo'] . '" class="Button Button--secondary Button--hero">View On GitHub</a>';
33+
}
34+
foreach ($page['entry_page'] as $key => $node) {
35+
echo '<a href="' . $node . '" class="Button Button--primary Button--hero">' . $key . '</a>';
36+
}
37+
?>
38+
<div class="clearfix"></div>
39+
</div>
40+
</div>
41+
</div>
42+
43+
<div class="HomepageContent">
44+
<div class="container">
45+
<div class="container--inner">
46+
<div class="doc_content s-content">
47+
<?= $page['content']; ?>
48+
</div>
49+
</div>
50+
</div>
51+
</div>
52+
53+
<div class="HomepageFooter">
54+
<div class="container">
55+
<div class="container--inner">
56+
<?php if (!empty($params['html']['links'])) {
57+
?>
58+
<ul class="HomepageFooter__links">
59+
<?php foreach ($params['html']['links'] as $name => $url) {
60+
echo '<li><a href="' . $url . '" target="_blank">' . $name . '</a></li>';
61+
} ?>
62+
</ul>
63+
<?php
64+
65+
} ?>
66+
67+
<?php if (!empty($params['html']['twitter'])) {
68+
?>
69+
<div class="HomepageFooter__twitter">
70+
<?php foreach ($params['html']['twitter'] as $handle) {
71+
?>
72+
<div class="Twitter">
73+
<iframe allowtransparency="true" frameborder="0" scrolling="no" style="width:162px; height:20px;" src="https://platform.twitter.com/widgets/follow_button.html?screen_name=<?= $handle; ?>&amp;show_count=false"></iframe>
74+
</div>
75+
<?php
76+
77+
} ?>
78+
</div>
79+
<?php
80+
81+
} ?>
82+
</div>
83+
</div>
84+
<div class="clearfix"></div>
85+
</div>

Diff for: daux/templates/layout/00_layout.php

+84
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
<!DOCTYPE html>
2+
<!--[if lt IE 7]> <html class="no-js ie6 oldie" lang="en"> <![endif]-->
3+
<!--[if IE 7]> <html class="no-js ie7 oldie" lang="en"> <![endif]-->
4+
<!--[if IE 8]> <html class="no-js ie8 oldie" lang="en"> <![endif]-->
5+
<!--[if gt IE 8]><!--> <html class="no-js" lang="en"> <!--<![endif]-->
6+
<head>
7+
<title><?= $page['title']; ?> <?php if ($page['title'] != $params['title']) {
8+
echo '- ' . $params['title'];
9+
} ?></title>
10+
<meta name="description" content="<?= $params['tagline']; ?>" />
11+
<meta name="author" content="<?= $params['author']; ?>">
12+
<meta charset="UTF-8">
13+
<link rel="icon" href="<?= $params['theme']['favicon']; ?>" type="image/x-icon">
14+
<!-- Mobile -->
15+
<meta name="apple-mobile-web-app-capable" content="yes" />
16+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
17+
18+
<!-- Font -->
19+
<?php foreach ($params['theme']['fonts'] as $font) {
20+
echo "<link href='$font' rel='stylesheet' type='text/css'>";
21+
} ?>
22+
23+
<!-- CSS -->
24+
<?php foreach ($params['theme']['css'] as $css) {
25+
echo "<link href='$css' rel='stylesheet' type='text/css'>";
26+
} ?>
27+
28+
<?php if ($params['html']['search']) {
29+
?>
30+
<!-- Tipue Search -->
31+
<link href="<?= $base_url; ?>tipuesearch/tipuesearch.css" rel="stylesheet">
32+
<?php
33+
34+
} ?>
35+
36+
<!--[if lt IE 9]>
37+
<script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
38+
<![endif]-->
39+
</head>
40+
<body class="<?= $params['html']['float'] ? 'with-float' : ''; ?>">
41+
<?= $this->section('content'); ?>
42+
43+
<?php
44+
if ($params['html']['google_analytics']) {
45+
$this->insert('theme::partials/google_analytics', ['analytics' => $params['html']['google_analytics'], 'host' => array_key_exists('host', $params) ? $params['host'] : '']);
46+
}
47+
if ($params['html']['piwik_analytics']) {
48+
$this->insert('theme::partials/piwik_analytics', ['url' => $params['html']['piwik_analytics'], 'id' => $params['html']['piwik_analytics_id']]);
49+
}
50+
?>
51+
52+
<!-- jQuery -->
53+
<script src="<?= $base_url; ?>themes/daux/js/jquery-1.11.3.min.js"></script>
54+
55+
<!-- hightlight.js -->
56+
<script src="<?= $base_url; ?>themes/daux/js/highlight.pack.js"></script>
57+
<script>hljs.initHighlightingOnLoad();</script>
58+
59+
<!-- JS -->
60+
<?php foreach ($params['theme']['js'] as $js) {
61+
echo '<script src="' . $js . '"></script>';
62+
} ?>
63+
64+
<script src="<?= $base_url; ?>themes/daux/js/daux.js"></script>
65+
66+
<?php if ($params['html']['search']) {
67+
?>
68+
<!-- Tipue Search -->
69+
<script type="text/javascript" src="<?php echo $base_url; ?>tipuesearch/tipuesearch.js"></script>
70+
71+
<script>
72+
window.onunload = function(){}; // force $(document).ready to be called on back/forward navigation in firefox
73+
$(function() {
74+
tipuesearch({
75+
'base_url': '<?php echo $base_url?>'
76+
});
77+
});
78+
</script>
79+
<?php
80+
81+
} ?>
82+
83+
</body>
84+
</html>

Diff for: daux/templates/layout/05_page.php

+108
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,108 @@
1+
<?php $this->layout('theme::layout/00_layout') ?>
2+
3+
<?php if ($params['html']['repo']) {
4+
?>
5+
<a href="https://github.com/<?= $params['html']['repo']; ?>" target="_blank" id="github-ribbon" class="Github hidden-print"><img src="https://s3.amazonaws.com/github/ribbons/forkme_right_darkblue_121621.png" alt="Fork me on GitHub"></a>
6+
<?php
7+
8+
} ?>
9+
10+
<div class="Navbar hidden-print">
11+
<?php $this->insert('theme::partials/navbar_content', ['params' => $params]); ?>
12+
</div>
13+
<div class="Columns content">
14+
<div class="Columns__left hidden-print Collapsible">
15+
<div class="Collapsible__container">
16+
<button type="button" class="Button Collapsible__trigger">
17+
<span class="Collapsible__trigger--bar"></span>
18+
<span class="Collapsible__trigger--bar"></span>
19+
<span class="Collapsible__trigger--bar"></span>
20+
</button>
21+
</div>
22+
23+
<div class="Collapsible__content">
24+
<!-- Navigation -->
25+
<?php
26+
$rendertree = $tree;
27+
$path = '';
28+
29+
if ($page['language'] !== '') {
30+
$rendertree = $tree->value[$page['language']];
31+
$path = $page['language'];
32+
}
33+
34+
echo $this->get_navigation($rendertree, $path, isset($params['request']) ? $params['request'] : '', $base_page, $params['mode']);
35+
?>
36+
37+
38+
<div class="Links">
39+
<?php if (!empty($params['html']['links'])) {
40+
?>
41+
<hr/>
42+
<?php foreach ($params['html']['links'] as $name => $url) {
43+
?>
44+
<a href="<?= $url ?>" target="_blank"><?= $name ?></a>
45+
<br />
46+
<?php
47+
48+
} ?>
49+
<?php
50+
51+
} ?>
52+
53+
<?php if ($params['html']['toggle_code']) {
54+
?>
55+
<div class="CodeToggler">
56+
<hr/>
57+
<?php if ($params['html']['float']) {
58+
?>
59+
<span class="CodeToggler__text">Code blocks</span>
60+
<div class="ButtonGroup" role="group">
61+
<button class="Button Button--default Button--small CodeToggler__button CodeToggler__button--hide">No</button>
62+
<button class="Button Button--default Button--small CodeToggler__button CodeToggler__button--below">Below</button>
63+
<button class="Button Button--default Button--small CodeToggler__button CodeToggler__button--float">Inline</button>
64+
</div>
65+
<?php
66+
67+
} else {
68+
?>
69+
<a class="CodeToggler__button CodeToggler__button--main" href="#">Show Code Blocks Inline</a><br>
70+
<?php
71+
72+
} ?>
73+
</div>
74+
<?php
75+
76+
} ?>
77+
78+
<?php if (!empty($params['html']['twitter'])) {
79+
?>
80+
<hr/>
81+
<div class="Twitter">
82+
<?php foreach ($params['html']['twitter'] as $handle) {
83+
?>
84+
<iframe allowtransparency="true" frameborder="0" scrolling="no" style="width:162px; height:20px;" src="https://platform.twitter.com/widgets/follow_button.html?screen_name=<?= $handle; ?>&amp;show_count=false"></iframe>
85+
<br />
86+
<br />
87+
<?php
88+
89+
} ?>
90+
</div>
91+
<?php
92+
93+
} ?>
94+
</div>
95+
</div>
96+
<!-- For Mobile -->
97+
98+
99+
</div>
100+
<div class="Columns__right <?= $params['html']['float'] ? 'Columns__right--float' : ''; ?>">
101+
102+
<div class="Columns__right__content">
103+
<div class="doc_content">
104+
<?= $this->section('content'); ?>
105+
</div>
106+
</div>
107+
</div>
108+
</div>

Diff for: daux/templates/partials/google_analytics.php

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<script>
2+
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
3+
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
4+
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
5+
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
6+
7+
ga('create', '<?= $analytics ?>', '<?= $host ?>');
8+
ga('send', 'pageview');
9+
</script>

Diff for: daux/templates/partials/navbar_content.php

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<a class="Navbar__brand" href="<?= $params['base_page'] . $params['index']->getUri(); ?>"><?= $params['title']; ?></a>
2+
3+
<?php if ($params['html']['search']) {
4+
?>
5+
<div class="Search">
6+
<svg class="Search__icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 451 451"><path d="M447.05 428l-109.6-109.6c29.4-33.8 47.2-77.9 47.2-126.1C384.65 86.2 298.35 0 192.35 0 86.25 0 .05 86.3.05 192.3s86.3 192.3 192.3 192.3c48.2 0 92.3-17.8 126.1-47.2L428.05 447c2.6 2.6 6.1 4 9.5 4s6.9-1.3 9.5-4c5.2-5.2 5.2-13.8 0-19zM26.95 192.3c0-91.2 74.2-165.3 165.3-165.3 91.2 0 165.3 74.2 165.3 165.3s-74.1 165.4-165.3 165.4c-91.1 0-165.3-74.2-165.3-165.4z"/></svg>
7+
<input type="search" id="tipue_search_input" class="Search__field" placeholder="Search..." autocomplete="on" results=25 autosave=text_search>
8+
</div>
9+
<?php
10+
11+
} ?>

Diff for: daux/templates/partials/piwik_analytics.php

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
2+
<script type="text/javascript">
3+
var _paq = _paq || [];
4+
_paq.push(["trackPageView"]);
5+
_paq.push(["enableLinkTracking"]);
6+
(function() {
7+
var u=(("https:" == document.location.protocol) ? "https" : "http") + "://<?= $url ?>/";
8+
_paq.push(["setTrackerUrl", u+"piwik.php"]);
9+
_paq.push(["setSiteId", <?= $id ?>]);
10+
11+
var d=document, g=d.createElement("script"), s=d.getElementsByTagName("script")[0];
12+
g.type="text/javascript";
13+
g.defer=true; g.async=true; g.src=u+"piwik.js"; s.parentNode.insertBefore(g,s);
14+
})();
15+
</script>

0 commit comments

Comments
 (0)