summaryrefslogtreecommitdiff
path: root/_includes/gw_tools
diff options
context:
space:
mode:
authorYehonal <yehonal.azeroth@gmail.com>2018-12-16 15:54:48 +0100
committerYehonal <yehonal.azeroth@gmail.com>2018-12-16 16:35:55 +0100
commit4a8156e08a5e3ffe540f56ecb894b951dd9b7c84 (patch)
treee14862984ffba17f4a8fe53d90b937917014827a /_includes/gw_tools
parentd910d7263f43ddce21dbab7345dd679dc5b092b6 (diff)
downloadwiki-4a8156e08a5e3ffe540f56ecb894b951dd9b7c84.tar.gz
wiki-4a8156e08a5e3ffe540f56ecb894b951dd9b7c84.tar.bz2
wiki-4a8156e08a5e3ffe540f56ecb894b951dd9b7c84.zip
Git-Wiki 2.0
Diffstat (limited to '_includes/gw_tools')
-rw-r--r--_includes/gw_tools/page_actions.html14
-rw-r--r--_includes/gw_tools/search_module.html25
-rw-r--r--_includes/gw_tools/tools.html13
3 files changed, 52 insertions, 0 deletions
diff --git a/_includes/gw_tools/page_actions.html b/_includes/gw_tools/page_actions.html
new file mode 100644
index 0000000..927b178
--- /dev/null
+++ b/_includes/gw_tools/page_actions.html
@@ -0,0 +1,14 @@
+{{page.relative_path}}
+{% if site.use_github_wiki %}
+<span class="tools-element"><a target="_blank" href="{{ site.github.repository_url }}/{{page.folder}}{{url | remove: '.html' | append: ''}}/_edit">Edit</a></span>
+<span class="tools-element"><a target="_blank" href="{{ site.github.repository_url }}/{{page.folder}}{{url | remove: '.html' | append: ''}}/_history">History</a></span>
+<span class="tools-element"><a target="_blank" href="{{ site.github.repository_url }}/{{page.folder}}{{url | remove: '.html' | append: '.md'}}/">Source</a></span>
+{% else %}
+<span class="tools-element"><a target="_blank" href="{{ site.github.repository_url }}/edit/{{site.git_branch}}{{page.folder}}{{url | remove: '.html' | append: '.md'}}">Edit</a></span>
+{% if site.use_prose_io %}
+<span class="tools-element"><a target="_blank" href="http://prose.io/#{{site.github.repository_nwo}}/edit/{{site.git_branch}}{{page.folder}}{{url | remove: '.html' | append: '.md'}}">Edit
+ with Prose.io</a></span>
+{% endif %}
+<span class="tools-element"><a target="_blank" href="{{ site.github.repository_url }}/commits/{{site.git_branch}}{{page.folder}}{{url | remove: '.html' | append: '.md'}}">History</a></span>
+<span class="tools-element"><a target="_blank" href="{{ site.github.repository_url }}/blob/{{site.git_branch}}{{page.folder}}{{url | remove: '.html' | append: '.md'}}">Source</a></span>
+{% endif %} \ No newline at end of file
diff --git a/_includes/gw_tools/search_module.html b/_includes/gw_tools/search_module.html
new file mode 100644
index 0000000..f79335a
--- /dev/null
+++ b/_includes/gw_tools/search_module.html
@@ -0,0 +1,25 @@
+{% if site.google_cse_token %}
+<script>
+ (function () {
+ var cx = "{{site.google_cse_token}}";
+ var gcse = document.createElement('script');
+ gcse.type = 'text/javascript';
+ gcse.async = true;
+ gcse.src = 'https://cse.google.com/cse.js?cx=' + cx;
+ var s = document.getElementsByTagName('script')[0];
+ s.parentNode.insertBefore(gcse, s);
+ })();
+</script>
+<gcse:search></gcse:search>
+{% else %}
+<form method="GET" action="{{ site.github.repository_url }}/search">
+ <input type="text" name="q[]" placeholder="Text to search">
+ {% if site.use_github_wiki %}
+ <input type="hidden" name="type" value="Wikis">
+ {% else %}
+ <!-- <input type="hidden" name="l" value="Markdown"> -->
+ <input type="hidden" name="q[]" value="path:/{{ site.wiki_folder }}">
+ {% endif %}
+ <input type="submit" value="Search">
+</form>
+{% endif %} \ No newline at end of file
diff --git a/_includes/gw_tools/tools.html b/_includes/gw_tools/tools.html
new file mode 100644
index 0000000..c0b50f7
--- /dev/null
+++ b/_includes/gw_tools/tools.html
@@ -0,0 +1,13 @@
+<div id="tools-buttons" style="width: 100%; text-align: right">
+ {% if site.inc_before_tools %}
+ {% include {{ site.inc_before_tools }} %}
+ {% endif %}
+
+ {% include gw_tools/page_actions.html %}
+
+ {% include gw_tools/search_module.html %}
+
+ {% if site.inc_after_tools %}
+ {% include {{ site.inc_after_tools }} %}
+ {% endif %}
+</div> \ No newline at end of file