JairoDanielMT commited on
Commit
9c00a8a
verified
1 Parent(s): 89c703e

Update app/templates/base.html.j2

Browse files
Files changed (1) hide show
  1. app/templates/base.html.j2 +113 -78
app/templates/base.html.j2 CHANGED
@@ -4,35 +4,73 @@
4
  <meta charset="UTF-8" />
5
  <title>{{ doc.metadata.description or "Documentaci贸n de Script" }}</title>
6
 
7
- <!-- Fuente corporativa desde Google Fonts -->
8
  <link rel="preconnect" href="https://fonts.googleapis.com" />
9
  <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
10
  <link
11
  href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap"
12
  rel="stylesheet"
13
  />
 
14
 
15
  <style>
16
  /* ----------------------------------------
17
- CONFIGURACI脫N GLOBAL / A4 / M脕RGENES
 
 
 
 
 
 
18
  ----------------------------------------- */
19
- @page {
20
- size: A4;
21
- margin: 2.54cm; /* 1 pulgada por cada lado */
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
22
  }
23
 
 
 
 
 
24
  body {
25
- font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI",
26
- system-ui, sans-serif;
27
- color: #111827;
28
- font-size: 13px;
29
- line-height: 1.7;
30
  margin: 0;
31
- background: #ffffff;
 
 
 
 
 
 
 
32
  }
33
 
34
- .page {
35
- /* contenedor principal del documento */
 
 
 
 
 
36
  }
37
 
38
  /* ----------------------------------------
@@ -41,230 +79,227 @@
41
  .doc-header {
42
  margin-bottom: 16px;
43
  padding-bottom: 10px;
44
- border-bottom: 1px solid #e5e7eb;
45
  }
46
 
47
  .doc-header-meta {
48
  font-size: 11px;
49
- color: #6b7280;
50
  margin-top: 4px;
51
  }
52
 
53
  .doc-footer {
54
  margin-top: 32px;
55
  font-size: 11px;
56
- color: #9ca3af;
57
  text-align: right;
58
  }
59
 
60
  /* ----------------------------------------
61
- TITULOS
62
  ----------------------------------------- */
63
- h1,
64
- h2,
65
- h3,
66
- h4 {
67
- font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI",
68
- system-ui, sans-serif;
69
  margin-bottom: 6px;
70
  font-weight: 600;
71
  }
72
 
73
- h1 {
74
  font-size: 22px;
75
- color: #0f172a;
76
  letter-spacing: 0.03em;
77
  text-transform: uppercase;
78
  margin-top: 0;
79
  }
80
 
81
- h2 {
82
  font-size: 16px;
83
- color: #111827;
84
- border-left: 3px solid #1d4ed8;
85
  padding-left: 10px;
86
  margin-top: 24px;
87
  margin-bottom: 8px;
88
  }
89
 
90
- h3 {
91
  font-size: 14px;
92
- color: #111827;
93
  margin-top: 18px;
94
  margin-bottom: 4px;
95
  }
96
 
97
- h4 {
98
  font-size: 13px;
99
- color: #374151;
100
  margin-top: 12px;
101
  margin-bottom: 4px;
102
  }
103
 
104
- p {
105
  margin: 4px 0 10px;
106
  }
107
 
108
- .muted {
109
- color: #6b7280;
110
  font-size: 11px;
111
  }
112
 
113
- .section {
114
  margin-top: 16px;
115
  }
116
 
117
  /* ----------------------------------------
118
  TARJETAS
119
  ----------------------------------------- */
120
- .card-grid {
121
  display: grid;
122
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
123
  gap: 10px;
124
  margin: 14px 0;
125
  }
126
 
127
- .card {
128
- border: 1px solid #e5e7eb;
129
  border-radius: 6px;
130
  padding: 12px 14px;
131
- background: #f9fafb;
132
  }
133
 
134
- .card-title {
135
  font-size: 12px;
136
  font-weight: 600;
137
  text-transform: uppercase;
138
  letter-spacing: 0.04em;
139
- color: #4b5563;
140
  margin-bottom: 6px;
141
  }
142
 
143
  /* ----------------------------------------
144
- TABLAS (pensadas para PDF)
145
  ----------------------------------------- */
146
- table {
147
  width: 100%;
148
  border-collapse: collapse;
149
  margin: 12px 0 16px;
150
  font-size: 12px;
151
  }
152
 
153
- thead {
154
- display: table-header-group; /* Repite encabezados en cada p谩gina */
155
  }
156
 
157
- tfoot {
158
  display: table-footer-group;
159
  }
160
 
161
- tr {
162
- page-break-inside: avoid; /* Evita cortar filas a la mitad */
163
  }
164
 
165
- th,
166
- td {
167
- border: 1px solid #e5e7eb;
168
  padding: 6px 8px;
169
  vertical-align: top;
170
  }
171
 
172
- th {
173
- background: #eff2f7;
174
  font-weight: 600;
175
  text-transform: uppercase;
176
  font-size: 10px;
177
  letter-spacing: 0.06em;
178
- color: #4b5563;
179
  }
180
 
181
- tr:nth-child(even) td {
182
- background: #f9fafb;
183
  }
184
 
185
  /* ----------------------------------------
186
  LISTAS
187
  ----------------------------------------- */
188
- ul {
189
  padding-left: 20px;
190
  margin: 6px 0 8px;
191
  }
192
 
193
- ul li {
194
  margin-bottom: 3px;
195
  }
196
 
197
  /* ----------------------------------------
198
  PILLS
199
  ----------------------------------------- */
200
- .pill {
201
  display: inline-block;
202
  padding: 3px 8px;
203
  border-radius: 999px;
204
- background: #e5e7eb;
205
  font-size: 10px;
206
  margin-right: 4px;
207
  text-transform: uppercase;
208
  letter-spacing: 0.05em;
209
- color: #374151;
210
  }
211
 
212
  /* ----------------------------------------
213
  SUMMARY BOX
214
  ----------------------------------------- */
215
- .summary-box {
216
- border-left: 3px solid #2563eb;
217
- background: #eff6ff;
218
  padding: 10px 12px;
219
  border-radius: 4px;
220
  font-size: 12px;
221
  margin: 10px 0 14px;
222
  }
223
 
224
- .summary-title {
225
  font-size: 11px;
226
  font-weight: 600;
227
  text-transform: uppercase;
228
  letter-spacing: 0.05em;
229
- color: #1d4ed8;
230
  margin-bottom: 4px;
231
  }
232
 
233
  /* ----------------------------------------
234
  UTILIDADES
235
  ----------------------------------------- */
236
- .flex {
237
  display: flex;
238
  }
239
 
240
- .justify-between {
241
  justify-content: space-between;
242
  }
243
 
244
- .items-center {
245
  align-items: center;
246
  }
247
 
248
- .text-right {
249
  text-align: right;
250
  }
251
 
252
- .badge {
253
  display: inline-block;
254
  padding: 2px 8px;
255
  border-radius: 999px;
256
  font-size: 10px;
257
- border: 1px solid #d1d5db;
258
- color: #4b5563;
259
- background: #f9fafb;
260
  }
261
  </style>
262
  </head>
263
-
264
  <body>
265
- <div class="page">
266
  {% block content %}{% endblock %}
267
-
268
  <p class="doc-footer">
269
  Generado autom谩ticamente {{ generated_at }}
270
  </p>
 
4
  <meta charset="UTF-8" />
5
  <title>{{ doc.metadata.description or "Documentaci贸n de Script" }}</title>
6
 
7
+ {# Opcional: si QUIERES forzar Inter en modo PDF standalone, descomenta esto
8
  <link rel="preconnect" href="https://fonts.googleapis.com" />
9
  <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
10
  <link
11
  href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap"
12
  rel="stylesheet"
13
  />
14
+ #}
15
 
16
  <style>
17
  /* ----------------------------------------
18
+ VARIABLES DE TEMA (sobrescribibles)
19
+ Puedes sobreescribir estas en la p谩gina host:
20
+ .doc-page {
21
+ --doc-color-text: #e5e7eb;
22
+ --doc-color-muted: #9ca3af;
23
+ ...
24
+ }
25
  ----------------------------------------- */
26
+ .doc-page {
27
+ --doc-font-family: inherit;
28
+ --doc-font-size: 13px;
29
+ --doc-line-height: 1.7;
30
+
31
+ --doc-color-bg: transparent;
32
+ --doc-color-text: #111827;
33
+ --doc-color-muted: #6b7280;
34
+ --doc-color-muted-soft: #9ca3af;
35
+
36
+ --doc-color-border: #e5e7eb;
37
+ --doc-color-border-soft: #d1d5db;
38
+
39
+ --doc-color-heading-main: #0f172a;
40
+ --doc-color-heading: #111827;
41
+ --doc-color-heading-sub: #374151;
42
+
43
+ --doc-color-accent: #1d4ed8;
44
+ --doc-color-accent-soft: #2563eb;
45
+
46
+ --doc-color-surface: #f9fafb;
47
+ --doc-color-table-header: #eff2f7;
48
+ --doc-color-summary-bg: #eff6ff;
49
  }
50
 
51
+ /* ----------------------------------------
52
+ CONFIGURACI脫N GLOBAL LIMITADA
53
+ (NO tocamos body, solo lo limpiamos un poco)
54
+ ----------------------------------------- */
55
  body {
 
 
 
 
 
56
  margin: 0;
57
+ background: transparent;
58
+ }
59
+
60
+ /* Si usas modo PDF puedes mantener esto (wkhtmltopdf/weasyprint lo respetan).
61
+ Si solo es vista web incrustada, puedes incluso quitar @page. */
62
+ @page {
63
+ size: A4;
64
+ margin: 2.54cm;
65
  }
66
 
67
+ /* Contenedor principal del documento */
68
+ .doc-page {
69
+ font-family: var(--doc-font-family);
70
+ font-size: var(--doc-font-size);
71
+ line-height: var(--doc-line-height);
72
+ color: var(--doc-color-text);
73
+ background: var(--doc-color-bg);
74
  }
75
 
76
  /* ----------------------------------------
 
79
  .doc-header {
80
  margin-bottom: 16px;
81
  padding-bottom: 10px;
82
+ border-bottom: 1px solid var(--doc-color-border);
83
  }
84
 
85
  .doc-header-meta {
86
  font-size: 11px;
87
+ color: var(--doc-color-muted);
88
  margin-top: 4px;
89
  }
90
 
91
  .doc-footer {
92
  margin-top: 32px;
93
  font-size: 11px;
94
+ color: var(--doc-color-muted-soft);
95
  text-align: right;
96
  }
97
 
98
  /* ----------------------------------------
99
+ TITULOS (scopeados al doc)
100
  ----------------------------------------- */
101
+ .doc-page h1,
102
+ .doc-page h2,
103
+ .doc-page h3,
104
+ .doc-page h4 {
105
+ font-family: inherit; /* No forzamos fuente */
 
106
  margin-bottom: 6px;
107
  font-weight: 600;
108
  }
109
 
110
+ .doc-page h1 {
111
  font-size: 22px;
112
+ color: var(--doc-color-heading-main);
113
  letter-spacing: 0.03em;
114
  text-transform: uppercase;
115
  margin-top: 0;
116
  }
117
 
118
+ .doc-page h2 {
119
  font-size: 16px;
120
+ color: var(--doc-color-heading);
121
+ border-left: 3px solid var(--doc-color-accent);
122
  padding-left: 10px;
123
  margin-top: 24px;
124
  margin-bottom: 8px;
125
  }
126
 
127
+ .doc-page h3 {
128
  font-size: 14px;
129
+ color: var(--doc-color-heading);
130
  margin-top: 18px;
131
  margin-bottom: 4px;
132
  }
133
 
134
+ .doc-page h4 {
135
  font-size: 13px;
136
+ color: var(--doc-color-heading-sub);
137
  margin-top: 12px;
138
  margin-bottom: 4px;
139
  }
140
 
141
+ .doc-page p {
142
  margin: 4px 0 10px;
143
  }
144
 
145
+ .doc-page .muted {
146
+ color: var(--doc-color-muted);
147
  font-size: 11px;
148
  }
149
 
150
+ .doc-page .section {
151
  margin-top: 16px;
152
  }
153
 
154
  /* ----------------------------------------
155
  TARJETAS
156
  ----------------------------------------- */
157
+ .doc-page .card-grid {
158
  display: grid;
159
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
160
  gap: 10px;
161
  margin: 14px 0;
162
  }
163
 
164
+ .doc-page .card {
165
+ border: 1px solid var(--doc-color-border);
166
  border-radius: 6px;
167
  padding: 12px 14px;
168
+ background: var(--doc-color-surface);
169
  }
170
 
171
+ .doc-page .card-title {
172
  font-size: 12px;
173
  font-weight: 600;
174
  text-transform: uppercase;
175
  letter-spacing: 0.04em;
176
+ color: var(--doc-color-heading-sub);
177
  margin-bottom: 6px;
178
  }
179
 
180
  /* ----------------------------------------
181
+ TABLAS
182
  ----------------------------------------- */
183
+ .doc-page table {
184
  width: 100%;
185
  border-collapse: collapse;
186
  margin: 12px 0 16px;
187
  font-size: 12px;
188
  }
189
 
190
+ .doc-page thead {
191
+ display: table-header-group;
192
  }
193
 
194
+ .doc-page tfoot {
195
  display: table-footer-group;
196
  }
197
 
198
+ .doc-page tr {
199
+ page-break-inside: avoid;
200
  }
201
 
202
+ .doc-page th,
203
+ .doc-page td {
204
+ border: 1px solid var(--doc-color-border);
205
  padding: 6px 8px;
206
  vertical-align: top;
207
  }
208
 
209
+ .doc-page th {
210
+ background: var(--doc-color-table-header);
211
  font-weight: 600;
212
  text-transform: uppercase;
213
  font-size: 10px;
214
  letter-spacing: 0.06em;
215
+ color: var(--doc-color-heading-sub);
216
  }
217
 
218
+ .doc-page tr:nth-child(even) td {
219
+ background: var(--doc-color-surface);
220
  }
221
 
222
  /* ----------------------------------------
223
  LISTAS
224
  ----------------------------------------- */
225
+ .doc-page ul {
226
  padding-left: 20px;
227
  margin: 6px 0 8px;
228
  }
229
 
230
+ .doc-page ul li {
231
  margin-bottom: 3px;
232
  }
233
 
234
  /* ----------------------------------------
235
  PILLS
236
  ----------------------------------------- */
237
+ .doc-page .pill {
238
  display: inline-block;
239
  padding: 3px 8px;
240
  border-radius: 999px;
241
+ background: var(--doc-color-border);
242
  font-size: 10px;
243
  margin-right: 4px;
244
  text-transform: uppercase;
245
  letter-spacing: 0.05em;
246
+ color: var(--doc-color-heading-sub);
247
  }
248
 
249
  /* ----------------------------------------
250
  SUMMARY BOX
251
  ----------------------------------------- */
252
+ .doc-page .summary-box {
253
+ border-left: 3px solid var(--doc-color-accent-soft);
254
+ background: var(--doc-color-summary-bg);
255
  padding: 10px 12px;
256
  border-radius: 4px;
257
  font-size: 12px;
258
  margin: 10px 0 14px;
259
  }
260
 
261
+ .doc-page .summary-title {
262
  font-size: 11px;
263
  font-weight: 600;
264
  text-transform: uppercase;
265
  letter-spacing: 0.05em;
266
+ color: var(--doc-color-accent-soft);
267
  margin-bottom: 4px;
268
  }
269
 
270
  /* ----------------------------------------
271
  UTILIDADES
272
  ----------------------------------------- */
273
+ .doc-page .flex {
274
  display: flex;
275
  }
276
 
277
+ .doc-page .justify-between {
278
  justify-content: space-between;
279
  }
280
 
281
+ .doc-page .items-center {
282
  align-items: center;
283
  }
284
 
285
+ .doc-page .text-right {
286
  text-align: right;
287
  }
288
 
289
+ .doc-page .badge {
290
  display: inline-block;
291
  padding: 2px 8px;
292
  border-radius: 999px;
293
  font-size: 10px;
294
+ border: 1px solid var(--doc-color-border-soft);
295
+ color: var(--doc-color-heading-sub);
296
+ background: var(--doc-color-surface);
297
  }
298
  </style>
299
  </head>
 
300
  <body>
301
+ <div class="doc-page">
302
  {% block content %}{% endblock %}
 
303
  <p class="doc-footer">
304
  Generado autom谩ticamente {{ generated_at }}
305
  </p>