Skip to content

Commit 2078da9

Browse files
Chaitanya-Shaharevgvassilev
authored andcommitted
Add thumbnail and banner to blog posts
1 parent 36e2d9c commit 2078da9

15 files changed

+191
-31
lines changed

Gemfile.lock

+74
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
GEM
2+
remote: https://rubygems.org/
3+
specs:
4+
addressable (2.8.6)
5+
public_suffix (>= 2.0.2, < 6.0)
6+
colorator (1.1.0)
7+
concurrent-ruby (1.2.3)
8+
em-websocket (0.5.3)
9+
eventmachine (>= 0.12.9)
10+
http_parser.rb (~> 0)
11+
eventmachine (1.2.7)
12+
ffi (1.16.3)
13+
forwardable-extended (2.6.0)
14+
google-protobuf (4.26.1-arm64-darwin)
15+
rake (>= 13)
16+
http_parser.rb (0.8.0)
17+
i18n (1.14.5)
18+
concurrent-ruby (~> 1.0)
19+
jekyll (4.3.3)
20+
addressable (~> 2.4)
21+
colorator (~> 1.0)
22+
em-websocket (~> 0.5)
23+
i18n (~> 1.0)
24+
jekyll-sass-converter (>= 2.0, < 4.0)
25+
jekyll-watch (~> 2.0)
26+
kramdown (~> 2.3, >= 2.3.1)
27+
kramdown-parser-gfm (~> 1.0)
28+
liquid (~> 4.0)
29+
mercenary (>= 0.3.6, < 0.5)
30+
pathutil (~> 0.9)
31+
rouge (>= 3.0, < 5.0)
32+
safe_yaml (~> 1.0)
33+
terminal-table (>= 1.8, < 4.0)
34+
webrick (~> 1.7)
35+
jekyll-sass-converter (3.0.0)
36+
sass-embedded (~> 1.54)
37+
jekyll-watch (2.2.1)
38+
listen (~> 3.0)
39+
kramdown (2.4.0)
40+
rexml
41+
kramdown-parser-gfm (1.1.0)
42+
kramdown (~> 2.0)
43+
liquid (4.0.4)
44+
listen (3.9.0)
45+
rb-fsevent (~> 0.10, >= 0.10.3)
46+
rb-inotify (~> 0.9, >= 0.9.10)
47+
mercenary (0.4.0)
48+
pathutil (0.16.2)
49+
forwardable-extended (~> 2.6)
50+
public_suffix (5.0.5)
51+
rake (13.2.1)
52+
rb-fsevent (0.11.2)
53+
rb-inotify (0.10.1)
54+
ffi (~> 1.0)
55+
rexml (3.2.6)
56+
rouge (4.2.1)
57+
safe_yaml (1.0.5)
58+
sass-embedded (1.77.0-arm64-darwin)
59+
google-protobuf (>= 3.25, < 5.0)
60+
terminal-table (3.0.2)
61+
unicode-display_width (>= 1.1.1, < 3)
62+
unicode-display_width (2.5.0)
63+
webrick (1.8.1)
64+
65+
PLATFORMS
66+
arm64-darwin
67+
68+
DEPENDENCIES
69+
jekyll (>= 3.6.3)
70+
kramdown-parser-gfm
71+
webrick
72+
73+
BUNDLED WITH
74+
2.5.9

_includes/blog-post-card.html

+78-12
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
2-
<div class="well">
1+
<div class="well">
2+
<div class="post-content">
33
<h3>{{ post.title }}</h3>
44
<p>
55
{% if post.author %}
@@ -9,14 +9,7 @@ <h3>{{ post.title }}</h3>
99
<a href="{{ author.name | replace: " ", "" | prepend: "/team/" }}">
1010
<img
1111
src="{% if author.photo %}{{ site.baseurl }}/images/team/{{ author.photo }}{% else %}{{ site.baseurl }}/images/team/defaultDP.png{% endif %}"
12-
alt="{{ author.name }}" style="
13-
width: 30px;
14-
height: 30px;
15-
border-radius: 50%;
16-
margin: 0;
17-
margin-top: 4px;
18-
margin-bottom: 4px;
19-
" />
12+
alt="{{ author.name }}" class="author-image" />
2013
{{ author.name }}
2114
</a>
2215
{% if forloop.last == false %}, {% endif %}
@@ -31,11 +24,10 @@ <h3>{{ post.title }}</h3>
3124
</p>
3225
<p>{{ post.excerpt | truncatewords: 50 }}</p>
3326

34-
3527
{% if post.tags and post.tags.size > 0 %}
3628
<p>
3729
{% for tag in post.tags %}
38-
<a href="{{ site.baseurl }}/tags#{{ tag | downcase | slugify }}" class="badge" style="background-color: #999999; padding: 0.5rem">{{ tag }}</a>
30+
<a href="{{ site.baseurl }}/tags#{{ tag | downcase | slugify }}" class="badge">{{ tag }}</a>
3931
{% endfor %}
4032
</p>
4133
{% endif %}
@@ -44,3 +36,77 @@ <h3>{{ post.title }}</h3>
4436
<button class="btn btn-primary" onclick="window.location.href='{{ post.url }}'">Read More</button>
4537
</p>
4638
</div>
39+
{% if post.banner_image %}
40+
<div class="thumbnail-container">
41+
<img
42+
src="{{ post.banner_image }}"
43+
alt="Post Thumbnail"
44+
class="thumbnail-image"
45+
/>
46+
</div>
47+
{% endif %}
48+
</div>
49+
50+
<style>
51+
.well {
52+
display: flex;
53+
align-items: center;
54+
justify-content: space-between;
55+
flex-wrap: wrap;
56+
}
57+
58+
.post-content {
59+
flex: 1;
60+
min-width: 250px;
61+
margin-bottom: 1rem;
62+
}
63+
64+
.author-image {
65+
width: 30px;
66+
height: 30px;
67+
border-radius: 50%;
68+
margin: 0;
69+
margin-top: 4px;
70+
margin-bottom: 4px;
71+
}
72+
73+
.badge {
74+
background-color: #999999;
75+
padding: 0.5rem;
76+
}
77+
78+
.thumbnail-container {
79+
margin-left: 1rem;
80+
flex-shrink: 0;
81+
min-width: 100px;
82+
}
83+
84+
.thumbnail-image {
85+
width: 200px;
86+
height: 200px;
87+
object-fit: cover;
88+
border-radius: 5px;
89+
}
90+
91+
@media (max-width: 700px) {
92+
.well {
93+
flex-direction: column-reverse;
94+
align-items: flex-start;
95+
}
96+
97+
.well > div {
98+
margin-left: 0;
99+
margin-bottom: 1rem;
100+
}
101+
102+
.well img {
103+
margin-bottom: 1rem;
104+
}
105+
106+
.thumbnail-image {
107+
width: 100%;
108+
height: auto;
109+
}
110+
}
111+
112+
</style>

_layouts/post.html

+29-19
Original file line numberDiff line numberDiff line change
@@ -6,24 +6,16 @@
66
<header class="post-header">
77
<h1 class="post-title" itemprop="name headline">{{ page.title }}</h1>
88
<p class="post-meta">
9-
<time
10-
datetime="{{ page.date | date_to_xmlschema }}"
11-
itemprop="datePublished"
12-
>
9+
<time datetime="{{ page.date | date_to_xmlschema }}" itemprop="datePublished">
1310
{{ page.date | date: "%b %-d, %Y" }}
1411
</time>
1512
{% if page.author %} • {% for author_name in page.author %}
1613
<span itemprop="author" itemscope itemtype="http://schema.org/Person">
17-
{% assign author = site.data.contributors | where: "name", author_name |
18-
first %} {% assign author_link = author.name | replace: " ", "" |
19-
prepend: "/team/" %}
14+
{% assign author = site.data.contributors | where: "name", author_name | first %}
15+
{% assign author_link = author.name | replace: " ", "" | prepend: "/team/" %}
2016
<a href="{{ author_link }}" itemprop="url">
21-
<img
22-
src="{% if author.photo %}{{ site.baseurl }}/images/team/{{ author.photo }}{% else %}{{ site.baseurl }}/images/team/defaultDP.png{% endif %}"
23-
alt="{{ author_name }}"
24-
class="author-image"
25-
style="margin: 0"
26-
/>
17+
<img src="{% if author.photo %}{{ site.baseurl }}/images/team/{{ author.photo }}{% else %}{{ site.baseurl }}/images/team/defaultDP.png{% endif %}"
18+
alt="{{ author_name }}" class="author-image" />
2719
<span itemprop="name">{{ author_name }}</span>
2820
</a>
2921
{% if forloop.last == false %} , {% endif %}
@@ -32,6 +24,13 @@ <h1 class="post-title" itemprop="name headline">{{ page.title }}</h1>
3224
</p>
3325
</header>
3426

27+
{% if page.banner_image %}
28+
<div class="post-banner">
29+
<img src="{{ page.banner_image }}"
30+
alt="Banner Image" class="banner-image" />
31+
</div>
32+
{% endif %}
33+
3534
<div class="post-content" itemprop="articleBody">{{ content }}</div>
3635

3736
{% if page.tags and page.tags.size > 0 %}
@@ -40,14 +39,25 @@ <h1 class="post-title" itemprop="name headline">{{ page.title }}</h1>
4039
<p>
4140
<h4>Tags:</h4>
4241
{% for tag in page.tags %}
43-
<a
44-
href="{{ site.baseurl }}/tag#{{ tag | downcase | slugify }}"
45-
class="badge badge-secondary"
46-
style="background-color: #999999; padding: 0.5rem"
47-
>{{ tag }}</a
48-
>
42+
<a href="{{ site.baseurl }}/tag#{{ tag | downcase | slugify }}" class="badge badge-secondary tag-badge">{{ tag }}</a>
4943
{% endfor %}
5044
</p>
5145
</footer>
5246
{% endif %}
5347
</article>
48+
49+
<style>
50+
.post-header .author-image {
51+
margin: 0;
52+
}
53+
54+
.post-banner .banner-image {
55+
width: 100%;
56+
height: auto;
57+
}
58+
59+
.tag-badge {
60+
background-color: #999999;
61+
padding: 0.5rem;
62+
}
63+
</style>

_posts/2022-11-30-extend-clang-to-resugar-template-specialization-accesses.md

+1
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ excerpt: "Clang is an LLVM native C/C++/Objective-C compiler, which aims to
1515
sitemap: false
1616
author: Matheus Izvekov
1717
permalink: blogs/gsoc22_izvekov_experience_blog/
18+
banner_image: /images/blog/gsoc-banner.png
1819
date: 2022-11-30
1920
tags: gsoc clang llvm
2021
---

_posts/2022-12-02-recovering-from-errors-in-clang-repl-and-code-undo.md

+1
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ author:
1919
- Jun Zhang
2020
- Purva Chaudhari
2121
permalink: blogs/gsoc22_zhang_chaudhari_experience_blog/
22+
banner_image: /images/blog/gsoc-banner.png
2223
date: 2022-12-02
2324
tags: gsoc clang llvm
2425
---

_posts/2022-12-07-shared-memory-based-jitlink-memory-manager.md

+1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ transferred through finalize calls."
1313
sitemap: false
1414
author: Anubhab Ghosh
1515
permalink: blogs/gsoc22_ghosh_experience_blog/
16+
banner_image: /images/blog/gsoc-banner.png
1617
date: 2022-12-07
1718
tags: gsoc llvm jitlink memory-manager
1819
---

_posts/2023-05-10-accelerated-documentation-with-google-season-of-docs-2023.md

+1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ Floating-Point Error Estimation), and Python-C++ Interoperability (Clang-Repl
1010
sitemap: false
1111
author: QuillPusher
1212
permalink: blogs/gsod23_quillpusher_experience_blog/
13+
banner_image: /images/blog/gsod-banner.png
1314
date: 2023-05-10
1415
tags: gsod documentation llvm root clang-repl cppyy
1516
---

_posts/2023-09-18-code-completion-in-clang-repl.md

+1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ statement. Consequently, this causes typos or syntactic errors."
1111
sitemap: false
1212
author: Yuquan (Fred) Fu
1313
permalink: blogs/gsoc23_ffu_experience_blog/
14+
banner_image: /images/blog/gsoc-banner.png
1415
date: 2023-09-18
1516
tags: gsoc clang llvm
1617
---

_posts/2024-05-11-llvm-org-website-redesign-project.md

+1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ This initiative will streamline navigation, improve accessibility, and update
77
content, transforming LLVM.org into a more user-friendly resource."
88
sitemap: false
99
author: Chaitanya Shahare
10+
banner_image: /images/blog/gsoc-banner.png
1011
permalink: blogs/gsoc24_chaitanya_shahare_introduction_blog/
1112
date: 2024-05-11
1213
tags: gsoc llvm website

_posts/2024-05-26-implementing-kokkos-differentiation-in-clad.md

+1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ excerpt: "A GSoC 2024 project aimed at implementing the differentiation of the K
55
sitemap: false
66
author: Atell Yehor Krasnopolski
77
permalink: blogs/gsoc24_atell_krasnopolsky_introduction_blog/
8+
banner_image: /images/blog/gsoc-banner.png
89
date: 2024-05-26
910
tags: gsoc clang llvm clad
1011
---

_posts/2024-05-30-enable-cuda-compilation-cppyy-numba-generated-ir.md

+1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ excerpt: "Enable CUDA Compilation on Cppyy-Numba generated IR project, part of G
55
sitemap: false
66
author: Riya Bisht
77
permalink: blogs/gsoc24_riya_bisht_introduction_blog/
8+
banner_image: /images/blog/gsoc-banner.png
89
date: 2024-05-30
910
tags: gsoc cuda numba llvm cppyy
1011
---

_posts/2024-05-30-integrate-a-large-language-model-with-the-xeus-cpp-jupyter-kernel.md

+1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ excerpt: "Integrate a Large Language Model with the xeus-cpp Jupyter kernel, par
55
sitemap: false
66
author: Tharun Anandh
77
permalink: blogs/gsoc24_tharun_anandh_introduction_blog/
8+
banner_image: /images/blog/gsoc-banner.png
89
date: 2024-05-30
910
tags: gsoc xeus xeus-cpp cpp llm
1011
---

_posts/2024-05-31-superbuilds-for-root.md

+1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ excerpt: "A GSoC 2024 project with goal to split ROOT into separate components a
55
sitemap: false
66
author: Pavlo Svirin
77
permalink: blogs/gsoc24_pavlo_svirin_introduction_blog/
8+
banner_image: /images/blog/gsoc-banner.png
89
date: 2024-05-31
910
tags: gsoc root cmake
1011
---

images/blog/gsoc-banner.png

93.4 KB
Loading

images/blog/gsod-banner.png

115 KB
Loading

0 commit comments

Comments
 (0)