Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Setup CIVLII #1697

Merged
merged 8 commits into from
Jan 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 17 additions & 1 deletion .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -350,10 +350,26 @@ jobs:
git_remote_url: 'ssh://[email protected]:22/mauritiuslii-peachjam'
git_push_flags: '--force'

deploy-civlii:
if: ${{ !cancelled() }}
needs: deploy-mauritiuslii
name: Deploy to civlii
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0

- name: git push to civlii.laws.africa
uses: dokku/github-action@master
with:
ssh_private_key: ${{ secrets.SSH_DEPLOYMENT_KEY }}
git_remote_url: 'ssh://[email protected]:22/civlii-peachjam'
git_push_flags: '--force'

deploy-lii:
if: ${{ !cancelled() }}
needs: deploy-mauritiuslii
needs: deploy-civlii
name: Deploy to lii
runs-on: ubuntu-latest
steps:
Expand Down
Empty file added civlii/__init__.py
Empty file.
6 changes: 6 additions & 0 deletions civlii/apps.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
from django.apps import AppConfig


class CIVLIIConfig(AppConfig):
default_auto_field = "django.db.models.BigAutoField"
name = "civlii"
15 changes: 15 additions & 0 deletions civlii/settings.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
from django.utils.translation import gettext_lazy as _

from liiweb.settings import * # noqa

INSTALLED_APPS = ["civlii.apps.CIVLIIConfig"] + INSTALLED_APPS # noqa


JAZZMIN_SETTINGS["site_title"] = "CIVLII" # noqa
JAZZMIN_SETTINGS["site_header"] = "CIVLII" # noqa
JAZZMIN_SETTINGS["site_brand"] = "civlii.laws.africa" # noqa

LANGUAGES = [
("fr", _("French")),
("en", _("English")),
]
1 change: 1 addition & 0 deletions civlii/static/stylesheets/_variables.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
$primary: #326fd1;
10 changes: 10 additions & 0 deletions civlii/static/stylesheets/civlii.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
@import "variables";
@import "stylesheets/liiweb";

footer {
background-color: $gray-100;
}

.btn.btn-primary {
color: #fff;
}
10 changes: 10 additions & 0 deletions civlii/templates/liiweb/home.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{% extends "liiweb/home.html" %}
{% load i18n static %}
{% block hero-headings %}
<h1 class="mb-4">{% trans "Welcome to the Côte d'Ivoire Legal Information Institute" %}</h1>
<h4 class="mb-4">
{% blocktrans trimmed %}
Free access to the law of Côte d'Ivoire. CIVLII is a member of the community of African LIIs and of the Free Access to Law Movement.
{% endblocktrans %}
</h4>
{% endblock %}
27 changes: 27 additions & 0 deletions civlii/templates/peachjam/_header.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{% extends 'peachjam/_header.html' %}
{% load static i18n %}
{% block top-bar %}{% endblock %}
{% block navbar-logo %}
<img src="{% static 'images/logo.png' %}" alt="{{ APP_NAME }}" height="40"/>
<a class="navbar-brand" href="{% url 'home_page' %}">CIVLII</a>
{% endblock %}
{% block nav-items %}
<li class="nav-item">
<a class="nav-link {% if view.navbar_link == 'judgments' %}active{% endif %}"
href="{% url 'judgment_list' %}">
{% trans 'Judgments' %}
</a>
</li>
<li class="nav-item">
<a class="nav-link {% if view.navbar_link == 'legislation' %}active{% endif %}"
href="{% url 'legislation_list' %}">
{% trans 'Legislation' %}
</a>
</li>
<li class="nav-item">
<a class="nav-link {% if view.navbar_link == 'about' %}active{% endif %}"
href="{% url 'about' %}">
{% trans 'About' %}
</a>
</li>
{% endblock %}
50 changes: 50 additions & 0 deletions civlii/templates/peachjam/about.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
{% extends "peachjam/layouts/main.html" %}
{% load i18n %}
{% block title %}
{% trans 'About' %}
{% endblock %}
{% block page-content %}
<section class="py-5">
<div class="container">
<h1 class="mb-4">{% trans 'About CIVLII' %}</h1>
<p class="lead mb-4">
{% blocktrans trimmed %}
CIVLII is a member of the community of African LIIs and of the Free Access to Law Movement.
{% endblocktrans %}
</p>
<h2 class="mb-4">AfricanLII</h2>
<p class="mb-4">
{% blocktrans trimmed %}
<a href="https://africanlii.org/" target="_blank" rel="noreferrer noopener">AfricanLII</a> is a part of the
<a href="http://www.dgru.uct.ac.za/" target="_blank" rel="noreferrer noopener">Democratic
Governance and Rights Unit</a> at the Faculty of Law, University of Cape Town
(UCT), South Africa. AfricanLII helps individuals, organizations, and governments build and maintain sustainable
free access to law portals, and reach the people of Africa and beyond.
{% endblocktrans %}
</p>
<h2 class="mb-4">Laws.Africa</h2>
<p class="mb-4">
{% blocktrans trimmed %}
<a href="https://laws.africa/" target="_blank" rel="noreferrer noopener">Laws.Africa</a> is a South Africa
non-profit organisation that digitises African legal information for public use.
Open access to digital African legal information helps communities to thrive, businesses to succeed, and judicial
officers and civil servants to deliver services efficiently and effectively.
{% endblocktrans %}
</p>
<h2 class="mb-4" id="contact">{% trans 'Contact us' %}</h2>
<div class="mb-4">
{% blocktrans trimmed %}
<div>
<a href="mailto:[email protected]"><span style="margin-right: .2rem"><i class="bi bi-envelope mr-2"></i></span>[email protected]</a>
</div>
<div>
<a href="https://facebook.com/africanlii/"><span style="margin-right: .2rem"><i class="bi bi-facebook mr-2"></i></span>facebook.com/africanlii</a>
</div>
<div>
<a href="https://twitter.com/AfricanLII/"><span style="margin-right: .2rem"><i class="bi bi-twitter mr-2"></i></span>twitter.com/AfricanLII</a>
</div>
{% endblocktrans %}
</div>
</div>
</section>
{% endblock %}
7 changes: 7 additions & 0 deletions civlii/templates/peachjam/layouts/main.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{% extends "peachjam/layouts/main.html" %}
{% load sass_tags %}
{% block head-css %}
<link rel="stylesheet"
href="{% sass_src 'stylesheets/civlii.scss' %}"
type="text/css"/>
{% endblock %}
8 changes: 8 additions & 0 deletions civlii/templates/peachjam/terms_of_use.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{% extends "peachjam/terms_of_use.html" %}
{% block terms-of-use-content %}
{% with organisation_name="CIVLII" org_link_text="https://civlii.laws.africa/" robots_link_text="https://civlii.laws.africa/robots.txt" contact_email="[email protected]" %}
{% with who_are_we="CIVLII is a member of the community of African LIIs and of the Free Access to Law Movement." %}
{% include "peachjam/_terms_of_use_content.html" %}
{% endwith %}
{% endwith %}
{% endblock %}
4 changes: 4 additions & 0 deletions peachjam/resolver.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ class RedirectResolver:
"country_code": "aa",
"domain": "africanlii.org",
},
"civlii": {
"country_code": "ci",
"domain": "civlii.laws.africa",
},
"eswatinilii": {
"country_code": "sz",
"domain": "eswatinilii.org",
Expand Down
Loading