Spaces:
Sleeping
Sleeping
Update templates/index.html
Browse files- templates/index.html +48 -85
templates/index.html
CHANGED
|
@@ -121,147 +121,110 @@
|
|
| 121 |
|
| 122 |
#solution {
|
| 123 |
background: #fff;
|
| 124 |
-
padding:
|
| 125 |
border-radius: 8px;
|
| 126 |
text-align: left;
|
| 127 |
line-height: 1.8;
|
| 128 |
font-size: 16px;
|
|
|
|
|
|
|
| 129 |
}
|
| 130 |
|
| 131 |
-
/* Modified styles for continuous flow */
|
| 132 |
.step-section, .code-section, .output-section {
|
| 133 |
margin: 0; /* Remove vertical margins between blocks */
|
| 134 |
-
padding: 15px; /*
|
| 135 |
border-radius: 0; /* Remove rounded corners between blocks */
|
| 136 |
-
border-left: none; /* Remove left border */
|
| 137 |
overflow-x: auto;
|
| 138 |
-
white-space: pre-wrap;
|
| 139 |
-
background-color: transparent; /* Ensure consistent background
|
| 140 |
}
|
| 141 |
|
| 142 |
.step-section {
|
| 143 |
-
|
| 144 |
-
|
| 145 |
-
|
| 146 |
-
background-color: #f9f9f9; /* Background for step sections */
|
| 147 |
}
|
| 148 |
|
| 149 |
-
|
| 150 |
.code-section {
|
| 151 |
-
/* Code section
|
| 152 |
}
|
| 153 |
|
| 154 |
.code-header {
|
| 155 |
-
|
| 156 |
-
|
| 157 |
-
|
| 158 |
-
|
| 159 |
-
|
| 160 |
-
|
| 161 |
-
|
| 162 |
-
|
| 163 |
-
|
| 164 |
-
|
| 165 |
-
|
| 166 |
|
| 167 |
.code-content {
|
| 168 |
margin: 0;
|
| 169 |
-
padding: 15px;
|
| 170 |
background-color: var(--code-bg);
|
| 171 |
color: #e6e6e6;
|
| 172 |
overflow-x: auto;
|
| 173 |
font-family: 'Courier New', monospace;
|
| 174 |
font-size: 14px;
|
| 175 |
line-height: 1.5;
|
| 176 |
-
/* No border-radius here, managed by parent or siblings */
|
| 177 |
}
|
| 178 |
|
| 179 |
.output-section {
|
| 180 |
background-color: var(--output-bg);
|
| 181 |
-
padding: 15px;
|
| 182 |
-
border-top: 1px solid #ddd;
|
| 183 |
color: #333;
|
| 184 |
font-family: 'Courier New', monospace;
|
| 185 |
font-size: 14px;
|
| 186 |
white-space: pre-wrap;
|
| 187 |
overflow-x: auto;
|
| 188 |
-
border-bottom-left-radius: 8px;
|
| 189 |
border-bottom-right-radius: 8px;
|
| 190 |
}
|
| 191 |
|
| 192 |
-
/*
|
| 193 |
#solution > div:first-child {
|
| 194 |
border-top-left-radius: 8px;
|
| 195 |
border-top-right-radius: 8px;
|
| 196 |
}
|
| 197 |
-
/* Special case for first code header */
|
| 198 |
-
#solution .code-section:first-child .code-header {
|
| 199 |
-
border-top-left-radius: 8px;
|
| 200 |
-
border-top-right-radius: 8px;
|
| 201 |
-
}
|
| 202 |
-
|
| 203 |
|
| 204 |
-
|
| 205 |
border-bottom-left-radius: 8px;
|
| 206 |
border-bottom-right-radius: 8px;
|
| 207 |
}
|
| 208 |
-
/* Special case for last code content (if not followed by output) */
|
| 209 |
-
#solution .code-section:last-child .code-content:last-child:not(+.output-section) {
|
| 210 |
-
border-bottom-left-radius: 8px;
|
| 211 |
-
border-bottom-right-radius: 8px;
|
| 212 |
-
}
|
| 213 |
|
| 214 |
-
|
| 215 |
-
.
|
| 216 |
-
|
| 217 |
-
|
| 218 |
-
margin: 15px 0;
|
| 219 |
-
text-align: center;
|
| 220 |
-
}
|
| 221 |
-
|
| 222 |
-
.thinking-indicator, .executing-indicator, .answering-indicator {
|
| 223 |
-
display: flex;
|
| 224 |
-
align-items: center;
|
| 225 |
-
padding: 10px;
|
| 226 |
-
margin: 10px 0;
|
| 227 |
-
border-radius: 8px;
|
| 228 |
-
font-size: 0.9rem;
|
| 229 |
-
}
|
| 230 |
-
|
| 231 |
-
.thinking-indicator {
|
| 232 |
-
background-color: #e3f2fd;
|
| 233 |
-
color: #1565c0;
|
| 234 |
-
}
|
| 235 |
-
|
| 236 |
-
.executing-indicator {
|
| 237 |
-
background-color: #ede7f6;
|
| 238 |
-
color: #5e35b1;
|
| 239 |
-
}
|
| 240 |
-
|
| 241 |
-
.answering-indicator {
|
| 242 |
-
background-color: #e8f5e9;
|
| 243 |
-
color: #2e7d32;
|
| 244 |
-
}
|
| 245 |
-
|
| 246 |
-
.indicator-icon {
|
| 247 |
-
margin-right: 10px;
|
| 248 |
-
animation: pulse 1.5s infinite ease-in-out;
|
| 249 |
}
|
| 250 |
|
| 251 |
-
|
| 252 |
-
|
| 253 |
-
|
| 254 |
-
|
| 255 |
-
|
| 256 |
|
|
|
|
| 257 |
mjx-container {
|
| 258 |
overflow-x: auto;
|
| 259 |
overflow-y: hidden;
|
| 260 |
-
display: block;
|
| 261 |
-
margin: 1em 0;
|
| 262 |
text-align: initial;
|
| 263 |
padding: 0 !important;
|
| 264 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 265 |
mjx-assistive-mml {
|
| 266 |
display: none !important;
|
| 267 |
}
|
|
@@ -323,7 +286,7 @@
|
|
| 323 |
<i class="fas fa-brain indicator-icon"></i>
|
| 324 |
<span>Je réfléchis au problème...</span>
|
| 325 |
</div>
|
| 326 |
-
<div id="solution"
|
| 327 |
</div>
|
| 328 |
|
| 329 |
<div class="upgrade-section">
|
|
@@ -353,7 +316,7 @@
|
|
| 353 |
options: {
|
| 354 |
enableMenu: false,
|
| 355 |
ignoreHtmlClass: 'code-content',
|
| 356 |
-
processHtmlClass: 'step-section
|
| 357 |
skipHtmlTags: ['script', 'noscript', 'style', 'textarea', 'pre', 'code']
|
| 358 |
},
|
| 359 |
loader: {
|
|
|
|
| 121 |
|
| 122 |
#solution {
|
| 123 |
background: #fff;
|
| 124 |
+
padding: 0; /* Remove padding from the container */
|
| 125 |
border-radius: 8px;
|
| 126 |
text-align: left;
|
| 127 |
line-height: 1.8;
|
| 128 |
font-size: 16px;
|
| 129 |
+
overflow: hidden; /* Clip child border-radius */
|
| 130 |
+
box-shadow: var(--box-shadow); /* Add shadow to the main container */
|
| 131 |
}
|
| 132 |
|
|
|
|
| 133 |
.step-section, .code-section, .output-section {
|
| 134 |
margin: 0; /* Remove vertical margins between blocks */
|
| 135 |
+
padding: 15px 20px; /* Add padding inside each block, matching original #solution padding */
|
| 136 |
border-radius: 0; /* Remove rounded corners between blocks */
|
| 137 |
+
border-left: none; /* Remove default left border */
|
| 138 |
overflow-x: auto;
|
| 139 |
+
white-space: pre-wrap; /* Preserve white space and line breaks */
|
| 140 |
+
background-color: transparent; /* Ensure consistent background */
|
| 141 |
}
|
| 142 |
|
| 143 |
.step-section {
|
| 144 |
+
border-left: 4px solid var(--primary-color); /* Keep the left border as a visual cue */
|
| 145 |
+
padding-left: calc(20px - 4px); /* Adjust padding to maintain alignment */
|
| 146 |
+
background-color: #f9f9f9; /* Subtle background for text steps */
|
|
|
|
| 147 |
}
|
| 148 |
|
|
|
|
| 149 |
.code-section {
|
| 150 |
+
/* Code section internal elements handle their own padding and background */
|
| 151 |
}
|
| 152 |
|
| 153 |
.code-header {
|
| 154 |
+
background-color: #343a40;
|
| 155 |
+
color: white;
|
| 156 |
+
padding: 8px 20px; /* Match horizontal padding */
|
| 157 |
+
font-size: 14px;
|
| 158 |
+
font-family: 'Courier New', monospace;
|
| 159 |
+
display: flex;
|
| 160 |
+
justify-content: space-between;
|
| 161 |
+
align-items: center;
|
| 162 |
+
border-top-left-radius: 8px;
|
| 163 |
+
border-top-right-radius: 8px;
|
| 164 |
+
}
|
| 165 |
|
| 166 |
.code-content {
|
| 167 |
margin: 0;
|
| 168 |
+
padding: 15px 20px; /* Match horizontal padding */
|
| 169 |
background-color: var(--code-bg);
|
| 170 |
color: #e6e6e6;
|
| 171 |
overflow-x: auto;
|
| 172 |
font-family: 'Courier New', monospace;
|
| 173 |
font-size: 14px;
|
| 174 |
line-height: 1.5;
|
|
|
|
| 175 |
}
|
| 176 |
|
| 177 |
.output-section {
|
| 178 |
background-color: var(--output-bg);
|
| 179 |
+
padding: 15px 20px; /* Match horizontal padding */
|
| 180 |
+
border-top: 1px solid #ddd;
|
| 181 |
color: #333;
|
| 182 |
font-family: 'Courier New', monospace;
|
| 183 |
font-size: 14px;
|
| 184 |
white-space: pre-wrap;
|
| 185 |
overflow-x: auto;
|
| 186 |
+
border-bottom-left-radius: 8px;
|
| 187 |
border-bottom-right-radius: 8px;
|
| 188 |
}
|
| 189 |
|
| 190 |
+
/* Apply border-radius to the very first and very last child inside #solution */
|
| 191 |
#solution > div:first-child {
|
| 192 |
border-top-left-radius: 8px;
|
| 193 |
border-top-right-radius: 8px;
|
| 194 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 195 |
|
| 196 |
+
#solution > div:last-child {
|
| 197 |
border-bottom-left-radius: 8px;
|
| 198 |
border-bottom-right-radius: 8px;
|
| 199 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 200 |
|
| 201 |
+
/* Special case for first code header within the first child */
|
| 202 |
+
#solution > .code-section:first-child .code-header {
|
| 203 |
+
border-top-left-radius: 8px;
|
| 204 |
+
border-top-right-radius: 8px;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 205 |
}
|
| 206 |
|
| 207 |
+
/* Special case for last code content if it's the very last child and not followed by output */
|
| 208 |
+
#solution > .code-section:last-child .code-content:last-child:not(+.output-section) {
|
| 209 |
+
border-bottom-left-radius: 8px;
|
| 210 |
+
border-bottom-right-radius: 8px;
|
| 211 |
+
}
|
| 212 |
|
| 213 |
+
/* MathJax rendering output styles */
|
| 214 |
mjx-container {
|
| 215 |
overflow-x: auto;
|
| 216 |
overflow-y: hidden;
|
| 217 |
+
display: block; /* Block math */
|
| 218 |
+
margin: 1em 0; /* Vertical spacing for block math */
|
| 219 |
text-align: initial;
|
| 220 |
padding: 0 !important;
|
| 221 |
}
|
| 222 |
+
/* Inline math container */
|
| 223 |
+
mjx-container[display="inline"] {
|
| 224 |
+
display: inline-block; /* Inline math behaves like text */
|
| 225 |
+
margin: 0 !important; /* No vertical margin for inline math */
|
| 226 |
+
}
|
| 227 |
+
|
| 228 |
mjx-assistive-mml {
|
| 229 |
display: none !important;
|
| 230 |
}
|
|
|
|
| 286 |
<i class="fas fa-brain indicator-icon"></i>
|
| 287 |
<span>Je réfléchis au problème...</span>
|
| 288 |
</div>
|
| 289 |
+
<div id="solution"></div>
|
| 290 |
</div>
|
| 291 |
|
| 292 |
<div class="upgrade-section">
|
|
|
|
| 316 |
options: {
|
| 317 |
enableMenu: false,
|
| 318 |
ignoreHtmlClass: 'code-content',
|
| 319 |
+
processHtmlClass: 'step-section', /* Process step-section for Math */
|
| 320 |
skipHtmlTags: ['script', 'noscript', 'style', 'textarea', 'pre', 'code']
|
| 321 |
},
|
| 322 |
loader: {
|