Skip to content

Commit

Permalink
Merge pull request #9 from lynngoh7/updated-donate-button
Browse files Browse the repository at this point in the history
Updated the 'Donate' button
  • Loading branch information
jaredliw authored Aug 25, 2024
2 parents bfc6255 + 1d2632c commit 6d93e00
Show file tree
Hide file tree
Showing 5 changed files with 74 additions and 39 deletions.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,6 @@ node_modules/
.idea/

# Python environment
venv/
venv/

.DS_Store
1 change: 1 addition & 0 deletions assets/app.scss
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ $body-color: $gray-800;
$accordion-button-color: $gray-600;
$accordion-button-active-color: $primary;
$nav-tabs-link-hover-border-color: transparent;
$modal-header-border-color: $gray-200;

@import "bootstrap/scss/variables-dark";
@import "bootstrap/scss/maps";
Expand Down
2 changes: 2 additions & 0 deletions layouts/page/join-us.html
Original file line number Diff line number Diff line change
Expand Up @@ -53,4 +53,6 @@ <h2 class="accordion-header" id="accordionHeader-{{ $hash }}">
{{ end }}
</div>
</div>

{{ partial "footer.html" }}
{{- end -}}
106 changes: 68 additions & 38 deletions layouts/partials/nav.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,42 +17,6 @@
<span class="navbar-toggler-icon"></span>
</button>

<!-- For sm screen and down -->
<div class="d-flex d-md-none offcanvas offcanvas-end" id="offcanvasNavbar">
<div class="offcanvas-header d-flex flex-column">
<button type="button" class="btn-close me-auto" data-bs-dismiss="offcanvas" aria-label="Close"></button>
<a class="navbar-brand offcanvas-navbar-brand lh-sm text-center mt-3 me-0 flex-wrap"
href="{{ absURL "" }}">
<span style="font-size: 1.1rem">{{ site.Title }}</span><br>
{{ site.Params.subtitle }}
</a>
</div>

<div class="offcanvas-body pt-0">
<ul class="navbar-nav justify-content-end flex-grow-1 pe-3">
{{ range site.Params.pages }}
<li class="nav-item">
<a class="nav-link text-uppercase py-1 text-center"
href="{{ absURL (index . 1) }}">
{{ index . 0 }}
</a>
</li>
{{ end }}

<li class="ms-2 pt-4">
<button class="btn donate-btn btn-outline-primary text-uppercase px-3 rounded-0"
type="button" style="font-size: 0.9rem;">
Donate
</button>
<a class="btn btn-primary text-white text-uppercase px-3 rounded-0 ms-2" type="button"
style="font-size: 0.9rem;" href="{{ absURL "join-us" }}">
Join Us
</a>
</li>
</ul>
</div>
</div>

<!-- For md screen and up -->
<ul class="d-none d-md-flex navbar-nav flex-row ms-auto">
{{ range site.Params.pages }}
Expand All @@ -64,17 +28,83 @@
{{ end }}

<li class="ms-2">
<button class="btn donate-btn btn-outline-primary text-uppercase px-4 rounded-0"
type="button" style="font-size: 0.9rem;">
<button class="btn donate-btn btn-outline-primary text-uppercase px-4 rounded-0" type="button"
data-bs-toggle="modal" data-bs-target="#donateModal" style="font-size: 0.9rem;">
Donate
</button>

<a class="btn btn-primary text-white text-uppercase px-4 rounded-0 ms-2" type="button"
style="font-size: 0.9rem;" href="{{ absURL "join-us" }}">
Join Us
</a>
</li>
</ul>
</div>

<!-- Donate Modal -->
<div class="modal fade" id="donateModal" tabindex="-1" aria-labelledby="donateModalLabel"
aria-hidden="true">
<div class="modal-fullscreen-sm-down modal-dialog modal-dialog-scrollable">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="donateModalLabel">Donation Details</h5>
<button type="button" class="btn-close" data-bs-dismiss="modal"
aria-label="Close"></button>
</div>

<div class="modal-body mb-2">
<h6 class="fw-normal">Thank you for considering a donation.<br>
Please transfer to:</h6>

<h6 class="text-center mt-3 mb-2">
<strong>3233325318</strong><br>
<strong>PPBP MALAYSIA</strong><br>
<strong>PUBLIC BANK</strong>
</h6>

<img src="{{ absURL "TIAPaymentQR.jpeg" }}" alt="QR Code" width="240"
class="d-block mx-auto">
</div>
</div>
</div>
</div>

<!-- For sm screen and down -->
<div class="d-flex d-md-none offcanvas offcanvas-end" id="offcanvasNavbar">
<div class="offcanvas-header d-flex flex-column">
<button type="button" class="btn-close ms-0 me-auto" data-bs-dismiss="offcanvas" aria-label="Close"></button>
<a class="navbar-brand offcanvas-navbar-brand lh-sm text-center mt-4 me-0 flex-wrap"
href="{{ absURL "" }}">
<span style="font-size: 1.1rem">{{ site.Title }}</span><br>
{{ site.Params.subtitle }}
</a>
</div>

<div class="offcanvas-body pt-0">
<ul class="navbar-nav justify-content-end flex-grow-1 pe-3">
{{ range site.Params.pages }}
<li class="nav-item">
<a class="nav-link text-uppercase py-1 text-center"
href="{{ absURL (index . 1) }}">
{{ index . 0 }}
</a>
</li>
{{ end }}

<li class="ms-2 pt-4">
<button class="btn donate-btn btn-outline-primary text-uppercase px-3 rounded-0"
type="button" style="font-size: 0.9rem;" data-bs-toggle="modal"
data-bs-target="#donateModal">
Donate
</button>
<a class="btn btn-primary text-white text-uppercase px-3 rounded-0 ms-2" type="button"
style="font-size: 0.9rem;" href="{{ absURL "join-us" }}">
Join Us
</a>
</li>
</ul>
</div>
</div>
</nav>

{{ with resources.Get "nav.css" | postCSS | minify }}
Expand Down
Binary file added static/TIAPaymentQR.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 6d93e00

Please sign in to comment.