Skip to content

Commit

Permalink
Merge pull request #14 from fredagscafeen/Dark-Mode
Browse files Browse the repository at this point in the history
Dark mode
  • Loading branch information
AndersSeverinsen authored Jul 18, 2024
2 parents 90df2f5 + 54f303c commit 5e78e5d
Show file tree
Hide file tree
Showing 22 changed files with 985 additions and 217 deletions.
24 changes: 24 additions & 0 deletions bartab/migrations/0003_alter_bartabentry_user.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Generated by Django 3.2.4 on 2024-07-18 21:33

import django.db.models.deletion
from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
("bartab", "0002_auto_20201020_1659"),
]

operations = [
migrations.AlterField(
model_name="bartabentry",
name="user",
field=models.ForeignKey(
on_delete=django.db.models.deletion.CASCADE,
related_name="indtastninger",
to="bartab.bartabuser",
verbose_name="Bruger",
),
),
]
10 changes: 5 additions & 5 deletions bartenders/templates/barplan.html
Original file line number Diff line number Diff line change
Expand Up @@ -26,16 +26,16 @@ <h2>{% translate "Barplan" %}</h2>
</thead>
<tbody>
{% for shift in bartendershifts %}
<tr {% if shift|is_with_user:user %}style="background-color: skyblue;"{% endif %}>
<td class="col-md-2">{{ shift.display_str }}{% if show_all %} {{ shift.start_datetime.year }}{% endif %}</td>
<td class="col-md-3">{{ shift.responsible.name }}</td>
<td class="col-md-7">
<tr>
<td {% if shift|is_with_user:user %}style="background-color: rgba(173, 216, 230, 0.462);"{% endif %}class="col-md-2">{{ shift.display_str }} {% if show_all %} {{ shift.start_datetime.year }}{% endif %}</td>
<td {% if shift|is_with_user:user %}style="background-color: rgba(173, 216, 230, 0.462);"{% endif %} class="col-md-3">{{ shift.responsible.name }}</td>
<td {% if shift|is_with_user:user %}style="background-color: rgba(173, 216, 230, 0.462);"{% endif %} class="col-md-7">
{% for bartender in shift.other_bartenders.all %}
{% if bartender.first_bartender_shift == shift %}<b title="{% translate "Bartender's first shift" %}">{{ bartender.name }}</b>{% else %}{{ bartender.name }}{% endif %}{% if not forloop.last %},{% endif %}
{% endfor %}
</td>
{% if user.is_staff %}
<td class="hidden-xs col-md-1"><a href="/admin/bartenders/bartendershift/{{ shift.id }}">{% translate "Edit" %}</a></td>
<td {% if shift|is_with_user:user %}style="background-color: rgba(173, 216, 230, 0.462);"{% endif %} class="hidden-xs col-md-1"><a href="/admin/bartenders/bartendershift/{{ shift.id }}">{% translate "Edit" %}</a></td>
{% endif %}
</tr>
{% endfor %}
Expand Down
7 changes: 6 additions & 1 deletion bartenders/templates/bartender_info.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,13 @@
{% block extrahead %}
<script type="text/javascript">
$(function() {
const isDarkMode = document.documentElement.classList.contains("dark");
$('#unavailable_dates_table input').change(function(e) {
$(this).closest('td').toggleClass('danger', this.checked);
if (isDarkMode) {
$(this).closest('td').toggleClass('danger-dark', this.checked);
} else {
$(this).closest('td').toggleClass('danger', this.checked);
}
});

var preventUnload = false;
Expand Down
3 changes: 2 additions & 1 deletion bartenders/templates/board.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
{% block extrahead %}
<script src="{% static 'js/timesheet.min.js' %}"></script>
<link rel="stylesheet" href="{% static 'js/timesheet-white.min.css' %}">
<link rel="stylesheet" href="{% static 'js/timesheet-black.min.css' %}">
<style>
#timesheet {
width: auto;
Expand Down Expand Up @@ -68,7 +69,7 @@ <h4 class="panel-title">

<h1>{% translate "Bestyrelsen gennem tiden" %}</h1>

<div class="white">
<div id="timesheet-theme" class="white">
<div id="timesheet"></div>
</div>

Expand Down
2 changes: 1 addition & 1 deletion bartenders/templates/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

{% block content %}

{% translate "Velkommen til Fredagscaféens webside, her kan du finde information om åbningstider, sortiment, udlejning af fadølsanlæg og grill mm." %}
<p>{% translate "Velkommen til Fredagscaféens webside, her kan du finde information om åbningstider, sortiment, udlejning af fadølsanlæg og grill mm." %}</p>

<div class="row">
<div class="col-md-8">
Expand Down
Binary file modified locale/da/LC_MESSAGES/django.mo
Binary file not shown.
Loading

0 comments on commit 5e78e5d

Please sign in to comment.