A repo for my personal website
1{{ define "main" }}
2{{- if not (.Site.Params.homepage.disableHeroSection) }}
3<section class="hero" style="background-image:linear-gradient(rgba(20,30,38, 0.9), rgba(24,44,54, 0.8)),
4url('{{.Site.Params.homepage.heroBackgroundImage}}'); ">
5 <header class="container">
6 <hgroup>
7 <h1>{{.Site.Params.homepage.heroUpperTitle}}</h1>
8 <h1>{{.Site.Params.homepage.heroTitle}}</h1>
9 <h2>{{.Site.Params.homepage.heroDescription}}</h2>
10 </hgroup>
11 <div>
12 <a
13 class="hero-buttons"
14 href="{{ .Site.Params.homepage.heroCTAPrimaryUrl | relURL }}"
15 role="button"
16 >{{.Site.Params.homepage.heroCTAPrimaryText}}</a
17 >
18 <a
19 href="{{ .Site.Params.homepage.heroCTASecondaryUrl | relURL }}"
20 role="button"
21 class="contrast outline"
22 >{{.Site.Params.homepage.heroCTASecondaryText}}</a
23 >
24 </div>
25 </header>
26</section>
27{{ end }}
28
29
30{{- if not (.Site.Params.homepage.disableBlogSection) }}
31<section>
32 <hgroup class="text-center">
33 <h2>{{.Site.Params.homepage.blogTitle}}</h2>
34 <h3>{{.Site.Params.homepage.blogDescription}}</h3>
35 </hgroup>
36 <div class="container">
37 <div class="grid grid-post">
38 {{ $paginator := .Paginate (where site.RegularPages "Type" "in" site.Params.mainSections | first
39 3) }} {{ range $paginator.Pages }}
40 <a href="{{ .RelPermalink }}">
41 <article class="text-center">
42 {{if .Params.Cover.Image}}
43 <figure>
44 <img
45 src="{{.Params.Cover.Image | absURL}}"
46 width="600"
47 height="400"
48 layout="responsive"
49 ></img>
50 {{ end }}
51 </figure>
52 <hgroup>
53 <h3>{{ .Title }}</h3>
54 <hr />
55 <p>
56 {{ .Description | plainify | htmlUnescape | truncate 100 }}{{ if
57 .Truncated }}...{{ end }}
58 </p>
59 </hgroup>
60 <small> {{- partial "post_meta.html" . -}} </small>
61 </article>
62 </a>
63 {{ end }}
64 </div>
65 </div>
66 <div class="text-center">
67 <a href="{{ "/blog" | absLangURL }}"><kbd>{{.Site.Params.homepage.seeMoreText}}</kbd></a>
68</div>
69</section>
70{{ end }}
71
72{{- if not (.Site.Params.homepage.disableAboutSection) }}
73<section>
74 <hgroup class="text-center">
75 <a id="about"><h2>{{.Site.Params.homepage.aboutTitle}}</h2></a>
76 <h3>{{.Site.Params.homepage.aboutDescription}}</h3>
77 </hgroup>
78 <div class="container">
79 <div class="grid">
80 <div class="container" style="text-align: right;">
81 <img
82 src="{{.Site.Params.homepage.aboutImgUrl}}"
83 alt="{{.Site.Params.author}}"
84 width="300"
85 height="450"
86 layout="intrinsic"
87 ></img>
88 </div>
89 <div class="container">
90 {{ range .Site.Params.homepage.aboutContent }}
91 <p>{{ . }}</p>
92 {{ end }}
93 </div>
94 </div>
95 </div>
96</section>
97{{ end }}
98
99{{- if not (.Site.Params.homepage.disablePortfolioSection) }}
100<section>
101 <hgroup class="text-center">
102 <a id="portfolio"><h2>{{.Site.Params.homepage.portfolioTitle}}</h2></a>
103 <h3>{{.Site.Params.homepage.portfolioDescription}}</h3>
104 </hgroup>
105 <div class="container">
106 <div class="grid grid-post">
107 {{ range .Site.Params.homepage.portfolio }}
108 <a class="portfolio-post" href="{{.websiteUrl}}">
109 <figure >
110 <img
111 src="{{.imageUrl}}"
112 width="600"
113 height="400"
114 layout="responsive"
115 alt="{{.alt}}"
116 ></img>
117 </figure>
118 <hgroup class="text-center">
119 <h4>{{.description}}</h4>
120 </hgroup>
121 </a>
122 {{ end }}
123 </div>
124 </div>
125</section>
126{{ end }}
127
128{{ end }}