Skip to content

Commit

Permalink
add footer and some build infrastrucutre
Browse files Browse the repository at this point in the history
  • Loading branch information
oetiker committed Jul 18, 2019
1 parent f5afd6d commit b98d030
Show file tree
Hide file tree
Showing 8 changed files with 3,542 additions and 23 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@
site

.venv
__pycache__
__pycache__
node_modules
19 changes: 19 additions & 0 deletions _footer.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<style>
footer {
display: flex;
}
.flex-1 {
flex: 1
}
.flex-2 {
flex: 2
}
</style>
<footer>
<div class="flex-1">
Some Stuff for the first row
</div>
<div class="flex-2">
Some Stuff for the second row
</div>
</footer>
26 changes: 4 additions & 22 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,27 +24,9 @@
coverpage: true
}
</script>
<script src="//unpkg.com/docsify/lib/docsify.min.js"></script>
<script src="//unpkg.com/docsify/lib/plugins/search.min.js"></script>
<script src="//unpkg.com/docsify/lib/plugins/zoom-image.min.js"></script>
<!-- <script>
window.$docsify = {
plugins: [
function(hook) {
var footer = [
'<hr/>',
'<footer>',
'<span><a href="https://github.com/QingWei-Li">cinwell</a> &copy;2017.</span>',
'<span>Proudly published with <a href="https://github.com/docsifyjs/docsify" target="_blank">docsify</a>.</span>',
'</footer>'
].join('');
hook.afterEach(function(html) {
return html + footer;
});
}
]
}
</script> -->
<script src="lib/docsify.min.js"></script>
<script src="lib/plugins/search.min.js"></script>
<script src="lib/plugins/zoom-image.min.js"></script>
<script src="lib/plugins/footer.js"></script>
</body>
</html>
1 change: 1 addition & 0 deletions lib/docsify.min.js

Large diffs are not rendered by default.

26 changes: 26 additions & 0 deletions lib/plugins/footer.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
/**
* docsify plugin to insert the _footer.html at the bottom of
* each page in your documentation project.
*
* copyright 2019-07-18 by IT'IS Foundation
* author [email protected]
* license MIT
*
* create _footer.html file in the root of you project and
* load this script ... done.
*/
(function(){
let install = function (hook, vm) {
let loader = new XMLHttpRequest();
let footer = "<p><tt>_footer.html</tt> not loaded yet.</p>";
loader.addEventListener("load",function(){
footer = this.response;
});
loader.open("GET", "_footer.html");
loader.send();
hook.afterEach(function(html,next) {
next(html + footer);
});
};
$docsify.plugins = [].concat(install, $docsify.plugins);
})();
1 change: 1 addition & 0 deletions lib/plugins/search.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions lib/plugins/zoom-image.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit b98d030

Please sign in to comment.