new: resize_image

pull/2/head
José Lopes 4 years ago
parent 85c04db4ca
commit 0116cd02d4

1
.gitignore vendored

@ -1,6 +1,7 @@
# zola trash
zola
public
static/processed_images
# os trash
.DS_Store

@ -38,6 +38,7 @@ Posuere urna nec tincidunt praesent semper. Viverra mauris in aliquam sem fringi
Tristique risus `nec feugiat in fermentum` posuere. Consequat nisl vel pretium lectus
![quam id.](crt-phosphor-dots.png)
{{ resize_image(path="lorem-ipsum/crt-phosphor-dots.png", width=400, caption="Figure 1.") }}
```python
class ECB(object):

@ -0,0 +1,26 @@
{% if not width %}
{% set width = 240 %}
{% endif %}
{% if not height %}
{% if width %}
{% set height = width %}
{% else %}
{% set height = 180 %}
{% endif %}
{% endif %}
{% if not op %}
{% set op = 'fill' %}
{% endif %}
{% if caption %}
<figure>
<a href="{{ get_url(path=path) }}"><img src="{{ resize_image(path=path, width=width, height=height, op=op) }}"/></a>
<figcaption>{{ caption }}</figcaption>
</figure>
{% elif figure %}
<figure>
<img src="{{ resize_image(path=path, width=width, height=height, op=op) }}"/>
</figure>
{% else %}
<img src="{{ resize_image(path=path, width=width, height=height, op=op) }}"/>
{% endif %}

@ -2,7 +2,7 @@ name = "zola.386"
description = "Zola port of the BOOTSTRA.386 theme."
license = "MIT"
homepage = "https://github.com/lopes/zola.386"
min_version = "0.1.7"
min_version = "0.2.0"
demo = "https://zola-386.netlify.com"
[author]

Loading…
Cancel
Save