Skip to content

Commit

Permalink
Merge pull request #102 from ardianta/feat/98/list-of-contributors
Browse files Browse the repository at this point in the history
Feat/98/list of contributors
  • Loading branch information
ardianta authored Oct 26, 2024
2 parents b8464ed + dd953fe commit 059acc2
Show file tree
Hide file tree
Showing 3 changed files with 85 additions and 68 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
repo: gohugoid/gohugoid.github.io
# Use if your pushing to a different repo.
# Dont add ".git" to the end of the URL (youl'll get 404s).
hugoVersion: extended_0.105.0
hugoVersion: extended_0.135.0
# Use if your site requires a specific version of Hugo
# Append "extended_" to the begining to use Hugo Extended
args: --gc --minify --cleanDestinationDir
Expand Down
2 changes: 1 addition & 1 deletion themes/nusantara/layouts/_default/baseof.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>{{ .Site.Title }}</title>

<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bulma@0.9.3/css/bulma.min.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bulma@1.0.2/css/bulma.min.css">
<script defer src="https://use.fontawesome.com/releases/v5.3.1/js/all.js"></script>
<link rel="icon" href="/logo.png" />

Expand Down
149 changes: 83 additions & 66 deletions themes/nusantara/layouts/index.html
Original file line number Diff line number Diff line change
@@ -1,82 +1,99 @@
{{ define "main" }}

<header class="hero is-danger is-medium">
<div class="hero-body">
<div class="container has-text-centered">
</div>

{{ $githubContributorsUrl := "https://api.github.com/repos/gohugoid/gohugoid-web/contributors" }}
{{ $contributors := resources.GetRemote $githubContributorsUrl | transform.Unmarshal }}

<header class="hero is-danger is-medium">
<div class="hero-body">
<div class="container has-text-centered">
</div>
</header>
</div>
</header>


<section class="section counter-panel">
<div class="container">
<div class="columns">
<div class="box hero column is-8 mx-auto">
<h2 class="title has-text-centered pt-5">Hugo Indonesia</h2>
<nav class="level is-mobile hero-body">
<div class="level-item has-text-centered">
<div>
<a href="https://t.me/gohugoid/" target="_blank">
<span class="icon">
<i class="fas fa-users fa-4x has-text-info"></i>
</span>
<p class="heading">Members</p>
<p class="title" id="member-count">0</p>
</a>
</div>
<section class="section counter-panel">
<div class="container">
<div class="columns">
<div class="box hero column is-8 mx-auto">
<h2 class="title has-text-centered pt-5">Hugo Indonesia</h2>
<nav class="level is-mobile hero-body">
<div class="level-item has-text-centered">
<div>
<a href="/post/">
<span class="icon">
<i class="fas fa-newspaper fa-4x has-text-info"></i>
</span>
<p class="heading">Artikel</p>
<p class="title" id="member-count">{{ len (where .Site.RegularPages "Section" "="
"post")}}</p>
</a>
</div>
<div class="level-item has-text-centered">
<div>
</div>
<div class="level-item has-text-centered">
<div>
<a href="#contributors">
<span class="icon">
<i class="fas fa-calendar-alt fa-4x has-text-warning"></i>
<i class="fas fa-users fa-4x has-text-warning"></i>
</span>
<p class="heading">Events</p>
<p class="title">0</p>
</div>
<p class="heading">Kontributor</p>
<p class="title">
{{ len $contributors }}
</p>
</a>
</div>
<div class="level-item has-text-centered">
<div>
<a href="/showcase/">
<span class="icon">
<i class="fas fa-globe-asia fa-4x has-text-primary"></i>
</span>
<p class="heading">Websites</p>
<p class="title">{{ len .Site.Data.showcase }}</p>
</a>
</div>
</div>
<div class="level-item has-text-centered">
<div>
<a href="/showcase/">
<span class="icon">
<i class="fas fa-globe-asia fa-4x has-text-primary"></i>
</span>
<p class="heading">Website</p>
<p class="title">{{ len .Site.Data.showcase }}</p>
</a>
</div>
</nav>
</div>
</div>
</nav>
</div>
</div>
</section>
</div>
</section>

<section class="section">
<div class="container">
<div class="columns">
<div class="column is-4 is-offset-1 has-text-center">
<img src="/img/status-update.svg" alt="/img/status-update.svg" title="About Us" width="400" />
</div>
<div class="column is-6">
<h2 class="title">About Us</h2>
<p>Hugo Indonesia adalah komunitas pengguna dan pengembang Hugo di Indonesia.
Mulai berdiri sejak 18 Desember 2017 (di Telegram). Komunitas ini bertujuan untuk belajar dan
berbagi segala hal tentang Hugo Static Site Generator dan JAM Stacks.
</p>
</div>
<section class="section">
<div class="container">
<div class="columns">
<div class="column is-4 is-offset-1">
<img src="/img/status-update.svg" alt="/img/status-update.svg" title="About Us" width="400" />
</div>
<div class="column is-6">
<h2 class="title">About Us</h2>
<p>Hugo Indonesia adalah komunitas pengguna dan pengembang Hugo di Indonesia.
Mulai berdiri sejak 18 Desember 2017 (di Telegram). Komunitas ini bertujuan untuk belajar dan
berbagi segala hal tentang Hugo Static Site Generator dan JAM Stacks.
</p>
</div>
</div>
</section>


</div>
</section>

<section class="section">
<div class="container">
<div class="column is-9 mx-auto">
<h2 class="title has-text-centered pt-5 pb-4" id="contributors">Contributors</h2>
<div class="grid is-col-min-6 is-gap-4">
{{ range $contributors }}
<div class="cell is-flex is-justify-content-center is-flex-direction-column is-align-items-center">
<a href="{{ .html_url }}" target="_blank">
<figure class="image is-128x128 mb-3">
<img src="{{ .avatar_url }}" class="is-rounded" />
</figure>
</a>
<a href="{{ .html_url }}" target="_blank">{{ .login }}</a>
</div>
{{ end }}
</div>
</div>
</div>
</section>

<script>
fetch("https://gohugoid.glitch.me/member-count")
.then(response => response.json())
.then(data => {
document.querySelector("#member-count").innerHTML = data;
});
</script>

{{ end }}
{{ end }}

0 comments on commit 059acc2

Please sign in to comment.