-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathhome-hub.html
More file actions
84 lines (72 loc) · 3.19 KB
/
Copy pathhome-hub.html
File metadata and controls
84 lines (72 loc) · 3.19 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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
{% assign t = site.t[site.active_lang] | default: site.t.en %}
{% assign projects = site.projects | where_exp: "item", "item.home_url != nil" %}
{% assign posts = site.posts_combined %}
{% assign num_posts = site.num_posts_combined %}
{% assign featured_projects = projects | where: "featured", true %}
{% assign num_featured_projects = featured_projects | size %}
{% if num_featured_projects > 0 %}
<section class="featured-projects">
<h2 class="title">{{ t.featured_projects | default: "Featured Technologies" }}</h2>
<div class="items">
{% for item in featured_projects limit:3 %}
{% assign project_slug = item.path | split: "/" | slice: 1, 1 | join: "" %}
{% assign translated_desc = site.project_descriptions[project_slug][site.active_lang] | default: item.description %}
<a class="item" href="{{ item.home_url }}" role="article">
<header>
<div class="logo-container">
{% assign symbol_path = "/projects/" | append: project_slug | append: "/assets/symbol.svg" %}
<div class="logo"><img src="{{ symbol_path | relative_url }}" onerror="this.src='{{ '/assets/symbol.svg' | relative_url }}'" alt="{{ item.title }} logo"></div>
</div>
<h3 class="title">{{ item.title }}</h3>
</header>
<p class="body">
{{ translated_desc }}
</p>
<div class="cta-view-project">
<div class="button">{{ t.visit_site | default: "Visit Site" }}</div>
</div>
</a>
{% endfor %}
</div>
</section>
{% endif %}
{% if num_posts > 0 %}
<section class="featured-posts">
<div class="puny-label">{{ t.latest_news | default: "Latest news" }}</div>
<h2 class="title">{{ t.from_blog | default: "From the Blog" }}</h2>
<div class="items">
{% for item in posts limit:3 %}
{% include post-card.html post=item %}
{% endfor %}
</div>
</section>
{% endif %}
{% assign other_projects = projects | where: "featured", false %}
{% assign num_other_projects = other_projects | size %}
{% if num_other_projects > 0 %}
<section class="other-projects">
{% include assets/symbol.svg %}
<h2 class="title">{{ t.other_projects | default: "Other Technologies" }}</h2>
<div class="items {% if num_other_projects < 5 %}one-row{% endif %}">
{% for item in other_projects %}
{% assign project_slug = item.path | split: "/" | slice: 1, 1 | join: "" %}
{% assign translated_desc = site.project_descriptions[project_slug][site.active_lang] | default: item.description %}
<a class="item" href="{{ item.home_url }}" role="article">
<header>
<div class="logo-container">
{% assign symbol_path = "/projects/" | append: project_slug | append: "/assets/symbol.svg" %}
<div class="logo"><img src="{{ symbol_path }}" onerror="this.src='{{ '/assets/symbol.svg' | relative_url }}'"></div>
</div>
<h3 class="title">{{ item.title }}</h3>
</header>
<p class="body">
{{ translated_desc }}
</p>
<footer class="meta">
{% include tag-list.html tags=item.tags %}
</footer>
</a>
{% endfor %}
</div>
</section>
{% endif %}