Skip to content

Commit

Permalink
new lawlibrary homepage
Browse files Browse the repository at this point in the history
  • Loading branch information
longhotsummer committed Jul 12, 2024
1 parent 7a97c30 commit 2e3f4a0
Show file tree
Hide file tree
Showing 4 changed files with 91 additions and 80 deletions.
Binary file added lawlibrary/static/images/hero-logo.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
37 changes: 22 additions & 15 deletions lawlibrary/templates/lawlibrary/home.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,29 @@
{% block hero-headings-title %}
{% trans 'Welcome to the digital Law Library of South Africa' %}
{% endblock %}
{% block hero-headings-welcome %}
{% blocktrans trimmed %}
Reliable and current access to the law of South Africa: annotated and consolidated legislation, case summaries,
caselaw collections by subject, and legal commentary. Read, use and share the law freely.
{% endblocktrans %}
{% endblock %}
{% block hero-headings-blurb %}
{% blocktrans trimmed %}
LawLibrary.org.za is a project of the AfricanLII and Judicial Institute for Africa at the University of Cape Town.
Legislation digitised by Laws.Africa.
{% endblocktrans %}
{% endblock %}
{% block hero-logos %}
{{ block.super }}
<img src="{% static 'images/jifa.png' %}" alt="JIFA"/>
{% block hero %}
{% block hero-search %}
<section class="pt-5 pb-3 hero-search">
<div class="container">{% include 'liiweb/_hero_search.html' %}</div>
</section>
{% endblock %}
<section class="pt-5 pt-3">
<div class="container">
<div class="row">
<div class="col-9">
<h2>Law Library South Africa</h2>
<p class="h4 mt-4">The most comprehensive collection of free legal information in South Africa.</p>
</div>
<div class="col-3 col-lg-2 offset-lg-1 text-center">
<img src="{% static 'images/hero-logo.jpg' %}"
class="img-fluid"
alt="Law Library logo"/>
</div>
</div>
</div>
</section>
{% endblock %}
{% block about %}{% endblock %}
{% block pocketlaw %}
{% include 'liiweb/_donate_call_to_action.html' %}
{{ block.super }}
Expand Down
21 changes: 21 additions & 0 deletions liiweb/templates/liiweb/_hero_search.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{% load i18n %}
<div class="row justify-content-center">
<div class="col col-md-10 col-lg-8">
<form method="get" action="{% url 'search:search' %}" class="d-flex mb-2">
<input type="text"
class="form-control form-control-lg flex-grow-1"
placeholder="{% blocktrans %}Search {{ APP_NAME }}{% endblocktrans %}"
aria-label="{% blocktrans %}Search {{ APP_NAME }}{% endblocktrans %}"
aria-describedby="button-addon2"
autofocus=""
name="q"/>
<input type="submit"
class="btn btn-primary ms-2 btn-lg"
value="{% trans 'Search' %}"/>
</form>
<div class="d-flex">
<a class="me-4" href="{% url 'search:search' %}?show-advanced-tab=1">{% trans 'Advanced search' %}</a>
{% include "peachjam/_help_button.html" with link="search" %}
</div>
</div>
</div>
113 changes: 48 additions & 65 deletions liiweb/templates/liiweb/home.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,78 +4,61 @@
{% trans 'Home' %}
{% endblock %}
{% block page-content %}
<section class="hero">
{% block hero-img %}
<img class="hero__background-img"
src="{% static 'images/banner.jpg' %}"
srcset="{% static 'images/banner-small.jpg' %} 770w,
{% static 'images/banner.jpg' %} 1920w"
sizes="100vw"
alt="{{ APP_NAME }}"
height="40"/>
{% endblock %}
<div class="hero__content">
<div class="row">
<div class="col-lg-8 col-12">
{% block hero-content %}
{% block hero-headings %}<h1 class="mb-4">{{ APP_NAME }}</h1>{% endblock %}
{% endblock %}
</div>
</div>
</div>
</section>
<section class="py-5 hero-search">
<div class="container">
{% block hero-search %}
<div class="row justify-content-center">
<div class="col col-md-10 col-lg-8">
<form method="get" action="{% url 'search:search' %}" class="d-flex mb-2">
<input type="text"
class="form-control form-control-lg flex-grow-1"
placeholder="{% blocktrans %}Search {{ APP_NAME }}{% endblocktrans %}"
aria-label="{% blocktrans %}Search {{ APP_NAME }}{% endblocktrans %}"
aria-describedby="button-addon2"
autofocus=""
name="q"/>
<input type="submit"
class="btn btn-primary ms-2 btn-lg"
value="{% trans 'Search' %}"/>
</form>
<div class="d-flex">
<a class="me-4" href="{% url 'search:search' %}?show-advanced-tab=1">{% trans 'Advanced search' %}</a>
{% include "peachjam/_help_button.html" with link="search" %}
</div>
{% block hero %}
<section class="hero">
{% block hero-img %}
<img class="hero__background-img"
src="{% static 'images/banner.jpg' %}"
srcset="{% static 'images/banner-small.jpg' %} 770w,
{% static 'images/banner.jpg' %} 1920w"
sizes="100vw"
alt="{{ APP_NAME }}"
height="40"/>
{% endblock %}
<div class="hero__content">
<div class="row">
<div class="col-lg-8 col-12">
{% block hero-content %}
{% block hero-headings %}<h1 class="mb-4">{{ APP_NAME }}</h1>{% endblock %}
{% endblock %}
</div>
</div>
{% endblock %}
</div>
</section>
</div>
</section>
{% block hero-search %}
<section class="py-5 hero-search">
<div class="container">{% include 'liiweb/_hero_search.html' %}</div>
</section>
{% endblock %}
{% endblock %}
{% block after-search %}{% endblock %}
<section class="mt-2">
<div class="container">
<div class="row justify-content-between align-items-center mt-5 mb-3">
<div class="col-12 col-lg-6">
{% block second-column-content %}
{% block second-col-about %}{% endblock %}
{% block second-col-logos %}{% endblock %}
{% if PEACHJAM_SETTINGS.facebook_link or PEACHJAM_SETTINGS.twitter_link or PEACHJAM_SETTINGS.linkedin_link %}
{% block social-media %}
{% include 'peachjam/_social_media.html' %}
{% endblock %}
{% endif %}
{% endblock %}
</div>
<div class="col-12 col-lg-6">
<div class="hero-logos row justify-content-center">
{% block hero-logos %}
<img src="{% static 'images/africanlii-logo.svg' %}" alt="AfricanLII"/>
<img src="{% static 'images/laws-africa-logo.png' %}" alt="Laws.Africa"/>
{% block about %}
<section class="mt-2">
<div class="container">
<div class="row justify-content-between align-items-center mt-5 mb-3">
<div class="col-12 col-lg-6">
{% block second-column-content %}
{% block second-col-about %}{% endblock %}
{% block second-col-logos %}{% endblock %}
{% if PEACHJAM_SETTINGS.facebook_link or PEACHJAM_SETTINGS.twitter_link or PEACHJAM_SETTINGS.linkedin_link %}
{% block social-media %}
{% include 'peachjam/_social_media.html' %}
{% endblock %}
{% endif %}
{% endblock %}
</div>
<div class="col-12 col-lg-6">
<div class="hero-logos row justify-content-center">
{% block hero-logos %}
<img src="{% static 'images/africanlii-logo.svg' %}" alt="AfricanLII"/>
<img src="{% static 'images/laws-africa-logo.png' %}" alt="Laws.Africa"/>
{% endblock %}
</div>
</div>
</div>
</div>
</div>
</section>
</section>
{% endblock %}
{% block recent-documents %}
<section class="my-5">
<div class="container">
Expand Down

0 comments on commit 2e3f4a0

Please sign in to comment.