Spaces:
Sleeping
Sleeping
Se termina de aplicarla paleta de colores para crear una sesion
Browse files- tecnicas/forms/word_form.py +1 -1
- tecnicas/static/js/create-session.js +12 -26
- tecnicas/static/js/panel-words.js +2 -2
- tecnicas/templates/tecnicas/create_sesion/configuracion-panel-words.html +33 -21
- tecnicas/templates/tecnicas/create_sesion/creando_sesion.html +6 -6
- theme/static_src/src/styles.css +1 -1
- theme/static_src/tailwind.config.js +1 -1
tecnicas/forms/word_form.py
CHANGED
|
@@ -14,7 +14,7 @@ class WordForm(forms.ModelForm):
|
|
| 14 |
"max_length": "la palabra es muy larga",
|
| 15 |
},
|
| 16 |
widget=forms.TextInput(attrs={
|
| 17 |
-
"class": "bg-
|
| 18 |
"placeholder": "Ingrese palabra",
|
| 19 |
"oninput": "this.value = this.value.toLowerCase()",
|
| 20 |
})
|
|
|
|
| 14 |
"max_length": "la palabra es muy larga",
|
| 15 |
},
|
| 16 |
widget=forms.TextInput(attrs={
|
| 17 |
+
"class": "bg-surface-sweet border-b text-center text-black pb-1 rounded",
|
| 18 |
"placeholder": "Ingrese palabra",
|
| 19 |
"oninput": "this.value = this.value.toLowerCase()",
|
| 20 |
})
|
tecnicas/static/js/create-session.js
CHANGED
|
@@ -43,18 +43,17 @@ function renderElementsResponse({
|
|
| 43 |
const loadElement = document.querySelector(".ct-load-create");
|
| 44 |
|
| 45 |
const message = document.createElement("p");
|
| 46 |
-
message.classList.add("text-2xl", "text-
|
| 47 |
|
| 48 |
const nameSessionP = document.createElement("p");
|
| 49 |
nameSessionP.classList.add(
|
| 50 |
"text-lg",
|
| 51 |
-
"text-white",
|
| 52 |
"text-center",
|
| 53 |
"font-bold"
|
| 54 |
);
|
| 55 |
|
| 56 |
const idSession = document.createElement("p");
|
| 57 |
-
idSession.classList.add("text-lg", "text-
|
| 58 |
const pHelp = document.createElement("p");
|
| 59 |
|
| 60 |
// ******************************** //
|
|
@@ -68,7 +67,7 @@ function renderElementsResponse({
|
|
| 68 |
idSession.innerHTML = `El ID de la seesion es:<br><strong class="border-b border-white">${sessionId}</strong>`;
|
| 69 |
nameSessionP.textContent = `Nombre de sesion: ${nameSession}`;
|
| 70 |
|
| 71 |
-
pHelp.classList.add("text-lg", "text-
|
| 72 |
pHelp.textContent =
|
| 73 |
"Puedes pasar este ID a los catadores para que ingresen a la sesion";
|
| 74 |
}
|
|
@@ -84,16 +83,9 @@ function renderElementsResponse({
|
|
| 84 |
|
| 85 |
const stylesBtns = [
|
| 86 |
"uppercase",
|
| 87 |
-
"text-lg",
|
| 88 |
"tracking-wider",
|
| 89 |
-
"
|
| 90 |
-
"
|
| 91 |
-
"px-4",
|
| 92 |
-
"border-b-2",
|
| 93 |
-
"active:border-b-0",
|
| 94 |
-
"active:border-t-2",
|
| 95 |
-
"transition-all",
|
| 96 |
-
"rounded-xl",
|
| 97 |
"w-fit",
|
| 98 |
];
|
| 99 |
|
|
@@ -103,27 +95,21 @@ function renderElementsResponse({
|
|
| 103 |
|
| 104 |
aIndex.classList.add(
|
| 105 |
...stylesBtns,
|
| 106 |
-
"
|
| 107 |
-
"border-blue-800",
|
| 108 |
-
"bg-blue-500",
|
| 109 |
-
"text-white"
|
| 110 |
);
|
| 111 |
|
| 112 |
-
const
|
| 113 |
-
|
| 114 |
-
|
| 115 |
|
| 116 |
-
|
| 117 |
...stylesBtns,
|
| 118 |
-
"
|
| 119 |
-
"border-yellow-800",
|
| 120 |
-
"bg-yellow-500",
|
| 121 |
-
"text-black"
|
| 122 |
);
|
| 123 |
|
| 124 |
divBtns.appendChild(aIndex);
|
| 125 |
if (!error) {
|
| 126 |
-
divBtns.appendChild(
|
| 127 |
}
|
| 128 |
|
| 129 |
loadElement.classList.add("hidden");
|
|
|
|
| 43 |
const loadElement = document.querySelector(".ct-load-create");
|
| 44 |
|
| 45 |
const message = document.createElement("p");
|
| 46 |
+
message.classList.add("text-2xl", "text-center", "font-bold");
|
| 47 |
|
| 48 |
const nameSessionP = document.createElement("p");
|
| 49 |
nameSessionP.classList.add(
|
| 50 |
"text-lg",
|
|
|
|
| 51 |
"text-center",
|
| 52 |
"font-bold"
|
| 53 |
);
|
| 54 |
|
| 55 |
const idSession = document.createElement("p");
|
| 56 |
+
idSession.classList.add("text-lg", "text-center", "font-bold");
|
| 57 |
const pHelp = document.createElement("p");
|
| 58 |
|
| 59 |
// ******************************** //
|
|
|
|
| 67 |
idSession.innerHTML = `El ID de la seesion es:<br><strong class="border-b border-white">${sessionId}</strong>`;
|
| 68 |
nameSessionP.textContent = `Nombre de sesion: ${nameSession}`;
|
| 69 |
|
| 70 |
+
pHelp.classList.add("text-lg", "text-center");
|
| 71 |
pHelp.textContent =
|
| 72 |
"Puedes pasar este ID a los catadores para que ingresen a la sesion";
|
| 73 |
}
|
|
|
|
| 83 |
|
| 84 |
const stylesBtns = [
|
| 85 |
"uppercase",
|
|
|
|
| 86 |
"tracking-wider",
|
| 87 |
+
"cts-btn-general",
|
| 88 |
+
"btn-push",
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 89 |
"w-fit",
|
| 90 |
];
|
| 91 |
|
|
|
|
| 95 |
|
| 96 |
aIndex.classList.add(
|
| 97 |
...stylesBtns,
|
| 98 |
+
"cts-btn-secondary"
|
|
|
|
|
|
|
|
|
|
| 99 |
);
|
| 100 |
|
| 101 |
+
const aDetails = document.createElement("a");
|
| 102 |
+
aDetails.href = `/cata/detalles-sesion/${sessionId}`;
|
| 103 |
+
aDetails.textContent = "Ver detalles la sesion";
|
| 104 |
|
| 105 |
+
aDetails.classList.add(
|
| 106 |
...stylesBtns,
|
| 107 |
+
"cts-btn-tertiary"
|
|
|
|
|
|
|
|
|
|
| 108 |
);
|
| 109 |
|
| 110 |
divBtns.appendChild(aIndex);
|
| 111 |
if (!error) {
|
| 112 |
+
divBtns.appendChild(aDetails);
|
| 113 |
}
|
| 114 |
|
| 115 |
loadElement.classList.add("hidden");
|
tecnicas/static/js/panel-words.js
CHANGED
|
@@ -57,8 +57,8 @@ async function getWordsByName(e) {
|
|
| 57 |
function createWordElement({ word, add = true, callback = null }) {
|
| 58 |
const li = document.createElement("li");
|
| 59 |
li.classList.add(
|
| 60 |
-
add ? "bg-
|
| 61 |
-
|
| 62 |
"rounded",
|
| 63 |
"font-bold",
|
| 64 |
"text-lg",
|
|
|
|
| 57 |
function createWordElement({ word, add = true, callback = null }) {
|
| 58 |
const li = document.createElement("li");
|
| 59 |
li.classList.add(
|
| 60 |
+
add ? "bg-surface-card" : "bg-surface-sweet",
|
| 61 |
+
"text-black",
|
| 62 |
"rounded",
|
| 63 |
"font-bold",
|
| 64 |
"text-lg",
|
tecnicas/templates/tecnicas/create_sesion/configuracion-panel-words.html
CHANGED
|
@@ -4,13 +4,13 @@
|
|
| 4 |
{% block title %}Panel Configuracion{% endblock %}
|
| 5 |
|
| 6 |
{% block content %}
|
| 7 |
-
<article class="
|
| 8 |
<section class="w-fit h-fit relative">
|
| 9 |
-
<article class="
|
| 10 |
<h1 class="text-center font-bold text-4xl">Panel de configuración</h1>
|
| 11 |
<hr>
|
| 12 |
{% if error %}
|
| 13 |
-
<p class="bg-red-400 font-bold text-lg tracking-wide
|
| 14 |
{{ error }}
|
| 15 |
</p>
|
| 16 |
{% endif %}
|
|
@@ -19,22 +19,21 @@
|
|
| 19 |
<section class="flex-3/5 flex flex-col gap-4">
|
| 20 |
<form action="" method="get" class="ct-serach-words">
|
| 21 |
{% csrf_token %}
|
| 22 |
-
<p class="text-lg font-bold text-center mb-2 bg-
|
| 23 |
Dejar en blaco para buscar las primeras 10 palabras
|
| 24 |
</p>
|
| 25 |
<section class="flex flex-row gap-2">
|
| 26 |
<label for="search" class="w-full">
|
| 27 |
<input type="text" name="search" id="search" placeholder="Buscar palabra"
|
| 28 |
-
class="p-2 px-4 bg-
|
| 29 |
</label>
|
| 30 |
<button type="submit"
|
| 31 |
-
class="
|
| 32 |
Buscar
|
| 33 |
</button>
|
| 34 |
</section>
|
| 35 |
</form>
|
| 36 |
-
<p
|
| 37 |
-
class="ct-error-words hidden capitalize text-white bg-red-600 text-center text-2xl p-1.5 rounded">
|
| 38 |
error</p>
|
| 39 |
<ul class="ct-palabras-encontradas gap-2 grid-cols-2 max-h-96 overflow-y-auto">
|
| 40 |
<div class="flex justify-center items-center">
|
|
@@ -42,9 +41,9 @@
|
|
| 42 |
</div>
|
| 43 |
</ul>
|
| 44 |
</section>
|
| 45 |
-
<section class="flex-1/3 bg-
|
| 46 |
<p class="text-xl font-bold pb-3">Lista de palabras</p>
|
| 47 |
-
<hr class="mb-3
|
| 48 |
<ul class="ct-palabras-usadas flex flex-col gap-3">
|
| 49 |
{% if not words %}
|
| 50 |
<img src="{% static 'img/list.svg' %}" alt="lista de palabras" class="ct-img-list">
|
|
@@ -61,23 +60,22 @@
|
|
| 61 |
</section>
|
| 62 |
</article>
|
| 63 |
|
| 64 |
-
<article class="ct-new-tags bg-
|
| 65 |
<form method="post" action="" class="ct-form-new-word p-3">
|
| 66 |
{% csrf_token %}
|
| 67 |
-
<p class="mb-4 text-2xl min-md:text-xl font-bold text-center
|
| 68 |
¿No encuentras una palabra?
|
| 69 |
</p>
|
| 70 |
<label for="{{ form_word.nombre_palabra.id_for_label }}"
|
| 71 |
-
class="font-medium text-xl
|
| 72 |
<p class="px-4">Nueva palabra:</p>
|
| 73 |
{{ form_word.nombre_palabra }}
|
| 74 |
</label>
|
| 75 |
-
<p
|
| 76 |
-
class="ct-error-word mb-4 font-bold bg-red-500 text-white text-md capitalize text-center rounded hidden">
|
| 77 |
error
|
| 78 |
</p>
|
| 79 |
-
<hr
|
| 80 |
-
<article class="flex justify-center gap-8 mt-4
|
| 81 |
<button
|
| 82 |
class="text-lg tracking-wider font-medium p-2 px-4 border-b-2 active:border-b-0 active:border-t-2 active:border-green-500 border-green-800 transition-all rounded-xl bg-green-600 text-white w-fit"
|
| 83 |
type="submit">
|
|
@@ -90,10 +88,24 @@
|
|
| 90 |
<article>
|
| 91 |
<form action="" method="post" class="ct-creat-session flex justify-center mt-4">
|
| 92 |
{% csrf_token %}
|
| 93 |
-
<
|
| 94 |
-
class="
|
| 95 |
-
|
| 96 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 97 |
</form>
|
| 98 |
</article>
|
| 99 |
|
|
|
|
| 4 |
{% block title %}Panel Configuracion{% endblock %}
|
| 5 |
|
| 6 |
{% block content %}
|
| 7 |
+
<article class="cts-container-main">
|
| 8 |
<section class="w-fit h-fit relative">
|
| 9 |
+
<article class="cts-wrap-content text-black lg:w-4xl w-full">
|
| 10 |
<h1 class="text-center font-bold text-4xl">Panel de configuración</h1>
|
| 11 |
<hr>
|
| 12 |
{% if error %}
|
| 13 |
+
<p class="bg-red-400 font-bold text-lg tracking-wide capitalize text-center py-2">
|
| 14 |
{{ error }}
|
| 15 |
</p>
|
| 16 |
{% endif %}
|
|
|
|
| 19 |
<section class="flex-3/5 flex flex-col gap-4">
|
| 20 |
<form action="" method="get" class="ct-serach-words">
|
| 21 |
{% csrf_token %}
|
| 22 |
+
<p class="text-lg font-bold text-center mb-2 bg-surface-card p-2 rounded">
|
| 23 |
Dejar en blaco para buscar las primeras 10 palabras
|
| 24 |
</p>
|
| 25 |
<section class="flex flex-row gap-2">
|
| 26 |
<label for="search" class="w-full">
|
| 27 |
<input type="text" name="search" id="search" placeholder="Buscar palabra"
|
| 28 |
+
class="p-2 px-4 bg-surface-ligt rounded-lg w-full text-lg font-medium">
|
| 29 |
</label>
|
| 30 |
<button type="submit"
|
| 31 |
+
class="font-bold rounded-lg text-xl px-3 text-center cts-btn-tertiary btn-push">
|
| 32 |
Buscar
|
| 33 |
</button>
|
| 34 |
</section>
|
| 35 |
</form>
|
| 36 |
+
<p class="ct-error-words hidden capitalize bg-red-600 text-center text-2xl p-1.5 rounded">
|
|
|
|
| 37 |
error</p>
|
| 38 |
<ul class="ct-palabras-encontradas gap-2 grid-cols-2 max-h-96 overflow-y-auto">
|
| 39 |
<div class="flex justify-center items-center">
|
|
|
|
| 41 |
</div>
|
| 42 |
</ul>
|
| 43 |
</section>
|
| 44 |
+
<section class="flex-1/3 bg-surface-card p-4 rounded-lg text-center min-h-96">
|
| 45 |
<p class="text-xl font-bold pb-3">Lista de palabras</p>
|
| 46 |
+
<hr class="mb-3">
|
| 47 |
<ul class="ct-palabras-usadas flex flex-col gap-3">
|
| 48 |
{% if not words %}
|
| 49 |
<img src="{% static 'img/list.svg' %}" alt="lista de palabras" class="ct-img-list">
|
|
|
|
| 60 |
</section>
|
| 61 |
</article>
|
| 62 |
|
| 63 |
+
<article class="ct-new-tags bg-surface-card p-5 flex justify-center items-center rounded-2xl">
|
| 64 |
<form method="post" action="" class="ct-form-new-word p-3">
|
| 65 |
{% csrf_token %}
|
| 66 |
+
<p class="mb-4 text-2xl min-md:text-xl font-bold text-center">
|
| 67 |
¿No encuentras una palabra?
|
| 68 |
</p>
|
| 69 |
<label for="{{ form_word.nombre_palabra.id_for_label }}"
|
| 70 |
+
class="font-medium text-xl flex flex-wrap justify-center items-center gap-3 mb-4">
|
| 71 |
<p class="px-4">Nueva palabra:</p>
|
| 72 |
{{ form_word.nombre_palabra }}
|
| 73 |
</label>
|
| 74 |
+
<p class="ct-error-word mb-4 font-bold bg-red-500 text-md capitalize text-center rounded hidden">
|
|
|
|
| 75 |
error
|
| 76 |
</p>
|
| 77 |
+
<hr>
|
| 78 |
+
<article class="flex justify-center gap-8 mt-4 font-medium tracking-wide">
|
| 79 |
<button
|
| 80 |
class="text-lg tracking-wider font-medium p-2 px-4 border-b-2 active:border-b-0 active:border-t-2 active:border-green-500 border-green-800 transition-all rounded-xl bg-green-600 text-white w-fit"
|
| 81 |
type="submit">
|
|
|
|
| 88 |
<article>
|
| 89 |
<form action="" method="post" class="ct-creat-session flex justify-center mt-4">
|
| 90 |
{% csrf_token %}
|
| 91 |
+
<article class="cs-escalas-radio w-full flex flex-col gap-4">
|
| 92 |
+
<section class="flex max-sm:flex-col flex-wrap items-center justify-center gap-4">
|
| 93 |
+
<button type="submit" name="start"
|
| 94 |
+
class="cts-btn-general cts-btn-primary btn-push flex-1 w-full">
|
| 95 |
+
Crear sesión
|
| 96 |
+
</button>
|
| 97 |
+
<a href="{% url 'cata_system:seleccion_tecnica' %}" class="flex-1 w-full">
|
| 98 |
+
<button type="button" class="cts-btn-general cts-btn-secondary btn-push w-full">
|
| 99 |
+
Paso anterior
|
| 100 |
+
</button>
|
| 101 |
+
</a>
|
| 102 |
+
</section>
|
| 103 |
+
<a href="{% url 'cata_system:seleccion_tecnica' %}" class="flex-1 w-full">
|
| 104 |
+
<button type="button" class="cts-btn-general cts-btn-error btn-push w-full">
|
| 105 |
+
Cancelar la creación
|
| 106 |
+
</button>
|
| 107 |
+
</a>
|
| 108 |
+
</article>
|
| 109 |
</form>
|
| 110 |
</article>
|
| 111 |
|
tecnicas/templates/tecnicas/create_sesion/creando_sesion.html
CHANGED
|
@@ -4,20 +4,20 @@
|
|
| 4 |
{% block title %}Creando sesion{% endblock %}
|
| 5 |
|
| 6 |
{% block content %}
|
| 7 |
-
<article class="
|
| 8 |
-
<article class="
|
| 9 |
<h1 class="text-center font-bold text-4xl">Creando Sesion</h1>
|
| 10 |
<hr>
|
| 11 |
-
<section class="ct-load-create flex flex-col gap-4 bg-
|
| 12 |
-
<p class="text-lg text-
|
| 13 |
Estamos creando la sesion, por favor espere...
|
| 14 |
</p>
|
| 15 |
-
<hr
|
| 16 |
<div class="w-full h-4 bg-green-500 rounded-full overflow-hidden">
|
| 17 |
<div class="h-full bg-red-400 animate-pulse" style="width: 100%"></div>
|
| 18 |
</div>
|
| 19 |
</section>
|
| 20 |
-
<section class="ct-message-create flex flex-col gap-4 bg-
|
| 21 |
<form action="" method="post" class="hidden ct-cretae-session-form">
|
| 22 |
{% csrf_token %}
|
| 23 |
<input type="hidden" name="action" value="create_session">
|
|
|
|
| 4 |
{% block title %}Creando sesion{% endblock %}
|
| 5 |
|
| 6 |
{% block content %}
|
| 7 |
+
<article class="cts-container-main">
|
| 8 |
+
<article class="cts-wrap-content text-black lg:w-4xl w-full">
|
| 9 |
<h1 class="text-center font-bold text-4xl">Creando Sesion</h1>
|
| 10 |
<hr>
|
| 11 |
+
<section class="ct-load-create flex flex-col gap-4 bg-surface-card p-6 rounded-xl">
|
| 12 |
+
<p class="text-lg text-center font-bold">
|
| 13 |
Estamos creando la sesion, por favor espere...
|
| 14 |
</p>
|
| 15 |
+
<hr>
|
| 16 |
<div class="w-full h-4 bg-green-500 rounded-full overflow-hidden">
|
| 17 |
<div class="h-full bg-red-400 animate-pulse" style="width: 100%"></div>
|
| 18 |
</div>
|
| 19 |
</section>
|
| 20 |
+
<section class="ct-message-create flex flex-col gap-4 bg-surface-card p-6 rounded-xl hidden"></section>
|
| 21 |
<form action="" method="post" class="hidden ct-cretae-session-form">
|
| 22 |
{% csrf_token %}
|
| 23 |
<input type="hidden" name="action" value="create_session">
|
theme/static_src/src/styles.css
CHANGED
|
@@ -23,7 +23,7 @@
|
|
| 23 |
}
|
| 24 |
|
| 25 |
.cts-btn-tertiary {
|
| 26 |
-
@apply text-
|
| 27 |
}
|
| 28 |
|
| 29 |
.cts-btn-error {
|
|
|
|
| 23 |
}
|
| 24 |
|
| 25 |
.cts-btn-tertiary {
|
| 26 |
+
@apply text-gray-700 bg-btn-tertiary border-green-600;
|
| 27 |
}
|
| 28 |
|
| 29 |
.cts-btn-error {
|
theme/static_src/tailwind.config.js
CHANGED
|
@@ -16,7 +16,7 @@ module.exports = {
|
|
| 16 |
"surface-alter-card": "#91C4C3",
|
| 17 |
"btn-primary": "#4CAF50",
|
| 18 |
"btn-secondary": "#E45A92",
|
| 19 |
-
"btn-tertiary": "#
|
| 20 |
"ct-success": "#2E7D32",
|
| 21 |
"ct-error": "#E62727",
|
| 22 |
},
|
|
|
|
| 16 |
"surface-alter-card": "#91C4C3",
|
| 17 |
"btn-primary": "#4CAF50",
|
| 18 |
"btn-secondary": "#E45A92",
|
| 19 |
+
"btn-tertiary": "#CCECC0",
|
| 20 |
"ct-success": "#2E7D32",
|
| 21 |
"ct-error": "#E62727",
|
| 22 |
},
|