Skip to content

Commit 7fd9b2e

Browse files
committed
increased author image resolution
1 parent ca471b2 commit 7fd9b2e

39 files changed

+910
-81
lines changed

layouts/partials/sections/home.html

+139
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,139 @@
1+
{{ $author:= site.Data.author }}
2+
{{ if (index site.Data site.Language.Lang).author }}
3+
{{ $author = (index site.Data site.Language.Lang).author }}
4+
{{ end }}
5+
6+
{{ $name:="Jane Doe" }}
7+
{{ if $author.nickname }}
8+
{{ $name = $author.nickname }}
9+
{{ else if $author.name }}
10+
{{ $name = $author.name }}
11+
{{ end }}
12+
13+
{{ $sections:= site.Data.sections }}
14+
{{ if (index site.Data site.Language.Lang).sections }}
15+
{{ $sections = (index site.Data site.Language.Lang).sections }}
16+
{{ end }}
17+
18+
{{ $backgroundImage:= "/images/default-background.jpg" }}
19+
{{ if site.Params.background }}
20+
{{ $backgroundImage = site.Params.background }}
21+
{{ end }}
22+
23+
24+
{{ $authorImage:= "/images/default-avatar.png" }}
25+
{{ if $author.image }}
26+
{{ $authorImage = $author.image }}
27+
{{ end }}
28+
{{ $authorImage := resources.Get $authorImage }}
29+
30+
{{/* apply image processing. don't use "Fit" in svg or gif because its not supported */}}
31+
{{ if and $authorImage (and (ne $authorImage.MediaType.SubType "svg") ( ne $authorImage.MediaType.SubType "gif")) }}
32+
{{ $authorImage = $authorImage.Resize "600x600" }}
33+
{{ end }}
34+
{{/* get file that matches the filename as specified as src="" in shortcode */}}
35+
{{ $src := resources.Get $backgroundImage }}
36+
37+
{{/* set image sizes, these are hardcoded for now, x dictates that images are resized to this width */}}
38+
39+
{{ $tinyw := default "500x" }}
40+
{{ $smallw := default "800x" }}
41+
{{ $mediumw := default "1200x" }}
42+
{{ $largew := default "1500x" }}
43+
44+
{{/* resize the src image to the given sizes */}}
45+
46+
{{ $tiny := $src.Resize $tinyw }}
47+
{{ $small := $src.Resize $smallw }}
48+
{{ $medium := $src.Resize $mediumw }}
49+
{{ $large := $src.Resize $largew }}
50+
51+
{{/* only use images smaller than or equal to the src (original) image size, as Hugo will upscale small images */}}
52+
{{/* set the sizes attribute to (min-width: 35em) 1200px, 100vw unless overridden in shortcode */}}
53+
54+
{{ if lt $src.Width "500" }}
55+
{{ $tiny := $src}}
56+
{{ $small := $src}}
57+
{{ $medium := $src}}
58+
{{ $large := $src}}
59+
{{ end }}
60+
61+
{{ if lt $src.Width "800" }}
62+
{{ $small := $src}}
63+
{{ $medium := $src}}
64+
{{ $large := $src}}
65+
{{ end }}
66+
67+
{{ if lt $src.Width "1200" }}
68+
{{ $medium := $src}}
69+
{{ $large := $src}}
70+
{{ end }}
71+
72+
{{ if lt $src.Width "1500" }}
73+
{{ $large := $src}}
74+
{{ end }}
75+
76+
<div class="container-fluid home" id="home">
77+
<style>
78+
/* 0 to 299 */
79+
#homePageBackgroundImageDivStyled {
80+
background-image: url('{{ $tiny.RelPermalink }}');
81+
}
82+
/* 300 to X */
83+
@media (min-width: 500px) and (max-width: 800px) { /* or 301 if you want really the same as previously. */
84+
#homePageBackgroundImageDivStyled {
85+
background-image: url('{{ $small.RelPermalink }}');
86+
}
87+
}
88+
@media (min-width: 801px) and (max-width: 1200px) { /* or 301 if you want really the same as previously. */
89+
#homePageBackgroundImageDivStyled {
90+
background-image: url('{{ $medium.RelPermalink }}');
91+
}
92+
}
93+
@media (min-width: 1201px) and (max-width: 1500px) { /* or 301 if you want really the same as previously. */
94+
#homePageBackgroundImageDivStyled {
95+
background-image: url('{{ $large.RelPermalink }}');
96+
}
97+
}
98+
@media (min-width: 1501px) { /* or 301 if you want really the same as previously. */
99+
#homePageBackgroundImageDivStyled {
100+
background-image: url('{{ $src.RelPermalink }}');
101+
}
102+
}
103+
</style>
104+
<span class="on-the-fly-behavior"></span>
105+
<div
106+
id="homePageBackgroundImageDivStyled"
107+
class="background container-fluid"
108+
></div>
109+
<div class="container content text-center">
110+
<img src="{{ $authorImage.RelPermalink }}"
111+
class="rounded-circle mx-auto d-block img-fluid"
112+
alt="Author Image"
113+
/>
114+
<h1 class="greeting"> {{ $author.greeting }} {{ $name }}</h1>
115+
{{ if $author.subtitle }}
116+
<h2 class="greeting-subtitle">{{ $author.subtitle }}</h2>
117+
{{ end }}
118+
<div class="typing-carousel">
119+
<span id="ityped" class="ityped"></span>
120+
<span class="ityped-cursor"></span>
121+
</div>
122+
<ul id="typing-carousel-data">
123+
{{ if $author.summary }}
124+
{{ range $author.summary }}
125+
<li>{{ . }}</li>
126+
{{ end}}
127+
{{ end }}
128+
</ul>
129+
{{ if $sections }}
130+
{{ range first 1 (where (sort $sections "section.weight") ".section.enable" true) }}
131+
{{ $sectionID := replace (lower .section.name) " " "-" }}
132+
{{ if .section.id }}
133+
{{ $sectionID = .section.id }}
134+
{{ end }}
135+
<a href="#{{ $sectionID }}" class="arrow-center" aria-label="{{ i18n "read" }} {{ i18n "more" }} - {{ $name }}"><i class="arrow bounce fa fa-chevron-down"></i></a>
136+
{{ end }}
137+
{{ end }}
138+
</div>
139+
</div>

public/categories/index.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,6 @@
66
<description>Recent content in Categories on Stefano Giannini</description>
77
<generator>Hugo -- gohugo.io</generator>
88
<language>en</language>
9-
<lastBuildDate>Sun, 30 Jun 2024 08:00:00 +0100</lastBuildDate><atom:link href="http://localhost:1313/categories/index.xml" rel="self" type="application/rss+xml" />
9+
<lastBuildDate>Wed, 03 Jul 2024 08:00:00 +0100</lastBuildDate><atom:link href="http://localhost:1313/categories/index.xml" rel="self" type="application/rss+xml" />
1010
</channel>
1111
</rss>

public/categories/physics/index.html

+49
Original file line numberDiff line numberDiff line change
@@ -293,6 +293,55 @@
293293

294294

295295

296+
<div class="post-card">
297+
<div class="card">
298+
<div class="card-head">
299+
<a href="/posts/physics/quantum_computing/teleportation/" class="post-card-link">
300+
<img class="card-img-top" src='/posts/physics/quantum_computing/teleportation/images/blog_teleportation.png' alt="Hero Image">
301+
</a>
302+
</div>
303+
<div class="card-body">
304+
<a href="/posts/physics/quantum_computing/teleportation/" class="post-card-link">
305+
<h5 class="card-title">Quantum Computing - Fundementals - Teleportation</h5>
306+
<p class="card-text post-summary">Introduction Quantum teleportation is a fundamental protocol in quantum information science that enables the transfer of quantum information from one location to another. Despite its name, it doesn&rsquo;t involve the transportation of matter, but rather the transmission of the quantum state of a particle.
307+
The Concept In quantum teleportation, we have three main parties:
308+
Alice: The sender who wants to transmit a quantum state. Bob: The receiver who will receive the quantum state.</p>
309+
</a>
310+
311+
<div class="tags">
312+
<ul style="padding-left: 0;">
313+
314+
315+
<li class="rounded"><a href="/tags/science/" class="btn btn-sm btn-info">Science</a></li>
316+
317+
318+
<li class="rounded"><a href="/tags/statistics/" class="btn btn-sm btn-info">Statistics</a></li>
319+
320+
321+
<li class="rounded"><a href="/tags/quantum/" class="btn btn-sm btn-info">Quantum</a></li>
322+
323+
324+
<li class="rounded"><a href="/tags/physics/" class="btn btn-sm btn-info">Physics</a></li>
325+
326+
</ul>
327+
</div>
328+
329+
330+
</div>
331+
<div class="card-footer">
332+
<span class="float-start">
333+
Wednesday, July 3, 2024
334+
| 7 minutes </span>
335+
<a
336+
href="/posts/physics/quantum_computing/teleportation/"
337+
class="float-end btn btn-outline-info btn-sm">Read</a>
338+
</div>
339+
</div>
340+
</div>
341+
342+
343+
344+
296345
<div class="post-card">
297346
<div class="card">
298347
<div class="card-head">

public/categories/physics/index.xml

+12-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,18 @@
66
<description>Recent content in Physics on Stefano Giannini</description>
77
<generator>Hugo -- gohugo.io</generator>
88
<language>en</language>
9-
<lastBuildDate>Sun, 30 Jun 2024 08:00:00 +0100</lastBuildDate><atom:link href="http://localhost:1313/categories/physics/index.xml" rel="self" type="application/rss+xml" /><item>
9+
<lastBuildDate>Wed, 03 Jul 2024 08:00:00 +0100</lastBuildDate><atom:link href="http://localhost:1313/categories/physics/index.xml" rel="self" type="application/rss+xml" /><item>
10+
<title>Quantum Computing - Fundementals - Teleportation</title>
11+
<link>http://localhost:1313/posts/physics/quantum_computing/teleportation/</link>
12+
<pubDate>Wed, 03 Jul 2024 08:00:00 +0100</pubDate>
13+
14+
<guid>http://localhost:1313/posts/physics/quantum_computing/teleportation/</guid>
15+
<description>Introduction Quantum teleportation is a fundamental protocol in quantum information science that enables the transfer of quantum information from one location to another. Despite its name, it doesn&amp;rsquo;t involve the transportation of matter, but rather the transmission of the quantum state of a particle.
16+
The Concept In quantum teleportation, we have three main parties:
17+
Alice: The sender who wants to transmit a quantum state. Bob: The receiver who will receive the quantum state.</description>
18+
</item>
19+
20+
<item>
1021
<title>Quantum Computing - Fundementals (Part 1)</title>
1122
<link>http://localhost:1313/posts/physics/quantum_computing/introduction/</link>
1223
<pubDate>Sun, 30 Jun 2024 08:00:00 +0100</pubDate>

public/index.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -333,7 +333,7 @@
333333
class="background container-fluid"
334334
></div>
335335
<div class="container content text-center">
336-
<img src="/images/author/profile_hu8a567cefac8c1a165d433ac0796ac418_3088978_148x148_fit_q75_box.jpg"
336+
<img src="/images/author/profile_hu8a567cefac8c1a165d433ac0796ac418_3088978_600x600_resize_q75_box.jpg"
337337
class="rounded-circle mx-auto d-block img-fluid"
338338
alt="Author Image"
339339
/>

public/posts/data-science/index.html

+29-4
Original file line numberDiff line numberDiff line change
@@ -402,9 +402,24 @@
402402
<li><a class=" list-link" href="/posts/physics/percolation/" title="Percolation">Percolation</a></li>
403403

404404

405-
406-
</ul>
407-
</li>
405+
406+
407+
408+
409+
410+
411+
<li>
412+
<i data-feather="plus-circle"></i><a class=" list-link" href="/posts/physics/quantum_computing/"> Quantum Computing</a>
413+
414+
<ul class="">
415+
416+
417+
418+
419+
420+
421+
422+
<li><a class=" list-link" href="/posts/physics/quantum_computing/introduction/" title="Introduction">Introduction</a></li>
408423

409424

410425

@@ -413,7 +428,17 @@
413428

414429

415430

416-
<li><a class=" list-link" href="/posts/physics/quantum_computing/" title="Quantum Computing">Quantum Computing</a></li>
431+
<li><a class=" list-link" href="/posts/physics/quantum_computing/teleportation/" title="Teleportation">Teleportation</a></li>
432+
433+
434+
435+
</ul>
436+
</li>
437+
438+
439+
440+
</ul>
441+
</li>
417442

418443

419444

public/posts/finance/index.html

+29-4
Original file line numberDiff line numberDiff line change
@@ -405,9 +405,24 @@
405405
<li><a class=" list-link" href="/posts/physics/percolation/" title="Percolation">Percolation</a></li>
406406

407407

408-
409-
</ul>
410-
</li>
408+
409+
410+
411+
412+
413+
414+
<li>
415+
<i data-feather="plus-circle"></i><a class=" list-link" href="/posts/physics/quantum_computing/"> Quantum Computing</a>
416+
417+
<ul class="">
418+
419+
420+
421+
422+
423+
424+
425+
<li><a class=" list-link" href="/posts/physics/quantum_computing/introduction/" title="Introduction">Introduction</a></li>
411426

412427

413428

@@ -416,7 +431,17 @@
416431

417432

418433

419-
<li><a class=" list-link" href="/posts/physics/quantum_computing/" title="Quantum Computing">Quantum Computing</a></li>
434+
<li><a class=" list-link" href="/posts/physics/quantum_computing/teleportation/" title="Teleportation">Teleportation</a></li>
435+
436+
437+
438+
</ul>
439+
</li>
440+
441+
442+
443+
</ul>
444+
</li>
420445

421446

422447

public/posts/finance/monte_carlo/black-scholes/index.html

+32-4
Original file line numberDiff line numberDiff line change
@@ -418,9 +418,24 @@
418418
<li><a class=" list-link" href="/posts/physics/percolation/" title="Percolation">Percolation</a></li>
419419

420420

421-
422-
</ul>
423-
</li>
421+
422+
423+
424+
425+
426+
427+
<li>
428+
<i data-feather="plus-circle"></i><a class=" list-link" href="/posts/physics/quantum_computing/"> Quantum Computing</a>
429+
430+
<ul class="">
431+
432+
433+
434+
435+
436+
437+
438+
<li><a class=" list-link" href="/posts/physics/quantum_computing/introduction/" title="Introduction">Introduction</a></li>
424439

425440

426441

@@ -429,7 +444,17 @@
429444

430445

431446

432-
<li><a class=" list-link" href="/posts/physics/quantum_computing/" title="Quantum Computing">Quantum Computing</a></li>
447+
<li><a class=" list-link" href="/posts/physics/quantum_computing/teleportation/" title="Teleportation">Teleportation</a></li>
448+
449+
450+
451+
</ul>
452+
</li>
453+
454+
455+
456+
</ul>
457+
</li>
433458

434459

435460

@@ -747,6 +772,9 @@ <h2 id="8-conclusion">8. Conclusion</h2>
747772

748773

749774

775+
776+
777+
750778

751779

752780

0 commit comments

Comments
 (0)