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

UI/icons consistent #99

Merged
merged 19 commits into from
Feb 12, 2025
Merged
Show file tree
Hide file tree
Changes from 14 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
33 changes: 21 additions & 12 deletions home/templates/components/search_bar.html
Original file line number Diff line number Diff line change
@@ -1,15 +1,24 @@
<!DOCTYPE html>
<html lang="en">
<form method="get" action="{{ search_url }}" class="d-flex gap-2">
{% for key, value in current_params.items %}
{% if key != 'q' and key != 'page' %}
<input type="hidden" name="{{ key }}" value="{{ value }}">
{% endif %}
{% endfor %}
{{ search_form.q }}
<button type="submit" class="btn btn-primary">Search</button>
{% if current_search %}
<a href="{{ search_url }}" class="btn btn-outline-secondary">Clear</a>
{% endif %}
</form>
<form method="get" action="{{ search_url }}" class="d-flex gap-2">
{% for key, value in current_params.items %}
{% if key != 'q' and key != 'page' %}
<input type="hidden" name="{{ key }}" value="{{ value }}">
{% endif %}
{% endfor %}
{{ search_form.q }}
<!-- <div class="w-100"> -->
<button type="submit" class="btn btn-primary">
<!-- <i class="bx bxs-search" alt=""></i> -->
Search
</button>

{% if current_search %}
<a href="{{ search_url }}" class="btn btn-outline-secondary">
<!-- <i class="bx bxs-undo" alt=""></i> -->
Clear</a>
{% endif %}
<!-- </div> -->
</form>

</html>
2 changes: 1 addition & 1 deletion home/templates/home/profile.html
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ <h1>Profile</h1>

<div class="text-center">
<button type="submit" class="btn btn-primary" style="background-color: #6933AD; border: none;">
Update Profile
<i class="bx bxs-user-check" alt=""></i> Update Profile
</button>
<!-- <a href="{% url 'home' %}" class="btn btn-primary" style="background-color: #6933AD; border: none; margin-left: 10px;">
Cancel
Expand Down
8 changes: 4 additions & 4 deletions home/templates/organisation/organisation.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<nav aria-label="breadcrumb">
<ol class="breadcrumb mb-0">
<li class="breadcrumb-item active" aria-current="page">
<i class="bx bxs-buildings"></i> My Organisation
<i class="bx bxs-buildings" alt=""></i> My Organisation
</li>
</ol>
</nav>
Expand All @@ -26,7 +26,7 @@ <h2 class="text-2xl font-bold d-inline-block">Projects</h2>
{% if can_create %}
<a href="{% url 'project_create' organisation.id %}">
<button type="button" class="btn btn-primary">
<i class="bx bxs-folder-plus align-middle"></i> Create project
<i class="bx bxs-folder-plus" alt=""></i> Create project
</button>
</a>
{% endif %}
Expand All @@ -46,13 +46,13 @@ <h2 class="text-2xl font-bold d-inline-block">Projects</h2>
{% if can_edit|get_item:project.id %}
<a href="{% url 'project_edit' project.id %}">
<button type="button" class="btn btn-light">
<i class="bx bxs-edit"></i> Edit
<i class="bx bxs-edit" alt=""></i> Edit
</button>
</a>
{% endif %}
<a href="{% url 'project' project.id %}">
<button type="button" class="btn btn-dark">
<i class="bx bxs-folder-open"></i> View
<i class="bx bxs-folder-open" alt=""></i> View
</button>
</a>
</div>
Expand Down
2 changes: 1 addition & 1 deletion home/templates/projects/create.html
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ <h1>Create Project</h1>
{% endfor %}
<div class="text-center">
<button type="submit" class="btn btn-primary" style="background-color: #6933AD; border: none;">
Create Project
<i class="bx bxs-folder-plus" alt=""></i> Create Project
</button>
</div>
</form>
Expand Down
12 changes: 6 additions & 6 deletions home/templates/projects/project.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
<nav aria-label="breadcrumb">
<ol class="breadcrumb mb-0">
<li class="breadcrumb-item" aria-current="page">
<i class="bx bxs-buildings"></i> <a href="{% url 'myorganisation' %}">My Organisation</a>
<i class="bx bxs-buildings" alt=""></i> <a href="{% url 'myorganisation' %}">My Organisation</a>
</li>
<li class="breadcrumb-item active" aria-current="page">
<i class="bx bxs-folder-open"></i> Project: {{ project.name }}
<i class="bx bxs-folder-open" alt=""></i> Project: {{ project.name }}
</li>
</ol>
</nav>
Expand All @@ -30,7 +30,7 @@ <h1>{{ project.name }}</h1>
<div></div>
<div></div>
<div>
<a href="{% url 'project_delete' project.pk %}" class="btn btn-danger">Delete project</a>
<a href="{% url 'project_delete' project.pk %}" class="btn btn-danger"><i class="bx bxs-trash" alt=""></i>Delete project</a>
</div>
</div>
</div>
Expand All @@ -42,9 +42,9 @@ <h1>{{ project.name }}</h1>
<div class="w-100 d-flex justify-content-between align-items-center mt-3 mb-6">
<h2 class="text-2xl font-bold d-inline-block">Surveys</h2>
{% if can_create %}
<a href="{% url "survey_create" project.id %}">
<a href="{% url 'survey_create' project.id %}">
<button type="button" class="btn btn-primary">
<i class="bx bx-chart align-middle"></i> Create survey
<i class="bx bx-chart" alt=""></i> Create survey
</button>
</a>
{% endif %}
Expand All @@ -60,7 +60,7 @@ <h3 class="card-title">{{ survey.name }}</h3>
<div class="mt-2 w-100 d-flex flex-wrap justify-content-end gap-2">
<a href="{% url 'survey' survey.id %}">
<button type="button" class="btn btn-dark">
<i class="bx bxs-chart align-middle"></i> View
<i class="bx bxs-chart" alt=""></i> View
</button>
</a>
</div>
Expand Down
2 changes: 1 addition & 1 deletion static/css/base.css
Original file line number Diff line number Diff line change
Expand Up @@ -112,4 +112,4 @@ h1, h2, h3, h4, h5, h6 {

.form-control {
padding: 0.375rem 0.75rem;
}
}
92 changes: 46 additions & 46 deletions static/templates/base.html
Original file line number Diff line number Diff line change
@@ -1,46 +1,46 @@
{% load static %}
{% load django_bootstrap5 %}
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>
{% block title %}SORT{% endblock %}
</title>
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css"
rel="stylesheet">
<link href="https://cdn.jsdelivr.net/npm/[email protected]/css/boxicons.min.css"
rel="stylesheet">
<link href="{% static 'css/base.css' %}" rel="stylesheet">
<link href="{% static 'css/utilities.css' %}" rel="stylesheet">
{% block extra_css %}{% endblock %}
</head>
<body>
{% block navitems %}<!-- Content here -->{% endblock %}
<main>
<div class="card-body">
{% if messages %}
{% for message in messages %}
{% if message.tags == 'success' %}
<div class="text-center alert alert-success" role="alert">{{ message }}</div>
{% endif %}
{% if message.tags == 'error' %}
<div class="text-center alert alert-danger" role="alert">{{ message }}</div>
{% elif message.tags == 'warning' %}
<div class="text-center alert alert-warning" role="alert">{{ message }}</div>
{% elif message.tags == 'info' %}
<div class="text-center alert alert-info" role="alert">{{ message }}</div>
{% endif %}
{% endfor %}
{% endif %}
{% block content %}<!-- Content here -->{% endblock %}
</div>
</main>

{% include 'footer.html' %}

<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
</body>
</html>
{% load static %}
{% load django_bootstrap5 %}
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>
{% block title %}SORT{% endblock %}
</title>
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css"
rel="stylesheet">
<link href="https://cdn.jsdelivr.net/npm/[email protected]/css/boxicons.min.css"
rel="stylesheet">
<link href="{% static 'css/base.css' %}" rel="stylesheet">
<link href="{% static 'css/utilities.css' %}" rel="stylesheet">
{% block extra_css %}{% endblock %}
</head>
<body>
{% block navitems %}<!-- Content here -->{% endblock %}
<main>
<div class="card-body">
{% if messages %}
{% for message in messages %}
{% if message.tags == 'success' %}
<div class="text-center alert alert-success" role="alert">{{ message }}</div>
{% endif %}
{% if message.tags == 'error' %}
<div class="text-center alert alert-danger" role="alert">{{ message }}</div>
{% elif message.tags == 'warning' %}
<div class="text-center alert alert-warning" role="alert">{{ message }}</div>
{% elif message.tags == 'info' %}
<div class="text-center alert alert-info" role="alert">{{ message }}</div>
{% endif %}
{% endfor %}
{% endif %}
{% block content %}<!-- Content here -->{% endblock %}
</div>
</main>

{% include 'footer.html' %}

<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
</body>
</html>
6 changes: 3 additions & 3 deletions static/templates/base_manager.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@
<div class="collapse navbar-collapse" id="navbarNav">
<ul class="navbar-nav ms-auto">
<li class="nav-item">
<a class="nav-link {% if request.path == invite_url %}active{% endif %}" href="{{ home_url }}">Home</a>
<a class="nav-link {% if request.path == invite_url %}active{% endif %}" href="{{ home_url }}"><i class="bx bxs-home" alt=""></i>Home</a>
</li>
<li class="nav-item">
<a class="nav-link {% if '/profile' in request.path %}active{% endif %}" href="{% url 'profile' %}">Profile</a>
<a class="nav-link {% if '/profile' in request.path %}active{% endif %}" href="{% url 'profile' %}"><i class="bx bxs-user" alt=""></i>Profile</a>
</li>
<li class="nav-item">
{% url 'organisation_create' as organisation_create_url %}
Expand All @@ -30,7 +30,7 @@
{% if '/projects' in request.path %}active{% endif %}
{% if '/survey' in request.path %}active{% endif %}
{% if '/completion' in request.path %}active{% endif %}"
href="{% url 'myorganisation' %}">My Organisation</a>
href="{% url 'myorganisation' %}"><i class="bx bxs-buildings" alt=""></i>My Organisation</a>
</li>
{% if user.is_authenticated %}
<li class="nav-item">
Expand Down
2 changes: 1 addition & 1 deletion survey/templates/invitations/send_invitation.html
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ <h1>Invitations</h1>
</div>

<div class="text-center">
<button type="submit" class="btn btn-primary" style="background-color: #6933AD; border: none;">Send</button>
<button type="submit" class="btn btn-primary" style="background-color: #6933AD; border: none;"><i class="bx bxs-send" alt=""></i> Send</button>
</div>
</form>
</div>
Expand Down
2 changes: 1 addition & 1 deletion survey/templates/survey/create.html
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ <h1>Create Survey</h1>
{% endfor %}
<div class="text-center">
<button type="submit" class="btn btn-primary" style="background-color: #6933AD; border: none;">
Create Survey
<i class="bx bx-chart" alt=""></i> Create Survey
</button>
</div>
</form>
Expand Down
12 changes: 6 additions & 6 deletions survey/templates/survey/survey.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@
<nav aria-label="breadcrumb">
<ol class="breadcrumb">
<li class="breadcrumb-item" aria-current="page">
<i class="bx bxs-buildings"></i> <a href="{% url 'myorganisation' %}">My Organisation</a>
<i class="bx bxs-buildings" alt=""></i> <a href="{% url 'myorganisation' %}">My Organisation</a>
</li>
<li class="breadcrumb-item" aria-current="page">
<i class="bx bxs-folder-open"></i> <a
<i class="bx bxs-folder-open" alt=""></i> <a
href="{% url 'project' survey.project.id %}">Project: {{ survey.project.name }}</a>
</li>
<li class="breadcrumb-item active" aria-current="page">
<i class="bx bxs-chart"></i> Survey: {{ survey.name }}
<i class="bx bxs-chart" alt=""></i> Survey: {{ survey.name }}
</li>
</ol>
</nav>
Expand All @@ -29,7 +29,7 @@ <h1>{{ survey.name }}</h1>
<div></div>
<div></div>
<div>
<a href="{% url 'survey_delete' survey.pk %}" class="btn btn-danger">Delete survey</a>
<a href="{% url 'survey_delete' survey.pk %}" class="btn btn-danger"><i class="bx bxs-trash" alt=""></i>Delete survey</a>
</div>
</div>
</div>
Expand All @@ -48,7 +48,7 @@ <h2>1. Configure Your Survey</h2>
<div class="mb-3 mt-3">
<p>First, configure you survey here. You are able to add and customise demographic questions asked
in the survey.</p>
<a href="{% url "survey_configure" survey.id %}" class="btn btn-primary">Configure the survey</a>
<a href="{% url 'survey_configure' survey.id %}" class="btn btn-primary"><i class="bx bxs-cog" alt=""></i> Configure the survey</a>
</div>
</div>
</div>
Expand Down Expand Up @@ -135,7 +135,7 @@ <h2>2. Invite Your Participants</h2>
<form method="post" action="{% url 'suvey_create_invite' survey.id %}">
{% csrf_token %}
<input type="submit" name="generate_token" value="Generate invitation"
class="btn btn-primary"/>
class="btn btn-primary"></input>
</form>
{% endif %}
</div>
Expand Down
2 changes: 1 addition & 1 deletion survey/templates/survey/survey_configure.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<i class="bx bxs-chart"></i> <a href="{% url 'survey' survey.id %}"> Survey: {{ survey.name }}</a>
</li>
<li class="breadcrumb-item active" aria-current="page">
<i class="bx bxs-chart"></i> Configuration
<i class="bx bxs-cog"></i> Configuration
</li>
</ol>
</nav>
Expand Down