improvements, especially images & arbitrary downloads
This commit is contained in:
parent
0df286192a
commit
7f881ff79d
8 changed files with 45 additions and 24 deletions
|
|
@ -8,4 +8,5 @@
|
|||
scad: main.scad
|
||||
flags: -Dsize=[1,4,9]
|
||||
stl: gen/monolith.stl
|
||||
images: ['gen/monolith.png']
|
||||
images: ['gen/monolith.png', 'HAL_2001_monolith.jpg']
|
||||
downloads: ['monolith.txt']
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@
|
|||
<div class="wrapper">
|
||||
<div id="header">
|
||||
<div class="container">
|
||||
<h1>MySTL</h1>
|
||||
<h1>{{ page.title }}</h1>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
@ -40,7 +40,7 @@
|
|||
<div class="container">
|
||||
<p>
|
||||
|
||||
This 3D printable project is offered under <a href="{{ relative }}LICENSE.html">an open source license</a>. The site is built with software under <a href="{{ relative }}other-licenses.html">various open source licenses</a>.
|
||||
This 3D printable project is offered under <a href="{{ relative }}LICENSE.html">an open source license</a>. The site is built with software under <a href="{{ relative }}other-licenses.html">various open source licenses</a>. Create your own MySTL site with cookiecutter-mystl (coming soon!).
|
||||
|
||||
</p>
|
||||
<a class="pull-right" href="#">Back to top</a>
|
||||
|
|
|
|||
2
_lib/readfile.scad
Normal file
2
_lib/readfile.scad
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
CONVEXITY=4;
|
||||
import(input, convexity=CONVEXITY);
|
||||
|
|
@ -44,7 +44,7 @@ MAKE_STL_PNG = """
|
|||
{target}: {src}
|
||||
\t$(ECHO) $target
|
||||
\t$(Q)mkdir -p $(dir {target})
|
||||
\t$(Q)openscad --imgsize=2048,2048 -o {target}.tmp.png -d {target}.d $(SCAD_FLAGS) {flags} -Dinput=\\\"{src}\\\" readfile.scad
|
||||
\t$(Q)openscad --imgsize=2048,2048 -o {target}.tmp.png -d {target}.d $(SCAD_FLAGS) {flags} -Dinput=\\\"{src}\\\" _lib/readfile.scad
|
||||
\t$(Q)convert -geometry 25% {target}.tmp.png {target}
|
||||
\t$(Q)rm -f {target}.tmp.png
|
||||
default:: {target}
|
||||
|
|
|
|||
49
index.md
49
index.md
|
|
@ -1,13 +1,16 @@
|
|||
---
|
||||
layout: base
|
||||
title: MySTL
|
||||
title: MySTL Demonstration page
|
||||
---
|
||||
|
||||
|
||||
|
||||
{% for asset in site.data.assets %}
|
||||
{% assign stlbasename = asset.stl | split: "/" | last | split: "." | first %}
|
||||
### {{ asset.name }}
|
||||
{% for image in asset.images %}
|
||||
{% if asset.stl %}
|
||||
{% assign basename = image | split: "/" | last | split: "." | first %}
|
||||
{% if basename == stlbasename %}
|
||||
<img src="{{ relative }}resources/{{ image }}" title="{{ asset.name }}" data-stl="{{ relative }}resources/{{ asset.stl }}">
|
||||
{% else %}
|
||||
<img src="{{ relative }}resources/{{ image }}" title="{{ asset.name }}">
|
||||
|
|
@ -17,32 +20,38 @@ title: MySTL
|
|||
|
||||
{% comment %}
|
||||
Sections to consider adding:
|
||||
# How I made this
|
||||
# Print Settings
|
||||
# Remixed from
|
||||
## How I made this
|
||||
## Print Settings
|
||||
## Remixed from
|
||||
{% endcomment %}
|
||||
|
||||
## Downloads
|
||||
|
||||
{% for asset in site.data.assets %}
|
||||
- {{ asset.name }}:
|
||||
### {{ asset.name }}:
|
||||
|
||||
{{ asset.notes }}
|
||||
{% if asset.scad %}
|
||||
{% assign basename = asset.scad | split: "/" | last %}
|
||||
- [{{ basename }}](resources/{{ asset.scad }})
|
||||
{{ asset.notes }}
|
||||
|
||||
{% if asset.flags %}
|
||||
STL generated with `{{ asset.flags }}`
|
||||
{% endif %}
|
||||
|
||||
{% if asset.scad %}
|
||||
{% assign basename = asset.scad | split: "/" | last %}
|
||||
- [{{ basename }}](resources/{{ asset.scad }})
|
||||
{% endif %}
|
||||
{% if asset.stl %}
|
||||
{% assign basename = asset.stl | split: "/" | last %}
|
||||
- [{{ basename }}](resources/{{ asset.stl }})
|
||||
{% endif %}
|
||||
{% if asset.stl %}
|
||||
{% assign basename = asset.stl | split: "/" | last %}
|
||||
- [{{ basename }}](resources/{{ asset.stl }})
|
||||
{% endif %}
|
||||
{% if asset.svg %}
|
||||
{% assign basename = asset.svg | split: "/" | last %}
|
||||
- [{{ asset.name }} - {{ basename }}](resources/{{ asset.svg }})
|
||||
{% endif %}
|
||||
{% if asset.flags %}
|
||||
Generated with `{{ asset.flags }}`
|
||||
{% if asset.svg %}
|
||||
{% assign basename = asset.svg | split: "/" | last %}
|
||||
- [{{ basename }}](resources/{{ asset.svg }})
|
||||
{% endif %}
|
||||
{% for download in asset.downloads %}
|
||||
{% assign basename = download | split: "/" | last %}
|
||||
- [{{ basename }}](resources/{{ download }})
|
||||
{% endfor %}
|
||||
{% endfor %}
|
||||
|
||||
|
||||
|
|
|
|||
BIN
resources/HAL_2001_monolith.jpg
Normal file
BIN
resources/HAL_2001_monolith.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 78 KiB |
9
resources/monolith.txt
Normal file
9
resources/monolith.txt
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
The next time you see the full moon high in the south, look carefully at its
|
||||
right-hand edge and let your eye travel upward along the curve of the disk.
|
||||
Round about two o'clock you will notice a small, dark oval: anyone with normal
|
||||
eyesight can find it quite easily. It is the great walled plain, one of the
|
||||
finest on the Moon, known as the Mare Crisium---the Sea of Crises. Three hundred
|
||||
miles in diameter, and almost completely surrounded by a ring of magnificent
|
||||
mountains, it had never been explored until we entered it in the late summer of
|
||||
1996.
|
||||
[extract from SENTINEL OF ETERNITY (1951) by Arthur C. Clarke]
|
||||
Loading…
Reference in a new issue