Skip to content

Commit

Permalink
Assembly Layers Add/Edit/Delete
Browse files Browse the repository at this point in the history
  • Loading branch information
ed-p-may committed Dec 12, 2024
1 parent af4123a commit fdb9951
Show file tree
Hide file tree
Showing 16 changed files with 129 additions and 100 deletions.
14 changes: 7 additions & 7 deletions PH_Materials/templates/account/login.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

{% block content %}

<h1 class="my-4 text-2xl leading-none tracking-tight text-white md:text-3xl lg:text-4xl">{% trans "Sign In" %}</h1>
<h1 class="my-4 text-2xl leading-none tracking-tight md:text-3xl lg:text-4xl">{% trans "Sign In" %}</h1>

{% get_providers as socialaccount_providers %}

Expand All @@ -29,7 +29,7 @@ <h1 class="my-4 text-2xl leading-none tracking-tight text-white md:text-3xl lg:t
{% include "socialaccount/snippets/login_extra.html" %}

{% else %}
<p class="mb-4 text-white">
<p class="mb-4 ">
{% blocktrans %}If you do not have an account yet, please create one:
<a class="alert alert-info hover:underline" href="{{ signup_url }}">Create an Account</a>
{% endblocktrans %}
Expand All @@ -40,20 +40,20 @@ <h1 class="my-4 text-2xl leading-none tracking-tight text-white md:text-3xl lg:t
{% csrf_token %}

<div class="mb-4">
{{ form.login|add_label_class:"text-white mb-4" }}
{% render_field form.login class="bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500" %}
{{ form.login|add_label_class:" mb-4" }}
{% render_field form.login class="bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark: dark:focus:ring-blue-500 dark:focus:border-blue-500" %}
</div>

<div class="mb-4">
{{ form.password|add_label_class:"text-white mb-2" }}
{% render_field form.password class="bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500" %}
{{ form.password|add_label_class:" mb-2" }}
{% render_field form.password class="bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark: dark:focus:ring-blue-500 dark:focus:border-blue-500" %}
</div>

{% if redirect_field_value %}
<input type="hidden" name="{{ redirect_field_name }}" value="{{ redirect_field_value }}" />
{% endif %}

<button class="primaryAction mt-2 bg-[#73B769] hover:bg-[#56964a] focus:outline-none text-white focus:ring-4 focus:ring-green-300 font-medium rounded-lg text-sm px-5 py-2.5 mr-2 mb-2" type="submit">
<button class="primaryAction mt-2 bg-[#73B769] hover:bg-[#56964a] focus:outline-none focus:ring-4 focus:ring-green-300 font-medium rounded-lg text-sm px-5 py-2.5 mr-2 mb-2" type="submit">
{% trans "Sign In" %}
</button>
</form>
Expand Down
6 changes: 3 additions & 3 deletions PH_Materials/templates/account/logout.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
{% block head_title %}{% trans "Sign Out" %}{% endblock %}

{% block content %}
<div class="flex flex-col items-center text-white">
<h1 class="text-4xl tracking-wide dark:text-white my-4">{% trans "Sign Out" %}</h1>
<div class="flex flex-col items-center ">
<h1 class="text-4xl tracking-wide dark: my-4">{% trans "Sign Out" %}</h1>

<p class="mt-2">{% trans 'Are you sure you want to sign out?' %}</p>

Expand All @@ -17,7 +17,7 @@ <h1 class="text-4xl tracking-wide dark:text-white my-4">{% trans "Sign Out" %}</
<input type="hidden" name="{{ redirect_field_name }}" value="{{ redirect_field_value }}"/>
{% endif %}

<button class="mt-6 bg-[#73B769] hover:bg-[#56964a] text-white font-bold py-2 px-4 rounded focus:outline-none focus:shadow-outline" type="submit">
<button class="mt-6 bg-[#73B769] hover:bg-[#56964a] font-bold py-2 px-4 rounded focus:outline-none focus:shadow-outline" type="submit">
{% trans 'Sign Out' %}
</button>
</form>
Expand Down
18 changes: 9 additions & 9 deletions PH_Materials/templates/account/signup.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
{% block head_title %}{% trans "Signup" %}{% endblock %}

{% block content %}
<h1 class="my-4 text-2xl leading-none tracking-tight text-white md:text-3xl lg:text-4xl">{% trans "Sign Up" %}</h1>
<h1 class="my-4 text-2xl leading-none tracking-tight md:text-3xl lg:text-4xl">{% trans "Sign Up" %}</h1>

<p class="mb-4 text-white">
<p class="mb-4 ">
{% blocktrans %}Already have an account? Then please
<a class="font-medium text-blue-600 dark:text-blue-500 hover:underline" href="{{ login_url }}">sign in</a>.
{% endblocktrans %}
Expand All @@ -27,25 +27,25 @@ <h1 class="my-4 text-2xl leading-none tracking-tight text-white md:text-3xl lg:t
{% endif %}

<div class="mb-4">
{{ form.username|add_label_class:"text-white mb-4" }}
{% render_field form.username class="bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500" %}
{{ form.username|add_label_class:" mb-4" }}
{% render_field form.username class="bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark: dark:focus:ring-blue-500 dark:focus:border-blue-500" %}
</div>

<div class="mb-4">
{{ form.password1|add_label_class:"text-white mb-2" }}
{% render_field form.password1 class="bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500" %}
{{ form.password1|add_label_class:" mb-2" }}
{% render_field form.password1 class="bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark: dark:focus:ring-blue-500 dark:focus:border-blue-500" %}
</div>


<div class="mb-4">
{{ form.password2|add_label_class:"text-white mb-2" }}
{% render_field form.password2 class="bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500" %}
{{ form.password2|add_label_class:" mb-2" }}
{% render_field form.password2 class="bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark: dark:focus:ring-blue-500 dark:focus:border-blue-500" %}
</div>

{% if redirect_field_value %}
<input type="hidden" name="{{ redirect_field_name }}" value="{{ redirect_field_value }}" />
{% endif %}
<button class="mt-2 focus:outline-none text-white bg-[#73B769] hover:bg-[#56964a] focus:ring-4 focus:ring-green-300 font-medium rounded-lg text-sm px-5 py-2.5 mr-2 mb-2" type="submit">
<button class="mt-2 focus:outline-none bg-[#73B769] hover:bg-[#56964a] focus:ring-4 focus:ring-green-300 font-medium rounded-lg text-sm px-5 py-2.5 mr-2 mb-2" type="submit">
{% trans "Sign Up" %} &raquo;
</button>
</form>
Expand Down
11 changes: 7 additions & 4 deletions static/css/styles.css
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
:root {
--cell-color: rgb(255, 255, 204);
--cell-important: rgb(204, 255, 204);
}

nav {
color: white;
background: rgb(22, 8, 42);
border-bottom: 0.5px solid white;
border-bottom: 0.5px solid rgb(167, 167, 167);
}

body {
background: radial-gradient(circle at 0% 10%, rgb(22, 8, 42) 20%, rgb(114, 74, 170) 200%);
background: radial-gradient(circle at 170% -10%, rgb(99, 102, 241) -10%, rgb(250, 250, 250) 60%);
min-height: 100vh;
}
8 changes: 4 additions & 4 deletions webportal/templates/webportal/assemblies.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@

{% block content %}

<div class="relative text-white" id="assemblies-page">
<div class="relative " id="assemblies-page">

<h1 class="mt-4 mb-6 text-2xl leading-none tracking-tight text-white md:text-3xl lg:text-4xl flex items-center mb-4">
<h1 class="mt-4 mb-6 text-2xl leading-none tracking-tight md:text-3xl lg:text-4xl flex items-center mb-4">
<svg
xmlns="http://www.w3.org/2000/svg"
fill="none"
Expand All @@ -23,8 +23,8 @@ <h1 class="mt-4 mb-6 text-2xl leading-none tracking-tight text-white md:text-3xl
Assemblies
</h1>

<div id="assemblies-container" class="relative text-white">
<div id="assemblies-grid-container" class="flex flex-col md:grid md:grid-cols-5 md:gap-4">
<div id="assemblies-container" class="relative ">
<div id="assemblies-grid-container" class="flex flex-col md:grid md:grid-cols-5 md:gap-6">

{% include 'webportal/partials/assemblies/sidebar.html' %}
{% include 'webportal/partials/assemblies/assembly.html' %}
Expand Down
12 changes: 6 additions & 6 deletions webportal/templates/webportal/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,33 +2,33 @@

{% block content %}

<h1 class="mt-4 mb-6 text-2xl leading-none tracking-tight text-white md:text-3xl lg:text-4xl">
<h1 class="mt-4 mb-6 text-2xl leading-none tracking-tight md:text-3xl lg:text-4xl">
Welcome!
</h1>


{% if user.is_authenticated %}

<div class="flex items-center mb-6">
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="mr-2 w-6 h-6 text-white">
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="mr-2 w-6 h-6 ">
<path stroke-linecap="round" stroke-linejoin="round" d="M15.182 15.182a4.5 4.5 0 01-6.364 0M21 12a9 9 0 11-18 0 9 9 0 0118 0zM9.75 9.75c0 .414-.168.75-.375.75S9 10.164 9 9.75 9.168 9 9.375 9s.375.336.375.75zm-.375 0h.008v.015h-.008V9.75zm5.625 0c0 .414-.168.75-.375.75s-.375-.336-.375-.75.168-.75.375-.75.375.336.375.75zm-.375 0h.008v.015h-.008V9.75z" />
</svg>

<p class="text-xl text-white">
<p class="text-xl ">
Welcome, {{ user.username }}
</p>
</div>

<div class="border mb-6"></div>
<div class="flex flex-row gap-8 mb-3">

<a href="{% url 'materials-page' %}" class="font-medium text-white hover:underline flex items-center">
<a href="{% url 'materials-page' %}" class="font-medium hover:underline flex items-center">
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="size-6 me-1">
<path stroke-linecap="round" stroke-linejoin="round" d="M8.25 6.75h12M8.25 12h12m-12 5.25h12M3.75 6.75h.007v.008H3.75V6.75Zm.375 0a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0ZM3.75 12h.007v.008H3.75V12Zm.375 0a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0Zm-.375 5.25h.007v.008H3.75v-.008Zm.375 0a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0Z" />
</svg>
Materials

<a href="{% url 'assemblies-page' %}" class="font-medium text-white hover:underline flex items-center">
<a href="{% url 'assemblies-page' %}" class="font-medium hover:underline flex items-center">
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="size-6 me-1">
<path stroke-linecap="round" stroke-linejoin="round" d="M14.25 6.087c0-.355.186-.676.401-.959.221-.29.349-.634.349-1.003 0-1.036-1.007-1.875-2.25-1.875s-2.25.84-2.25 1.875c0 .369.128.713.349 1.003.215.283.401.604.401.959v0a.64.64 0 0 1-.657.643 48.39 48.39 0 0 1-4.163-.3c.186 1.613.293 3.25.315 4.907a.656.656 0 0 1-.658.663v0c-.355 0-.676-.186-.959-.401a1.647 1.647 0 0 0-1.003-.349c-1.036 0-1.875 1.007-1.875 2.25s.84 2.25 1.875 2.25c.369 0 .713-.128 1.003-.349.283-.215.604-.401.959-.401v0c.31 0 .555.26.532.57a48.039 48.039 0 0 1-.642 5.056c1.518.19 3.058.309 4.616.354a.64.64 0 0 0 .657-.643v0c0-.355-.186-.676-.401-.959a1.647 1.647 0 0 1-.349-1.003c0-1.035 1.008-1.875 2.25-1.875 1.243 0 2.25.84 2.25 1.875 0 .369-.128.713-.349 1.003-.215.283-.4.604-.4.959v0c0 .333.277.599.61.58a48.1 48.1 0 0 0 5.427-.63 48.05 48.05 0 0 0 .582-4.717.532.532 0 0 0-.533-.57v0c-.355 0-.676.186-.959.401-.29.221-.634.349-1.003.349-1.035 0-1.875-1.007-1.875-2.25s.84-2.25 1.875-2.25c.37 0 .713.128 1.003.349.283.215.604.401.96.401v0a.656.656 0 0 0 .658-.663 48.422 48.422 0 0 0-.37-5.36c-1.886.342-3.81.574-5.766.689a.578.578 0 0 1-.61-.58v0Z" />
</svg>
Expand All @@ -42,6 +42,6 @@ <h1 class="mt-4 mb-6 text-2xl leading-none tracking-tight text-white md:text-3xl
{% endif %}


<p class="text-white">{% lorem %}</p>
<p class="">{% lorem %}</p>

{% endblock content %}
Loading

0 comments on commit fdb9951

Please sign in to comment.