aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/_includes/snippets/header.html
diff options
context:
space:
mode:
authorEgor Tensin <Egor.Tensin@gmail.com>2017-06-24 22:54:43 +0300
committerEgor Tensin <Egor.Tensin@gmail.com>2017-06-25 05:05:48 +0300
commit9b3ad53e855764e46a9febe395b88d3ca1aeaf45 (patch)
tree9930fcc81ef6fd38cb168732bdfd6bf87a4f0828 /_includes/snippets/header.html
parentadd _drafts/ (diff)
downloadjekyll-theme-9b3ad53e855764e46a9febe395b88d3ca1aeaf45.tar.gz
jekyll-theme-9b3ad53e855764e46a9febe395b88d3ca1aeaf45.zip
add post "static vs. inline vs. namespace {"
Also includes a bunch of includes to easily add grouped code snippets to a post. They were present before, but I wiped them away during the recent major history rewriting which I still regret about.
Diffstat (limited to '_includes/snippets/header.html')
-rw-r--r--_includes/snippets/header.html14
1 files changed, 14 insertions, 0 deletions
diff --git a/_includes/snippets/header.html b/_includes/snippets/header.html
new file mode 100644
index 0000000..673fc5a
--- /dev/null
+++ b/_includes/snippets/header.html
@@ -0,0 +1,14 @@
+{% capture snippet_basename %}{{ include.snippet_path | split:"/" | last }}{% endcapture %}
+{% capture snippet_id %}{{ include.snippet_path | replace:'/','_' | replace:'.','_' }}{% endcapture %}
+<div class="panel panel-default">
+ <div class="panel-heading">
+ {% if page.snippets_collapsible %}
+ <a id="{{ snippet_id }}" data-toggle="collapse" data-parent="#accordion_{{ include.section_id }}" href="#collapse_{{ snippet_id }}">{{ snippet_basename }}</a>
+ {% else %}
+ <div id="{{ snippet_id }}">{{ snippet_basename }}</div>
+ {% endif %}
+ </div>
+ {% if page.snippets_collapsible %}
+ <div id="collapse_{{ snippet_id }}" class="panel-collapse collapse">
+ {% endif %}
+ <div class="panel-body">