Skip to content

Commit

Permalink
Merge pull request #1632 from laws-africa/lawlibrary-donations
Browse files Browse the repository at this point in the history
Add donation page on lawlibrary
  • Loading branch information
nickmwangemi authored Dec 6, 2023
2 parents 55c82f6 + 3f2d2ca commit c26ccef
Show file tree
Hide file tree
Showing 13 changed files with 96 additions and 25 deletions.
Binary file added lawlibrary/static/images/snapscan.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions lawlibrary/templates/lawlibrary/home.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ <h4 class="mb-4">
{% endblocktrans %}
</h4>
{% endblock %}
{% block after-search %}
{% include 'liiweb/_donate_call_to_action.html' %}
{% endblock %}
{% block hero-logos %}
<img src="{% static 'images/africanlii-logo.svg' %}" alt="AfricanLII"/>
<img src="{% static 'images/jifa.png' %}" alt="JIFA"/>
Expand Down
46 changes: 46 additions & 0 deletions lawlibrary/templates/liiweb/donate.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
{% extends 'liiweb/donate.html' %}
{% load static i18n %}
{% block intro %}
<p class="mb-4">
{% blocktrans trimmed %}
Donate to LawLibrary and support our work to providing free and anonymous access
to case law, legislation and secondary legal materials from South Africa.
{% endblocktrans %}
</p>
<h3 class="mb-4">Donate with Snapscan</h3>
<p class="mb-4">
{% blocktrans trimmed %}
Scan the Snapscan QR code below to donate to LawLibrary.
{% endblocktrans %}
</p>
<p>
<img src="{% static 'images/snapscan.png' %}"
alt="Snapscan QR code"
width="270"
height="315"/>
</p>
<h3 class="mb-4">Donate directly</h3>
<p class="mb-4">
{% blocktrans trimmed %}
You can also donate directly to LawLibrary by making a deposit into our bank account.
{% endblocktrans %}
</p>
<p class="mb-4">
<strong>Bank:</strong> FNB South Africa
<br/>
<strong>Account number:</strong> 6279 279 6579
<br/>
<strong>Account name:</strong>Laws.Africa
<br/>
<strong>Swift code:</strong> FIRNZAJJ
<br/>
</p>
<h3 class="mb-4">Section 18A Tax Certificate</h3>
<p class="mb-4">
{% blocktrans trimmed %}
To receive your Section 18A Tax Certificate for your donation, please email us at <a href="mailto:[email protected]">[email protected]</a>
{% endblocktrans %}
</p>
{% endblock %}
{% block about %}{% endblock %}
{% block payment-details %}{% endblock %}
4 changes: 4 additions & 0 deletions liiweb/static/stylesheets/liiweb.scss
Original file line number Diff line number Diff line change
@@ -1,2 +1,6 @@
@import "stylesheets/peachjam";
@import "components/index";

.donate {
background-color: transparentize($primary, 0.80);
}
22 changes: 22 additions & 0 deletions liiweb/templates/liiweb/_donate_call_to_action.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{% load i18n %}
<section class="py-3 donate">
<div class="container">
<div class="row justify-content-center align-items-center">
<div class="col-md-6">
<h3 class="font-weight-bold">
{% blocktrans %}
Donate to {{ APP_NAME }}
{% endblocktrans %}
</h3>
<p class="lead">
{% blocktrans %}
{{ APP_NAME }} is an independent, self-funded organisation and needs your support.
{% endblocktrans %}
</p>
</div>
<div class="col-md-auto align-content-center">
<a class="btn btn-danger btn-lg btn-block" href="{% url 'donate' %}">{% trans 'Donate' %}</a>
</div>
</div>
</div>
</section>
13 changes: 13 additions & 0 deletions liiweb/templates/liiweb/donate.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{% extends "peachjam/layouts/main.html" %}
{% load i18n %}
{% block title %}
{% trans 'Donate' %}
{% endblock %}
{% block page-content %}
<section class="container my-4">
<h1 class="mb-4">{% blocktrans %}Donate to {{ APP_NAME }}{% endblocktrans %}</h1>
{% block intro %}{% endblock %}
{% block about %}{% endblock %}
{% block payment-details %}{% endblock %}
</section>
{% endblock %}
2 changes: 2 additions & 0 deletions liiweb/urls.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
from django.urls import include, path, re_path

from liiweb import views
from liiweb.views.donate import DonatePageView

urlpatterns = [
path("", views.HomePageView.as_view(), name="home_page"),
Expand All @@ -27,5 +28,6 @@
views.RedirectCaseURLsView.as_view(),
name="old_lii_case_redirect",
),
path("donate/", DonatePageView.as_view(), name="donate"),
path("", include("peachjam.urls")),
]
5 changes: 5 additions & 0 deletions liiweb/views/donate.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
from django.views.generic import TemplateView


class DonatePageView(TemplateView):
template_name = "liiweb/donate.html"
4 changes: 0 additions & 4 deletions seylii/static/stylesheets/seylii.scss
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,3 @@ footer {
.btn.btn-primary {
color: #fff;
}

.donate {
background-color: transparentize($primary, 0.80);
}
File renamed without changes.
14 changes: 1 addition & 13 deletions seylii/templates/liiweb/home.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,7 @@ <h4 class="mb-4">
<img src="{% static 'images/indigo-logo.jpg' %}" alt="indigo-logo"/>
{% endblock %}
{% block after-search %}
<section class="py-3 donate">
<div class="container">
<div class="row justify-content-center align-items-center">
<div class="col-md-6">
<h3 class="font-weight-bold">Donate to SeyLII</h3>
<p class="lead">SeyLII is an independent, self-funded organisation and needs your support.</p>
</div>
<div class="col-md-auto align-content-center">
<a class="btn btn-danger btn-lg btn-block" href="{% url 'donate' %}">Donate</a>
</div>
</div>
</div>
</section>
{% include 'liiweb/_donate_call_to_action.html' %}
{% endblock %}
{% block second-col-about %}
<div>
Expand Down
3 changes: 0 additions & 3 deletions seylii/urls.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
from django.urls import include, path

from seylii.views import DonatePageView

urlpatterns = [
path("donate/", DonatePageView.as_view(), name="donate"),
path("", include("liiweb.urls")),
]
5 changes: 0 additions & 5 deletions seylii/views.py
Original file line number Diff line number Diff line change
@@ -1,5 +0,0 @@
from django.views.generic import TemplateView


class DonatePageView(TemplateView):
template_name = "seylii/donate.html"

0 comments on commit c26ccef

Please sign in to comment.