-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathportfolio_grid.html
More file actions
60 lines (49 loc) · 1.75 KB
/
portfolio_grid.html
File metadata and controls
60 lines (49 loc) · 1.75 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
<!-- Portfolio Grid Section -->
<section id="portfolio">
<div class="container">
{% assign loopindex = 0 %}
{% for project in site.projects reversed %}
{% assign loopindex = loopindex | plus: 1 %}
{% assign rowfinder = loopindex | modulo: 2 %}
{% if rowfinder == 1 %}
<!-- start the row -->
<div class="row portfolio-row">
<!-- card -->
<div class="portfolio-column portfolio-item">
<a href="{{ project.url }}" class="portfolio-link">
<div class="caption">
<p>{{ project.title }}</p>
</div>
<img src="images/portfolio/{{ project.image }}" class="portfolio-item img-responsive overlay" alt="{{ project.alt }}">
</a>
</div>
{% elsif rowfinder == 0 %}
<!-- card -->
<div class="portfolio-column portfolio-item">
<a href="{{ project.url }}" class="portfolio-link">
<div class="caption">
<p>{{ project.title }}</p>
</div>
<img src="images/portfolio/{{ project.image }}" class="portfolio-item img-responsive" alt="{{ project.alt }}">
</a>
</div>
<!-- end the row -->
</div>
{% else %}
<!-- card -->
<div class="portfolio-column portfolio-item">
<a href="{{ project.url }}" class="portfolio-link">
<div class="caption">
<p>{{ project.title }}</p>
</div>
<img src="images/portfolio/{{ project.image }}" class="portfolio-item img-responsive" alt="{{ project.alt }}">
</a>
</div>
{% endif %}
{% endfor %}
<!-- close the div if rows are incomplete -->
{% if rowfinder != 0 %}
</div>
{% endif %}
</div>
</section>