aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--alphabetlearning/static/css/project.css29
-rw-r--r--alphabetlearning/templates/base.html5
-rw-r--r--alphabetlearning/templates/resources/admin_bar.html29
-rw-r--r--alphabetlearning/templates/resources/resource_list.html6
4 files changed, 37 insertions, 32 deletions
diff --git a/alphabetlearning/static/css/project.css b/alphabetlearning/static/css/project.css
index 3832efb..7c2bb5a 100644
--- a/alphabetlearning/static/css/project.css
+++ b/alphabetlearning/static/css/project.css
@@ -1,7 +1,6 @@
* {
box-sizing: border-box;
- background-color: #F1F3F6;
margin: 0;
padding: 0;
font-size: 18px;
@@ -46,6 +45,19 @@ nav > div > ul > li {
padding: 1px 2px;
}
+#resourceTabs {
+ display: flex;
+ margin: 10px auto;
+ justify-content: space-between;
+ border-bottom-style: dotted;
+ border-bottom-width: 2px;
+ padding: 10px;
+}
+
+#resourceTabs > li {
+ display: inline;
+}
+
.featured-container {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
@@ -58,7 +70,7 @@ nav > div > ul > li {
border-width: 2px;
border-radius: 5px;
padding: 10px;
- height: 560px;
+ /*height: 560px;*/
display: flex;
flex-direction: column;
justify-content: space-between;
@@ -98,6 +110,19 @@ nav > div > ul > li {
padding: 3px;
}
+.admin-box {
+ display: flex;
+ background-color: lightgray;
+ flex-direction: column;
+ justify-content: space-between;
+ border-style: solid;
+ border-color: black;
+ border-width: 2px;
+ border-radius: 4px;
+ padding: 8px;
+ margin: 20px auto;
+}
+
/* Change the colour of the box shadow */
.my-card-shadow-sm {
box-shadow: 0 0.25rem 0.5rem rgba(100, 100, 100, 0.1);
diff --git a/alphabetlearning/templates/base.html b/alphabetlearning/templates/base.html
index a0b2424..def801e 100644
--- a/alphabetlearning/templates/base.html
+++ b/alphabetlearning/templates/base.html
@@ -61,12 +61,10 @@
{% endif %}
</li>
<li>
-
{% if request.user.shoppingcart %}
<!- TODO - fix this, the logic should be different button if no cart ->
<! this is a problem because it seems you can have an empty cart ->
- <div>
<a href="{% url "payments:cart_detail" %}" class="full-basket-button">
<span>
Items in cart (
@@ -77,18 +75,15 @@
<path d="M8 1a2.5 2.5 0 0 1 2.5 2.5V4h-5v-.5A2.5 2.5 0 0 1 8 1m3.5 3v-.5a3.5 3.5 0 1 0-7 0V4H1v10a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V4zM2 5h12v9a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1z"/>
</svg>
</a>
- </div>
{% else %}
- <div>
<button disabled><span class="fw-bold px-1">Empty Basket</span>
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="currentColor" class="bi bi-bag-x" viewBox="0 0 16 16">
<path fill-rule="evenodd" d="M6.146 8.146a.5.5 0 0 1 .708 0L8 9.293l1.146-1.147a.5.5 0 1 1 .708.708L8.707 10l1.147 1.146a.5.5 0 0 1-.708.708L8 10.707l-1.146 1.147a.5.5 0 0 1-.708-.708L7.293 10 6.146 8.854a.5.5 0 0 1 0-.708"/>
<path d="M8 1a2.5 2.5 0 0 1 2.5 2.5V4h-5v-.5A2.5 2.5 0 0 1 8 1m3.5 3v-.5a3.5 3.5 0 1 0-7 0V4H1v10a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V4zM2 5h12v9a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1z"/>
</svg>
</button>
- </div>
{% endif %}
</li>
</ul>
diff --git a/alphabetlearning/templates/resources/admin_bar.html b/alphabetlearning/templates/resources/admin_bar.html
index be49e65..6d7b4b6 100644
--- a/alphabetlearning/templates/resources/admin_bar.html
+++ b/alphabetlearning/templates/resources/admin_bar.html
@@ -1,21 +1,8 @@
- {# admin block #}
- {% if request.user.is_authenticated and request.user.is_staff %}
- <div>
- <h5>Admin bar</h5>
- <p>
- Only you will see this bar - normal users will not see it. It allows us to
- include buttons for adding new resources, etc.
- </p>
- <div>
- <a href="{% url 'resources:create_resource' %}">Add a new resource</a>
- <div>
- Logged in as
- <strong>{{ request.user.email }}</strong>
- </div>
- <form action="{% url 'account_logout' %}" method="post" class="my-2">
- {% csrf_token %}
- <button type="submit">Log out</button>
- </form>
- </div>
- </div>
- {% endif %}
+{# admin block #}
+{% if request.user.is_authenticated and request.user.is_staff %}
+<h1>Admin</h1>
+<p> (this is not visible to customers!)</p>
+<div>
+ <a href="{% url 'resources:create_resource' %}">Add a new resource</a>
+</div>
+{% endif %}
diff --git a/alphabetlearning/templates/resources/resource_list.html b/alphabetlearning/templates/resources/resource_list.html
index bb32d90..a6e2a5d 100644
--- a/alphabetlearning/templates/resources/resource_list.html
+++ b/alphabetlearning/templates/resources/resource_list.html
@@ -6,7 +6,7 @@ Alphabet Learning - Resource List
{% endblock title %}
{% block content %}
<div class="container">
- <div>
+ <div class="admin-box">
{% include "resources/admin_bar.html" %}
</div>
@@ -35,9 +35,7 @@ Alphabet Learning - Resource List
{# standard resources #}
<div>
- <div>
- <h1>Standard resources</h1>
- </div>
+ <h1>Standard resources</h1>
</div>
<!-- Tabbed navigation bar for filtering -->