diff options
author | polo <ordipolo@gmx.fr> | 2025-05-10 23:51:37 +0200 |
---|---|---|
committer | polo <ordipolo@gmx.fr> | 2025-05-10 23:51:37 +0200 |
commit | 4efa19d4357ab204d62397f1849e4651906e0e70 (patch) | |
tree | d35c82fdf20762fd6d778eba9bc6d76c9098e9b6 /public | |
parent | aa8898ae00beaa0ac7e65e45c5f28199b25a9267 (diff) | |
download | cms-4efa19d4357ab204d62397f1849e4651906e0e70.zip |
fichiers manquant du commit précédent
Diffstat (limited to 'public')
-rw-r--r-- | public/css/main.css | 215 | ||||
-rw-r--r-- | public/css/menu.css | 4 | ||||
-rw-r--r-- | public/js/main.js | 81 |
3 files changed, 3 insertions, 297 deletions
diff --git a/public/css/main.css b/public/css/main.css deleted file mode 100644 index 870082a..0000000 --- a/public/css/main.css +++ /dev/null | |||
@@ -1,215 +0,0 @@ | |||
1 | main | ||
2 | { | ||
3 | margin: auto; | ||
4 | /*max-width: 1200px;*/ | ||
5 | background-color: #E3F3FF; | ||
6 | padding: 15px 0; | ||
7 | } | ||
8 | section > h3 | ||
9 | { | ||
10 | padding: 15px; | ||
11 | margin: 0; | ||
12 | text-align: center; | ||
13 | } | ||
14 | .grid_columns | ||
15 | { | ||
16 | display: grid; | ||
17 | grid-template-columns: repeat(3, 1fr); | ||
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 | } | ||
33 | .galery_photos | ||
34 | { | ||
35 | display: flex; | ||
36 | flex-wrap: wrap; | ||
37 | justify-content: space-evenly; | ||
38 | } | ||
39 | .galery_photos .html_from_editor img | ||
40 | { | ||
41 | max-width: 300px; | ||
42 | max-height: 200px; | ||
43 | } | ||
44 | article | ||
45 | { | ||
46 | /*display: flex;*/ | ||
47 | background-color: white; | ||
48 | margin: 15px; | ||
49 | padding: 0 15px; | ||
50 | /*min-height: 150px;*/ | ||
51 | } | ||
52 | article .logo2 | ||
53 | { | ||
54 | vertical-align: middle; | ||
55 | max-width: 200px; | ||
56 | max-height: 200px; | ||
57 | margin-right: 15px; | ||
58 | } | ||
59 | .new_content, .article_content | ||
60 | { | ||
61 | width: 100%; | ||
62 | } | ||
63 | .new_content | ||
64 | { | ||
65 | /*max-height: 400;*/ | ||
66 | overflow: hidden; | ||
67 | } | ||
68 | article img | ||
69 | { | ||
70 | width: 100%; | ||
71 | height: auto; | ||
72 | } | ||
73 | |||
74 | .action_icon | ||
75 | { | ||
76 | width: 24px; | ||
77 | vertical-align: bottom; | ||
78 | border: white 2px solid; /* invisible */ | ||
79 | } | ||
80 | button .action_icon | ||
81 | { | ||
82 | border: none; | ||
83 | } | ||
84 | .action_icon:hover | ||
85 | { | ||
86 | background-color: #ffff00; | ||
87 | border-radius: 4px; | ||
88 | border: lightgrey 2px outset; | ||
89 | cursor: pointer; | ||
90 | } | ||
91 | button .action_icon:hover | ||
92 | { | ||
93 | border: none; | ||
94 | } | ||
95 | |||
96 | .button_zone | ||
97 | { | ||
98 | display: flex; | ||
99 | } | ||
100 | |||
101 | .share | ||
102 | { | ||
103 | float: right; | ||
104 | } | ||
105 | .article_title_zone | ||
106 | { | ||
107 | padding: 10px; | ||
108 | } | ||
109 | .under_an_article | ||
110 | { | ||
111 | display: flex; | ||
112 | justify-content: space-between; | ||
113 | font-size: small; | ||
114 | } | ||
115 | .under_an_article img | ||
116 | { | ||
117 | width: 24px; | ||
118 | margin-right: 5px; | ||
119 | vertical-align: middle; | ||
120 | } | ||
121 | .article_admin_zone | ||
122 | { | ||
123 | display: flex; | ||
124 | justify-content: end; | ||
125 | } | ||
126 | main button | ||
127 | { | ||
128 | color: #ff1d04; | ||
129 | font-size: medium; | ||
130 | border-radius: 4px; | ||
131 | background-color: white; | ||
132 | border: lightgrey 2px outset; /* rend identiques les boutons firefox et chromium */ | ||
133 | } | ||
134 | main button:hover | ||
135 | { | ||
136 | background-color: #ffff00; | ||
137 | border-radius: 4px; | ||
138 | cursor: pointer; | ||
139 | } | ||
140 | |||
141 | article a:hover | ||
142 | { | ||
143 | cursor: pointer; | ||
144 | } | ||
145 | |||
146 | |||
147 | |||
148 | /* -- mode modification d'une page -- */ | ||
149 | /*.modif_page_explanations | ||
150 | { | ||
151 | background-color: white; | ||
152 | padding: 10px; | ||
153 | margin: 10px 20px; | ||
154 | } | ||
155 | .modif_page_explanations div | ||
156 | { | ||
157 | display: flex; | ||
158 | flex-wrap: wrap; | ||
159 | font-size: smaller; | ||
160 | }*/ | ||
161 | .edit_bloc_zone | ||
162 | { | ||
163 | background-color: white; | ||
164 | padding: 10px; | ||
165 | margin: 10px 15px; | ||
166 | display: flex; | ||
167 | justify-content: space-evenly; | ||
168 | flex-wrap: wrap; | ||
169 | } | ||
170 | .edit_bloc_zone p | ||
171 | { | ||
172 | margin: 5px; | ||
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 | } | ||
184 | .new_bloc #bloc_title | ||
185 | { | ||
186 | width: 70%; | ||
187 | max-width: 300px; | ||
188 | } | ||
189 | .new_bloc form select, .new_bloc form input[type=submit], .modify_bloc form input[type=submit] | ||
190 | { | ||
191 | color: #ff1d04; | ||
192 | font-size: medium; | ||
193 | border-radius: 4px; | ||
194 | background-color: white; | ||
195 | border: lightgrey 2px outset; | ||
196 | } | ||
197 | select:hover | ||
198 | { | ||
199 | cursor: pointer; | ||
200 | } | ||
201 | .new_bloc form input[type=submit]:hover, .modify_bloc form input[type=submit]:hover | ||
202 | { | ||
203 | background-color: #ffff00; | ||
204 | border-radius: 4px; | ||
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; | ||
215 | } \ No newline at end of file | ||
diff --git a/public/css/menu.css b/public/css/menu.css index 61e8a01..68e2b2a 100644 --- a/public/css/menu.css +++ b/public/css/menu.css | |||
@@ -1,4 +1,4 @@ | |||
1 | /* page "Menu et chemins" uniquement */ | 1 | /*-- page "Menu et chemins" uniquement --*/ |
2 | 2 | ||
3 | .menu | 3 | .menu |
4 | { | 4 | { |
@@ -68,7 +68,7 @@ | |||
68 | { | 68 | { |
69 | width: 20px; | 69 | width: 20px; |
70 | vertical-align: middle; | 70 | vertical-align: middle; |
71 | border: 2px #e3f3ff solid; | 71 | border: 2px transparent solid; |
72 | } | 72 | } |
73 | .menu #location:hover, .menu input[type=submit]:hover, .move_entry_icon:hover | 73 | .menu #location:hover, .menu input[type=submit]:hover, .move_entry_icon:hover |
74 | { | 74 | { |
diff --git a/public/js/main.js b/public/js/main.js index 7dacb7a..071a1db 100644 --- a/public/js/main.js +++ b/public/js/main.js | |||
@@ -36,6 +36,7 @@ function toastNotify(message) { | |||
36 | setTimeout(function(){ toast.className = toast.className.replace('show', ''); }, 3000); | 36 | setTimeout(function(){ toast.className = toast.className.replace('show', ''); }, 3000); |
37 | } | 37 | } |
38 | 38 | ||
39 | |||
39 | // complète les fonctions dans tinymce.js | 40 | // complète les fonctions dans tinymce.js |
40 | function switchPositions(article_id, direction) | 41 | function switchPositions(article_id, direction) |
41 | { | 42 | { |
@@ -202,84 +203,4 @@ function findParent(element, tag_name){ | |||
202 | element = element.parentElement; | 203 | element = element.parentElement; |
203 | } | 204 | } |
204 | return null; | 205 | 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 | }); | ||
234 | } | ||
235 | |||
236 | function switchBlocsPositions(bloc_id, direction, current_page) { | ||
237 | const current_bloc = document.getElementById(bloc_id); | ||
238 | const current_bloc_edit_zone = document.getElementById("bloc_edit_" + bloc_id); | ||
239 | var other_bloc; | ||
240 | |||
241 | if(direction == 'down'){ | ||
242 | other_bloc = current_bloc.nextElementSibling; | ||
243 | } | ||
244 | else if(direction == 'up'){ | ||
245 | other_bloc = current_bloc.previousElementSibling; | ||
246 | } | ||
247 | |||
248 | if(other_bloc == null || other_bloc.tagName !== 'SECTION') | ||
249 | { | ||
250 | console.log('Inversion impossible'); | ||
251 | return; | ||
252 | } | ||
253 | const other_bloc_edit_zone = document.getElementById("bloc_edit_" + other_bloc.id); | ||
254 | |||
255 | fetch('index.php?page=' + current_page + '&bloc_edit=switch_blocs_positions', { | ||
256 | method: 'POST', | ||
257 | headers: { | ||
258 | 'Content-Type': 'application/json' | ||
259 | }, | ||
260 | body: JSON.stringify({ id1: bloc_id, id2: parseInt(other_bloc.id) }) | ||
261 | }) | ||
262 | .then(response => response.json()) | ||
263 | .then(data => { | ||
264 | if(data.success) | ||
265 | { | ||
266 | if(direction == 'down'){ | ||
267 | current_bloc.parentElement.insertBefore(other_bloc, current_bloc); | ||
268 | current_bloc_edit_zone.parentElement.insertBefore(other_bloc_edit_zone, current_bloc_edit_zone); | ||
269 | console.log('Inversion réussie'); | ||
270 | } | ||
271 | else if(direction == 'up'){ | ||
272 | other_bloc.parentElement.insertBefore(current_bloc, other_bloc); | ||
273 | other_bloc_edit_zone.parentElement.insertBefore(current_bloc_edit_zone, other_bloc_edit_zone); | ||
274 | console.log('Inversion réussie'); | ||
275 | } | ||
276 | } | ||
277 | else { | ||
278 | |||
279 | console.error('Échec de l\'inversion'); | ||
280 | } | ||
281 | }) | ||
282 | .catch(error => { | ||
283 | console.error('Erreur:', error); | ||
284 | }); | ||
285 | } \ No newline at end of file | 206 | } \ No newline at end of file |