First commit

This commit is contained in:
Emilio Pinna
2018-05-21 20:14:41 +01:00
commit b81e57005a
57 changed files with 1082 additions and 0 deletions

46
_layouts/bin.html Normal file
View File

@@ -0,0 +1,46 @@
---
layout: common
---
{% capture bin_name %}{% include get_bin_name path=page.path %}{% endcapture %}
{% include page_title.html title=bin_name %}
{% include function_list.html bin=page %}
{{ page.description | markdownify }}
{% for function in page.functions %}
{% assign function_name = function[0] %}
{% assign examples = function[1] %}
<h2 id="{{ function_name }}" class="function-name">
{{- site.data.functions[function_name].label -}}
</h2>
{{ site.data.functions[function_name].description | markdownify }}
{% for example in examples %}
<div class="example">
{{ example.description | markdownify }}
{% capture code %}
{%- if function_name == 'suid-enabled' or function_name == 'suid-limited' %}
cp $(which {{ bin_name }}) .
sudo chown 0 ./{{ bin_name }}
sudo chmod +s ./{{ bin_name }}
{% endif %}
{{ example.code }}
{% endcapture %}
<pre><code>
{{- code | strip -}}
</code></pre>
</div>
{% endfor %}
{% endfor %}

22
_layouts/common.html Normal file
View File

@@ -0,0 +1,22 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>
{{ site.title }}
{% if page.url != '/' %}
|
{% if page.layout == 'bin' %}
{{ page.title | downcase }}
{% else %}
{{ page.title }}
{% endif %}
{% endif %}
</title>
<link rel="stylesheet" href="/style.css" type="text/css"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=5.0, user-scalable=yes">
</head>
<body>
{{ content }}
</body>
</html>

7
_layouts/page.html Normal file
View File

@@ -0,0 +1,7 @@
---
layout: common
---
{% include page_title.html title=page.title %}
{{ content }}