forked from ScoDoc/ScoDoc
sco_gen_cal : ajout style semaine courante
This commit is contained in:
parent
a4db8c4ff8
commit
fa6f83722e
@ -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"
|
||||
|
@ -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>
|
Loading…
Reference in New Issue
Block a user