Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/alshedivat/al-folio into …
Browse files Browse the repository at this point in the history
…update-bootstrap
  • Loading branch information
rohandebsarkar committed Jul 9, 2022
2 parents 4042036 + 9d71804 commit 0474573
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 30 deletions.
13 changes: 2 additions & 11 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,23 +15,14 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: '3.0.2'
- name: Enable bundler cache
uses: actions/cache@v2
with:
path: vendor/bundle
key: ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile.lock') }}
restore-keys: |
${{ runner.os }}-gems-
bundler-cache: true
- name: Install deps
run: |
gem install bundler
bundle config path vendor/bundle
bundle install --jobs 4 --retry 3
npm install -g mermaid.cli
- name: Setup deploy options
id: setup
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ Feel free to add your own page(s) by sending a PR.
<a href="https://amalawilson.com" target="_blank">★</a>
<a href="https://tirtharajdash.github.io" target="_blank">★</a>
<a href="https://carolinacarreira.github.io" target="_blank">★</a>
<a href="https://manandey.github.io" target="_blank">★</a>
</td>
</tr>
<tr>
Expand Down
4 changes: 1 addition & 3 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -240,10 +240,8 @@ filtered_bibtex_keywords: [abbr, abstract, arxiv, bibtex_show, html, pdf, select
# Responsive WebP Images
# -----------------------------------------------------------------------------

enable_responsive_images: true # enables responsive images for your site (recomended, see https://github.com/alshedivat/al-folio/issues/537)

imagemagick:
enabled: true # make it 'false' if not using responsive images
enabled: true # enables responsive images for your site (recomended, see https://github.com/alshedivat/al-folio/issues/537)
widths:
- 480
- 800
Expand Down
34 changes: 20 additions & 14 deletions _includes/figure.html
Original file line number Diff line number Diff line change
@@ -1,27 +1,33 @@
{%- assign path = include.path | remove: ".jpg" | remove: ".jpeg" | remove: ".png" | remove: ".tiff" -%}
{%- assign img_path = include.path | remove: ".jpg" | remove: ".jpeg" | remove: ".png" | remove: ".tiff" -%}

<figure>

<picture>
{% if site.enable_responsive_images %}
{% if site.imagemagick.enabled %}
{% for i in site.imagemagick.widths -%}
<source media="(max-width: {{ i }}px)" srcset="{{ path | relative_url }}-{{ i }}.webp" />
<source
class="responsive-img-srcset"
media="(max-width: {{ i }}px)"
srcset="{{ img_path | relative_url }}-{{ i }}.webp"
/>
{% endfor -%}
{% endif %}

<!-- Fallback to the original file -->
<img
{% if include.class %}class="{{ include.class }}"{% endif %}
src="{{ include.path | relative_url }}"
{% if include.width %}width="{{ include.width }}"{% else %}width="auto"{% endif %}
{% if include.height %}height="{{ include.height }}"{% else %}height="auto"{% endif %}
{% if include.min-width %}min-width="{{ include.min-width }}"{% endif %}
{% if include.min-height %}min-height="{{ include.min-height }}"{% endif %}
{% if include.max-width %}max-width="{{ include.max-width }}"{% endif %}
{% if include.max-height %}height="{{ include.max-height }}"{% endif %}
{% if include.alt %}alt="{{ include.alt }}"{% endif %}
{% if include.title %}title="{{ include.title }}"{% endif %}
{% if include.zoomable %}data-zoomable{% endif %} />
src="{{ include.path | relative_url }}"
{% if include.class %}class="{{ include.class }}"{% endif %}
{% if include.width %}width="{{ include.width }}"{% else %}width="auto"{% endif %}
{% if include.height %}height="{{ include.height }}"{% else %}height="auto"{% endif %}
{% if include.min-width %}min-width="{{ include.min-width }}"{% endif %}
{% if include.min-height %}min-height="{{ include.min-height }}"{% endif %}
{% if include.max-width %}max-width="{{ include.max-width }}"{% endif %}
{% if include.max-height %}height="{{ include.max-height }}"{% endif %}
{% if include.alt %}alt="{{ include.alt }}"{% endif %}
{% if include.title %}title="{{ include.title }}"{% endif %}
{% if include.zoomable %}data-zoomable{% endif %}
onerror="this.onerror=null; $('.responsive-img-srcset').remove();"
/>

</picture>

Expand Down
4 changes: 2 additions & 2 deletions _layouts/about.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ <h1 class="post-title">
{%- assign profile_image_path = page.profile.image | prepend: 'assets/img/' -%}

{% if page.profile.image_cicular %}
{%- assign profile_image_class = "img-fluid z-dept-1 rounded-circle" -%}
{%- assign profile_image_class = "img-fluid z-depth-1 rounded-circle" -%}
{% else %}
{%- assign profile_image_class = "img-fluid z-dept-1 rounded" -%}
{%- assign profile_image_class = "img-fluid z-depth-1 rounded" -%}
{% endif %}

{% include figure.html
Expand Down

0 comments on commit 0474573

Please sign in to comment.