feat: added landing page with CTA
CI / test (push) Successful in 48s
CI / build (push) Successful in 27s

This commit is contained in:
2026-07-17 13:56:54 +02:00
parent f722f0765e
commit 96738bf7d5
7 changed files with 349 additions and 129 deletions
+125 -64
View File
@@ -2,7 +2,7 @@ msgid ""
msgstr ""
"Project-Id-Version: crochet\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2026-07-17 11:17+0000\n"
"POT-Creation-Date: 2026-07-17 11:52+0000\n"
"Language: en\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
@@ -58,6 +58,7 @@ msgid "Cerrar sesión"
msgstr "Log out"
#: crochet/templates/crochet/base.html:37
#: crochet/templates/crochet/home.html:24
#: crochet/templates/registration/login.html:4
#: crochet/templates/registration/login.html:14
msgid "Iniciar sesión"
@@ -68,6 +69,66 @@ msgstr "Log in"
msgid "Registrarme"
msgstr "Sign up"
#: crochet/templates/crochet/home.html:4
msgid "Crochet — Crea y comparte tus patrones"
msgstr "Crochet — Create and share your patterns"
#: crochet/templates/crochet/home.html:15
msgid "Crea y comparte tus patrones de crochet"
msgstr "Create and share your crochet patterns"
#: crochet/templates/crochet/home.html:17
msgid ""
"Diseña tus patrones con un editor visual, expórtalos a PDF y compártelos con "
"quien quieras, sin instalar nada."
msgstr ""
"Design your patterns with a visual editor, export them to PDF, and share "
"them with anyone, no installation needed."
#: crochet/templates/crochet/home.html:21
msgid "Ir a mis patrones"
msgstr "Go to my patterns"
#: crochet/templates/crochet/home.html:23
msgid "Crear cuenta gratis"
msgstr "Create a free account"
#: crochet/templates/crochet/home.html:35
msgid "Editor visual"
msgstr "Visual editor"
#: crochet/templates/crochet/home.html:37
msgid ""
"Añade títulos, instrucciones, materiales e imágenes por secciones, sin "
"complicarte con el formato."
msgstr ""
"Add titles, instructions, materials, and images section by section, without "
"fussing over formatting."
#: crochet/templates/crochet/home.html:44
msgid "Exporta a PDF"
msgstr "Export to PDF"
#: crochet/templates/crochet/home.html:46
msgid ""
"Descarga tu patrón listo para imprimir, con tu propia portada, colores y "
"tipografía."
msgstr ""
"Download your pattern ready to print, with your own cover image, colors, "
"and typography."
#: crochet/templates/crochet/home.html:53
msgid "Comparte con un enlace"
msgstr "Share with a link"
#: crochet/templates/crochet/home.html:55
msgid ""
"Envía tu patrón a quien quieras con un enlace de solo lectura: nadie más "
"podrá editarlo."
msgstr ""
"Send your pattern to anyone with a read-only link: no one else will be able "
"to edit it."
# crochet/templates/crochet/pattern.html
#: crochet/templates/crochet/pattern.html:31
msgid "No se ha podido guardar. Inténtalo de nuevo."
@@ -117,185 +178,185 @@ msgstr "Cover image"
msgid "No se ha podido subir la imagen de portada. Inténtalo de nuevo."
msgstr "Couldn't upload the cover image. Please try again."
#: crochet/templates/crochet/pattern.html:78
#: crochet/templates/crochet/pattern.html:162
#: crochet/templates/crochet/pattern.html:84
#: crochet/templates/crochet/pattern.html:168
msgid "Color del texto"
msgstr "Text color"
#: crochet/templates/crochet/pattern.html:82
#: crochet/templates/crochet/pattern.html:88
msgid "Color de acento (títulos)"
msgstr "Accent color (headings)"
#: crochet/templates/crochet/pattern.html:86
#: crochet/templates/crochet/pattern.html:162
#: crochet/templates/crochet/pattern.html:92
#: crochet/templates/crochet/pattern.html:168
msgid "Color de fondo"
msgstr "Background color"
#: crochet/templates/crochet/pattern.html:90
#: crochet/templates/crochet/pattern.html:96
msgid "Tipografía"
msgstr "Font"
#: crochet/templates/crochet/pattern.html:96
#: crochet/templates/crochet/pattern.html:102
msgid "Monoespaciada"
msgstr "Monospace"
#: crochet/templates/crochet/pattern.html:100
#: crochet/templates/crochet/pattern.html:106
msgid "Tamaño de letra"
msgstr "Font size"
#: crochet/templates/crochet/pattern.html:102
#: crochet/templates/crochet/pattern.html:108
msgid "Pequeño"
msgstr "Small"
#: crochet/templates/crochet/pattern.html:103
#: crochet/templates/crochet/pattern.html:109
msgid "Normal"
msgstr "Normal"
#: crochet/templates/crochet/pattern.html:104
#: crochet/templates/crochet/pattern.html:110
msgid "Grande"
msgstr "Large"
#: crochet/templates/crochet/pattern.html:108
#: crochet/templates/crochet/pattern.html:114
msgid "Alineación del texto"
msgstr "Text alignment"
#: crochet/templates/crochet/pattern.html:110
#: crochet/templates/crochet/pattern.html:116
msgid "Izquierda"
msgstr "Left"
#: crochet/templates/crochet/pattern.html:111
#: crochet/templates/crochet/pattern.html:117
msgid "Centrado"
msgstr "Center"
#: crochet/templates/crochet/pattern.html:112
#: crochet/templates/crochet/pattern.html:118
msgid "Justificado"
msgstr "Justify"
#: crochet/templates/crochet/pattern.html:116
#: crochet/templates/crochet/pattern.html:122
msgid "Tamaño de página"
msgstr "Page size"
#: crochet/templates/crochet/pattern.html:121
#: crochet/templates/crochet/pattern.html:127
msgid "Carta (Letter)"
msgstr "Letter"
#: crochet/templates/crochet/pattern.html:126
#: crochet/templates/crochet/pattern.html:132
msgid "Orientación"
msgstr "Orientation"
#: crochet/templates/crochet/pattern.html:128
#: crochet/templates/crochet/pattern.html:134
msgid "Vertical"
msgstr "Portrait"
#: crochet/templates/crochet/pattern.html:129
#: crochet/templates/crochet/pattern.html:135
msgid "Horizontal"
msgstr "Landscape"
#: crochet/templates/crochet/pattern.html:137
#: crochet/templates/crochet/pattern.html:145
#: crochet/templates/crochet/pattern.html:143
#: crochet/templates/crochet/pattern.html:151
msgid "Secciones"
msgstr "Sections"
#: crochet/templates/crochet/pattern.html:138
#: crochet/templates/crochet/pattern.html:184
#: crochet/templates/crochet/pattern.html:144
#: crochet/templates/crochet/pattern.html:190
msgid "Vista previa"
msgstr "Preview"
#: crochet/templates/crochet/pattern.html:147
#: crochet/templates/crochet/pattern.html:153
msgid "Colapsar todo"
msgstr "Collapse all"
#: crochet/templates/crochet/pattern.html:147
#: crochet/templates/crochet/pattern.html:153
msgid "Expandir todo"
msgstr "Expand all"
#: crochet/templates/crochet/pattern.html:152
#: crochet/templates/crochet/pattern.html:158
msgid "Añadir sección"
msgstr "Add section"
#: crochet/templates/crochet/pattern.html:155
#: crochet/templates/crochet/pattern.html:161
msgid "Título"
msgstr "Title"
#: crochet/templates/crochet/pattern.html:155
#: crochet/templates/crochet/pattern.html:161
msgid "Título..."
msgstr "Title..."
#: crochet/templates/crochet/pattern.html:157
#: crochet/templates/crochet/pattern.html:163
msgid "Subtítulo"
msgstr "Subtitle"
#: crochet/templates/crochet/pattern.html:157
#: crochet/templates/crochet/pattern.html:163
msgid "Subtítulo..."
msgstr "Subtitle..."
#: crochet/templates/crochet/pattern.html:159
#: crochet/templates/crochet/pattern.html:165
msgid "Texto"
msgstr "Text"
#: crochet/templates/crochet/pattern.html:159
#: crochet/templates/crochet/pattern.html:165
msgid "Escribe aquí..."
msgstr "Write here..."
#: crochet/templates/crochet/pattern.html:161
#: crochet/templates/crochet/pattern.html:162
#: crochet/templates/crochet/pattern.html:167
#: crochet/templates/crochet/pattern.html:168
msgid "Nota"
msgstr "Note"
#: crochet/templates/crochet/pattern.html:161
#: crochet/templates/crochet/pattern.html:167
msgid "Escribe una nota o consejo..."
msgstr "Write a note or tip..."
#: crochet/templates/crochet/pattern.html:164
#: crochet/templates/crochet/pattern.html:170
msgid "Materiales"
msgstr "Materials"
#: crochet/templates/crochet/pattern.html:164
#: crochet/templates/crochet/pattern.html:170
msgid "Añadir material..."
msgstr "Add material..."
#: crochet/templates/crochet/pattern.html:164
#: crochet/templates/crochet/pattern.html:170
msgid "Añadir línea"
msgstr "Add line"
#: crochet/templates/crochet/pattern.html:166
#: crochet/templates/crochet/pattern.html:168
#: crochet/templates/crochet/pattern.html:172
#: crochet/templates/crochet/pattern.html:174
msgid "Imagen"
msgstr "Image"
#: crochet/templates/crochet/pattern.html:168
#: crochet/templates/crochet/pattern.html:174
msgid "No se ha podido subir la imagen. Inténtalo de nuevo."
msgstr "Couldn't upload the image. Please try again."
#: crochet/templates/crochet/pattern.html:170
#: crochet/templates/crochet/pattern.html:176
msgid "Patrón"
msgstr "Pattern"
#: crochet/templates/crochet/pattern.html:170
#: crochet/templates/crochet/pattern.html:176
msgid "Elementos"
msgstr "Elements"
#: crochet/templates/crochet/pattern.html:172
#: crochet/templates/crochet/pattern.html:178
msgid "Grupo"
msgstr "Group"
#: crochet/templates/crochet/pattern.html:176
#: crochet/templates/crochet/pattern.html:182
msgid "Arrastrar para reordenar"
msgstr "Drag to reorder"
#: crochet/templates/crochet/pattern.html:177
#: crochet/templates/crochet/pattern.html:183
msgid "Colapsar / expandir"
msgstr "Collapse / expand"
#: crochet/templates/crochet/pattern.html:178
#: crochet/templates/crochet/pattern.html:184
msgid "Duplicar sección"
msgstr "Duplicate section"
#: crochet/templates/crochet/pattern.html:179
#: crochet/templates/crochet/pattern.html:185
msgid "Eliminar sección"
msgstr "Delete section"
#: crochet/templates/crochet/pattern.html:180
#: crochet/templates/crochet/pattern.html:186
msgid ""
"¿Seguro que quieres eliminar este grupo? Se eliminarán también todas las "
"secciones que contiene."
@@ -303,7 +364,7 @@ msgstr ""
"Are you sure you want to delete this group? All sections inside it will also "
"be deleted."
#: crochet/templates/crochet/pattern.html:186
#: crochet/templates/crochet/pattern.html:192
msgid "Añade una sección para ver aquí el resultado."
msgstr "Add a section to see the result here."
@@ -332,51 +393,51 @@ msgstr "Create account"
msgid "¿Ya tienes cuenta? Inicia sesión"
msgstr "Already have an account? Log in"
#: crochet/urls.py:31
#: crochet/urls.py:33
msgid "pattern/<uuid:uuid>/"
msgstr ""
#: crochet/urls.py:32
#: crochet/urls.py:34
msgid "pattern/<uuid:uuid>/edit/"
msgstr ""
#: crochet/urls.py:33
#: crochet/urls.py:35
msgid "pattern/<uuid:uuid>/save/"
msgstr ""
#: crochet/urls.py:34
#: crochet/urls.py:36
msgid "pattern/<uuid:uuid>/images/"
msgstr ""
#: crochet/urls.py:35
#: crochet/urls.py:37
msgid "pattern/<uuid:uuid>/cover/"
msgstr ""
#: crochet/urls.py:36
#: crochet/urls.py:38
msgid "pattern/<uuid:uuid>/pdf/"
msgstr ""
#: crochet/urls.py:37
#: crochet/urls.py:39
msgid "pattern/<uuid:uuid>/delete/"
msgstr ""
#: crochet/urls.py:38
#: crochet/urls.py:40
msgid "pattern/new/"
msgstr ""
#: crochet/urls.py:39
#: crochet/urls.py:41
msgid "account/"
msgstr ""
#: crochet/urls.py:40
#: crochet/urls.py:42
msgid "account/register/"
msgstr ""
#: crochet/urls.py:42
#: crochet/urls.py:44
msgid "account/login/"
msgstr ""
#: crochet/urls.py:47
#: crochet/urls.py:49
msgid "account/logout/"
msgstr ""
+117 -64
View File
@@ -2,7 +2,7 @@ msgid ""
msgstr ""
"Project-Id-Version: crochet\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2026-07-17 11:17+0000\n"
"POT-Creation-Date: 2026-07-17 11:52+0000\n"
"Language: es\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
@@ -58,6 +58,7 @@ msgid "Cerrar sesión"
msgstr ""
#: crochet/templates/crochet/base.html:37
#: crochet/templates/crochet/home.html:24
#: crochet/templates/registration/login.html:4
#: crochet/templates/registration/login.html:14
msgid "Iniciar sesión"
@@ -68,6 +69,58 @@ msgstr ""
msgid "Registrarme"
msgstr ""
#: crochet/templates/crochet/home.html:4
msgid "Crochet — Crea y comparte tus patrones"
msgstr ""
#: crochet/templates/crochet/home.html:15
msgid "Crea y comparte tus patrones de crochet"
msgstr ""
#: crochet/templates/crochet/home.html:17
msgid ""
"Diseña tus patrones con un editor visual, expórtalos a PDF y compártelos con "
"quien quieras, sin instalar nada."
msgstr ""
#: crochet/templates/crochet/home.html:21
msgid "Ir a mis patrones"
msgstr ""
#: crochet/templates/crochet/home.html:23
msgid "Crear cuenta gratis"
msgstr ""
#: crochet/templates/crochet/home.html:35
msgid "Editor visual"
msgstr ""
#: crochet/templates/crochet/home.html:37
msgid ""
"Añade títulos, instrucciones, materiales e imágenes por secciones, sin "
"complicarte con el formato."
msgstr ""
#: crochet/templates/crochet/home.html:44
msgid "Exporta a PDF"
msgstr ""
#: crochet/templates/crochet/home.html:46
msgid ""
"Descarga tu patrón listo para imprimir, con tu propia portada, colores y "
"tipografía."
msgstr ""
#: crochet/templates/crochet/home.html:53
msgid "Comparte con un enlace"
msgstr ""
#: crochet/templates/crochet/home.html:55
msgid ""
"Envía tu patrón a quien quieras con un enlace de solo lectura: nadie más "
"podrá editarlo."
msgstr ""
#: crochet/templates/crochet/pattern.html:31
msgid "No se ha podido guardar. Inténtalo de nuevo."
msgstr ""
@@ -116,191 +169,191 @@ msgstr ""
msgid "No se ha podido subir la imagen de portada. Inténtalo de nuevo."
msgstr ""
#: crochet/templates/crochet/pattern.html:78
#: crochet/templates/crochet/pattern.html:162
#: crochet/templates/crochet/pattern.html:84
#: crochet/templates/crochet/pattern.html:168
msgid "Color del texto"
msgstr ""
#: crochet/templates/crochet/pattern.html:82
#: crochet/templates/crochet/pattern.html:88
msgid "Color de acento (títulos)"
msgstr ""
#: crochet/templates/crochet/pattern.html:86
#: crochet/templates/crochet/pattern.html:162
#: crochet/templates/crochet/pattern.html:92
#: crochet/templates/crochet/pattern.html:168
msgid "Color de fondo"
msgstr ""
#: crochet/templates/crochet/pattern.html:90
#: crochet/templates/crochet/pattern.html:96
msgid "Tipografía"
msgstr ""
#: crochet/templates/crochet/pattern.html:96
#: crochet/templates/crochet/pattern.html:102
msgid "Monoespaciada"
msgstr ""
#: crochet/templates/crochet/pattern.html:100
#: crochet/templates/crochet/pattern.html:106
msgid "Tamaño de letra"
msgstr ""
#: crochet/templates/crochet/pattern.html:102
#: crochet/templates/crochet/pattern.html:108
msgid "Pequeño"
msgstr ""
#: crochet/templates/crochet/pattern.html:103
#: crochet/templates/crochet/pattern.html:109
msgid "Normal"
msgstr ""
#: crochet/templates/crochet/pattern.html:104
#: crochet/templates/crochet/pattern.html:110
msgid "Grande"
msgstr ""
#: crochet/templates/crochet/pattern.html:108
#: crochet/templates/crochet/pattern.html:114
msgid "Alineación del texto"
msgstr ""
#: crochet/templates/crochet/pattern.html:110
#: crochet/templates/crochet/pattern.html:116
msgid "Izquierda"
msgstr ""
#: crochet/templates/crochet/pattern.html:111
#: crochet/templates/crochet/pattern.html:117
msgid "Centrado"
msgstr ""
#: crochet/templates/crochet/pattern.html:112
#: crochet/templates/crochet/pattern.html:118
msgid "Justificado"
msgstr ""
#: crochet/templates/crochet/pattern.html:116
#: crochet/templates/crochet/pattern.html:122
msgid "Tamaño de página"
msgstr ""
#: crochet/templates/crochet/pattern.html:121
#: crochet/templates/crochet/pattern.html:127
msgid "Carta (Letter)"
msgstr ""
#: crochet/templates/crochet/pattern.html:126
#: crochet/templates/crochet/pattern.html:132
msgid "Orientación"
msgstr ""
#: crochet/templates/crochet/pattern.html:128
#: crochet/templates/crochet/pattern.html:134
msgid "Vertical"
msgstr ""
#: crochet/templates/crochet/pattern.html:129
#: crochet/templates/crochet/pattern.html:135
msgid "Horizontal"
msgstr ""
#: crochet/templates/crochet/pattern.html:137
#: crochet/templates/crochet/pattern.html:145
#: crochet/templates/crochet/pattern.html:143
#: crochet/templates/crochet/pattern.html:151
msgid "Secciones"
msgstr ""
#: crochet/templates/crochet/pattern.html:138
#: crochet/templates/crochet/pattern.html:184
#: crochet/templates/crochet/pattern.html:144
#: crochet/templates/crochet/pattern.html:190
msgid "Vista previa"
msgstr ""
#: crochet/templates/crochet/pattern.html:147
#: crochet/templates/crochet/pattern.html:153
msgid "Colapsar todo"
msgstr ""
#: crochet/templates/crochet/pattern.html:147
#: crochet/templates/crochet/pattern.html:153
msgid "Expandir todo"
msgstr ""
#: crochet/templates/crochet/pattern.html:152
#: crochet/templates/crochet/pattern.html:158
msgid "Añadir sección"
msgstr ""
#: crochet/templates/crochet/pattern.html:155
#: crochet/templates/crochet/pattern.html:161
msgid "Título"
msgstr ""
#: crochet/templates/crochet/pattern.html:155
#: crochet/templates/crochet/pattern.html:161
msgid "Título..."
msgstr ""
#: crochet/templates/crochet/pattern.html:157
#: crochet/templates/crochet/pattern.html:163
msgid "Subtítulo"
msgstr ""
#: crochet/templates/crochet/pattern.html:157
#: crochet/templates/crochet/pattern.html:163
msgid "Subtítulo..."
msgstr ""
#: crochet/templates/crochet/pattern.html:159
#: crochet/templates/crochet/pattern.html:165
msgid "Texto"
msgstr ""
#: crochet/templates/crochet/pattern.html:159
#: crochet/templates/crochet/pattern.html:165
msgid "Escribe aquí..."
msgstr ""
#: crochet/templates/crochet/pattern.html:161
#: crochet/templates/crochet/pattern.html:162
#: crochet/templates/crochet/pattern.html:167
#: crochet/templates/crochet/pattern.html:168
msgid "Nota"
msgstr ""
#: crochet/templates/crochet/pattern.html:161
#: crochet/templates/crochet/pattern.html:167
msgid "Escribe una nota o consejo..."
msgstr ""
#: crochet/templates/crochet/pattern.html:164
#: crochet/templates/crochet/pattern.html:170
msgid "Materiales"
msgstr ""
#: crochet/templates/crochet/pattern.html:164
#: crochet/templates/crochet/pattern.html:170
msgid "Añadir material..."
msgstr ""
#: crochet/templates/crochet/pattern.html:164
#: crochet/templates/crochet/pattern.html:170
msgid "Añadir línea"
msgstr ""
#: crochet/templates/crochet/pattern.html:166
#: crochet/templates/crochet/pattern.html:168
#: crochet/templates/crochet/pattern.html:172
#: crochet/templates/crochet/pattern.html:174
msgid "Imagen"
msgstr ""
#: crochet/templates/crochet/pattern.html:168
#: crochet/templates/crochet/pattern.html:174
msgid "No se ha podido subir la imagen. Inténtalo de nuevo."
msgstr ""
#: crochet/templates/crochet/pattern.html:170
#: crochet/templates/crochet/pattern.html:176
msgid "Patrón"
msgstr ""
#: crochet/templates/crochet/pattern.html:170
#: crochet/templates/crochet/pattern.html:176
msgid "Elementos"
msgstr ""
#: crochet/templates/crochet/pattern.html:172
#: crochet/templates/crochet/pattern.html:178
msgid "Grupo"
msgstr ""
#: crochet/templates/crochet/pattern.html:176
#: crochet/templates/crochet/pattern.html:182
msgid "Arrastrar para reordenar"
msgstr ""
#: crochet/templates/crochet/pattern.html:177
#: crochet/templates/crochet/pattern.html:183
msgid "Colapsar / expandir"
msgstr ""
#: crochet/templates/crochet/pattern.html:178
#: crochet/templates/crochet/pattern.html:184
msgid "Duplicar sección"
msgstr ""
#: crochet/templates/crochet/pattern.html:179
#: crochet/templates/crochet/pattern.html:185
msgid "Eliminar sección"
msgstr ""
#: crochet/templates/crochet/pattern.html:180
#: crochet/templates/crochet/pattern.html:186
msgid ""
"¿Seguro que quieres eliminar este grupo? Se eliminarán también todas las "
"secciones que contiene."
msgstr ""
#: crochet/templates/crochet/pattern.html:186
#: crochet/templates/crochet/pattern.html:192
msgid "Añade una sección para ver aquí el resultado."
msgstr ""
@@ -331,52 +384,52 @@ msgstr ""
# Rutas traducibles de crochet/urls.py: la base "pattern/" se traduce como
# "patron/" (sin tilde, para no meter caracteres acentuados en la URL).
#: crochet/urls.py:31
#: crochet/urls.py:33
msgid "pattern/<uuid:uuid>/"
msgstr "patron/<uuid:uuid>/"
#: crochet/urls.py:32
#: crochet/urls.py:34
msgid "pattern/<uuid:uuid>/edit/"
msgstr "patron/<uuid:uuid>/editar/"
#: crochet/urls.py:33
#: crochet/urls.py:35
msgid "pattern/<uuid:uuid>/save/"
msgstr "patron/<uuid:uuid>/guardar/"
#: crochet/urls.py:34
#: crochet/urls.py:36
msgid "pattern/<uuid:uuid>/images/"
msgstr "patron/<uuid:uuid>/imagenes/"
#: crochet/urls.py:35
#: crochet/urls.py:37
msgid "pattern/<uuid:uuid>/cover/"
msgstr "patron/<uuid:uuid>/portada/"
#: crochet/urls.py:36
#: crochet/urls.py:38
msgid "pattern/<uuid:uuid>/pdf/"
msgstr "patron/<uuid:uuid>/pdf/"
#: crochet/urls.py:37
#: crochet/urls.py:39
msgid "pattern/<uuid:uuid>/delete/"
msgstr "patron/<uuid:uuid>/eliminar/"
#: crochet/urls.py:38
#: crochet/urls.py:40
msgid "pattern/new/"
msgstr "patron/nuevo/"
# Igual que "pattern/" arriba: "account/" se traduce como "cuenta/".
#: crochet/urls.py:39
#: crochet/urls.py:41
msgid "account/"
msgstr "cuenta/"
#: crochet/urls.py:40
#: crochet/urls.py:42
msgid "account/register/"
msgstr "cuenta/registro/"
#: crochet/urls.py:42
#: crochet/urls.py:44
msgid "account/login/"
msgstr "cuenta/entrar/"
#: crochet/urls.py:47
#: crochet/urls.py:49
msgid "account/logout/"
msgstr "cuenta/salir/"
+1 -1
View File
@@ -24,7 +24,7 @@
solo el propio patrón. no-print para que nunca salga en el PDF. -->
<nav class="navbar bg-base-100 border-b border-base-300 px-4 no-print">
<div class="flex-1">
<a href="{% url 'crochet:account_home' %}" class="btn btn-ghost text-xl px-2">🧶 Crochet</a>
<a href="{% url 'crochet:home' %}" class="btn btn-ghost text-xl px-2">🧶 Crochet</a>
</div>
<div class="flex-none flex items-center gap-2">
{% if user.is_authenticated %}
+61
View File
@@ -0,0 +1,61 @@
{% extends 'crochet/base.html' %}
{% load i18n %}
{% block title %}{% trans 'Crochet — Crea y comparte tus patrones' %}{% endblock %}
{% block extra_css %}
{% include 'crochet/_platform_assets.html' %}
{% endblock %}
{% block content %}
<main>
<div class="hero py-16 px-4">
<div class="hero-content text-center">
<div class="max-w-xl">
<h1 class="text-4xl font-bold">{% trans 'Crea y comparte tus patrones de crochet' %}</h1>
<p class="py-6 text-lg text-base-content/70">
{% trans 'Diseña tus patrones con un editor visual, expórtalos a PDF y compártelos con quien quieras, sin instalar nada.' %}
</p>
<div class="flex flex-wrap justify-center gap-4">
{% if user.is_authenticated %}
<a href="{% url 'crochet:account_home' %}" class="btn btn-primary btn-lg">{% trans 'Ir a mis patrones' %}</a>
{% else %}
<a href="{% url 'crochet:register' %}" class="btn btn-primary btn-lg">{% trans 'Crear cuenta gratis' %}</a>
<a href="{% url 'crochet:login' %}" class="btn btn-outline btn-lg">{% trans 'Iniciar sesión' %}</a>
{% endif %}
</div>
</div>
</div>
</div>
<div class="max-w-4xl mx-auto px-4 pb-16 grid gap-6 sm:grid-cols-3">
<div class="card bg-base-100 shadow border border-base-300">
<div class="card-body items-center text-center">
<span class="text-4xl mb-2">✏️</span>
<h2 class="card-title text-lg">{% trans 'Editor visual' %}</h2>
<p class="text-sm text-base-content/70">
{% trans 'Añade títulos, instrucciones, materiales e imágenes por secciones, sin complicarte con el formato.' %}
</p>
</div>
</div>
<div class="card bg-base-100 shadow border border-base-300">
<div class="card-body items-center text-center">
<span class="text-4xl mb-2">📄</span>
<h2 class="card-title text-lg">{% trans 'Exporta a PDF' %}</h2>
<p class="text-sm text-base-content/70">
{% trans 'Descarga tu patrón listo para imprimir, con tu propia portada, colores y tipografía.' %}
</p>
</div>
</div>
<div class="card bg-base-100 shadow border border-base-300">
<div class="card-body items-center text-center">
<span class="text-4xl mb-2">🔗</span>
<h2 class="card-title text-lg">{% trans 'Comparte con un enlace' %}</h2>
<p class="text-sm text-base-content/70">
{% trans 'Envía tu patrón a quien quieras con un enlace de solo lectura: nadie más podrá editarlo.' %}
</p>
</div>
</div>
</div>
</main>
{% endblock %}
+39
View File
@@ -14,6 +14,45 @@ from crochet.tests.test_models import make_test_image_file
NO_HTML_COMMENTS_RE = re.compile(r'<!--.*?-->', re.S)
class HomeViewTests(TestCase):
def test_get_renders_home_template(self):
with translation.override('es'):
url = reverse('crochet:home')
response = self.client.get(url)
self.assertEqual(response.status_code, 200)
self.assertTemplateUsed(response, 'crochet/home.html')
self.assertContains(response, 'Crea y comparte tus patrones de crochet')
def test_anonymous_user_sees_register_and_login_links(self):
with translation.override('es'):
url = reverse('crochet:home')
register_url = reverse('crochet:register')
login_url = reverse('crochet:login')
response = self.client.get(url)
self.assertContains(response, f'href="{register_url}"')
self.assertContains(response, f'href="{login_url}"')
def test_logged_in_user_sees_link_to_their_patterns(self):
user = User.objects.create_user(username='crocheter', password='a-very-uncommon-pw-1')
self.client.force_login(user)
with translation.override('es'):
url = reverse('crochet:home')
account_home_url = reverse('crochet:account_home')
response = self.client.get(url)
self.assertContains(response, f'href="{account_home_url}"')
self.assertNotContains(response, 'Crear cuenta gratis')
def test_available_at_root_for_both_languages(self):
response_es = self.client.get('/es/')
response_en = self.client.get('/en/')
self.assertEqual(response_es.status_code, 200)
self.assertEqual(response_en.status_code, 200)
class PatternEditViewTests(TestCase):
def setUp(self):
self.owner = User.objects.create_user(username='crocheter', password='a-very-uncommon-pw-1')
+2
View File
@@ -5,6 +5,7 @@ from django.utils.translation import gettext_lazy as _
from crochet.forms import StyledAuthenticationForm
from crochet.views import (
AccountHomeView,
HomeView,
PatternCoverImageUploadView,
PatternCreateView,
PatternDeleteView,
@@ -28,6 +29,7 @@ app_name = 'crochet'
# entera según el prefijo de idioma, p.ej. /en/pattern/<uuid>/edit/ frente a
# /es/patron/<uuid>/editar/.
urlpatterns = [
path('', name='home', view=HomeView.as_view()),
path(_('pattern/<uuid:uuid>/'), name='pattern_detail', view=PatternDetailView.as_view()),
path(_('pattern/<uuid:uuid>/edit/'), name='pattern_edit', view=PatternEditView.as_view()),
path(_('pattern/<uuid:uuid>/save/'), name='pattern_save', view=PatternSaveView.as_view()),
+4
View File
@@ -63,6 +63,10 @@ def _pattern_detail_context(pattern):
}
class HomeView(TemplateView):
template_name = 'crochet/home.html'
class PatternEditView(LoginRequiredMixin, DetailView):
model = Pattern
template_name = 'crochet/pattern.html'