feat: improved UI
CI / test (push) Successful in 1m28s
CI / build (push) Successful in 29s

This commit is contained in:
2026-07-22 11:26:57 +02:00
parent 1a1c8786a3
commit 8920047c55
7 changed files with 319 additions and 214 deletions
+94 -75
View File
@@ -2,18 +2,18 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: crochet\n" "Project-Id-Version: crochet\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2026-07-22 08:00+0000\n" "POT-Creation-Date: 2026-07-22 08:53+0000\n"
"Language: en\n" "Language: en\n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
#: crochet/forms.py:48 crochet/forms.py:96 #: crochet/forms.py:48 crochet/forms.py:96
#: crochet/templates/crochet/account_settings.html:29 #: crochet/templates/crochet/account_settings.html:49
msgid "Email" msgid "Email"
msgstr "Email" msgstr "Email"
#: crochet/forms.py:128 crochet/templates/crochet/account_settings.html:22 #: crochet/forms.py:128 crochet/templates/crochet/account_settings.html:40
msgid "Nombre para mostrar" msgid "Nombre para mostrar"
msgstr "Display name" msgstr "Display name"
@@ -34,7 +34,7 @@ msgstr ""
"deleted. This action cannot be undone." "deleted. This action cannot be undone."
#: crochet/templates/crochet/_account_delete_form.html:19 #: crochet/templates/crochet/_account_delete_form.html:19
#: crochet/templates/crochet/account_settings.html:48 #: crochet/templates/crochet/account_settings.html:68
msgid "Eliminar cuenta" msgid "Eliminar cuenta"
msgstr "Delete account" msgstr "Delete account"
@@ -59,7 +59,7 @@ msgid "Contraseña actualizada."
msgstr "Password updated." msgstr "Password updated."
#: crochet/templates/crochet/_account_password_form.html:19 #: crochet/templates/crochet/_account_password_form.html:19
#: crochet/templates/crochet/account_settings.html:36 #: crochet/templates/crochet/account_settings.html:56
#: crochet/templates/crochet/password_reset_confirm.html:30 #: crochet/templates/crochet/password_reset_confirm.html:30
msgid "Cambiar contraseña" msgid "Cambiar contraseña"
msgstr "Change password" msgstr "Change password"
@@ -109,7 +109,7 @@ msgid "Actualizado el %(date)s"
msgstr "Updated on %(date)s" msgstr "Updated on %(date)s"
#: crochet/templates/crochet/account_home.html:44 #: crochet/templates/crochet/account_home.html:44
#: crochet/templates/crochet/pattern.html:163 #: crochet/templates/crochet/pattern.html:182
msgid "Vista previa" msgid "Vista previa"
msgstr "Preview" msgstr "Preview"
@@ -128,11 +128,19 @@ msgstr "You don't have any patterns yet."
msgid "Ajustes de la cuenta" msgid "Ajustes de la cuenta"
msgstr "Account settings" msgstr "Account settings"
#: crochet/templates/crochet/account_settings.html:41 #: crochet/templates/crochet/account_settings.html:30
msgid "Volver a mis patrones" msgid "Perfil"
msgstr "Back to my patterns" msgstr "Profile"
#: crochet/templates/crochet/account_settings.html:50 #: crochet/templates/crochet/account_settings.html:31
msgid "Seguridad"
msgstr "Security"
#: crochet/templates/crochet/account_settings.html:32
msgid "Zona de peligro"
msgstr "Danger zone"
#: crochet/templates/crochet/account_settings.html:70
msgid "Esto borrará tu cuenta y todos tus patrones de forma permanente." msgid "Esto borrará tu cuenta y todos tus patrones de forma permanente."
msgstr "This will permanently delete your account and all your patterns." msgstr "This will permanently delete your account and all your patterns."
@@ -474,208 +482,216 @@ msgstr "More options"
msgid "Guardado" msgid "Guardado"
msgstr "Saved" msgstr "Saved"
#: crochet/templates/crochet/pattern.html:72 #: crochet/templates/crochet/pattern.html:78
msgid "Personalización de página"
msgstr "Page customization"
#: crochet/templates/crochet/pattern.html:76
msgid "Título del patrón" msgid "Título del patrón"
msgstr "Pattern title" msgstr "Pattern title"
#: crochet/templates/crochet/pattern.html:77 #: crochet/templates/crochet/pattern.html:79
msgid "Título del patrón..." msgid "Título del patrón..."
msgstr "Pattern title..." msgstr "Pattern title..."
#: crochet/templates/crochet/pattern.html:80 #: crochet/templates/crochet/pattern.html:82
msgid "Autor"
msgstr "Author"
#: crochet/templates/crochet/pattern.html:81
msgid "Autor..."
msgstr "Author..."
#: crochet/templates/crochet/pattern.html:86
msgid "Imagen de portada" msgid "Imagen de portada"
msgstr "Cover image" msgstr "Cover image"
#: crochet/templates/crochet/pattern.html:89 #: crochet/templates/crochet/pattern.html:95
msgid "Añadir imagen"
msgstr "Add image"
#: crochet/templates/crochet/pattern.html:98
msgid "Cambiar"
msgstr "Change"
#: crochet/templates/crochet/pattern.html:103
msgid "No se ha podido subir la imagen de portada. Inténtalo de nuevo." msgid "No se ha podido subir la imagen de portada. Inténtalo de nuevo."
msgstr "Couldn't upload the cover image. Please try again." msgstr "Couldn't upload the cover image. Please try again."
#: crochet/templates/crochet/pattern.html:103 #: crochet/templates/crochet/pattern.html:114
#: crochet/templates/crochet/pattern.html:187 msgid "Personalización de página"
msgstr "Page customization"
#: crochet/templates/crochet/pattern.html:117
msgid "Autor"
msgstr "Author"
#: crochet/templates/crochet/pattern.html:118
msgid "Autor..."
msgstr "Author..."
#: crochet/templates/crochet/pattern.html:122
#: crochet/templates/crochet/pattern.html:206
msgid "Color del texto" msgid "Color del texto"
msgstr "Text color" msgstr "Text color"
#: crochet/templates/crochet/pattern.html:107 #: crochet/templates/crochet/pattern.html:126
msgid "Color de acento (títulos)" msgid "Color de acento (títulos)"
msgstr "Accent color (headings)" msgstr "Accent color (headings)"
#: crochet/templates/crochet/pattern.html:111 #: crochet/templates/crochet/pattern.html:130
#: crochet/templates/crochet/pattern.html:187 #: crochet/templates/crochet/pattern.html:206
msgid "Color de fondo" msgid "Color de fondo"
msgstr "Background color" msgstr "Background color"
#: crochet/templates/crochet/pattern.html:115 #: crochet/templates/crochet/pattern.html:134
msgid "Tipografía" msgid "Tipografía"
msgstr "Font" msgstr "Font"
#: crochet/templates/crochet/pattern.html:121 #: crochet/templates/crochet/pattern.html:140
msgid "Monoespaciada" msgid "Monoespaciada"
msgstr "Monospace" msgstr "Monospace"
#: crochet/templates/crochet/pattern.html:125 #: crochet/templates/crochet/pattern.html:144
msgid "Tamaño de letra" msgid "Tamaño de letra"
msgstr "Font size" msgstr "Font size"
#: crochet/templates/crochet/pattern.html:127 #: crochet/templates/crochet/pattern.html:146
msgid "Pequeño" msgid "Pequeño"
msgstr "Small" msgstr "Small"
#: crochet/templates/crochet/pattern.html:128 #: crochet/templates/crochet/pattern.html:147
msgid "Normal" msgid "Normal"
msgstr "Normal" msgstr "Normal"
#: crochet/templates/crochet/pattern.html:129 #: crochet/templates/crochet/pattern.html:148
msgid "Grande" msgid "Grande"
msgstr "Large" msgstr "Large"
#: crochet/templates/crochet/pattern.html:133 #: crochet/templates/crochet/pattern.html:152
msgid "Alineación del texto" msgid "Alineación del texto"
msgstr "Text alignment" msgstr "Text alignment"
#: crochet/templates/crochet/pattern.html:135 #: crochet/templates/crochet/pattern.html:154
msgid "Izquierda" msgid "Izquierda"
msgstr "Left" msgstr "Left"
#: crochet/templates/crochet/pattern.html:136 #: crochet/templates/crochet/pattern.html:155
msgid "Centrado" msgid "Centrado"
msgstr "Center" msgstr "Center"
#: crochet/templates/crochet/pattern.html:137 #: crochet/templates/crochet/pattern.html:156
msgid "Justificado" msgid "Justificado"
msgstr "Justify" msgstr "Justify"
#: crochet/templates/crochet/pattern.html:141 #: crochet/templates/crochet/pattern.html:160
msgid "Tamaño de página" msgid "Tamaño de página"
msgstr "Page size" msgstr "Page size"
#: crochet/templates/crochet/pattern.html:146 #: crochet/templates/crochet/pattern.html:165
msgid "Carta (Letter)" msgid "Carta (Letter)"
msgstr "Letter" msgstr "Letter"
#: crochet/templates/crochet/pattern.html:151 #: crochet/templates/crochet/pattern.html:170
msgid "Orientación" msgid "Orientación"
msgstr "Orientation" msgstr "Orientation"
#: crochet/templates/crochet/pattern.html:153 #: crochet/templates/crochet/pattern.html:172
msgid "Vertical" msgid "Vertical"
msgstr "Portrait" msgstr "Portrait"
#: crochet/templates/crochet/pattern.html:154 #: crochet/templates/crochet/pattern.html:173
msgid "Horizontal" msgid "Horizontal"
msgstr "Landscape" msgstr "Landscape"
#: crochet/templates/crochet/pattern.html:162 #: crochet/templates/crochet/pattern.html:181
#: crochet/templates/crochet/pattern.html:170 #: crochet/templates/crochet/pattern.html:189
msgid "Secciones" msgid "Secciones"
msgstr "Sections" msgstr "Sections"
#: crochet/templates/crochet/pattern.html:172 #: crochet/templates/crochet/pattern.html:191
msgid "Colapsar todo" msgid "Colapsar todo"
msgstr "Collapse all" msgstr "Collapse all"
#: crochet/templates/crochet/pattern.html:172 #: crochet/templates/crochet/pattern.html:191
msgid "Expandir todo" msgid "Expandir todo"
msgstr "Expand all" msgstr "Expand all"
#: crochet/templates/crochet/pattern.html:177 #: crochet/templates/crochet/pattern.html:196
msgid "Añadir sección" msgid "Añadir sección"
msgstr "Add section" msgstr "Add section"
#: crochet/templates/crochet/pattern.html:180 #: crochet/templates/crochet/pattern.html:199
msgid "Título" msgid "Título"
msgstr "Title" msgstr "Title"
#: crochet/templates/crochet/pattern.html:180 #: crochet/templates/crochet/pattern.html:199
msgid "Título..." msgid "Título..."
msgstr "Title..." msgstr "Title..."
#: crochet/templates/crochet/pattern.html:182 #: crochet/templates/crochet/pattern.html:201
msgid "Subtítulo" msgid "Subtítulo"
msgstr "Subtitle" msgstr "Subtitle"
#: crochet/templates/crochet/pattern.html:182 #: crochet/templates/crochet/pattern.html:201
msgid "Subtítulo..." msgid "Subtítulo..."
msgstr "Subtitle..." msgstr "Subtitle..."
#: crochet/templates/crochet/pattern.html:184 #: crochet/templates/crochet/pattern.html:203
msgid "Texto" msgid "Texto"
msgstr "Text" msgstr "Text"
#: crochet/templates/crochet/pattern.html:184 #: crochet/templates/crochet/pattern.html:203
msgid "Escribe aquí..." msgid "Escribe aquí..."
msgstr "Write here..." msgstr "Write here..."
#: crochet/templates/crochet/pattern.html:186 #: crochet/templates/crochet/pattern.html:205
#: crochet/templates/crochet/pattern.html:187 #: crochet/templates/crochet/pattern.html:206
msgid "Nota" msgid "Nota"
msgstr "Note" msgstr "Note"
#: crochet/templates/crochet/pattern.html:186 #: crochet/templates/crochet/pattern.html:205
msgid "Escribe una nota o consejo..." msgid "Escribe una nota o consejo..."
msgstr "Write a note or tip..." msgstr "Write a note or tip..."
#: crochet/templates/crochet/pattern.html:189 #: crochet/templates/crochet/pattern.html:208
msgid "Materiales" msgid "Materiales"
msgstr "Materials" msgstr "Materials"
#: crochet/templates/crochet/pattern.html:189 #: crochet/templates/crochet/pattern.html:208
msgid "Añadir material..." msgid "Añadir material..."
msgstr "Add material..." msgstr "Add material..."
#: crochet/templates/crochet/pattern.html:189 #: crochet/templates/crochet/pattern.html:208
msgid "Añadir línea" msgid "Añadir línea"
msgstr "Add line" msgstr "Add line"
#: crochet/templates/crochet/pattern.html:191 #: crochet/templates/crochet/pattern.html:210
#: crochet/templates/crochet/pattern.html:193 #: crochet/templates/crochet/pattern.html:212
msgid "Imagen" msgid "Imagen"
msgstr "Image" msgstr "Image"
#: crochet/templates/crochet/pattern.html:193 #: crochet/templates/crochet/pattern.html:212
msgid "No se ha podido subir la imagen. Inténtalo de nuevo." msgid "No se ha podido subir la imagen. Inténtalo de nuevo."
msgstr "Couldn't upload the image. Please try again." msgstr "Couldn't upload the image. Please try again."
#: crochet/templates/crochet/pattern.html:195 #: crochet/templates/crochet/pattern.html:214
msgid "Patrón" msgid "Patrón"
msgstr "Pattern" msgstr "Pattern"
#: crochet/templates/crochet/pattern.html:195 #: crochet/templates/crochet/pattern.html:214
msgid "Elementos" msgid "Elementos"
msgstr "Elements" msgstr "Elements"
#: crochet/templates/crochet/pattern.html:197 #: crochet/templates/crochet/pattern.html:216
msgid "Grupo" msgid "Grupo"
msgstr "Group" msgstr "Group"
#: crochet/templates/crochet/pattern.html:201 #: crochet/templates/crochet/pattern.html:220
msgid "Arrastrar para reordenar" msgid "Arrastrar para reordenar"
msgstr "Drag to reorder" msgstr "Drag to reorder"
#: crochet/templates/crochet/pattern.html:202 #: crochet/templates/crochet/pattern.html:221
msgid "Colapsar / expandir" msgid "Colapsar / expandir"
msgstr "Collapse / expand" msgstr "Collapse / expand"
#: crochet/templates/crochet/pattern.html:203 #: crochet/templates/crochet/pattern.html:222
msgid "Duplicar sección" msgid "Duplicar sección"
msgstr "Duplicate section" msgstr "Duplicate section"
#: crochet/templates/crochet/pattern.html:204 #: crochet/templates/crochet/pattern.html:223
msgid "Eliminar sección" msgid "Eliminar sección"
msgstr "Delete section" msgstr "Delete section"
#: crochet/templates/crochet/pattern.html:205 #: crochet/templates/crochet/pattern.html:224
msgid "" msgid ""
"¿Seguro que quieres eliminar este grupo? Se eliminarán también todas las " "¿Seguro que quieres eliminar este grupo? Se eliminarán también todas las "
"secciones que contiene." "secciones que contiene."
@@ -683,7 +699,7 @@ msgstr ""
"Are you sure you want to delete this group? All sections inside it will also " "Are you sure you want to delete this group? All sections inside it will also "
"be deleted." "be deleted."
#: crochet/templates/crochet/pattern.html:210 #: crochet/templates/crochet/pattern.html:229
msgid "Añade una sección para ver aquí el resultado." msgid "Añade una sección para ver aquí el resultado."
msgstr "Add a section to see the result here." msgstr "Add a section to see the result here."
@@ -813,6 +829,9 @@ msgstr "This pattern doesn't have any content yet."
msgid "Tu cuenta se ha eliminado correctamente." msgid "Tu cuenta se ha eliminado correctamente."
msgstr "Your account has been deleted successfully." msgstr "Your account has been deleted successfully."
#~ msgid "Volver a mis patrones"
#~ msgstr "Back to my patterns"
#~ msgid "Ir a mis patrones" #~ msgid "Ir a mis patrones"
#~ msgstr "Go to my patterns" #~ msgstr "Go to my patterns"
+90 -74
View File
@@ -2,18 +2,18 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: crochet\n" "Project-Id-Version: crochet\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2026-07-22 08:00+0000\n" "POT-Creation-Date: 2026-07-22 08:53+0000\n"
"Language: es\n" "Language: es\n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
#: crochet/forms.py:48 crochet/forms.py:96 #: crochet/forms.py:48 crochet/forms.py:96
#: crochet/templates/crochet/account_settings.html:29 #: crochet/templates/crochet/account_settings.html:49
msgid "Email" msgid "Email"
msgstr "" msgstr ""
#: crochet/forms.py:128 crochet/templates/crochet/account_settings.html:22 #: crochet/forms.py:128 crochet/templates/crochet/account_settings.html:40
msgid "Nombre para mostrar" msgid "Nombre para mostrar"
msgstr "" msgstr ""
@@ -32,7 +32,7 @@ msgid ""
msgstr "" msgstr ""
#: crochet/templates/crochet/_account_delete_form.html:19 #: crochet/templates/crochet/_account_delete_form.html:19
#: crochet/templates/crochet/account_settings.html:48 #: crochet/templates/crochet/account_settings.html:68
msgid "Eliminar cuenta" msgid "Eliminar cuenta"
msgstr "" msgstr ""
@@ -57,7 +57,7 @@ msgid "Contraseña actualizada."
msgstr "" msgstr ""
#: crochet/templates/crochet/_account_password_form.html:19 #: crochet/templates/crochet/_account_password_form.html:19
#: crochet/templates/crochet/account_settings.html:36 #: crochet/templates/crochet/account_settings.html:56
#: crochet/templates/crochet/password_reset_confirm.html:30 #: crochet/templates/crochet/password_reset_confirm.html:30
msgid "Cambiar contraseña" msgid "Cambiar contraseña"
msgstr "" msgstr ""
@@ -105,7 +105,7 @@ msgid "Actualizado el %(date)s"
msgstr "" msgstr ""
#: crochet/templates/crochet/account_home.html:44 #: crochet/templates/crochet/account_home.html:44
#: crochet/templates/crochet/pattern.html:163 #: crochet/templates/crochet/pattern.html:182
msgid "Vista previa" msgid "Vista previa"
msgstr "" msgstr ""
@@ -124,11 +124,19 @@ msgstr ""
msgid "Ajustes de la cuenta" msgid "Ajustes de la cuenta"
msgstr "" msgstr ""
#: crochet/templates/crochet/account_settings.html:41 #: crochet/templates/crochet/account_settings.html:30
msgid "Volver a mis patrones" msgid "Perfil"
msgstr "" msgstr ""
#: crochet/templates/crochet/account_settings.html:50 #: crochet/templates/crochet/account_settings.html:31
msgid "Seguridad"
msgstr ""
#: crochet/templates/crochet/account_settings.html:32
msgid "Zona de peligro"
msgstr ""
#: crochet/templates/crochet/account_settings.html:70
msgid "Esto borrará tu cuenta y todos tus patrones de forma permanente." msgid "Esto borrará tu cuenta y todos tus patrones de forma permanente."
msgstr "" msgstr ""
@@ -442,214 +450,222 @@ msgstr ""
msgid "Guardado" msgid "Guardado"
msgstr "" msgstr ""
#: crochet/templates/crochet/pattern.html:72 #: crochet/templates/crochet/pattern.html:78
msgid "Personalización de página"
msgstr ""
#: crochet/templates/crochet/pattern.html:76
msgid "Título del patrón" msgid "Título del patrón"
msgstr "" msgstr ""
#: crochet/templates/crochet/pattern.html:77 #: crochet/templates/crochet/pattern.html:79
msgid "Título del patrón..." msgid "Título del patrón..."
msgstr "" msgstr ""
#: crochet/templates/crochet/pattern.html:80 #: crochet/templates/crochet/pattern.html:82
msgid "Autor"
msgstr ""
#: crochet/templates/crochet/pattern.html:81
msgid "Autor..."
msgstr ""
#: crochet/templates/crochet/pattern.html:86
msgid "Imagen de portada" msgid "Imagen de portada"
msgstr "" msgstr ""
#: crochet/templates/crochet/pattern.html:89 #: crochet/templates/crochet/pattern.html:95
msgid "No se ha podido subir la imagen de portada. Inténtalo de nuevo." msgid "Añadir imagen"
msgstr ""
#: crochet/templates/crochet/pattern.html:98
msgid "Cambiar"
msgstr "" msgstr ""
#: crochet/templates/crochet/pattern.html:103 #: crochet/templates/crochet/pattern.html:103
#: crochet/templates/crochet/pattern.html:187 msgid "No se ha podido subir la imagen de portada. Inténtalo de nuevo."
msgstr ""
#: crochet/templates/crochet/pattern.html:114
msgid "Personalización de página"
msgstr ""
#: crochet/templates/crochet/pattern.html:117
msgid "Autor"
msgstr ""
#: crochet/templates/crochet/pattern.html:118
msgid "Autor..."
msgstr ""
#: crochet/templates/crochet/pattern.html:122
#: crochet/templates/crochet/pattern.html:206
msgid "Color del texto" msgid "Color del texto"
msgstr "" msgstr ""
#: crochet/templates/crochet/pattern.html:107 #: crochet/templates/crochet/pattern.html:126
msgid "Color de acento (títulos)" msgid "Color de acento (títulos)"
msgstr "" msgstr ""
#: crochet/templates/crochet/pattern.html:111 #: crochet/templates/crochet/pattern.html:130
#: crochet/templates/crochet/pattern.html:187 #: crochet/templates/crochet/pattern.html:206
msgid "Color de fondo" msgid "Color de fondo"
msgstr "" msgstr ""
#: crochet/templates/crochet/pattern.html:115 #: crochet/templates/crochet/pattern.html:134
msgid "Tipografía" msgid "Tipografía"
msgstr "" msgstr ""
#: crochet/templates/crochet/pattern.html:121 #: crochet/templates/crochet/pattern.html:140
msgid "Monoespaciada" msgid "Monoespaciada"
msgstr "" msgstr ""
#: crochet/templates/crochet/pattern.html:125 #: crochet/templates/crochet/pattern.html:144
msgid "Tamaño de letra" msgid "Tamaño de letra"
msgstr "" msgstr ""
#: crochet/templates/crochet/pattern.html:127 #: crochet/templates/crochet/pattern.html:146
msgid "Pequeño" msgid "Pequeño"
msgstr "" msgstr ""
#: crochet/templates/crochet/pattern.html:128 #: crochet/templates/crochet/pattern.html:147
msgid "Normal" msgid "Normal"
msgstr "" msgstr ""
#: crochet/templates/crochet/pattern.html:129 #: crochet/templates/crochet/pattern.html:148
msgid "Grande" msgid "Grande"
msgstr "" msgstr ""
#: crochet/templates/crochet/pattern.html:133 #: crochet/templates/crochet/pattern.html:152
msgid "Alineación del texto" msgid "Alineación del texto"
msgstr "" msgstr ""
#: crochet/templates/crochet/pattern.html:135 #: crochet/templates/crochet/pattern.html:154
msgid "Izquierda" msgid "Izquierda"
msgstr "" msgstr ""
#: crochet/templates/crochet/pattern.html:136 #: crochet/templates/crochet/pattern.html:155
msgid "Centrado" msgid "Centrado"
msgstr "" msgstr ""
#: crochet/templates/crochet/pattern.html:137 #: crochet/templates/crochet/pattern.html:156
msgid "Justificado" msgid "Justificado"
msgstr "" msgstr ""
#: crochet/templates/crochet/pattern.html:141 #: crochet/templates/crochet/pattern.html:160
msgid "Tamaño de página" msgid "Tamaño de página"
msgstr "" msgstr ""
#: crochet/templates/crochet/pattern.html:146 #: crochet/templates/crochet/pattern.html:165
msgid "Carta (Letter)" msgid "Carta (Letter)"
msgstr "" msgstr ""
#: crochet/templates/crochet/pattern.html:151 #: crochet/templates/crochet/pattern.html:170
msgid "Orientación" msgid "Orientación"
msgstr "" msgstr ""
#: crochet/templates/crochet/pattern.html:153 #: crochet/templates/crochet/pattern.html:172
msgid "Vertical" msgid "Vertical"
msgstr "" msgstr ""
#: crochet/templates/crochet/pattern.html:154 #: crochet/templates/crochet/pattern.html:173
msgid "Horizontal" msgid "Horizontal"
msgstr "" msgstr ""
#: crochet/templates/crochet/pattern.html:162 #: crochet/templates/crochet/pattern.html:181
#: crochet/templates/crochet/pattern.html:170 #: crochet/templates/crochet/pattern.html:189
msgid "Secciones" msgid "Secciones"
msgstr "" msgstr ""
#: crochet/templates/crochet/pattern.html:172 #: crochet/templates/crochet/pattern.html:191
msgid "Colapsar todo" msgid "Colapsar todo"
msgstr "" msgstr ""
#: crochet/templates/crochet/pattern.html:172 #: crochet/templates/crochet/pattern.html:191
msgid "Expandir todo" msgid "Expandir todo"
msgstr "" msgstr ""
#: crochet/templates/crochet/pattern.html:177 #: crochet/templates/crochet/pattern.html:196
msgid "Añadir sección" msgid "Añadir sección"
msgstr "" msgstr ""
#: crochet/templates/crochet/pattern.html:180 #: crochet/templates/crochet/pattern.html:199
msgid "Título" msgid "Título"
msgstr "" msgstr ""
#: crochet/templates/crochet/pattern.html:180 #: crochet/templates/crochet/pattern.html:199
msgid "Título..." msgid "Título..."
msgstr "" msgstr ""
#: crochet/templates/crochet/pattern.html:182 #: crochet/templates/crochet/pattern.html:201
msgid "Subtítulo" msgid "Subtítulo"
msgstr "" msgstr ""
#: crochet/templates/crochet/pattern.html:182 #: crochet/templates/crochet/pattern.html:201
msgid "Subtítulo..." msgid "Subtítulo..."
msgstr "" msgstr ""
#: crochet/templates/crochet/pattern.html:184 #: crochet/templates/crochet/pattern.html:203
msgid "Texto" msgid "Texto"
msgstr "" msgstr ""
#: crochet/templates/crochet/pattern.html:184 #: crochet/templates/crochet/pattern.html:203
msgid "Escribe aquí..." msgid "Escribe aquí..."
msgstr "" msgstr ""
#: crochet/templates/crochet/pattern.html:186 #: crochet/templates/crochet/pattern.html:205
#: crochet/templates/crochet/pattern.html:187 #: crochet/templates/crochet/pattern.html:206
msgid "Nota" msgid "Nota"
msgstr "" msgstr ""
#: crochet/templates/crochet/pattern.html:186 #: crochet/templates/crochet/pattern.html:205
msgid "Escribe una nota o consejo..." msgid "Escribe una nota o consejo..."
msgstr "" msgstr ""
#: crochet/templates/crochet/pattern.html:189 #: crochet/templates/crochet/pattern.html:208
msgid "Materiales" msgid "Materiales"
msgstr "" msgstr ""
#: crochet/templates/crochet/pattern.html:189 #: crochet/templates/crochet/pattern.html:208
msgid "Añadir material..." msgid "Añadir material..."
msgstr "" msgstr ""
#: crochet/templates/crochet/pattern.html:189 #: crochet/templates/crochet/pattern.html:208
msgid "Añadir línea" msgid "Añadir línea"
msgstr "" msgstr ""
#: crochet/templates/crochet/pattern.html:191 #: crochet/templates/crochet/pattern.html:210
#: crochet/templates/crochet/pattern.html:193 #: crochet/templates/crochet/pattern.html:212
msgid "Imagen" msgid "Imagen"
msgstr "" msgstr ""
#: crochet/templates/crochet/pattern.html:193 #: crochet/templates/crochet/pattern.html:212
msgid "No se ha podido subir la imagen. Inténtalo de nuevo." msgid "No se ha podido subir la imagen. Inténtalo de nuevo."
msgstr "" msgstr ""
#: crochet/templates/crochet/pattern.html:195 #: crochet/templates/crochet/pattern.html:214
msgid "Patrón" msgid "Patrón"
msgstr "" msgstr ""
#: crochet/templates/crochet/pattern.html:195 #: crochet/templates/crochet/pattern.html:214
msgid "Elementos" msgid "Elementos"
msgstr "" msgstr ""
#: crochet/templates/crochet/pattern.html:197 #: crochet/templates/crochet/pattern.html:216
msgid "Grupo" msgid "Grupo"
msgstr "" msgstr ""
#: crochet/templates/crochet/pattern.html:201 #: crochet/templates/crochet/pattern.html:220
msgid "Arrastrar para reordenar" msgid "Arrastrar para reordenar"
msgstr "" msgstr ""
#: crochet/templates/crochet/pattern.html:202 #: crochet/templates/crochet/pattern.html:221
msgid "Colapsar / expandir" msgid "Colapsar / expandir"
msgstr "" msgstr ""
#: crochet/templates/crochet/pattern.html:203 #: crochet/templates/crochet/pattern.html:222
msgid "Duplicar sección" msgid "Duplicar sección"
msgstr "" msgstr ""
#: crochet/templates/crochet/pattern.html:204 #: crochet/templates/crochet/pattern.html:223
msgid "Eliminar sección" msgid "Eliminar sección"
msgstr "" msgstr ""
#: crochet/templates/crochet/pattern.html:205 #: crochet/templates/crochet/pattern.html:224
msgid "" msgid ""
"¿Seguro que quieres eliminar este grupo? Se eliminarán también todas las " "¿Seguro que quieres eliminar este grupo? Se eliminarán también todas las "
"secciones que contiene." "secciones que contiene."
msgstr "" msgstr ""
#: crochet/templates/crochet/pattern.html:210 #: crochet/templates/crochet/pattern.html:229
msgid "Añade una sección para ver aquí el resultado." msgid "Añade una sección para ver aquí el resultado."
msgstr "" msgstr ""
@@ -0,0 +1,22 @@
// Panel lateral de ajustes de la cuenta (ver account_settings.html): solo
// alterna qué <section data-settings-panel> se ve, todo en la misma
// página. Los formularios de cada pestaña siguen siendo los mismos
// fragmentos HTMX de siempre, esto no los toca.
const tabLinks = document.querySelectorAll('[data-settings-tab]');
const panels = document.querySelectorAll('[data-settings-panel]');
function showTab(tabName) {
panels.forEach((panel) => {
panel.classList.toggle('hidden', panel.dataset.settingsPanel !== tabName);
});
tabLinks.forEach((link) => {
link.classList.toggle('menu-active', link.dataset.settingsTab === tabName);
});
}
tabLinks.forEach((link) => {
link.addEventListener('click', (event) => {
event.preventDefault();
showTab(link.dataset.settingsTab);
});
});
+2 -1
View File
@@ -3,7 +3,7 @@
// sección de tipo "Imagen"): esto es un atributo del patrón entero, así que // sección de tipo "Imagen"): esto es un atributo del patrón entero, así que
// se sube y aplica en cuanto se elige el archivo, sin esperar a "Guardar". // se sube y aplica en cuanto se elige el archivo, sin esperar a "Guardar".
import { coverImageInput, coverImageLargeUrlInput, coverImagePreview } from './dom-refs.js'; import { coverImageInput, coverImageLargeUrlInput, coverImagePlaceholder, coverImagePreview } from './dom-refs.js';
import { getCsrfToken } from './csrf.js'; import { getCsrfToken } from './csrf.js';
import { renderOutput } from './render.js'; import { renderOutput } from './render.js';
@@ -25,6 +25,7 @@ coverImageInput.addEventListener('change', async () => {
const data = await response.json(); const data = await response.json();
coverImagePreview.src = data.thumbnailUrl; coverImagePreview.src = data.thumbnailUrl;
coverImagePreview.classList.remove('hidden'); coverImagePreview.classList.remove('hidden');
coverImagePlaceholder.classList.add('hidden');
// "Vista previa" (ver render.js) pinta la portada a partir de este // "Vista previa" (ver render.js) pinta la portada a partir de este
// valor, igual que lee pageTitleInput/pageAuthorInput. // valor, igual que lee pageTitleInput/pageAuthorInput.
coverImageLargeUrlInput.value = data.largeUrl; coverImageLargeUrlInput.value = data.largeUrl;
+1
View File
@@ -27,4 +27,5 @@ export const pageSizeStyle = document.getElementById('page-size-style');
// entero, igual que título/autor de arriba, no una sección más. // entero, igual que título/autor de arriba, no una sección más.
export const coverImageInput = document.getElementById('cover-image-input'); export const coverImageInput = document.getElementById('cover-image-input');
export const coverImagePreview = document.getElementById('cover-image-preview'); // Miniatura dentro del propio control de subida. export const coverImagePreview = document.getElementById('cover-image-preview'); // Miniatura dentro del propio control de subida.
export const coverImagePlaceholder = document.getElementById('cover-image-placeholder'); // Icono + texto que tapa la miniatura mientras no hay portada.
export const coverImageLargeUrlInput = document.getElementById('cover-image-large-url'); // Leído por render.js para "Vista previa". export const coverImageLargeUrlInput = document.getElementById('cover-image-large-url'); // Leído por render.js para "Vista previa".
@@ -1,5 +1,5 @@
{% extends 'crochet/base.html' %} {% extends 'crochet/base.html' %}
{% load i18n %} {% load static i18n %}
{% block title %}{% trans 'Ajustes de la cuenta' %}{% endblock %} {% block title %}{% trans 'Ajustes de la cuenta' %}{% endblock %}
@@ -14,16 +14,36 @@
{% endblock %} {% endblock %}
{% block content %} {% block content %}
<main class="max-w-lg mx-auto px-4 py-8 flex flex-col gap-8"> <main class="max-w-4xl mx-auto px-4 py-8">
<h1 class="text-2xl font-semibold">{% trans 'Ajustes de la cuenta' %}</h1> <h1 class="text-2xl font-semibold mb-6">{% trans 'Ajustes de la cuenta' %}</h1>
<div class="flex flex-col md:flex-row gap-8">
<!-- Panel lateral: solo cambia qué <section data-settings-panel> se
ve (ver account-settings-tabs.js), no hay URL ni petición nueva
por pestaña; los formularios de cada una siguen siendo los
mismos fragmentos HTMX de siempre. -->
<nav class="md:w-56 shrink-0 no-print">
<!-- w-full: .menu de daisyUI se ajusta al contenido por defecto
(no ocupa el 100% de su contenedor), así que sin esto quedaba
visiblemente más estrecho que las tarjetas de abajo en móvil. -->
<ul class="menu bg-base-100 rounded-box border border-base-300 p-2 w-full md:flex-col">
<li><a href="#" data-settings-tab="profile" class="menu-active">{% trans 'Perfil' %}</a></li>
<li><a href="#" data-settings-tab="security">{% trans 'Seguridad' %}</a></li>
<li><a href="#" data-settings-tab="danger" class="text-error">{% trans 'Zona de peligro' %}</a></li>
</ul>
</nav>
<div class="flex-1 min-w-0">
<section data-settings-panel="profile" class="flex flex-col gap-8">
<section class="card bg-base-100 shadow border border-base-300"> <section class="card bg-base-100 shadow border border-base-300">
<div class="card-body"> <div class="card-body">
<h2 class="card-title text-lg">{% trans 'Nombre para mostrar' %}</h2> <h2 class="card-title text-lg">{% trans 'Nombre para mostrar' %}</h2>
{% include 'crochet/_account_display_name_form.html' %} {% include 'crochet/_account_display_name_form.html' %}
</div> </div>
</section> </section>
</section>
<section data-settings-panel="security" class="hidden flex-col gap-8">
<section class="card bg-base-100 shadow border border-base-300"> <section class="card bg-base-100 shadow border border-base-300">
<div class="card-body"> <div class="card-body">
<h2 class="card-title text-lg">{% trans 'Email' %}</h2> <h2 class="card-title text-lg">{% trans 'Email' %}</h2>
@@ -37,12 +57,12 @@
{% include 'crochet/_account_password_form.html' %} {% include 'crochet/_account_password_form.html' %}
</div> </div>
</section> </section>
</section>
<a href="{% url 'crochet:home' %}" class="link link-primary">{% trans 'Volver a mis patrones' %}</a> <!-- Zona de peligro en su propia pestaña, no solo con border-error
de por sí: separada del resto de ajustes, no algo con lo que
<!-- Zona de peligro, aparte del resto (border-error): que se note a te puedas topar sin querer bajando por la página. -->
simple vista que esto es irreversible, distinto de los ajustes de <section data-settings-panel="danger" class="hidden flex-col gap-8">
arriba. -->
<section class="card bg-base-100 shadow border border-error"> <section class="card bg-base-100 shadow border border-error">
<div class="card-body"> <div class="card-body">
<h2 class="card-title text-lg text-error">{% trans 'Eliminar cuenta' %}</h2> <h2 class="card-title text-lg text-error">{% trans 'Eliminar cuenta' %}</h2>
@@ -52,5 +72,12 @@
{% include 'crochet/_account_delete_form.html' %} {% include 'crochet/_account_delete_form.html' %}
</div> </div>
</section> </section>
</section>
</div>
</div>
</main> </main>
{% endblock %} {% endblock %}
{% block extra_js %}
<script defer src="{% static 'js/account-settings-tabs.js' %}"></script>
{% endblock %}
+39 -20
View File
@@ -68,36 +68,55 @@
<div class="p-4 pt-0"> <div class="p-4 pt-0">
<details class="border border-base-300 rounded-box p-4 mb-4 no-print"> <!-- Título e imagen de portada, fuera de "Personalización de página"
<summary class="text-lg font-semibold cursor-pointer select-none">{% trans 'Personalización de página' %}</summary> (aparte, no-print igual que el resto de controles del editor):
<div class="flex flex-col gap-4 mt-4"> son la identidad del patrón, no un ajuste de estilo, así que se
<div class="flex flex-col sm:flex-row gap-4"> quedan siempre a la vista en vez de detrás de un <details>
<label class="flex flex-col gap-1 flex-1"> colapsado. -->
<div class="no-print">
<label class="flex flex-col gap-1 flex-1 mb-4">
<span class="text-sm">{% trans 'Título del patrón' %}</span> <span class="text-sm">{% trans 'Título del patrón' %}</span>
<input id="page-title-input" type="text" class="input input-bordered" placeholder="{% trans 'Título del patrón...' %}"> <input id="page-title-input" type="text" class="input input-bordered" placeholder="{% trans 'Título del patrón...' %}">
</label> </label>
<label class="flex flex-col gap-1 flex-1"> <div class="flex flex-col gap-1 mb-4">
<span class="text-sm">{% trans 'Autor' %}</span>
<input id="page-author-input" type="text" class="input input-bordered" placeholder="{% trans 'Autor...' %}">
</label>
</div>
<div class="flex items-end gap-4">
<label class="flex flex-col gap-1 flex-1">
<span class="text-sm">{% trans 'Imagen de portada' %}</span> <span class="text-sm">{% trans 'Imagen de portada' %}</span>
<input id="cover-image-input" type="file" accept="image/*" class="file-input file-input-bordered" <!-- <label for="cover-image-input">, no un botón de archivo
data-upload-url="{% url 'crochet:pattern_cover_upload' pattern.uuid %}" nativo: al pulsar sobre el propio recuadro (miniatura o
data-error-message="{% trans 'No se ha podido subir la imagen de portada. Inténtalo de nuevo.' %}"> marcador de posición) se abre el selector de archivos igual
</label> que con el input nativo, sin JS propio para eso. -->
<label for="cover-image-input"
class="group relative flex w-full max-w-md h-56 items-center justify-center overflow-hidden rounded-box border-2 border-dashed border-base-300 bg-base-200/40 cursor-pointer transition-colors hover:border-primary">
<img id="cover-image-preview" alt="" <img id="cover-image-preview" alt=""
src="{% if pattern.cover_image_thumbnail %}{{ pattern.cover_image_thumbnail.url }}{% endif %}" src="{% if pattern.cover_image_thumbnail %}{{ pattern.cover_image_thumbnail.url }}{% endif %}"
class="w-24 h-24 object-cover rounded-box border border-base-300{% if not pattern.cover_image_thumbnail %} hidden{% endif %}"> class="absolute inset-0 h-full w-full object-cover{% if not pattern.cover_image_thumbnail %} hidden{% endif %}">
<!-- Tamaño "large" (no el thumbnail de arriba, pensado solo <span id="cover-image-placeholder"
para ese control): lo lee render.js para pintarla en class="flex flex-col items-center gap-2 px-2 text-center text-sm text-base-content/50{% if pattern.cover_image_thumbnail %} hidden{% endif %}">
"Vista previa", debajo del título, igual que hace <span class="text-5xl">🖼️</span>
{% trans 'Añadir imagen' %}
</span>
<span class="absolute inset-0 flex items-center justify-center bg-black/50 text-sm font-medium text-white opacity-0 transition-opacity group-hover:opacity-100">
{% trans 'Cambiar' %}
</span>
</label>
<input id="cover-image-input" type="file" accept="image/*" class="sr-only"
data-upload-url="{% url 'crochet:pattern_cover_upload' pattern.uuid %}"
data-error-message="{% trans 'No se ha podido subir la imagen de portada. Inténtalo de nuevo.' %}">
<!-- Tamaño "large" (no la miniatura de arriba, pensado solo para
ese control): lo lee render.js para pintarla en "Vista
previa", debajo del título, igual que hace
render_pattern_html() en la vista de solo lectura/PDF. --> render_pattern_html() en la vista de solo lectura/PDF. -->
<input type="hidden" id="cover-image-large-url" <input type="hidden" id="cover-image-large-url"
value="{% if pattern.cover_image_large %}{{ pattern.cover_image_large.url }}{% endif %}"> value="{% if pattern.cover_image_large %}{{ pattern.cover_image_large.url }}{% endif %}">
</div> </div>
</div>
<details class="border border-base-300 rounded-box p-4 mb-4 no-print">
<summary class="text-lg font-semibold cursor-pointer select-none">{% trans 'Personalización de página' %}</summary>
<div class="flex flex-col gap-4 mt-4">
<label class="flex flex-col gap-1">
<span class="text-sm">{% trans 'Autor' %}</span>
<input id="page-author-input" type="text" class="input input-bordered" placeholder="{% trans 'Autor...' %}">
</label>
<div class="flex flex-wrap items-end gap-4"> <div class="flex flex-wrap items-end gap-4">
<label class="flex flex-col gap-1"> <label class="flex flex-col gap-1">
<span class="text-sm">{% trans 'Color del texto' %}</span> <span class="text-sm">{% trans 'Color del texto' %}</span>