@@ -37,28 +37,34 @@ <h1 class="d-flex align-items-center gap-2">
3737 {% endif %}
3838 {% if following %}
3939 < turbo-frame id ="favorite ">
40- < a href ="{% url 'catalog:leave_course' course.slug %} "
41- class ="btn btn-outline-secondary btn-sm d-inline-flex align-items-center gap-1 ">
42- < svg xmlns ="http://www.w3.org/2000/svg " width ="16 " height ="16 " fill ="currentColor "
43- class ="bi bi-star-fill text-warning hover-spin " viewBox ="0 0 16 16 ">
44- < path
45- d ="M3.612 15.443c-.386.198-.824-.149-.746-.592l.83-4.73L.173 6.765c-.329-.314-.158-.888.283-.95l4.898-.696L7.538.792c.197-.39.73-.39.927 0l2.184 4.327 4.898.696c.441.062.612.636.282.95l-3.522 3.356.83 4.73c.078.443-.36.79-.746.592L8 13.187l-4.389 2.256z "/>
46- </ svg >
47- < span > Favori</ span >
48- </ a >
40+ < form method ="POST " action ="{% url 'catalog:leave_course' course.slug %} " class ="d-inline ">
41+ {% csrf_token %}
42+ < button type ="submit "
43+ class ="btn btn-outline-secondary btn-sm d-inline-flex align-items-center gap-1 ">
44+ < svg xmlns ="http://www.w3.org/2000/svg " width ="16 " height ="16 " fill ="currentColor "
45+ class ="bi bi-star-fill text-warning hover-spin " viewBox ="0 0 16 16 ">
46+ < path
47+ d ="M3.612 15.443c-.386.198-.824-.149-.746-.592l.83-4.73L.173 6.765c-.329-.314-.158-.888.283-.95l4.898-.696L7.538.792c.197-.39.73-.39.927 0l2.184 4.327 4.898.696c.441.062.612.636.282.95l-3.522 3.356.83 4.73c.078.443-.36.79-.746.592L8 13.187l-4.389 2.256z "/>
48+ </ svg >
49+ < span > Favori</ span >
50+ </ button >
51+ </ form >
4952 </ turbo-frame >
5053 {% else %}
5154 < turbo-frame id ="favorite ">
52- < a href ="{% url 'catalog:join_course' course.slug %} "
53- class ="btn btn-outline-secondary btn-sm d-inline-flex align-items-center gap-1 ">
54- < svg xmlns ="http://www.w3.org/2000/svg " width ="16 " height ="16 " fill ="currentColor "
55- class ="bi bi-star hover-spin "
56- viewBox ="0 0 16 16 ">
57- < path
58- d ="M2.866 14.85c-.078.444.36.791.746.593l4.39-2.256 4.389 2.256c.386.198.824-.149.746-.592l-.83-4.73 3.522-3.356c.33-.314.16-.888-.282-.95l-4.898-.696L8.465.792a.513.513 0 0 0-.927 0L5.354 5.12l-4.898.696c-.441.062-.612.636-.283.95l3.523 3.356-.83 4.73zm4.905-2.767-3.686 1.894.694-3.957a.565.565 0 0 0-.163-.505L1.71 6.745l4.052-.576a.525.525 0 0 0 .393-.288L8 2.223l1.847 3.658a.525.525 0 0 0 .393.288l4.052.575-2.906 2.77a.565.565 0 0 0-.163.506l.694 3.957-3.686-1.894a.503.503 0 0 0-.461 0z "/>
59- </ svg >
60- < span > Ajouter aux favoris</ span >
61- </ a >
55+ < form method ="POST " action ="{% url 'catalog:join_course' course.slug %} " class ="d-inline ">
56+ {% csrf_token %}
57+ < button type ="submit "
58+ class ="btn btn-outline-secondary btn-sm d-inline-flex align-items-center gap-1 ">
59+ < svg xmlns ="http://www.w3.org/2000/svg " width ="16 " height ="16 " fill ="currentColor "
60+ class ="bi bi-star hover-spin "
61+ viewBox ="0 0 16 16 ">
62+ < path
63+ d ="M2.866 14.85c-.078.444.36.791.746.593l4.39-2.256 4.389 2.256c.386.198.824-.149.746-.592l-.83-4.73 3.522-3.356c.33-.314.16-.888-.282-.95l-4.898-.696L8.465.792a.513.513 0 0 0-.927 0L5.354 5.12l-4.898.696c-.441.062-.612.636-.283.95l3.523 3.356-.83 4.73zm4.905-2.767-3.686 1.894.694-3.957a.565.565 0 0 0-.163-.505L1.71 6.745l4.052-.576a.525.525 0 0 0 .393-.288L8 2.223l1.847 3.658a.525.525 0 0 0 .393.288l4.052.575-2.906 2.77a.565.565 0 0 0-.163.506l.694 3.957-3.686-1.894a.503.503 0 0 0-.461 0z "/>
64+ </ svg >
65+ < span > Ajouter aux favoris</ span >
66+ </ button >
67+ </ form >
6268 </ turbo-frame >
6369 {% endif %}
6470 </ header >
@@ -78,7 +84,8 @@ <h1 class="d-flex align-items-center gap-2">
7884 >
7985 < a class ="btn btn-primary " data-bs-toggle ="collapse " href ="#collapseExample " role ="button "
8086 aria-expanded ="false " aria-controls ="collapseExample ">
81- < svg xmlns ="http://www.w3.org/2000/svg " width ="20 " height ="20 " fill ="currentColor " class ="bi bi-funnel "
87+ < svg xmlns ="http://www.w3.org/2000/svg " width ="20 " height ="20 " fill ="currentColor "
88+ class ="bi bi-funnel "
8289 viewBox ="0 0 16 16 ">
8390 < path
8491 d ="M1.5 1.5A.5.5 0 0 1 2 1h12a.5.5 0 0 1 .5.5v2a.5.5 0 0 1-.128.334L10 8.692V13.5a.5.5 0 0 1-.342.474l-3 1A.5.5 0 0 1 6 14.5V8.692L1.628 3.834A.5.5 0 0 1 1.5 3.5v-2zm1 .5v1.308l4.372 4.858A.5.5 0 0 1 7 8.5v5.306l2-.666V8.5a.5.5 0 0 1 .128-.334L13.5 3.308V2h-11z "/>
@@ -230,7 +237,8 @@ <h1 class="d-flex align-items-center gap-2">
230237 < h4 class ="alert-heading ">
231238
232239 Rentrée 2023-2024: Nouveaux cours !
233- < span style ="font-size: .5rem;transform: translate(0, -5px); " class ="badge rounded-pill bg-danger ">
240+ < span style ="font-size: .5rem;transform: translate(0, -5px); "
241+ class ="badge rounded-pill bg-danger ">
234242 NEW
235243 </ span >
236244
0 commit comments