File tree Expand file tree Collapse file tree 5 files changed +59
-2
lines changed Expand file tree Collapse file tree 5 files changed +59
-2
lines changed Original file line number Diff line number Diff line change @@ -106,4 +106,27 @@ html {
106
106
background-color : var (--borders-variant );
107
107
border-radius : 50px ;
108
108
box-shadow : 1px 1px 2px # 999 ;
109
+ }
110
+
111
+ .event-btn {
112
+ font-size : 0.625rem ;
113
+ text-align : center;
114
+ color : # fff ;
115
+ background-color : # 30465D ;
116
+ border-radius : 0.938rem ;
117
+ border : 0.063rem solid # 30465D ;
118
+ }
119
+
120
+ .add-event-icon {
121
+ display : inline-block;
122
+ }
123
+
124
+ .plus_image {
125
+ width : 3rem ;
126
+ height : 3rem ;
127
+ }
128
+
129
+ .pb-1 {
130
+ width : 1.2rem ;
131
+ height : 1.2rem ;
109
132
}
Original file line number Diff line number Diff line change
1
+ function scrollTo ( element ) {
2
+ window . scroll ( {
3
+ behavior : 'smooth' ,
4
+ left : 0 ,
5
+ top : element . offsetTop
6
+ } ) ;
7
+ }
8
+
9
+ document . addEventListener ( 'DOMContentLoaded' , ( ) => {
10
+ const chosen_button = document . getElementsByClassName ( 'event-btn' ) ;
11
+ for ( let i = 0 ; i < chosen_button . length ; i ++ ) {
12
+ chosen_button [ i ] . addEventListener ( "click" , function ( e ) {
13
+ let clickedElem = e . target . id
14
+ fetch ( '/event/edit' )
15
+ . then ( function ( response ) {
16
+ return response . text ( ) ;
17
+ } )
18
+ . then ( function ( body ) {
19
+ document . querySelector ( '#here' ) . innerHTML = body ;
20
+ scrollTo ( document . getElementById ( "here" ) ) ;
21
+ } ) ;
22
+ } ) ;
23
+ }
24
+ } ) ;
Original file line number Diff line number Diff line change 53
53
54
54
{% for event, attr in events %}
55
55
< div class ="d-flex flex-row justify-content-around align-items-end action-continer " style ="grid-row: {{attr.grid_position}}; ">
56
- < a href ="/edit/{{event.id}} " title ="Edit event " class ="action-icon "> < img class ="pb-1 " src ="{{ url_for('static', path='/images/icons/pencil.svg')}} " width ="15em " height ="15em "> </ a >
57
- < a href ="/delete/{{event.id}} " title ="Delete event " class ="action-icon "> < img class ="pb-1 " src ="{{ url_for('static', path='/images/icons/trash-can.svg')}} " width ="15em " height ="15em "> </ a >
56
+ < a href ="/edit/{{event.id}} " title ="Edit event " class ="action-icon "> < img class ="pb-1 " src ="{{ url_for('static', path='/images/icons/pencil.svg')}} "> </ a >
57
+ < a href ="/delete/{{event.id}} " title ="Delete event " class ="action-icon "> < img class ="pb-1 " src ="{{ url_for('static', path='/images/icons/trash-can.svg')}} "> </ a >
58
+ < a href ="/event/{{event.id}} " title ="See full event " class ="action-icon "> < img class ="pb-1 " src ="{{ url_for('static', path='/images/icons/view.svg')}} "> </ a >
58
59
</ div >
59
60
{% endfor %}
60
61
</ div >
61
62
</ div >
63
+ < div >
64
+ < button class ="event-btn " title ="Add Event " class ="add-event-icon "> < img class ="plus_image " src ="{{ url_for('static', path='/images/icons/plus.svg')}} "> </ a >
65
+ </ div >
66
+ < div id ="here "> Have a nice day</ div >
62
67
< script src ="https://cdn.jsdelivr.net/npm/bootstrap@5.0.0-beta1/dist/js/bootstrap.bundle.min.js " integrity ="sha384-ygbV9kiqUc6oa4msXn9868pTtWMgiQaeYH7/t7LECLbyPA2x65Kgf80OJFdroafW " crossorigin ="anonymous "> </ script >
68
+ < script type ="text/javascript " src ="{{ url_for('static', path='/eventdisplay.js') }} "> </ script >
63
69
</ body >
64
70
</ html >
You can’t perform that action at this time.
0 commit comments