Skip to content

Commit afbe63d

Browse files
Add GitHub star and fork buttons to website (#12)
* Add updated homepage template with GitHub buttons
1 parent 727aa66 commit afbe63d

File tree

1 file changed

+40
-0
lines changed

1 file changed

+40
-0
lines changed

layouts/partials/hero.html

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
{{- $navbarLogo := .Site.Params.navbarlogo }}
2+
{{- $hero := .Site.Params.hero }}
3+
{{- $title := index $hero "title" }}
4+
{{- $subtitle := index $hero "subtitle" }}
5+
{{- $buttonText := index $hero "buttontext" }}
6+
{{- $buttonLink := index $hero "buttonlink" }}
7+
{{- $image := index $hero "image" }}
8+
9+
<section class="hero">
10+
<div class="hero-container">
11+
<div class="hero-content">
12+
<div class="hero-title-content" style="display: flex; flex-direction: column;">
13+
<div class="hero-title">
14+
{{ $title }}
15+
<img class="hero-logo" src="{{ printf "/images/%s" $image | relURL }}" alt="{{ $title }} logo. {{ $navbarLogo.altText }}">
16+
</div>
17+
<div class="flex-column">
18+
{{ with $subtitle }}
19+
<div class="hero-subtitle">
20+
{{ . }}
21+
</div>
22+
{{ end }}
23+
24+
<!-- GitHub Stars and Forks Buttons -->
25+
<div style="margin: 20px 0; text-align: center;">
26+
<a class="github-button" href="https://github.com/gambitproject/gambit" data-icon="octicon-star" data-size="large" data-show-count="true" aria-label="Star gambitproject/gambit on GitHub">Star</a>
27+
<a class="github-button" href="https://github.com/gambitproject/gambit/fork" data-icon="octicon-repo-forked" data-size="large" data-show-count="true" aria-label="Fork gambitproject/gambit on GitHub">Fork</a>
28+
<script async defer src="https://buttons.github.io/buttons.js"></script>
29+
</div>
30+
31+
{{ if $buttonText }}
32+
<div class="hero-cta">
33+
<a href="{{ $buttonLink }}"><button class="cta-button">{{ $buttonText }}</button></a>
34+
</div>
35+
{{ end }}
36+
</div>
37+
</div>
38+
</div>
39+
</div>
40+
</section>

0 commit comments

Comments
 (0)