diff options
| author | polo <ordipolo@gmx.fr> | 2025-10-28 23:23:03 +0100 |
|---|---|---|
| committer | polo <ordipolo@gmx.fr> | 2025-10-28 23:23:03 +0100 |
| commit | f653506421ee8e2c46c78e93d28ee2418a1d399d (patch) | |
| tree | 93f54c301538960f543ffdb5fafd387c83dec94a /public | |
| parent | cf8c9c1d380afbd8529a6da0afd55a9e3d8f1bf4 (diff) | |
| download | cms-f653506421ee8e2c46c78e93d28ee2418a1d399d.zip | |
modification liens réseaux sociaux, placeholder input text, correction erreurs CSS
Diffstat (limited to 'public')
| -rw-r--r-- | public/css/head.css | 33 | ||||
| -rw-r--r-- | public/js/Input.js | 15 |
2 files changed, 42 insertions, 6 deletions
diff --git a/public/css/head.css b/public/css/head.css index c178d3a..3d9d6ca 100644 --- a/public/css/head.css +++ b/public/css/head.css | |||
| @@ -4,6 +4,7 @@ header | |||
| 4 | /*padding-top: 5px;*/ | 4 | /*padding-top: 5px;*/ |
| 5 | /*padding-bottom: 10px;*/ | 5 | /*padding-bottom: 10px;*/ |
| 6 | background-size: cover; /* largeur du bloc_page */ | 6 | background-size: cover; /* largeur du bloc_page */ |
| 7 | background-position: center; | ||
| 7 | } | 8 | } |
| 8 | #nav_zone | 9 | #nav_zone |
| 9 | { | 10 | { |
| @@ -44,6 +45,7 @@ header | |||
| 44 | { | 45 | { |
| 45 | background-color: #ffffff7f; | 46 | background-color: #ffffff7f; |
| 46 | border-radius: 10px; | 47 | border-radius: 10px; |
| 48 | padding: 1px; /* pour que les marges de h1 et h2 ne mordent pas le bloc parent */ | ||
| 47 | } | 49 | } |
| 48 | header h1 | 50 | header h1 |
| 49 | { | 51 | { |
| @@ -79,13 +81,27 @@ header a | |||
| 79 | display: flex; | 81 | display: flex; |
| 80 | justify-content: center; | 82 | justify-content: center; |
| 81 | } | 83 | } |
| 84 | #header_social_content | ||
| 85 | { | ||
| 86 | display: flex; | ||
| 87 | gap: 4px; | ||
| 88 | flex-wrap: wrap; | ||
| 89 | } | ||
| 82 | #header_social_content img | 90 | #header_social_content img |
| 83 | { | 91 | { |
| 84 | width: 28px; | 92 | width: 28px; |
| 93 | |||
| 94 | } | ||
| 95 | #header_social_content a img | ||
| 96 | { | ||
| 97 | width: 28px; | ||
| 85 | background-color: #ffffffb3; | 98 | background-color: #ffffffb3; |
| 86 | border-radius: 50%; | 99 | border-radius: 50%; |
| 87 | } | 100 | } |
| 88 | 101 | #header_social_content .action_icon | |
| 102 | { | ||
| 103 | width: 24px; | ||
| 104 | } | ||
| 89 | #header_social_content img:hover | 105 | #header_social_content img:hover |
| 90 | { | 106 | { |
| 91 | background-color: yellow; | 107 | background-color: yellow; |
| @@ -98,7 +114,8 @@ header a | |||
| 98 | } | 114 | } |
| 99 | 115 | ||
| 100 | @media screen and (max-width: 1000px){ | 116 | @media screen and (max-width: 1000px){ |
| 101 | .header_content{ | 117 | .header_content |
| 118 | { | ||
| 102 | padding: 15px 0; | 119 | padding: 15px 0; |
| 103 | } | 120 | } |
| 104 | header img | 121 | header img |
| @@ -106,14 +123,20 @@ header a | |||
| 106 | max-width: 160px; | 123 | max-width: 160px; |
| 107 | } | 124 | } |
| 108 | } | 125 | } |
| 109 | @media screen and (max-width: 500px){ | 126 | @media screen and (max-width: 800px){ |
| 110 | .header_content | 127 | .header_content |
| 111 | { | 128 | { |
| 112 | display: block; | 129 | grid-template-columns: 2fr 1fr; /* on vire la colonne de gauche et on permet au deux autres de "se pousser" si besoin */ |
| 113 | padding: 10px; | 130 | padding: 10px; |
| 114 | } | 131 | } |
| 115 | #header_logo | 132 | .header_left_col |
| 116 | { | 133 | { |
| 117 | display: none; | 134 | display: none; |
| 118 | } | 135 | } |
| 136 | } | ||
| 137 | @media screen and (max-width: 600px){ | ||
| 138 | .header_content | ||
| 139 | { | ||
| 140 | display: block; | ||
| 141 | } | ||
| 119 | } \ No newline at end of file | 142 | } \ No newline at end of file |
diff --git a/public/js/Input.js b/public/js/Input.js index be7cd8d..6c5af10 100644 --- a/public/js/Input.js +++ b/public/js/Input.js | |||
| @@ -54,7 +54,7 @@ class InputText extends InputToggler{ | |||
| 54 | .then(response => response.json()) | 54 | .then(response => response.json()) |
| 55 | .then(data => { | 55 | .then(data => { |
| 56 | if(data.success){ | 56 | if(data.success){ |
| 57 | this.content_elem.innerHTML = this.input_elem.value; | 57 | this.onSuccess(data); |
| 58 | this.close(); | 58 | this.close(); |
| 59 | } | 59 | } |
| 60 | else{ | 60 | else{ |
| @@ -65,12 +65,25 @@ class InputText extends InputToggler{ | |||
| 65 | console.error('Erreur:', error); | 65 | console.error('Erreur:', error); |
| 66 | }); | 66 | }); |
| 67 | } | 67 | } |
| 68 | onSuccess(data){ | ||
| 69 | this.content_elem.innerHTML = this.input_elem.value; | ||
| 70 | } | ||
| 68 | cancel(){ | 71 | cancel(){ |
| 69 | this.input_elem.value = this.content_elem.innerHTML; | 72 | this.input_elem.value = this.content_elem.innerHTML; |
| 70 | super.cancel(); | 73 | super.cancel(); |
| 71 | } | 74 | } |
| 72 | } | 75 | } |
| 73 | 76 | ||
| 77 | class InputTextSocialNetwork extends InputText{ | ||
| 78 | open(){ | ||
| 79 | this.input_elem.value = this.content_elem.parentNode.href; | ||
| 80 | super.open(); | ||
| 81 | } | ||
| 82 | onSuccess(data){ | ||
| 83 | this.content_elem.parentNode.href = this.input_elem.value; | ||
| 84 | } | ||
| 85 | } | ||
| 86 | |||
| 74 | class InputFile extends InputToggler{ | 87 | class InputFile extends InputToggler{ |
| 75 | constructor(name, options = {}){ | 88 | constructor(name, options = {}){ |
| 76 | super(name, options); | 89 | super(name, options); |
