-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
20 changed files
with
431 additions
and
157 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
# Generated by Django 3.2.23 on 2024-10-21 14:12 | ||
|
||
from django.conf import settings | ||
from django.db import migrations, models | ||
import django.db.models.deletion | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
migrations.swappable_dependency(settings.AUTH_USER_MODEL), | ||
("producten", "0058_alter_localizedproduct_decentrale_procedure_link"), | ||
] | ||
|
||
operations = [ | ||
migrations.CreateModel( | ||
name="NotificationViewed", | ||
fields=[ | ||
( | ||
"id", | ||
models.AutoField( | ||
auto_created=True, | ||
primary_key=True, | ||
serialize=False, | ||
verbose_name="ID", | ||
), | ||
), | ||
("last_viewed_date", models.DateTimeField(blank=True, null=True)), | ||
( | ||
"gebruiker", | ||
models.OneToOneField( | ||
on_delete=django.db.models.deletion.CASCADE, | ||
to=settings.AUTH_USER_MODEL, | ||
), | ||
), | ||
], | ||
), | ||
] |
18 changes: 18 additions & 0 deletions
18
src/sdg/producten/migrations/0060_alter_notificationviewed_last_viewed_date.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# Generated by Django 3.2.23 on 2024-11-15 16:33 | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
("producten", "0059_notificationviewed"), | ||
] | ||
|
||
operations = [ | ||
migrations.AlterField( | ||
model_name="notificationviewed", | ||
name="last_viewed_date", | ||
field=models.DateTimeField(auto_now=True), | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
from .localized import * # noqa | ||
from .notification import * # noqa | ||
from .product import * # noqa |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
from django.contrib.auth import get_user_model | ||
from django.db import models | ||
|
||
User = get_user_model() | ||
|
||
|
||
class NotificationViewed(models.Model): | ||
gebruiker = models.OneToOneField(User, on_delete=models.CASCADE) | ||
last_viewed_date = models.DateTimeField(auto_now=True) | ||
|
||
def __str__(self): | ||
return f"User: {self.gebruiker_id} - Notification last viewed on: {self.last_viewed_date}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -34,3 +34,5 @@ | |
@import 'url_label_field'; | ||
@import 'choices'; | ||
@import 'publications'; | ||
@import 'nav'; | ||
@import 'user-dropdown'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
.nav { | ||
display: flex; | ||
justify-content: space-between; | ||
|
||
&__list { | ||
display: flex; | ||
list-style: none; | ||
font-size: 1rem; | ||
color: $color-white; | ||
margin: 0; | ||
gap: $grid-margin-3; | ||
} | ||
|
||
&__item { | ||
color: $color-white; | ||
} | ||
|
||
&__item--active &__link { | ||
color: $color_accent; | ||
text-decoration: underline; | ||
} | ||
|
||
&__link { | ||
color: $color-white; | ||
text-decoration: none; | ||
|
||
&:hover { | ||
text-decoration: underline; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
.user-dropdown { | ||
--shadow-color: rgba(0, 0, 0, 0.121722); | ||
--border-color: #{$color_grey_dark}; | ||
|
||
align-items: center; | ||
background-color: var(--org-theme-bg-darker); | ||
border: 1px solid transparent; | ||
border-radius: 9999px; | ||
color: $color-white; | ||
display: flex; | ||
gap: $grid-margin-0; | ||
height: 40px; | ||
text-decoration: none; | ||
padding-right: $grid-margin-2; | ||
position: relative; | ||
transition: all 0.3s ease-in-out; | ||
|
||
&:hover &__list, | ||
& > *:hover ~ &__list, | ||
&__list:hover { | ||
opacity: 1; | ||
transition-delay: 0s; | ||
visibility: visible; | ||
} | ||
|
||
&:hover { | ||
background-color: $color_grey_light; | ||
border-color: var(--border-color); | ||
color: #212121; | ||
} | ||
|
||
&__icon { | ||
background-color: $color_primary_lightest; | ||
border: 2px solid var(--border-color); | ||
border-radius: 50%; | ||
color: $color_primary; | ||
flex-shrink: 0; | ||
height: 50px; | ||
left: -4px; | ||
overflow: hidden; | ||
padding-top: 4px; | ||
position: relative; | ||
width: 50px; | ||
|
||
> .svg-inline--fa { | ||
color: $color_primary; | ||
height: 100%; | ||
width: 100%; | ||
} | ||
} | ||
|
||
&__list { | ||
background-color: $color_grey_light; | ||
border: 1px solid var(--border-color); | ||
border-radius: 10px; | ||
box-shadow: 1px 1px 4px var(--shadow-color); | ||
color: #fff; | ||
left: 0; | ||
opacity: 0; | ||
position: absolute; | ||
right: 0; | ||
top: calc(100% + 1rem); | ||
transition: all 0.3s ease-in-out; | ||
transition-delay: 0s; | ||
visibility: hidden; | ||
z-index: 20; | ||
} | ||
|
||
&__action { | ||
align-items: center; | ||
color: $color_primary_dark; | ||
display: flex; | ||
gap: 0.5rem; | ||
padding: 12px; | ||
text-align: left; | ||
text-decoration: none; | ||
|
||
&:hover { | ||
text-decoration: underline; | ||
} | ||
} | ||
|
||
hr { | ||
border: 0.5px solid var(--border-color); | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.