techsical 0.1.0__tar.gz → 0.2.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (38) hide show
  1. {techsical-0.1.0 → techsical-0.2.0}/PKG-INFO +6 -2
  2. {techsical-0.1.0 → techsical-0.2.0}/README.md +5 -1
  3. {techsical-0.1.0 → techsical-0.2.0}/pyproject.toml +1 -1
  4. {techsical-0.1.0 → techsical-0.2.0}/pyproject.toml.orig +1 -1
  5. techsical-0.2.0/src/techsical/theme/assets/javascripts/transitions.js +54 -0
  6. techsical-0.2.0/src/techsical/theme/assets/stylesheets/options/framed.css +53 -0
  7. techsical-0.2.0/src/techsical/theme/assets/stylesheets/options/no-footer-nav.css +10 -0
  8. techsical-0.2.0/src/techsical/theme/assets/stylesheets/options/no-toc.css +26 -0
  9. techsical-0.2.0/src/techsical/theme/assets/stylesheets/options/transitions.css +29 -0
  10. {techsical-0.1.0 → techsical-0.2.0}/src/techsical/theme/assets/stylesheets/techsical.css +11 -4
  11. {techsical-0.1.0 → techsical-0.2.0}/src/techsical/theme/home.html +7 -1
  12. {techsical-0.1.0 → techsical-0.2.0}/src/techsical/theme/mkdocs_theme.yml +3 -1
  13. {techsical-0.1.0 → techsical-0.2.0}/src/techsical/theme/partials/techsical-head.html +29 -2
  14. {techsical-0.1.0 → techsical-0.2.0}/LICENSE +0 -0
  15. {techsical-0.1.0 → techsical-0.2.0}/src/techsical/__init__.py +0 -0
  16. {techsical-0.1.0 → techsical-0.2.0}/src/techsical/theme/assets/fonts/OFL-JetBrainsMono.txt +0 -0
  17. {techsical-0.1.0 → techsical-0.2.0}/src/techsical/theme/assets/fonts/OFL-Manrope.txt +0 -0
  18. {techsical-0.1.0 → techsical-0.2.0}/src/techsical/theme/assets/fonts/OFL-SourceSerif4.txt +0 -0
  19. {techsical-0.1.0 → techsical-0.2.0}/src/techsical/theme/assets/fonts/jetbrains-mono-greek-wght-italic.woff2 +0 -0
  20. {techsical-0.1.0 → techsical-0.2.0}/src/techsical/theme/assets/fonts/jetbrains-mono-greek-wght-normal.woff2 +0 -0
  21. {techsical-0.1.0 → techsical-0.2.0}/src/techsical/theme/assets/fonts/jetbrains-mono-latin-ext-wght-italic.woff2 +0 -0
  22. {techsical-0.1.0 → techsical-0.2.0}/src/techsical/theme/assets/fonts/jetbrains-mono-latin-ext-wght-normal.woff2 +0 -0
  23. {techsical-0.1.0 → techsical-0.2.0}/src/techsical/theme/assets/fonts/jetbrains-mono-latin-wght-italic.woff2 +0 -0
  24. {techsical-0.1.0 → techsical-0.2.0}/src/techsical/theme/assets/fonts/jetbrains-mono-latin-wght-normal.woff2 +0 -0
  25. {techsical-0.1.0 → techsical-0.2.0}/src/techsical/theme/assets/fonts/manrope-greek-wght-normal.woff2 +0 -0
  26. {techsical-0.1.0 → techsical-0.2.0}/src/techsical/theme/assets/fonts/manrope-latin-ext-wght-normal.woff2 +0 -0
  27. {techsical-0.1.0 → techsical-0.2.0}/src/techsical/theme/assets/fonts/manrope-latin-wght-normal.woff2 +0 -0
  28. {techsical-0.1.0 → techsical-0.2.0}/src/techsical/theme/assets/fonts/source-serif-4-greek-wght-italic.woff2 +0 -0
  29. {techsical-0.1.0 → techsical-0.2.0}/src/techsical/theme/assets/fonts/source-serif-4-greek-wght-normal.woff2 +0 -0
  30. {techsical-0.1.0 → techsical-0.2.0}/src/techsical/theme/assets/fonts/source-serif-4-latin-ext-wght-italic.woff2 +0 -0
  31. {techsical-0.1.0 → techsical-0.2.0}/src/techsical/theme/assets/fonts/source-serif-4-latin-ext-wght-normal.woff2 +0 -0
  32. {techsical-0.1.0 → techsical-0.2.0}/src/techsical/theme/assets/fonts/source-serif-4-latin-wght-italic.woff2 +0 -0
  33. {techsical-0.1.0 → techsical-0.2.0}/src/techsical/theme/assets/fonts/source-serif-4-latin-wght-normal.woff2 +0 -0
  34. {techsical-0.1.0 → techsical-0.2.0}/src/techsical/theme/assets/javascripts/math.js +0 -0
  35. {techsical-0.1.0 → techsical-0.2.0}/src/techsical/theme/assets/stylesheets/fonts.css +0 -0
  36. {techsical-0.1.0 → techsical-0.2.0}/src/techsical/theme/partials/copyright.html +0 -0
  37. {techsical-0.1.0 → techsical-0.2.0}/src/techsical/theme/partials/header.html +0 -0
  38. {techsical-0.1.0 → techsical-0.2.0}/src/techsical/theme/partials/icons.html +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: techsical
3
- Version: 0.1.0
3
+ Version: 0.2.0
4
4
  Summary: Tema editorial técnico para Zensical: tipografía serif de lectura, interfaz sans y colores personalizables.
5
5
  Keywords: zensical,theme,documentation,mkdocs
6
6
  Author: Isidro Rodríguez
@@ -45,9 +45,13 @@ name = "techsical"
45
45
  [project.extra.techsical]
46
46
  primary = "#164e63" # opcional: color principal
47
47
  accent = "#0f766e" # opcional: acento
48
- header_nav = [ # opcional: enlaces propios de la cabecera
48
+ header_nav = [ # opcional: barra de enlaces bajo la cabecera
49
49
  { title = "Guía", url = "guia/" },
50
50
  ]
51
+ toc = false # opcional: sin índice lateral en ninguna página
52
+ framed = true # opcional: el artículo en un panel
53
+ footer_nav = true # opcional: «anterior / siguiente» al pie
54
+ transitions = false # opcional: sin transiciones entre páginas
51
55
  ```
52
56
 
53
57
  Todas las opciones, la portada (`template: home.html`) y los tipos de página están en
@@ -21,9 +21,13 @@ name = "techsical"
21
21
  [project.extra.techsical]
22
22
  primary = "#164e63" # opcional: color principal
23
23
  accent = "#0f766e" # opcional: acento
24
- header_nav = [ # opcional: enlaces propios de la cabecera
24
+ header_nav = [ # opcional: barra de enlaces bajo la cabecera
25
25
  { title = "Guía", url = "guia/" },
26
26
  ]
27
+ toc = false # opcional: sin índice lateral en ninguna página
28
+ framed = true # opcional: el artículo en un panel
29
+ footer_nav = true # opcional: «anterior / siguiente» al pie
30
+ transitions = false # opcional: sin transiciones entre páginas
27
31
  ```
28
32
 
29
33
  Todas las opciones, la portada (`template: home.html`) y los tipos de página están en
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "techsical"
3
- version = "0.1.0"
3
+ version = "0.2.0"
4
4
  description = "Tema editorial técnico para Zensical: tipografía serif de lectura, interfaz sans y colores personalizables."
5
5
  readme = "README.md"
6
6
  requires-python = ">=3.12"
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "techsical"
3
- version = "0.1.0"
3
+ version = "0.2.0"
4
4
  description = "Tema editorial técnico para Zensical: tipografía serif de lectura, interfaz sans y colores personalizables."
5
5
  readme = "README.md"
6
6
  requires-python = ">=3.12"
@@ -0,0 +1,54 @@
1
+ /*
2
+ * techsical: la imagen de un enlace «vuela» hasta la imagen principal de la
3
+ * página de destino (portada, tarjeta o listado → artículo).
4
+ *
5
+ * Al salir (pageswap) se busca un enlace a la página de destino que contenga una
6
+ * imagen; si lo hay, se le da un nombre de transición y se anota el destino. Al
7
+ * llegar (pagereveal) se da el mismo nombre a la primera imagen del artículo, y
8
+ * el navegador anima una hacia la otra. Se carga en <head> sin defer porque
9
+ * pagereveal llega antes del primer pintado.
10
+ */
11
+ (() => {
12
+ const NAME = "tx-image";
13
+ const KEY = "techsical:transition-image";
14
+
15
+ const samePage = (a, b) => new URL(a, location.href).pathname === new URL(b).pathname;
16
+
17
+ window.addEventListener("pageswap", (event) => {
18
+ const entry = event.activation && event.activation.entry;
19
+ if (!event.viewTransition || !entry) return;
20
+ for (const link of document.querySelectorAll("a[href]")) {
21
+ const image = link.querySelector("img");
22
+ if (image && samePage(link.href, entry.url)) {
23
+ image.style.viewTransitionName = NAME;
24
+ try {
25
+ sessionStorage.setItem(KEY, new URL(entry.url).pathname);
26
+ } catch {
27
+ /* Sin sessionStorage no hay imagen compartida: la página se funde igual. */
28
+ }
29
+ return;
30
+ }
31
+ }
32
+ });
33
+
34
+ window.addEventListener("pagereveal", (event) => {
35
+ let target = null;
36
+ try {
37
+ target = sessionStorage.getItem(KEY);
38
+ sessionStorage.removeItem(KEY);
39
+ } catch {
40
+ return;
41
+ }
42
+ if (!event.viewTransition || target !== location.pathname) return;
43
+ const tag = () => {
44
+ const image = document.querySelector(".md-content article img, .md-content__inner img");
45
+ if (image) image.style.viewTransitionName = NAME;
46
+ };
47
+ // pagereveal puede llegar antes de que el cuerpo esté analizado.
48
+ if (document.readyState === "loading") {
49
+ document.addEventListener("DOMContentLoaded", tag, { once: true });
50
+ } else {
51
+ tag();
52
+ }
53
+ });
54
+ })();
@@ -0,0 +1,53 @@
1
+ /*
2
+ * techsical: opción framed = true ([project.extra.techsical]).
3
+ * El artículo va en un panel (fondo propio, borde fino, esquinas redondeadas y
4
+ * relleno) sobre un fondo de página algo más oscuro, como las tarjetas de una
5
+ * aplicación de escritorio. La portada (home.html) no lleva panel.
6
+ */
7
+
8
+ :root,
9
+ [data-md-color-scheme="default"] {
10
+ --tx-frame-page: var(--tx-surface-2);
11
+ --tx-frame-bg: var(--tx-bg);
12
+ }
13
+
14
+ [data-md-color-scheme="slate"] {
15
+ --tx-frame-page: var(--tx-bg);
16
+ --tx-frame-bg: var(--tx-surface-1);
17
+ }
18
+
19
+ .md-main,
20
+ .md-footer,
21
+ .md-footer-meta {
22
+ background-color: var(--tx-frame-page);
23
+ }
24
+
25
+ .md-content__inner {
26
+ margin-bottom: var(--tx-space-8);
27
+ padding: var(--tx-space-6) var(--tx-space-8) var(--tx-space-8);
28
+ background-color: var(--tx-frame-bg);
29
+ border: var(--tx-rule) solid var(--tx-border);
30
+ border-radius: var(--tx-radius-large);
31
+ }
32
+
33
+ /* Las migas quedan fuera del panel: un poco de aire las separa del artículo. */
34
+ .md-path {
35
+ margin-bottom: 1em;
36
+ }
37
+
38
+ /* Zensical deja un hueco sobre el título con un ::before; dentro del panel sobra. */
39
+ .md-content__inner::before {
40
+ height: 0;
41
+ }
42
+
43
+ @media screen and (max-width: 44.9375em) {
44
+ .md-content__inner {
45
+ padding: var(--tx-space-4) var(--tx-space-4) var(--tx-space-6);
46
+ }
47
+ }
48
+
49
+ .tx-home .md-content__inner {
50
+ padding: 0;
51
+ background-color: transparent;
52
+ border: 0;
53
+ }
@@ -0,0 +1,10 @@
1
+ /*
2
+ * techsical: sin «anterior / siguiente» al pie (opción por defecto; footer_nav =
3
+ * true en [project.extra.techsical] los muestra). Se oculta el bloque y no la
4
+ * feature navigation.footer, para que funcione aunque la web declare sus propias
5
+ * features.
6
+ */
7
+
8
+ .md-footer__inner {
9
+ display: none;
10
+ }
@@ -0,0 +1,26 @@
1
+ /*
2
+ * techsical: opción toc = false ([project.extra.techsical]).
3
+ * Ninguna página muestra el índice lateral y el artículo se centra en el espacio
4
+ * libre, como con `hide: [toc]` en cada página. La especificidad supera a la de
5
+ * Zensical ([dir=ltr] .md-sidebar--primary…), que fija los márgenes.
6
+ */
7
+
8
+ html body .md-main__inner > .md-sidebar.md-sidebar--secondary {
9
+ display: none;
10
+ }
11
+
12
+ /* Solo con espacio de sobra: en pantallas estrechas se conservan los márgenes de
13
+ Zensical. */
14
+ @media screen and (min-width: 60em) {
15
+ html body .md-main__inner > .md-sidebar.md-sidebar--secondary ~ .md-content > .md-content__inner,
16
+ html body .md-main__inner > .md-sidebar.md-sidebar--secondary ~ .md-content > .md-path {
17
+ margin-right: auto;
18
+ margin-left: auto;
19
+ }
20
+ }
21
+
22
+ /* En móvil, el índice de la página también se integra en el cajón del menú. */
23
+ .md-nav--primary .md-nav--secondary,
24
+ .md-nav--primary .md-nav__link[for="__toc"] .md-nav__icon {
25
+ display: none;
26
+ }
@@ -0,0 +1,29 @@
1
+ /*
2
+ * techsical: transiciones suaves entre páginas (View Transitions entre
3
+ * documentos). Activas por defecto; transitions = false en
4
+ * [project.extra.techsical] no carga esta hoja ni transitions.js.
5
+ *
6
+ * Solo funcionan con navegación normal entre páginas: la feature
7
+ * navigation.instant de Zensical cambia de página sin recargar y las anula.
8
+ * Los navegadores sin soporte navegan como siempre.
9
+ */
10
+
11
+ @view-transition {
12
+ navigation: auto;
13
+ }
14
+
15
+ ::view-transition-group(*) {
16
+ animation-duration: 0.35s;
17
+ animation-timing-function: cubic-bezier(0.2, 0, 0, 1);
18
+ }
19
+
20
+ /* La cabecera no cambia de una página a otra: se queda quieta. */
21
+ .md-header {
22
+ view-transition-name: tx-header;
23
+ }
24
+
25
+ @media (prefers-reduced-motion: reduce) {
26
+ @view-transition {
27
+ navigation: none;
28
+ }
29
+ }
@@ -456,10 +456,12 @@ body {
456
456
  max-width: var(--tx-content-max);
457
457
  }
458
458
 
459
- body .md-main__inner > .md-sidebar--secondary[hidden] ~ .md-content > .md-content__inner,
460
- body .md-main__inner > .md-sidebar--secondary[hidden] ~ .md-content > .md-path {
461
- margin-right: auto;
462
- margin-left: auto;
459
+ @media screen and (min-width: 60em) {
460
+ body .md-main__inner > .md-sidebar--secondary[hidden] ~ .md-content > .md-content__inner,
461
+ body .md-main__inner > .md-sidebar--secondary[hidden] ~ .md-content > .md-path {
462
+ margin-right: auto;
463
+ margin-left: auto;
464
+ }
463
465
  }
464
466
 
465
467
  .md-typeset {
@@ -850,6 +852,11 @@ body .md-main__inner > .md-sidebar--secondary[hidden] ~ .md-content > .md-path {
850
852
  }
851
853
  }
852
854
 
855
+ /* La portada no lleva «anterior / siguiente» aunque la web active navigation.footer. */
856
+ body:has(.tx-home) .md-footer__inner {
857
+ display: none;
858
+ }
859
+
853
860
  .tx-home .md-content__inner {
854
861
  max-width: 1120px;
855
862
  }
@@ -44,7 +44,13 @@
44
44
  <div class="tx-hero__media{% if images | length > 1 %} tx-hero__media--pair{% endif %}">
45
45
  {% for image in images %}
46
46
  <figure class="tx-hero__figure">
47
- <img src="{{ image.src | url }}" alt="{{ image.alt | d('', true) | e }}" loading="lazy">
47
+ {#- La primera imagen suele ser lo mayor de la primera pantalla: sin
48
+ diferir y con prioridad. -#}
49
+ {% if loop.first %}
50
+ <img src="{{ image.src | url }}" alt="{{ image.alt | d('', true) | e }}" fetchpriority="high">
51
+ {% else %}
52
+ <img src="{{ image.src | url }}" alt="{{ image.alt | d('', true) | e }}" loading="lazy">
53
+ {% endif %}
48
54
  {% if image.caption %}
49
55
  <figcaption>{{ image.caption }}</figcaption>
50
56
  {% endif %}
@@ -7,6 +7,9 @@ language: es
7
7
  font: false
8
8
  favicon: assets/favicon/favicon-32x32.png
9
9
 
10
+ # navigation.footer (anterior/siguiente al pie) queda oculta salvo con
11
+ # footer_nav = true en [project.extra.techsical]. Sin navigation.instant: cambia
12
+ # de página sin recargar y anula las transiciones entre páginas del tema.
10
13
  features:
11
14
  - content.code.annotate
12
15
  - content.code.copy
@@ -14,7 +17,6 @@ features:
14
17
  - content.tooltips
15
18
  - navigation.footer
16
19
  - navigation.indexes
17
- - navigation.instant
18
20
  - navigation.path
19
21
  - navigation.sections
20
22
  - navigation.top
@@ -8,12 +8,30 @@
8
8
  (colores #rrggbb), font_text, font_ui, font_code (familias CSS; la web carga
9
9
  las fuentes que no traiga el tema), content_max y figure_max (anchos CSS),
10
10
  theme_color (barra del navegador), manifest y favicons (false los omite),
11
- math (true carga MathJax para las fórmulas LaTeX de pymdownx.arithmatex) y
12
- header_nav (ver partials/header.html).
11
+ math (true carga MathJax para las fórmulas LaTeX de pymdownx.arithmatex),
12
+ toc (false quita el índice lateral de todas las páginas), footer_nav (true
13
+ muestra «anterior / siguiente» al pie; por defecto no), framed (true pone el
14
+ artículo en un panel), transitions (false quita las transiciones entre
15
+ páginas) y header_nav (ver partials/header.html).
13
16
  -#}
14
17
  {% set tx = config.extra.techsical | d({}, true) %}
15
18
  <link rel="stylesheet" href="{{ 'assets/stylesheets/fonts.css' | url }}">
16
19
  <link rel="stylesheet" href="{{ 'assets/stylesheets/techsical.css' | url }}">
20
+ {#- Opciones de maquetación: hojas aparte, cargadas solo si se activan. Van en
21
+ <head> porque valen para toda la web (la navegación instantánea no lo cambia). -#}
22
+ {% if tx.toc == false %}
23
+ <link rel="stylesheet" href="{{ 'assets/stylesheets/options/no-toc.css' | url }}">
24
+ {% endif %}
25
+ {% if not tx.footer_nav %}
26
+ <link rel="stylesheet" href="{{ 'assets/stylesheets/options/no-footer-nav.css' | url }}">
27
+ {% endif %}
28
+ {% if tx.transitions != false %}
29
+ <link rel="stylesheet" href="{{ 'assets/stylesheets/options/transitions.css' | url }}">
30
+ <script src="{{ 'assets/javascripts/transitions.js' | url }}"></script>
31
+ {% endif %}
32
+ {% if tx.framed %}
33
+ <link rel="stylesheet" href="{{ 'assets/stylesheets/options/framed.css' | url }}">
34
+ {% endif %}
17
35
  {% set _ = namespace(css = "") %}
18
36
  {% for key, var in [
19
37
  ("primary", "--tx-brand-primary"),
@@ -30,6 +48,15 @@
30
48
  {% set _.css = _.css ~ var ~ ":" ~ tx[key] ~ ";" %}
31
49
  {% endif %}
32
50
  {% endfor %}
51
+ {#- Sin primary_dark/accent_dark propios, el modo oscuro deriva los suyos del
52
+ color claro de la web (50 % con blanco: contraste ≥ 4,5:1 sobre el fondo
53
+ oscuro con colores de marca habituales; ver tests/test_contrast.py). -#}
54
+ {% if tx.primary and not tx.primary_dark %}
55
+ {% set _.css = _.css ~ "--tx-brand-primary-dark:color-mix(in oklab, " ~ tx.primary ~ " 50%, white);" %}
56
+ {% endif %}
57
+ {% if tx.accent and not tx.accent_dark %}
58
+ {% set _.css = _.css ~ "--tx-brand-accent-dark:color-mix(in oklab, " ~ tx.accent ~ " 50%, white);" %}
59
+ {% endif %}
33
60
  {% if _.css %}
34
61
  <style>:root{{ "{" }}{{ _.css }}{{ "}" }}</style>
35
62
  {% endif %}
File without changes