diff options
author | polo <ordipolo@gmx.fr> | 2025-05-08 22:58:04 +0200 |
---|---|---|
committer | polo <ordipolo@gmx.fr> | 2025-05-08 22:58:04 +0200 |
commit | 0f497d215de8e16739263e2718bd39640a6cc4d8 (patch) | |
tree | d241a0f95e34ee6e20d0221a9e8cae0e46379c10 /public | |
parent | 28698982ff6dc67a331788c2637bce8689121769 (diff) | |
download | cms-0f497d215de8e16739263e2718bd39640a6cc4d8.zip |
modif page, renommage et suppression, du responsive design, modif dans Director, notif toast
Diffstat (limited to 'public')
-rw-r--r-- | public/css/foot.css | 39 | ||||
-rw-r--r-- | public/css/main.css | 53 | ||||
-rw-r--r-- | public/css/trombinoscope.css | 35 | ||||
-rw-r--r-- | public/js/main.js | 29 |
4 files changed, 131 insertions, 25 deletions
diff --git a/public/css/foot.css b/public/css/foot.css index 038d33b..023a0f2 100644 --- a/public/css/foot.css +++ b/public/css/foot.css | |||
@@ -6,7 +6,7 @@ footer | |||
6 | background-color: #B7E9FE; | 6 | background-color: #B7E9FE; |
7 | /*width: 1200px;*/ | 7 | /*width: 1200px;*/ |
8 | margin: auto; | 8 | margin: auto; |
9 | padding: 0 20px; | 9 | /*padding: 0 20px;*/ |
10 | 10 | ||
11 | } | 11 | } |
12 | footer > div | 12 | footer > div |
@@ -39,7 +39,7 @@ footer > div | |||
39 | /*max-width: 45%;*/ | 39 | /*max-width: 45%;*/ |
40 | /*margin-right: 10px;*/ | 40 | /*margin-right: 10px;*/ |
41 | /*margin: 16px 0;*/ /* = p */ | 41 | /*margin: 16px 0;*/ /* = p */ |
42 | padding: 10px; | 42 | padding: 15px; |
43 | list-style: none; /* retirer les puces */ | 43 | list-style: none; /* retirer les puces */ |
44 | font-size: small; | 44 | font-size: small; |
45 | text-align: right; | 45 | text-align: right; |
@@ -69,6 +69,11 @@ footer > div | |||
69 | margin: 0 3px; | 69 | margin: 0 3px; |
70 | }*/ | 70 | }*/ |
71 | 71 | ||
72 | .contact | ||
73 | { | ||
74 | padding: 0 15px; | ||
75 | } | ||
76 | |||
72 | .footer_logo img | 77 | .footer_logo img |
73 | { | 78 | { |
74 | max-width: 288px; | 79 | max-width: 288px; |
@@ -85,6 +90,7 @@ footer > div | |||
85 | footer > div | 90 | footer > div |
86 | { | 91 | { |
87 | flex-direction: column; | 92 | flex-direction: column; |
93 | align-items: center; | ||
88 | } | 94 | } |
89 | } | 95 | } |
90 | 96 | ||
@@ -95,6 +101,17 @@ footer > div | |||
95 | } | 101 | } |
96 | 102 | ||
97 | /* zone admin */ | 103 | /* zone admin */ |
104 | .admin_buttons_zone | ||
105 | { | ||
106 | margin: 5px; | ||
107 | display: flex; | ||
108 | flex-wrap: wrap; | ||
109 | align-items: center; | ||
110 | } | ||
111 | .admin_buttons_zone p | ||
112 | { | ||
113 | margin: 0; | ||
114 | } | ||
98 | .logged_out | 115 | .logged_out |
99 | { | 116 | { |
100 | /*display: none;*/ | 117 | /*display: none;*/ |
@@ -107,23 +124,17 @@ footer > div | |||
107 | } | 124 | } |
108 | .empty_admin_zone | 125 | .empty_admin_zone |
109 | { | 126 | { |
110 | height: 32px; | 127 | height: 70px; |
111 | } | 128 | } |
112 | .logged_in | 129 | .logged_in |
113 | { | 130 | { |
114 | height: 32px; | 131 | /*height: 70px;*/ |
115 | width: 1200px; | 132 | width: 100%; |
116 | margin: auto; | 133 | margin: auto; |
117 | background-color: #ffff00; | 134 | background-color: #ffff00; |
118 | position: fixed; | 135 | position: fixed; |
119 | bottom: 0px; | 136 | bottom: 0px; |
120 | } | 137 | } |
121 | .logged_in > p | ||
122 | { | ||
123 | margin: 5px 0; | ||
124 | display: flex; | ||
125 | justify-content: center; | ||
126 | } | ||
127 | .logged_in button | 138 | .logged_in button |
128 | { | 139 | { |
129 | margin-left: 5px; | 140 | margin-left: 5px; |
@@ -132,6 +143,7 @@ footer > div | |||
132 | border: lightgrey 2px outset; | 143 | border: lightgrey 2px outset; |
133 | border-radius: 4px; | 144 | border-radius: 4px; |
134 | background-color: white; | 145 | background-color: white; |
146 | margin: 2px; | ||
135 | } | 147 | } |
136 | .logged_in button:hover | 148 | .logged_in button:hover |
137 | { | 149 | { |
@@ -139,6 +151,11 @@ footer > div | |||
139 | background-color: #ffff00; | 151 | background-color: #ffff00; |
140 | border-radius: 4px; | 152 | border-radius: 4px; |
141 | } | 153 | } |
154 | .modif_mode | ||
155 | { | ||
156 | background-color: #ffae1a; /* orange clair soupe de poisson */ | ||
157 | } | ||
158 | |||
142 | 159 | ||
143 | .toast { | 160 | .toast { |
144 | visibility: hidden; | 161 | visibility: hidden; |
diff --git a/public/css/main.css b/public/css/main.css index 93a7bcf..870082a 100644 --- a/public/css/main.css +++ b/public/css/main.css | |||
@@ -11,15 +11,25 @@ section > h3 | |||
11 | margin: 0; | 11 | margin: 0; |
12 | text-align: center; | 12 | text-align: center; |
13 | } | 13 | } |
14 | section > p /* boutons spéciaux mode admin */ | ||
15 | { | ||
16 | /*margin-left: 15px;*/ | ||
17 | } | ||
18 | .grid_columns | 14 | .grid_columns |
19 | { | 15 | { |
20 | display: grid; | 16 | display: grid; |
21 | grid-template-columns: repeat(3, 1fr); | 17 | grid-template-columns: repeat(3, 1fr); |
22 | } | 18 | } |
19 | @media screen and (max-width: 800px) | ||
20 | { | ||
21 | .grid_columns | ||
22 | { | ||
23 | grid-template-columns: repeat(2, 1fr); | ||
24 | } | ||
25 | } | ||
26 | @media screen and (max-width: 550px) | ||
27 | { | ||
28 | .grid_columns | ||
29 | { | ||
30 | display: block; | ||
31 | } | ||
32 | } | ||
23 | .galery_photos | 33 | .galery_photos |
24 | { | 34 | { |
25 | display: flex; | 35 | display: flex; |
@@ -148,23 +158,35 @@ article a:hover | |||
148 | flex-wrap: wrap; | 158 | flex-wrap: wrap; |
149 | font-size: smaller; | 159 | font-size: smaller; |
150 | }*/ | 160 | }*/ |
151 | .new_bloc | 161 | .edit_bloc_zone |
152 | { | 162 | { |
153 | background-color: white; | 163 | background-color: white; |
154 | padding: 10px; | 164 | padding: 10px; |
155 | margin: 10px 20px; | 165 | margin: 10px 15px; |
156 | 166 | display: flex; | |
167 | justify-content: space-evenly; | ||
168 | flex-wrap: wrap; | ||
157 | } | 169 | } |
158 | .new_bloc p | 170 | .edit_bloc_zone p |
159 | { | 171 | { |
160 | margin: 5px; | 172 | margin: 5px; |
161 | } | 173 | } |
174 | .new_bloc, .modify_bloc | ||
175 | { | ||
176 | /*background-color: white; | ||
177 | padding: 10px; | ||
178 | margin: 10px 20px;*/ | ||
179 | } | ||
180 | .new_bloc p | ||
181 | { | ||
182 | /*margin: 5px;*/ | ||
183 | } | ||
162 | .new_bloc #bloc_title | 184 | .new_bloc #bloc_title |
163 | { | 185 | { |
164 | width: 100%; | 186 | width: 70%; |
165 | max-width: 300px; | 187 | max-width: 300px; |
166 | } | 188 | } |
167 | .new_bloc form select, .new_bloc form input[type=submit] | 189 | .new_bloc form select, .new_bloc form input[type=submit], .modify_bloc form input[type=submit] |
168 | { | 190 | { |
169 | color: #ff1d04; | 191 | color: #ff1d04; |
170 | font-size: medium; | 192 | font-size: medium; |
@@ -176,9 +198,18 @@ select:hover | |||
176 | { | 198 | { |
177 | cursor: pointer; | 199 | cursor: pointer; |
178 | } | 200 | } |
179 | .new_bloc form input[type=submit]:hover | 201 | .new_bloc form input[type=submit]:hover, .modify_bloc form input[type=submit]:hover |
180 | { | 202 | { |
181 | background-color: #ffff00; | 203 | background-color: #ffff00; |
182 | border-radius: 4px; | 204 | border-radius: 4px; |
183 | cursor: pointer; | 205 | cursor: pointer; |
206 | } | ||
207 | .modify_bloc > div | ||
208 | { | ||
209 | display: flex; | ||
210 | align-items: baseline; | ||
211 | } | ||
212 | .modify_bloc img | ||
213 | { | ||
214 | vertical-align: middle; | ||
184 | } \ No newline at end of file | 215 | } \ No newline at end of file |
diff --git a/public/css/trombinoscope.css b/public/css/trombinoscope.css index 357e6b0..cee2666 100644 --- a/public/css/trombinoscope.css +++ b/public/css/trombinoscope.css | |||
@@ -1,10 +1,39 @@ | |||
1 | /* css personnalissé à cette page, | ||
2 | .grid_columns utilise un nombre de colonnes spécifique */ | ||
1 | article img | 3 | article img |
2 | { | 4 | { |
3 | border-radius: 50%; | 5 | border-radius: 50%; |
4 | } | 6 | } |
5 | |||
6 | .grid_columns | 7 | .grid_columns |
7 | { | 8 | { |
8 | /* écrase les 3 colonnes par défaut */ | 9 | grid-template-columns: repeat(4, 1fr); |
9 | grid-template-columns: repeat(4, 1fr); | 10 | } |
11 | @media screen and (max-width: 900px) | ||
12 | { | ||
13 | .grid_columns | ||
14 | { | ||
15 | grid-template-columns: repeat(3, 1fr); | ||
16 | } | ||
17 | } | ||
18 | @media screen and (max-width: 650px) | ||
19 | { | ||
20 | .grid_columns | ||
21 | { | ||
22 | grid-template-columns: repeat(2, 1fr); | ||
23 | } | ||
24 | } | ||
25 | @media screen and (max-width: 550px) | ||
26 | { | ||
27 | .grid_columns | ||
28 | { | ||
29 | display: grid; | ||
30 | grid-template-columns: repeat(2, 1fr); | ||
31 | } | ||
32 | } | ||
33 | @media screen and (max-width: 350px) | ||
34 | { | ||
35 | .grid_columns | ||
36 | { | ||
37 | display: block; | ||
38 | } | ||
10 | } \ No newline at end of file | 39 | } \ No newline at end of file |
diff --git a/public/js/main.js b/public/js/main.js index e278325..802bbbe 100644 --- a/public/js/main.js +++ b/public/js/main.js | |||
@@ -202,4 +202,33 @@ function findParent(element, tag_name){ | |||
202 | element = element.parentElement; | 202 | element = element.parentElement; |
203 | } | 203 | } |
204 | return null; | 204 | return null; |
205 | } | ||
206 | |||
207 | |||
208 | /* -- mode Modification d'une page -- */ | ||
209 | function renamePageBloc(bloc_id){ | ||
210 | const input = document.getElementById("bloc_rename_" + bloc_id); | ||
211 | const title = document.getElementById(bloc_id).querySelector("h3"); | ||
212 | |||
213 | fetch('index.php?bloc_edit=rename_page_bloc', { | ||
214 | method: 'POST', | ||
215 | headers: { | ||
216 | 'Content-Type': 'application/json' | ||
217 | }, | ||
218 | body: JSON.stringify({bloc_title: input.value, bloc_id: bloc_id}) | ||
219 | }) | ||
220 | .then(response => response.json()) | ||
221 | .then(data => { | ||
222 | if(data.success){ | ||
223 | title.innerHTML = data.title; | ||
224 | console.log(data.title); | ||
225 | toastNotify('Le bloc a été renommé: ' + data.title); | ||
226 | } | ||
227 | else{ | ||
228 | console.error('Erreur au renommage du titre.'); | ||
229 | } | ||
230 | }) | ||
231 | .catch(error => { | ||
232 | console.error('Erreur:', error); | ||
233 | }); | ||
205 | } \ No newline at end of file | 234 | } \ No newline at end of file |