remove unused files
This commit is contained in:
1
app.py
1
app.py
@ -269,6 +269,7 @@ def main():
|
|||||||
print("rendering posts", path)
|
print("rendering posts", path)
|
||||||
render_posts(path)
|
render_posts(path)
|
||||||
elif Path(path).suffix == '.md':
|
elif Path(path).suffix == '.md':
|
||||||
|
print("rendering single post", path)
|
||||||
render_single_file(get_page_data(path), path, OUTPUT_D)
|
render_single_file(get_page_data(path), path, OUTPUT_D)
|
||||||
elif Path(path).suffix in [".csv"]:
|
elif Path(path).suffix in [".csv"]:
|
||||||
print("not compiling this file!")
|
print("not compiling this file!")
|
||||||
|
@ -1,48 +0,0 @@
|
|||||||
{%- macro inventory(compare, compareWith) -%}
|
|
||||||
{%- set ns = namespace(has_inventory=false) -%}
|
|
||||||
{%- for item in documents.inventory -%}
|
|
||||||
{%- if (item[compare]) -%}
|
|
||||||
{%- if (item[compare].capitalize() | slugify) == (compareWith.capitalize() | slugify) -%}
|
|
||||||
{%- set ns.has_inventory = true -%}
|
|
||||||
|
|
||||||
{%- endif -%}
|
|
||||||
{%- endif -%}
|
|
||||||
{%- endfor -%}
|
|
||||||
|
|
||||||
{%- if ns.has_inventory -%}
|
|
||||||
<table>
|
|
||||||
<thead>
|
|
||||||
<tr>
|
|
||||||
<th>Name</th>
|
|
||||||
<th>Value</th>
|
|
||||||
<th>type</th>
|
|
||||||
<th>Where</th>
|
|
||||||
<th>When</th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody>
|
|
||||||
{%- for item in documents.inventory -%}
|
|
||||||
{%- if (item[compare]) -%}
|
|
||||||
{%- if (item[compare].capitalize() | slugify)== compareWith -%}
|
|
||||||
<tr>
|
|
||||||
<td>{{item.Name}}</td>
|
|
||||||
<td>{{item.Value}}</td>
|
|
||||||
|
|
||||||
<td><a href="/components/{{item.type | slugify}}.html">{{item.type}}</a></td>
|
|
||||||
|
|
||||||
<td><a href="/devices/{{item.Where | slugify}}.html">{{item.Where}}</a></td>
|
|
||||||
<td>{{item.Date}}</td>
|
|
||||||
</tr>
|
|
||||||
{%- endif -%}
|
|
||||||
{%- else -%}
|
|
||||||
other {{compare}} {{item}}
|
|
||||||
{%- endif -%}
|
|
||||||
{%- endfor -%}
|
|
||||||
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
|
|
||||||
{%- else -%}
|
|
||||||
No components were identified yet {{compare}} {{compareWith}}
|
|
||||||
{%- endif -%}
|
|
||||||
{%- endmacro -%}
|
|
@ -1,32 +0,0 @@
|
|||||||
|
|
||||||
{% if documents[type]|length > 0 %}
|
|
||||||
<ul class='list--{{ layout }}'>
|
|
||||||
|
|
||||||
{% for item in documents[type]|sort(attribute="filename") %}
|
|
||||||
|
|
||||||
|
|
||||||
<li class="list__item">
|
|
||||||
{% if layout == "list" %}
|
|
||||||
|
|
||||||
<span class="date">{{ item['start_datetime'] | prettydate }} </span>
|
|
||||||
<b>{{ item['title'] }}</b>
|
|
||||||
{% else %}
|
|
||||||
|
|
||||||
{% if item['image'] %}
|
|
||||||
<img src="{{ item['image'] }}" class="m-0" alt="" />
|
|
||||||
{% endif %}
|
|
||||||
<h5 class="m-0" ><a href="/{{ type }}/{{ item['slug'] }}.html">{{ item['title'] }}</a></h5>
|
|
||||||
{% if item['excerpt'] %}
|
|
||||||
<p>{{ item['excerpt'] }}</p>
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
|
|
||||||
{% endif %}
|
|
||||||
</li>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
{% endfor %}
|
|
||||||
|
|
||||||
</ul>
|
|
||||||
{% endif %}
|
|
@ -1,13 +0,0 @@
|
|||||||
{%- macro showCircuit(content) -%}
|
|
||||||
{% if content['pcb'] %}
|
|
||||||
<article template-type="circuit">
|
|
||||||
<header class="sm">
|
|
||||||
<h2>Paper circuit: {{content['title']}}</h2>
|
|
||||||
</header>
|
|
||||||
|
|
||||||
<section class="section--pcb">
|
|
||||||
<img src="{{ content['pcb']}}" class="media--pcb" />
|
|
||||||
</section>
|
|
||||||
</article>
|
|
||||||
{% endif %}
|
|
||||||
{%- endmacro -%}
|
|
@ -1,24 +0,0 @@
|
|||||||
{% from 'snippets/page-detail.jinja' import showDetail with context %}
|
|
||||||
{% from 'snippets/page-front.jinja' import pageFront with context %}
|
|
||||||
{% from 'snippets/page-circuit.jinja' import showCircuit with context %}
|
|
||||||
|
|
||||||
|
|
||||||
{%- macro showCoverPage(chapter, documents, index) -%}
|
|
||||||
<section class="meta">
|
|
||||||
<span data-chapter-title>{{chapter['title']}}</span>
|
|
||||||
</section>
|
|
||||||
<header class="page--cover">
|
|
||||||
|
|
||||||
<h3>Chapter {{index}}</h3>
|
|
||||||
<h1>{{chapter['title']}}</h1>
|
|
||||||
|
|
||||||
{% if chapter['nested'] %}
|
|
||||||
|
|
||||||
<ul class="list--frontpage">
|
|
||||||
{% for nest in documents[chapter['nested']] %}
|
|
||||||
<li><h3>{{nest['title']}} +<ins> (pagenr/link)</ins></h3></li>
|
|
||||||
{% endfor %}
|
|
||||||
</ul>
|
|
||||||
{% endif %}
|
|
||||||
</header>
|
|
||||||
{%- endmacro -%}
|
|
@ -1,84 +0,0 @@
|
|||||||
{%- macro showDetail(content, parentChapter) -%}
|
|
||||||
<article>
|
|
||||||
<section class="meta">
|
|
||||||
<span data-chapter-title>{{content['title']}}</span>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
<header>
|
|
||||||
|
|
||||||
<h2>[[chapter title]]</h2>
|
|
||||||
|
|
||||||
<h1>{{content['title']}}</h1>
|
|
||||||
|
|
||||||
{% if content['alsoKnownAs'] %}
|
|
||||||
<h5>Also known as {{content['alsoKnownAs']}}</h5>
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
{% if content['shortDescription'] %}
|
|
||||||
<p>{{content['shortDescription'] }}</p>
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
{% if content['sample'] %}
|
|
||||||
<div class="sample fn-sample">
|
|
||||||
<audio src="{{ content['sample'] }}"></audio>
|
|
||||||
<svg class="icon play" width="12" height="13" viewBox="0 0 12 13" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
||||||
<path d="M4 2.52588V9.52588L9.5 6.02588L4 2.52588Z" fill="black"/>
|
|
||||||
</svg>
|
|
||||||
<svg width="12" height="12" viewBox="0 0 12 12" fill="none" class="icon pause" xmlns="http://www.w3.org/2000/svg">
|
|
||||||
<path d="M3 9.5H5V2.5H3V9.5ZM7 2.5V9.5H9V2.5H7Z" fill="black"/>
|
|
||||||
</svg>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<label for="">play sample (web only)</label>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
{% endif %}
|
|
||||||
</header>
|
|
||||||
{% if content['BOM'] %}
|
|
||||||
<aside>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<h4>BOM</h4>
|
|
||||||
<ul>
|
|
||||||
{% for thing in content['BOM'] %}
|
|
||||||
<li>
|
|
||||||
{% if thing['type'] %}
|
|
||||||
{% if thing['label'] %}{{ thing['label'] }}{% endif %}
|
|
||||||
{{ thing['count'] }}
|
|
||||||
{{ thing['value'] }}
|
|
||||||
<a href="/components/{{ thing['type'] |slugify }}.html">{{thing['type']}}</a>
|
|
||||||
{% else %}
|
|
||||||
{{ thing }}
|
|
||||||
{% endif %}
|
|
||||||
</li>
|
|
||||||
{% endfor %}
|
|
||||||
</ul>
|
|
||||||
</aside>
|
|
||||||
{% endif %}
|
|
||||||
<section>
|
|
||||||
{{content['body']}}
|
|
||||||
</section>
|
|
||||||
|
|
||||||
{% if content['image'] %}<img
|
|
||||||
src="{{ content['image'] }}"
|
|
||||||
alt=""
|
|
||||||
/>{% endif %} {% if content['material'] %}
|
|
||||||
|
|
||||||
<dl>
|
|
||||||
<dt>Material</dt>
|
|
||||||
<dd>{{content['material']}}</dd>
|
|
||||||
<dt>Usage</dt>
|
|
||||||
<dd>{{content['usage']}}</dd>
|
|
||||||
<dt>Typically found in</dt>
|
|
||||||
<dd>{{content['whereToFind']}}</dd>
|
|
||||||
{% if content['schematicSymbol'] %}
|
|
||||||
<dt>Schematic symbol</dt>
|
|
||||||
<dd><img src="{{content['schematicSymbol']}}" /></dd>
|
|
||||||
{% endif %}
|
|
||||||
</dl>
|
|
||||||
{% endif %}
|
|
||||||
</article>
|
|
||||||
{%- endmacro -%}
|
|
@ -1,30 +0,0 @@
|
|||||||
{%- macro showFront(content) -%}
|
|
||||||
<article>
|
|
||||||
<section class="meta">
|
|
||||||
<span data-chapter-title>{{detail['title']}}</span>
|
|
||||||
</section>
|
|
||||||
<header>
|
|
||||||
<h1>{{detail['title']}}</h1>
|
|
||||||
<h5>Also known as {{detail['alsoKnownAs']}}</h5>
|
|
||||||
</header>
|
|
||||||
|
|
||||||
{% if detail['image'] %}<img src="{{ detail['image'] }}" alt="" />{% endif %}
|
|
||||||
|
|
||||||
<dl>
|
|
||||||
<dt>Material</dt>
|
|
||||||
<dd>{{detail['material']}}</dd>
|
|
||||||
<dt>Usage</dt>
|
|
||||||
<dd>{{detail['usage']}}</dd>
|
|
||||||
<dt>Typically found in</dt>
|
|
||||||
<dd>{{detail['whereToFind']}}</dd>
|
|
||||||
{% if detail['schematicSymbol'] %}
|
|
||||||
<dt>Schematic symbol</dt>
|
|
||||||
<dd><img src="{{detail['schematicSymbol']}}" /></dd>
|
|
||||||
{% endif %}
|
|
||||||
</dl>
|
|
||||||
|
|
||||||
|
|
||||||
{{detail['body']}}
|
|
||||||
|
|
||||||
</article>
|
|
||||||
{%- endmacro -%}
|
|
@ -1,14 +0,0 @@
|
|||||||
{% from 'snippets/page-detail.jinja' import showDetail with context %}
|
|
||||||
{% from 'snippets/page-front.jinja' import pageFront with context %}
|
|
||||||
{% from 'snippets/page-circuit.jinja' import showCircuit with context %}
|
|
||||||
|
|
||||||
|
|
||||||
{%- macro showNestedPages(chapter, documents) -%}
|
|
||||||
{% if chapter['nested']%}
|
|
||||||
<pre>{{ documents[chapter['nested']]|length }} </pre>
|
|
||||||
{% for nest in documents[chapter['nested']] %}
|
|
||||||
{{ showDetail(nest, chapter) }}
|
|
||||||
{{ showCircuit(nest) }}
|
|
||||||
{% endfor %}
|
|
||||||
{% endif %}
|
|
||||||
{%- endmacro -%}
|
|
Reference in New Issue
Block a user