Update opolka/ScoDoc from ScoDoc/ScoDoc #2

Merged
opolka merged 1272 commits from ScoDoc/ScoDoc:master into master 2024-05-27 09:11:04 +02:00
2 changed files with 16 additions and 0 deletions
Showing only changes of commit fa6f83722e - Show all commits

View File

@ -20,8 +20,11 @@ class Jour:
def __init__(self, date: datetime.date):
self.date = date
self.class_list: list[str] = []
if self.is_non_work():
self.class_list.append("non-travail")
if self.is_current_week():
self.class_list.append("sem-courante")
def get_nom(self, short=True):
"""
@ -45,6 +48,12 @@ class Jour:
dept_id=g.scodoc_dept_id
)
def is_current_week(self):
"""
Renvoie True si le jour est dans la semaine courante
"""
return self.date.isocalendar()[1] == datetime.date.today().isocalendar()[1]
def get_date(self) -> str:
"""
Renvoie la date du jour au format "dd/mm/yyyy"

View File

@ -69,4 +69,11 @@
border: 1px solid #d5d5d5;
position: relative;
}
.sem-courante{
--couleur : #ee752c;
border-left: solid 3px var(--couleur);
border-right: solid 3px var(--couleur);
}
</style>