Add support for responsive images (#439)
1
Gemfile
|
|
@ -6,6 +6,7 @@ group :jekyll_plugins do
|
|||
gem 'jekyll-feed'
|
||||
gem 'jekyll-github-metadata'
|
||||
gem 'jekyll-paginate-v2'
|
||||
gem 'jekyll-responsive-image'
|
||||
gem 'jekyll-scholar'
|
||||
gem 'jekyll-sitemap'
|
||||
gem 'jekyll-target-blank'
|
||||
|
|
|
|||
19
_config.yml
|
|
@ -144,6 +144,7 @@ plugins:
|
|||
- jekyll-feed
|
||||
- jekyll-github-metadata
|
||||
- jekyll-paginate-v2
|
||||
- jekyll-responsive-image
|
||||
- jekyll-sitemap
|
||||
- jekyll-target-blank
|
||||
- jekyll-twitter-plugin
|
||||
|
|
@ -181,6 +182,24 @@ scholar:
|
|||
|
||||
query: "@*"
|
||||
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# Jekyll Responsive Images
|
||||
# -----------------------------------------------------------------------------
|
||||
|
||||
responsive_image:
|
||||
template: _includes/responsive_img.html
|
||||
# Quality to use when resizing images.
|
||||
default_quality: 80
|
||||
sizes:
|
||||
- width: 480
|
||||
- width: 800
|
||||
- width: 1400
|
||||
quality: 90
|
||||
# Strip EXIF and other JPEG profiles. Helps to minimize JPEG size.
|
||||
strip: true
|
||||
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# Jekyll Diagrams
|
||||
# -----------------------------------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -6,7 +6,10 @@
|
|||
{% endif %}
|
||||
<div class="card hoverable">
|
||||
{% if project.img %}
|
||||
<img src="{{ project.img | relative_url }}" alt="project thumbnail">
|
||||
{% responsive_image_block %}
|
||||
path: {{ project.img }}
|
||||
alt: "project thumbnail"
|
||||
{% endresponsive_image_block %}
|
||||
{% endif %}
|
||||
<div class="card-body">
|
||||
<h2 class="card-title text-lowercase">{{ project.title }}</h2>
|
||||
|
|
|
|||
|
|
@ -8,7 +8,10 @@
|
|||
<div class="row g-0">
|
||||
{% if project.img %}
|
||||
<div class="card-img col-md-6">
|
||||
<img src="{{ project.img | relative_url }}" alt="project thumbnail">
|
||||
{% responsive_image_block %}
|
||||
path: {{ project.img }}
|
||||
alt: "project thumbnail"
|
||||
{% endresponsive_image_block %}
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
{% else %}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,8 @@
|
|||
{% assign largest = resized | sort: 'width' | last %}
|
||||
{% capture srcset %}
|
||||
{% for i in resized %}
|
||||
{{ i.path | relative_url }} {{ i.width }}w,
|
||||
{% endfor %}
|
||||
{% endcapture %}
|
||||
|
||||
<img {% if class %}class="{{ class }}"{% endif %} src="{{ largest.path | relative_url }}" srcset="{{ srcset | strip_newlines }}/ {{ path }} {{ original.width }}w" {% if alt %}alt="{{ alt }}"{% endif %} {% if title %}title="{{ title }}"{% endif %} {% if zoomable %}data-zoomable{% endif %}/>
|
||||
|
|
@ -15,7 +15,10 @@ layout: default
|
|||
{% if page.profile %}
|
||||
<div class="profile float-{% if page.profile.align == 'left' %}left{% else %}right{% endif %}">
|
||||
{% if page.profile.image %}
|
||||
<img class="img-fluid z-depth-1 rounded" src="{{ page.profile.image | prepend: '/assets/img/' | relative_url }}">
|
||||
{% responsive_image_block %}
|
||||
path: {{ page.profile.image | prepend: 'assets/img/' }}
|
||||
class: "img-fluid z-depth-1 rounded"
|
||||
{% endresponsive_image_block %}
|
||||
{% endif %}
|
||||
{% if page.profile.address %}
|
||||
<div class="address">
|
||||
|
|
|
|||
|
|
@ -8,10 +8,10 @@ This is an example post with image galleries.
|
|||
|
||||
<div class="row mt-3">
|
||||
<div class="col-sm mt-3 mt-md-0">
|
||||
<img class="img-fluid rounded z-depth-1" src="{{ site.baseurl }}/assets/img/9.jpg">
|
||||
{% responsive_image path: assets/img/9.jpg class: "img-fluid rounded z-depth-1" %}
|
||||
</div>
|
||||
<div class="col-sm mt-3 mt-md-0">
|
||||
<img class="img-fluid rounded z-depth-1" src="{{ site.baseurl }}/assets/img/7.jpg">
|
||||
{% responsive_image path: assets/img/7.jpg class: "img-fluid rounded z-depth-1" %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="caption">
|
||||
|
|
@ -23,10 +23,10 @@ Simply add `data-zoomable` to `<img>` tags that you want to make zoomable.
|
|||
|
||||
<div class="row mt-3">
|
||||
<div class="col-sm mt-3 mt-md-0">
|
||||
<img class="img-fluid rounded z-depth-1" src="{{ site.baseurl }}/assets/img/8.jpg" data-zoomable>
|
||||
{% responsive_image path: assets/img/8.jpg class: "img-fluid rounded z-depth-1" zoomable: true %}
|
||||
</div>
|
||||
<div class="col-sm mt-3 mt-md-0">
|
||||
<img class="img-fluid rounded z-depth-1" src="{{ site.baseurl }}/assets/img/10.jpg" data-zoomable>
|
||||
{% responsive_image path: assets/img/10.jpg class: "img-fluid rounded z-depth-1" zoomable: true %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
@ -34,12 +34,12 @@ The rest of the images in this post are all zoomable, arranged into different mi
|
|||
|
||||
<div class="row mt-3">
|
||||
<div class="col-sm mt-3 mt-md-0">
|
||||
<img class="img-fluid rounded z-depth-1" src="{{ site.baseurl }}/assets/img/11.jpg" data-zoomable>
|
||||
{% responsive_image path: assets/img/11.jpg class: "img-fluid rounded z-depth-1" zoomable: true %}
|
||||
</div>
|
||||
<div class="col-sm mt-3 mt-md-0">
|
||||
<img class="img-fluid rounded z-depth-1" src="{{ site.baseurl }}/assets/img/12.jpg" data-zoomable>
|
||||
{% responsive_image path: assets/img/12.jpg class: "img-fluid rounded z-depth-1" zoomable: true %}
|
||||
</div>
|
||||
<div class="col-sm mt-3 mt-md-0">
|
||||
<img class="img-fluid rounded z-depth-1" src="{{ site.baseurl }}/assets/img/7.jpg" data-zoomable>
|
||||
{% responsive_image path: assets/img/7.jpg class: "img-fluid rounded z-depth-1" zoomable: true %}
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
layout: page
|
||||
title: project 1
|
||||
description: a project with a background image
|
||||
img: /assets/img/12.jpg
|
||||
img: assets/img/12.jpg
|
||||
importance: 1
|
||||
category: work
|
||||
---
|
||||
|
|
@ -22,13 +22,13 @@ To give your project a background in the portfolio page, just add the img tag to
|
|||
|
||||
<div class="row">
|
||||
<div class="col-sm mt-3 mt-md-0">
|
||||
<img class="img-fluid rounded z-depth-1" src="{{ '/assets/img/1.jpg' | relative_url }}" alt="" title="example image"/>
|
||||
{% responsive_image path: assets/img/1.jpg title: "example image" class: "img-fluid rounded z-depth-1" %}
|
||||
</div>
|
||||
<div class="col-sm mt-3 mt-md-0">
|
||||
<img class="img-fluid rounded z-depth-1" src="{{ '/assets/img/3.jpg' | relative_url }}" alt="" title="example image"/>
|
||||
{% responsive_image path: assets/img/3.jpg title: "example image" class: "img-fluid rounded z-depth-1" %}
|
||||
</div>
|
||||
<div class="col-sm mt-3 mt-md-0">
|
||||
<img class="img-fluid rounded z-depth-1" src="{{ '/assets/img/5.jpg' | relative_url }}" alt="" title="example image"/>
|
||||
{% responsive_image path: assets/img/5.jpg title: "example image" class: "img-fluid rounded z-depth-1" %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="caption">
|
||||
|
|
@ -36,7 +36,7 @@ To give your project a background in the portfolio page, just add the img tag to
|
|||
</div>
|
||||
<div class="row">
|
||||
<div class="col-sm mt-3 mt-md-0">
|
||||
<img class="img-fluid rounded z-depth-1" src="{{ '/assets/img/5.jpg' | relative_url }}" alt="" title="example image"/>
|
||||
{% responsive_image path: assets/img/5.jpg title: "example image" class: "img-fluid rounded z-depth-1" %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="caption">
|
||||
|
|
@ -50,10 +50,10 @@ You describe how you toiled, sweated, *bled* for your project, and then... you r
|
|||
|
||||
<div class="row justify-content-sm-center">
|
||||
<div class="col-sm-8 mt-3 mt-md-0">
|
||||
<img class="img-fluid rounded z-depth-1" src="{{ '/assets/img/6.jpg' | relative_url }}" alt="" title="example image"/>
|
||||
{% responsive_image path: assets/img/6.jpg title: "example image" class: "img-fluid rounded z-depth-1" %}
|
||||
</div>
|
||||
<div class="col-sm-4 mt-3 mt-md-0">
|
||||
<img class="img-fluid rounded z-depth-1" src="{{ '/assets/img/11.jpg' | relative_url }}" alt="" title="example image"/>
|
||||
{% responsive_image path: assets/img/11.jpg title: "example image" class: "img-fluid rounded z-depth-1" %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="caption">
|
||||
|
|
@ -66,13 +66,15 @@ Just wrap your images with `<div class="col-sm">` and place them inside `<div cl
|
|||
To make images responsive, add `img-fluid` class to each; for rounded corners and shadows use `rounded` and `z-depth-1` classes.
|
||||
Here's the code for the last row of images above:
|
||||
|
||||
{% raw %}
|
||||
```html
|
||||
<div class="row justify-content-sm-center">
|
||||
<div class="col-sm-8 mt-3 mt-md-0">
|
||||
<img class="img-fluid rounded z-depth-1" src="{{ '/assets/img/6.jpg' | relative_url }}" alt="" title="example image"/>
|
||||
{% responsive_image path: assets/img/6.jpg title: "example image" class: "img-fluid rounded z-depth-1" %}
|
||||
</div>
|
||||
<div class="col-sm-4 mt-3 mt-md-0">
|
||||
<img class="img-fluid rounded z-depth-1" src="{{ '/assets/img/11.jpg' | relative_url }}" alt="" title="example image"/>
|
||||
{% responsive_image path: assets/img/11.jpg title: "example image" class: "img-fluid rounded z-depth-1" %}
|
||||
</div>
|
||||
</div>
|
||||
```
|
||||
{% endraw %}
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
layout: page
|
||||
title: project 2
|
||||
description: a project with a background image
|
||||
img: /assets/img/3.jpg
|
||||
img: assets/img/3.jpg
|
||||
importance: 2
|
||||
category: work
|
||||
---
|
||||
|
|
@ -22,13 +22,13 @@ To give your project a background in the portfolio page, just add the img tag to
|
|||
|
||||
<div class="row">
|
||||
<div class="col-sm mt-3 mt-md-0">
|
||||
<img class="img-fluid rounded z-depth-1" src="{{ '/assets/img/1.jpg' | relative_url }}" alt="" title="example image"/>
|
||||
{% responsive_image path: assets/img/1.jpg title: "example image" class: "img-fluid rounded z-depth-1" %}
|
||||
</div>
|
||||
<div class="col-sm mt-3 mt-md-0">
|
||||
<img class="img-fluid rounded z-depth-1" src="{{ '/assets/img/3.jpg' | relative_url }}" alt="" title="example image"/>
|
||||
{% responsive_image path: assets/img/3.jpg title: "example image" class: "img-fluid rounded z-depth-1" %}
|
||||
</div>
|
||||
<div class="col-sm mt-3 mt-md-0">
|
||||
<img class="img-fluid rounded z-depth-1" src="{{ '/assets/img/5.jpg' | relative_url }}" alt="" title="example image"/>
|
||||
{% responsive_image path: assets/img/5.jpg title: "example image" class: "img-fluid rounded z-depth-1" %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="caption">
|
||||
|
|
@ -36,7 +36,7 @@ To give your project a background in the portfolio page, just add the img tag to
|
|||
</div>
|
||||
<div class="row">
|
||||
<div class="col-sm mt-3 mt-md-0">
|
||||
<img class="img-fluid rounded z-depth-1" src="{{ '/assets/img/5.jpg' | relative_url }}" alt="" title="example image"/>
|
||||
{% responsive_image path: assets/img/5.jpg title: "example image" class: "img-fluid rounded z-depth-1" %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="caption">
|
||||
|
|
@ -50,10 +50,10 @@ You describe how you toiled, sweated, *bled* for your project, and then... you r
|
|||
|
||||
<div class="row justify-content-sm-center">
|
||||
<div class="col-sm-8 mt-3 mt-md-0">
|
||||
<img class="img-fluid rounded z-depth-1" src="{{ '/assets/img/6.jpg' | relative_url }}" alt="" title="example image"/>
|
||||
{% responsive_image path: assets/img/6.jpg title: "example image" class: "img-fluid rounded z-depth-1" %}
|
||||
</div>
|
||||
<div class="col-sm-4 mt-3 mt-md-0">
|
||||
<img class="img-fluid rounded z-depth-1" src="{{ '/assets/img/11.jpg' | relative_url }}" alt="" title="example image"/>
|
||||
{% responsive_image path: assets/img/11.jpg title: "example image" class: "img-fluid rounded z-depth-1" %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="caption">
|
||||
|
|
@ -66,13 +66,15 @@ Just wrap your images with `<div class="col-sm">` and place them inside `<div cl
|
|||
To make images responsive, add `img-fluid` class to each; for rounded corners and shadows use `rounded` and `z-depth-1` classes.
|
||||
Here's the code for the last row of images above:
|
||||
|
||||
{% raw %}
|
||||
```html
|
||||
<div class="row justify-content-sm-center">
|
||||
<div class="col-sm-8 mt-3 mt-md-0">
|
||||
<img class="img-fluid rounded z-depth-1" src="{{ '/assets/img/6.jpg' | relative_url }}" alt="" title="example image"/>
|
||||
{% responsive_image path: assets/img/6.jpg title: "example image" class: "img-fluid rounded z-depth-1" %}
|
||||
</div>
|
||||
<div class="col-sm-4 mt-3 mt-md-0">
|
||||
<img class="img-fluid rounded z-depth-1" src="{{ '/assets/img/11.jpg' | relative_url }}" alt="" title="example image"/>
|
||||
{% responsive_image path: assets/img/11.jpg title: "example image" class: "img-fluid rounded z-depth-1" %}
|
||||
</div>
|
||||
</div>
|
||||
```
|
||||
{% endraw %}
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
layout: page
|
||||
title: project 3
|
||||
description: a project that redirects to another website
|
||||
img: /assets/img/7.jpg
|
||||
img: assets/img/7.jpg
|
||||
redirect: https://unsplash.com
|
||||
importance: 3
|
||||
category: work
|
||||
|
|
@ -23,13 +23,13 @@ To give your project a background in the portfolio page, just add the img tag to
|
|||
|
||||
<div class="row">
|
||||
<div class="col-sm mt-3 mt-md-0">
|
||||
<img class="img-fluid rounded z-depth-1" src="{{ '/assets/img/1.jpg' | relative_url }}" alt="" title="example image"/>
|
||||
{% responsive_image path: assets/img/1.jpg title: "example image" class: "img-fluid rounded z-depth-1" %}
|
||||
</div>
|
||||
<div class="col-sm mt-3 mt-md-0">
|
||||
<img class="img-fluid rounded z-depth-1" src="{{ '/assets/img/3.jpg' | relative_url }}" alt="" title="example image"/>
|
||||
{% responsive_image path: assets/img/3.jpg title: "example image" class: "img-fluid rounded z-depth-1" %}
|
||||
</div>
|
||||
<div class="col-sm mt-3 mt-md-0">
|
||||
<img class="img-fluid rounded z-depth-1" src="{{ '/assets/img/5.jpg' | relative_url }}" alt="" title="example image"/>
|
||||
{% responsive_image path: assets/img/5.jpg title: "example image" class: "img-fluid rounded z-depth-1" %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="caption">
|
||||
|
|
@ -37,7 +37,7 @@ To give your project a background in the portfolio page, just add the img tag to
|
|||
</div>
|
||||
<div class="row">
|
||||
<div class="col-sm mt-3 mt-md-0">
|
||||
<img class="img-fluid rounded z-depth-1" src="{{ '/assets/img/5.jpg' | relative_url }}" alt="" title="example image"/>
|
||||
{% responsive_image path: assets/img/5.jpg title: "example image" class: "img-fluid rounded z-depth-1" %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="caption">
|
||||
|
|
@ -51,10 +51,10 @@ You describe how you toiled, sweated, *bled* for your project, and then... you r
|
|||
|
||||
<div class="row justify-content-sm-center">
|
||||
<div class="col-sm-8 mt-3 mt-md-0">
|
||||
<img class="img-fluid rounded z-depth-1" src="{{ '/assets/img/6.jpg' | relative_url }}" alt="" title="example image"/>
|
||||
{% responsive_image path: assets/img/6.jpg title: "example image" class: "img-fluid rounded z-depth-1" %}
|
||||
</div>
|
||||
<div class="col-sm-4 mt-3 mt-md-0">
|
||||
<img class="img-fluid rounded z-depth-1" src="{{ '/assets/img/11.jpg' | relative_url }}" alt="" title="example image"/>
|
||||
{% responsive_image path: assets/img/11.jpg title: "example image" class: "img-fluid rounded z-depth-1" %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="caption">
|
||||
|
|
@ -67,13 +67,15 @@ Just wrap your images with `<div class="col-sm">` and place them inside `<div cl
|
|||
To make images responsive, add `img-fluid` class to each; for rounded corners and shadows use `rounded` and `z-depth-1` classes.
|
||||
Here's the code for the last row of images above:
|
||||
|
||||
{% raw %}
|
||||
```html
|
||||
<div class="row justify-content-sm-center">
|
||||
<div class="col-sm-8 mt-3 mt-md-0">
|
||||
<img class="img-fluid rounded z-depth-1" src="{{ '/assets/img/6.jpg' | relative_url }}" alt="" title="example image"/>
|
||||
{% responsive_image path: assets/img/6.jpg title: "example image" class: "img-fluid rounded z-depth-1" %}
|
||||
</div>
|
||||
<div class="col-sm-4 mt-3 mt-md-0">
|
||||
<img class="img-fluid rounded z-depth-1" src="{{ '/assets/img/11.jpg' | relative_url }}" alt="" title="example image"/>
|
||||
{% responsive_image path: assets/img/11.jpg title: "example image" class: "img-fluid rounded z-depth-1" %}
|
||||
</div>
|
||||
</div>
|
||||
```
|
||||
{% endraw %}
|
||||
|
|
|
|||
|
|
@ -22,13 +22,13 @@ To give your project a background in the portfolio page, just add the img tag to
|
|||
|
||||
<div class="row">
|
||||
<div class="col-sm mt-3 mt-md-0">
|
||||
<img class="img-fluid rounded z-depth-1" src="{{ '/assets/img/1.jpg' | relative_url }}" alt="" title="example image"/>
|
||||
{% responsive_image path: assets/img/1.jpg title: "example image" class: "img-fluid rounded z-depth-1" %}
|
||||
</div>
|
||||
<div class="col-sm mt-3 mt-md-0">
|
||||
<img class="img-fluid rounded z-depth-1" src="{{ '/assets/img/3.jpg' | relative_url }}" alt="" title="example image"/>
|
||||
{% responsive_image path: assets/img/3.jpg title: "example image" class: "img-fluid rounded z-depth-1" %}
|
||||
</div>
|
||||
<div class="col-sm mt-3 mt-md-0">
|
||||
<img class="img-fluid rounded z-depth-1" src="{{ '/assets/img/5.jpg' | relative_url }}" alt="" title="example image"/>
|
||||
{% responsive_image path: assets/img/5.jpg title: "example image" class: "img-fluid rounded z-depth-1" %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="caption">
|
||||
|
|
@ -36,7 +36,7 @@ To give your project a background in the portfolio page, just add the img tag to
|
|||
</div>
|
||||
<div class="row">
|
||||
<div class="col-sm mt-3 mt-md-0">
|
||||
<img class="img-fluid rounded z-depth-1" src="{{ '/assets/img/5.jpg' | relative_url }}" alt="" title="example image"/>
|
||||
{% responsive_image path: assets/img/5.jpg title: "example image" class: "img-fluid rounded z-depth-1" %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="caption">
|
||||
|
|
@ -50,10 +50,10 @@ You describe how you toiled, sweated, *bled* for your project, and then... you r
|
|||
|
||||
<div class="row justify-content-sm-center">
|
||||
<div class="col-sm-8 mt-3 mt-md-0">
|
||||
<img class="img-fluid rounded z-depth-1" src="{{ '/assets/img/6.jpg' | relative_url }}" alt="" title="example image"/>
|
||||
{% responsive_image path: assets/img/6.jpg title: "example image" class: "img-fluid rounded z-depth-1" %}
|
||||
</div>
|
||||
<div class="col-sm-4 mt-3 mt-md-0">
|
||||
<img class="img-fluid rounded z-depth-1" src="{{ '/assets/img/11.jpg' | relative_url }}" alt="" title="example image"/>
|
||||
{% responsive_image path: assets/img/11.jpg title: "example image" class: "img-fluid rounded z-depth-1" %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="caption">
|
||||
|
|
@ -66,13 +66,15 @@ Just wrap your images with `<div class="col-sm">` and place them inside `<div cl
|
|||
To make images responsive, add `img-fluid` class to each; for rounded corners and shadows use `rounded` and `z-depth-1` classes.
|
||||
Here's the code for the last row of images above:
|
||||
|
||||
{% raw %}
|
||||
```html
|
||||
<div class="row justify-content-sm-center">
|
||||
<div class="col-sm-8 mt-3 mt-md-0">
|
||||
<img class="img-fluid rounded z-depth-1" src="{{ '/assets/img/6.jpg' | relative_url }}" alt="" title="example image"/>
|
||||
{% responsive_image path: assets/img/6.jpg title: "example image" class: "img-fluid rounded z-depth-1" %}
|
||||
</div>
|
||||
<div class="col-sm-4 mt-3 mt-md-0">
|
||||
<img class="img-fluid rounded z-depth-1" src="{{ '/assets/img/11.jpg' | relative_url }}" alt="" title="example image"/>
|
||||
{% responsive_image path: assets/img/11.jpg title: "example image" class: "img-fluid rounded z-depth-1" %}
|
||||
</div>
|
||||
</div>
|
||||
```
|
||||
{% endraw %}
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
layout: page
|
||||
title: project 5
|
||||
description: a project with a background image
|
||||
img: /assets/img/1.jpg
|
||||
img: assets/img/1.jpg
|
||||
importance: 3
|
||||
category: fun
|
||||
---
|
||||
|
|
@ -22,13 +22,13 @@ To give your project a background in the portfolio page, just add the img tag to
|
|||
|
||||
<div class="row">
|
||||
<div class="col-sm mt-3 mt-md-0">
|
||||
<img class="img-fluid rounded z-depth-1" src="{{ '/assets/img/1.jpg' | relative_url }}" alt="" title="example image"/>
|
||||
{% responsive_image path: assets/img/1.jpg title: "example image" class: "img-fluid rounded z-depth-1" %}
|
||||
</div>
|
||||
<div class="col-sm mt-3 mt-md-0">
|
||||
<img class="img-fluid rounded z-depth-1" src="{{ '/assets/img/3.jpg' | relative_url }}" alt="" title="example image"/>
|
||||
{% responsive_image path: assets/img/3.jpg title: "example image" class: "img-fluid rounded z-depth-1" %}
|
||||
</div>
|
||||
<div class="col-sm mt-3 mt-md-0">
|
||||
<img class="img-fluid rounded z-depth-1" src="{{ '/assets/img/5.jpg' | relative_url }}" alt="" title="example image"/>
|
||||
{% responsive_image path: assets/img/5.jpg title: "example image" class: "img-fluid rounded z-depth-1" %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="caption">
|
||||
|
|
@ -36,7 +36,7 @@ To give your project a background in the portfolio page, just add the img tag to
|
|||
</div>
|
||||
<div class="row">
|
||||
<div class="col-sm mt-3 mt-md-0">
|
||||
<img class="img-fluid rounded z-depth-1" src="{{ '/assets/img/5.jpg' | relative_url }}" alt="" title="example image"/>
|
||||
{% responsive_image path: assets/img/5.jpg title: "example image" class: "img-fluid rounded z-depth-1" %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="caption">
|
||||
|
|
@ -50,10 +50,10 @@ You describe how you toiled, sweated, *bled* for your project, and then... you r
|
|||
|
||||
<div class="row justify-content-sm-center">
|
||||
<div class="col-sm-8 mt-3 mt-md-0">
|
||||
<img class="img-fluid rounded z-depth-1" src="{{ '/assets/img/6.jpg' | relative_url }}" alt="" title="example image"/>
|
||||
{% responsive_image path: assets/img/6.jpg title: "example image" class: "img-fluid rounded z-depth-1" %}
|
||||
</div>
|
||||
<div class="col-sm-4 mt-3 mt-md-0">
|
||||
<img class="img-fluid rounded z-depth-1" src="{{ '/assets/img/11.jpg' | relative_url }}" alt="" title="example image"/>
|
||||
{% responsive_image path: assets/img/11.jpg title: "example image" class: "img-fluid rounded z-depth-1" %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="caption">
|
||||
|
|
@ -66,13 +66,15 @@ Just wrap your images with `<div class="col-sm">` and place them inside `<div cl
|
|||
To make images responsive, add `img-fluid` class to each; for rounded corners and shadows use `rounded` and `z-depth-1` classes.
|
||||
Here's the code for the last row of images above:
|
||||
|
||||
{% raw %}
|
||||
```html
|
||||
<div class="row justify-content-sm-center">
|
||||
<div class="col-sm-8 mt-3 mt-md-0">
|
||||
<img class="img-fluid rounded z-depth-1" src="{{ '/assets/img/6.jpg' | relative_url }}" alt="" title="example image"/>
|
||||
{% responsive_image path: assets/img/6.jpg title: "example image" class: "img-fluid rounded z-depth-1" %}
|
||||
</div>
|
||||
<div class="col-sm-4 mt-3 mt-md-0">
|
||||
<img class="img-fluid rounded z-depth-1" src="{{ '/assets/img/11.jpg' | relative_url }}" alt="" title="example image"/>
|
||||
{% responsive_image path: assets/img/11.jpg title: "example image" class: "img-fluid rounded z-depth-1" %}
|
||||
</div>
|
||||
</div>
|
||||
```
|
||||
{% endraw %}
|
||||
|
|
|
|||
|
|
@ -22,13 +22,13 @@ To give your project a background in the portfolio page, just add the img tag to
|
|||
|
||||
<div class="row">
|
||||
<div class="col-sm mt-3 mt-md-0">
|
||||
<img class="img-fluid rounded z-depth-1" src="{{ '/assets/img/1.jpg' | relative_url }}" alt="" title="example image"/>
|
||||
{% responsive_image path: assets/img/1.jpg title: "example image" class: "img-fluid rounded z-depth-1" %}
|
||||
</div>
|
||||
<div class="col-sm mt-3 mt-md-0">
|
||||
<img class="img-fluid rounded z-depth-1" src="{{ '/assets/img/3.jpg' | relative_url }}" alt="" title="example image"/>
|
||||
{% responsive_image path: assets/img/3.jpg title: "example image" class: "img-fluid rounded z-depth-1" %}
|
||||
</div>
|
||||
<div class="col-sm mt-3 mt-md-0">
|
||||
<img class="img-fluid rounded z-depth-1" src="{{ '/assets/img/5.jpg' | relative_url }}" alt="" title="example image"/>
|
||||
{% responsive_image path: assets/img/5.jpg title: "example image" class: "img-fluid rounded z-depth-1" %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="caption">
|
||||
|
|
@ -36,7 +36,7 @@ To give your project a background in the portfolio page, just add the img tag to
|
|||
</div>
|
||||
<div class="row">
|
||||
<div class="col-sm mt-3 mt-md-0">
|
||||
<img class="img-fluid rounded z-depth-1" src="{{ '/assets/img/5.jpg' | relative_url }}" alt="" title="example image"/>
|
||||
{% responsive_image path: assets/img/5.jpg title: "example image" class: "img-fluid rounded z-depth-1" %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="caption">
|
||||
|
|
@ -50,10 +50,10 @@ You describe how you toiled, sweated, *bled* for your project, and then... you r
|
|||
|
||||
<div class="row justify-content-sm-center">
|
||||
<div class="col-sm-8 mt-3 mt-md-0">
|
||||
<img class="img-fluid rounded z-depth-1" src="{{ '/assets/img/6.jpg' | relative_url }}" alt="" title="example image"/>
|
||||
{% responsive_image path: assets/img/6.jpg title: "example image" class: "img-fluid rounded z-depth-1" %}
|
||||
</div>
|
||||
<div class="col-sm-4 mt-3 mt-md-0">
|
||||
<img class="img-fluid rounded z-depth-1" src="{{ '/assets/img/11.jpg' | relative_url }}" alt="" title="example image"/>
|
||||
{% responsive_image path: assets/img/11.jpg title: "example image" class: "img-fluid rounded z-depth-1" %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="caption">
|
||||
|
|
@ -66,13 +66,15 @@ Just wrap your images with `<div class="col-sm">` and place them inside `<div cl
|
|||
To make images responsive, add `img-fluid` class to each; for rounded corners and shadows use `rounded` and `z-depth-1` classes.
|
||||
Here's the code for the last row of images above:
|
||||
|
||||
{% raw %}
|
||||
```html
|
||||
<div class="row justify-content-sm-center">
|
||||
<div class="col-sm-8 mt-3 mt-md-0">
|
||||
<img class="img-fluid rounded z-depth-1" src="{{ '/assets/img/6.jpg' | relative_url }}" alt="" title="example image"/>
|
||||
{% responsive_image path: assets/img/6.jpg title: "example image" class: "img-fluid rounded z-depth-1" %}
|
||||
</div>
|
||||
<div class="col-sm-4 mt-3 mt-md-0">
|
||||
<img class="img-fluid rounded z-depth-1" src="{{ '/assets/img/11.jpg' | relative_url }}" alt="" title="example image"/>
|
||||
{% responsive_image path: assets/img/11.jpg title: "example image" class: "img-fluid rounded z-depth-1" %}
|
||||
</div>
|
||||
</div>
|
||||
```
|
||||
{% endraw %}
|
||||
|
|
|
|||
|
After Width: | Height: | Size: 39 KiB |
|
After Width: | Height: | Size: 99 KiB |
|
After Width: | Height: | Size: 305 KiB |
|
After Width: | Height: | Size: 29 KiB |
|
After Width: | Height: | Size: 73 KiB |
|
After Width: | Height: | Size: 573 KiB |
|
After Width: | Height: | Size: 60 KiB |
|
After Width: | Height: | Size: 145 KiB |
|
After Width: | Height: | Size: 102 KiB |
|
After Width: | Height: | Size: 13 KiB |
|
After Width: | Height: | Size: 27 KiB |
|
After Width: | Height: | Size: 311 KiB |
|
After Width: | Height: | Size: 34 KiB |
|
After Width: | Height: | Size: 78 KiB |
|
After Width: | Height: | Size: 264 KiB |
|
After Width: | Height: | Size: 29 KiB |
|
After Width: | Height: | Size: 66 KiB |
|
After Width: | Height: | Size: 438 KiB |
|
After Width: | Height: | Size: 41 KiB |
|
After Width: | Height: | Size: 103 KiB |
|
After Width: | Height: | Size: 62 KiB |
|
After Width: | Height: | Size: 8.6 KiB |
|
After Width: | Height: | Size: 17 KiB |
|
After Width: | Height: | Size: 193 KiB |
|
After Width: | Height: | Size: 21 KiB |
|
After Width: | Height: | Size: 48 KiB |
|
After Width: | Height: | Size: 329 KiB |
|
After Width: | Height: | Size: 28 KiB |
|
After Width: | Height: | Size: 74 KiB |
|
After Width: | Height: | Size: 469 KiB |
|
After Width: | Height: | Size: 55 KiB |
|
After Width: | Height: | Size: 127 KiB |