componentsDjangoType 1.0.0__tar.gz → 1.0.1__tar.gz

Sign up to get free protection for your applications and to get access to all the features.
Files changed (24) hide show
  1. {componentsDjangoType-1.0.0/componentsDjangoType.egg-info → componentsdjangotype-1.0.1}/PKG-INFO +2 -1
  2. componentsDjangoType-1.0.0/componentsDjangoType/management/commands/createcomponentApp.py → componentsdjangotype-1.0.1/componentsDjangoType/management/commands/createApp.py +3 -1
  3. componentsdjangotype-1.0.1/componentsDjangoType/management/commands/utils/css/authentication.css +212 -0
  4. componentsdjangotype-1.0.1/componentsDjangoType/management/commands/utils/js/alertErrors.js +0 -0
  5. componentsdjangotype-1.0.1/componentsDjangoType/management/commands/utils/layouts/index.html +40 -0
  6. componentsdjangotype-1.0.1/componentsDjangoType/management/commands/utils/pages/home.html +3 -0
  7. componentsdjangotype-1.0.1/componentsDjangoType/management/commands/utils/pages/logged.html +6 -0
  8. componentsdjangotype-1.0.1/componentsDjangoType/management/commands/utils/pages/login.html +35 -0
  9. componentsdjangotype-1.0.1/componentsDjangoType/management/commands/utils/pages/singup.html +38 -0
  10. {componentsDjangoType-1.0.0 → componentsdjangotype-1.0.1/componentsDjangoType.egg-info}/PKG-INFO +2 -1
  11. componentsdjangotype-1.0.1/componentsDjangoType.egg-info/SOURCES.txt +21 -0
  12. {componentsDjangoType-1.0.0 → componentsdjangotype-1.0.1}/setup.py +1 -1
  13. componentsDjangoType-1.0.0/componentsDjangoType.egg-info/SOURCES.txt +0 -14
  14. {componentsDjangoType-1.0.0 → componentsdjangotype-1.0.1}/LICENSE +0 -0
  15. {componentsDjangoType-1.0.0 → componentsdjangotype-1.0.1}/MANIFEST.in +0 -0
  16. {componentsDjangoType-1.0.0 → componentsdjangotype-1.0.1}/README.md +0 -0
  17. {componentsDjangoType-1.0.0 → componentsdjangotype-1.0.1}/componentsDjangoType/__init__.py +0 -0
  18. {componentsDjangoType-1.0.0 → componentsdjangotype-1.0.1}/componentsDjangoType/management/__init__.py +0 -0
  19. {componentsDjangoType-1.0.0 → componentsdjangotype-1.0.1}/componentsDjangoType/management/commands/__init__.py +0 -0
  20. {componentsDjangoType-1.0.0 → componentsdjangotype-1.0.1}/componentsDjangoType/management/commands/createcomponent.py +0 -0
  21. {componentsDjangoType-1.0.0 → componentsdjangotype-1.0.1}/componentsDjangoType.egg-info/dependency_links.txt +0 -0
  22. {componentsDjangoType-1.0.0 → componentsdjangotype-1.0.1}/componentsDjangoType.egg-info/requires.txt +0 -0
  23. {componentsDjangoType-1.0.0 → componentsdjangotype-1.0.1}/componentsDjangoType.egg-info/top_level.txt +0 -0
  24. {componentsDjangoType-1.0.0 → componentsdjangotype-1.0.1}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: componentsDjangoType
3
- Version: 1.0.0
3
+ Version: 1.0.1
4
4
  Summary: A Django app for creating HTML components
5
5
  Home-page: https://github.com/jose-CR/componentsDjangoType
6
6
  Author: Alejandro
@@ -17,6 +17,7 @@ Classifier: Programming Language :: Python :: 3.7
17
17
  Classifier: Framework :: Django :: 3.2
18
18
  Description-Content-Type: text/markdown
19
19
  License-File: LICENSE
20
+ Requires-Dist: Django>=3.2
20
21
 
21
22
  # componentsDjangotype
22
23
 
@@ -152,7 +152,10 @@ class Command(BaseCommand):
152
152
  self.stdout.write(
153
153
  f"El archivo '{authentication_file_path}' ya existe.")
154
154
 
155
+ import os
156
+
155
157
  # Paso 6: Crear la carpeta templates y los archivos HTML
158
+ # Asumiendo que `project_name` ya está definido
156
159
  templates_dir = os.path.join(project_name, 'templates')
157
160
  layouts_dir = os.path.join(templates_dir, 'layouts')
158
161
  static_dir = os.path.join(project_name, 'static')
@@ -212,7 +215,6 @@ class Command(BaseCommand):
212
215
  print(f"Error al crear el archivo: {e}")
213
216
 
214
217
  # Crear las páginas HTML adicionales (home, signup, login, logged)
215
- # Rutas de los archivos fuente
216
218
  home_page = os.path.join('utils', 'pages', 'home.html')
217
219
  signup_page = os.path.join('utils', 'pages', 'signup.html')
218
220
  login_page = os.path.join('utils', 'pages', 'login.html')
@@ -0,0 +1,212 @@
1
+ /* Navbar */
2
+ .navbar {
3
+ display: flex;
4
+ justify-content: space-between;
5
+ align-items: center;
6
+ padding: 10px 20px;
7
+ background-color: #333; /* Color de fondo */
8
+ box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
9
+ }
10
+
11
+ /* Logo */
12
+ .navbar .logo a {
13
+ color: #ffffff;
14
+ font-size: 1.5em;
15
+ text-decoration: none;
16
+ transition: color 0.3s ease;
17
+ }
18
+
19
+ .navbar .logo a:hover {
20
+ color: #4a90e2; /* Hover del logo */
21
+ }
22
+
23
+ /* Links de navegación */
24
+ .nav-links {
25
+ display: flex;
26
+ gap: 15px;
27
+ list-style: none;
28
+ margin: 0;
29
+ padding: 0;
30
+ }
31
+
32
+ .nav-links .nav-item {
33
+ color: #ffffff;
34
+ font-size: 1em;
35
+ text-decoration: none;
36
+ padding: 8px 15px;
37
+ border-radius: 5px;
38
+ transition: background-color 0.3s ease, color 0.3s ease;
39
+ }
40
+
41
+ .nav-links .nav-item:hover {
42
+ background-color: #4a90e2; /* Hover */
43
+ color: #ffffff;
44
+ }
45
+
46
+ /* Estilos para dispositivos móviles */
47
+ .menu-toggle {
48
+ display: none;
49
+ }
50
+
51
+ @media (max-width: 768px) {
52
+ .menu-toggle {
53
+ display: inline-block;
54
+ font-size: 1.5em;
55
+ color: #ffffff;
56
+ cursor: pointer;
57
+ padding: 8px 15px;
58
+ }
59
+
60
+ .nav-links {
61
+ flex-direction: column;
62
+ position: absolute;
63
+ top: 100%;
64
+ right: 0;
65
+ width: 100%;
66
+ background-color: #333;
67
+ max-height: 0;
68
+ overflow: hidden;
69
+ transition: max-height 0.3s ease;
70
+ }
71
+
72
+ /* Activar menú desplegable */
73
+ .nav-links.active {
74
+ max-height: 300px; /* Ajustar altura */
75
+ }
76
+
77
+ .nav-links .nav-item {
78
+ padding: 10px 20px;
79
+ }
80
+ }
81
+
82
+ /* formularios */
83
+ /* Contenedor para centrar el formulario */
84
+ .form-wrapper {
85
+ display: flex;
86
+ justify-content: center;
87
+ align-items: center;
88
+ margin-top: 50px;
89
+ }
90
+
91
+ /* Contenedor del formulario */
92
+ .form-container {
93
+ padding: 20px;
94
+ background: black; /* Fondo azul con transparencia */
95
+ border-radius: 8px;
96
+ box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
97
+ color: white;
98
+ text-align: center;
99
+ max-width: 400px;
100
+ width: 100%;
101
+ }
102
+
103
+ /* Estilo del formulario */
104
+ .form-control {
105
+ display: flex;
106
+ flex-direction: column;
107
+ gap: 15px;
108
+ }
109
+
110
+ /* Estilo para las etiquetas */
111
+ label {
112
+ font-size: 0.9em;
113
+ color: #d1d5db; /* Color gris claro */
114
+ margin-bottom: 5px;
115
+ text-align: left;
116
+ }
117
+
118
+ /* Estilo para los campos de entrada */
119
+ input[type="text"],
120
+ input[type="password"] {
121
+ padding: 10px;
122
+ background: rgba(255, 255, 255, 0.2);
123
+ border: 1px solid rgba(255, 255, 255, 0.3);
124
+ border-radius: 5px;
125
+ color: #ffffff;
126
+ outline: none;
127
+ font-size: 1em;
128
+ transition: background 0.3s ease, box-shadow 0.3s ease;
129
+ }
130
+
131
+ input[type="text"]:focus,
132
+ input[type="password"]:focus {
133
+ background: rgba(255, 255, 255, 0.4);
134
+ box-shadow: 0 0 5px rgba(255, 255, 255, 0.5);
135
+ }
136
+
137
+ /* Estilo del botón */
138
+ button[type="submit"] {
139
+ padding: 10px;
140
+ background: #4a90e2;
141
+ color: white;
142
+ border: none;
143
+ border-radius: 5px;
144
+ cursor: pointer;
145
+ transition: background 0.3s ease;
146
+ }
147
+
148
+ button[type="submit"]:hover {
149
+ background: #357ab8;
150
+ }
151
+
152
+ /* alert */
153
+
154
+ /* Estilos para la alerta */
155
+ .alert {
156
+ max-width: 400px;
157
+ background-color: #333;
158
+ color: #ffffff;
159
+ border-radius: 8px;
160
+ box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
161
+ margin: 0 auto;
162
+ position: relative;
163
+ top: 20px;
164
+ padding: 15px;
165
+ }
166
+
167
+ .alert-content {
168
+ display: flex;
169
+ justify-content: space-between;
170
+ align-items: center;
171
+ }
172
+
173
+ .close-btn {
174
+ background: none;
175
+ border: none;
176
+ cursor: pointer;
177
+ color: #ffffff;
178
+ transition: color 0.3s ease;
179
+ }
180
+
181
+ .close-btn:hover {
182
+ color: #ff6b6b;
183
+ }
184
+
185
+ .close-icon {
186
+ width: 16px;
187
+ height: 16px;
188
+ }
189
+
190
+ /* logged */
191
+
192
+ /* Estilos para el contenedor del bloque */
193
+ .layout-container {
194
+ display: flex;
195
+ justify-content: center;
196
+ align-items: center;
197
+ height: 100vh;
198
+ background-color: #f0f4f8;
199
+ font-family: Arial, sans-serif;
200
+ }
201
+
202
+ /* Estilos para el título */
203
+ .layout-container h1 {
204
+ font-size: 2.5rem;
205
+ color: #4a90e2;
206
+ font-weight: bold;
207
+ text-align: center;
208
+ padding: 20px;
209
+ border-radius: 8px;
210
+ background: #ffffff;
211
+ box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
212
+ }
@@ -0,0 +1,40 @@
1
+ {% load static %}
2
+ <!DOCTYPE html>
3
+ <html lang="en">
4
+ <head>
5
+ <meta charset="UTF-8">
6
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
7
+ <link rel="stylesheet" href="{% static 'css/authentication.css' %}">
8
+ <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.6.0/css/all.min.css">
9
+ <title>django components</title>
10
+ </head>
11
+ <body class="bg-gray-100 text-gray-800">
12
+
13
+ <nav class="navbar">
14
+ <div class="logo">
15
+ <a href="{% url 'home' %}">
16
+ <i class="fa-solid fa-house"></i>
17
+ </a>
18
+ </div>
19
+ <div class="menu-toggle">
20
+ <i class="fa fa-bars"></i>
21
+ </div>
22
+ <ul class="nav-links">
23
+ {% if user.is_authenticated %}
24
+ <li><a href="{% url 'logout' %}" class="nav-item">Logout</a></li>
25
+ {% else %}
26
+ <li><a href="{% url 'signup' %}" class="nav-item">Sign Up</a></li>
27
+ <li><a href="{% url 'login' %}" class="nav-item">Login</a></li>
28
+ {% endif %}
29
+ </ul>
30
+ </nav>
31
+
32
+ <div class="container mx-auto p-4">
33
+ {% block layout %}
34
+ {% endblock %}
35
+ </div>
36
+
37
+ {% block script %}
38
+ {% endblock %}
39
+ </body>
40
+ </html>
@@ -0,0 +1,3 @@
1
+ {% extends "layouts/index.html" %}
2
+ {% block layout %}
3
+ {% endblock %}
@@ -0,0 +1,6 @@
1
+ {% extends "layouts/index.html" %}
2
+ {% block layout %}
3
+ <div class="layout-container">
4
+ <h1>¡Has iniciado sesión!</h1>
5
+ </div>
6
+ {% endblock %}
@@ -0,0 +1,35 @@
1
+ {% extends "layouts/index.html" %}
2
+ {% block layout %}
3
+ {% if error %}
4
+ <div class="alert" id="alert">
5
+ <div class="alert-content">
6
+ {{ error }}
7
+ <button class="close-btn" onclick="closeAlert()">
8
+ <span class="sr-only">Close</span>
9
+ <svg class="close-icon" width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
10
+ <path d="M0.92524 0.687069C1.126 0.486219 1.39823 0.373377 1.68209 0.373377C1.96597 0.373377 2.2382 0.486219 2.43894 0.687069L8.10514 6.35813L13.7714 0.687069C13.8701 0.584748 13.9882 0.503105 14.1188 0.446962C14.2494 0.39082 14.3899 0.361248 14.5321 0.360026C14.6742 0.358783 14.8151 0.38589 14.9468 0.439762C15.0782 0.493633 15.1977 0.573197 15.2983 0.673783C15.3987 0.774389 15.4784 0.894026 15.5321 1.02568C15.5859 1.15736 15.6131 1.29845 15.6118 1.44071C15.6105 1.58297 15.5809 1.72357 15.5248 1.85428C15.4688 1.98499 15.3872 2.10324 15.2851 2.20206L9.61883 7.87312L15.2851 13.5441C15.4801 13.7462 15.588 14.0168 15.5854 14.2977C15.5831 14.5787 15.4705 14.8474 15.272 15.046C15.0735 15.2449 14.805 15.3574 14.5244 15.3599C14.2437 15.3623 13.9733 15.2543 13.7714 15.0591L8.10514 9.38812L2.43894 15.0591C2.23704 15.2543 1.96663 15.3623 1.68594 15.3599C1.40526 15.3574 1.13677 15.2449 0.938279 15.046C0.739807 14.8474 0.627232 14.5787 0.624791 14.2977C0.62235 14.0168 0.730236 13.7462 0.92524 13.5441L6.59144 7.87312L0.92524 2.20206C0.724562 2.00115 0.611816 1.72867 0.611816 1.44457C0.611816 1.16047 0.724562 0.887983 0.92524 0.687069Z" fill="currentColor"/>
11
+ </svg>
12
+ </button>
13
+ </div>
14
+ </div>
15
+ {% endif %}
16
+ <div class="form-wrapper">
17
+ <div class="form-container">
18
+ <form action="" method="post" class="form-control">
19
+ {% csrf_token %}
20
+ <h1>Login</h1>
21
+
22
+ <label for="username">Usuario:</label>
23
+ {{ form.username }}
24
+
25
+ <label for="password">Contraseña:</label>
26
+ <input type="password" id="password" name="password" value="{{ form.password2 }}" required>
27
+
28
+ <button type="submit">Login</button>
29
+ </form>
30
+ </div>
31
+ </div>
32
+ {% endblock %}
33
+ {% block script %}
34
+ <script src="{% static 'js/alertErrors.js'%}"></script>
35
+ {% endblock %}
@@ -0,0 +1,38 @@
1
+ {% extends "layouts/index.html" %}
2
+ {% block layout %}
3
+ {% if error %}
4
+ <div class="alert" id="alert">
5
+ <div class="alert-content">
6
+ {{ error }}
7
+ <button class="close-btn" onclick="closeAlert()">
8
+ <span class="sr-only">Close</span>
9
+ <svg class="close-icon" width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
10
+ <path d="M0.92524 0.687069C1.126 0.486219 1.39823 0.373377 1.68209 0.373377C1.96597 0.373377 2.2382 0.486219 2.43894 0.687069L8.10514 6.35813L13.7714 0.687069C13.8701 0.584748 13.9882 0.503105 14.1188 0.446962C14.2494 0.39082 14.3899 0.361248 14.5321 0.360026C14.6742 0.358783 14.8151 0.38589 14.9468 0.439762C15.0782 0.493633 15.1977 0.573197 15.2983 0.673783C15.3987 0.774389 15.4784 0.894026 15.5321 1.02568C15.5859 1.15736 15.6131 1.29845 15.6118 1.44071C15.6105 1.58297 15.5809 1.72357 15.5248 1.85428C15.4688 1.98499 15.3872 2.10324 15.2851 2.20206L9.61883 7.87312L15.2851 13.5441C15.4801 13.7462 15.588 14.0168 15.5854 14.2977C15.5831 14.5787 15.4705 14.8474 15.272 15.046C15.0735 15.2449 14.805 15.3574 14.5244 15.3599C14.2437 15.3623 13.9733 15.2543 13.7714 15.0591L8.10514 9.38812L2.43894 15.0591C2.23704 15.2543 1.96663 15.3623 1.68594 15.3599C1.40526 15.3574 1.13677 15.2449 0.938279 15.046C0.739807 14.8474 0.627232 14.5787 0.624791 14.2977C0.62235 14.0168 0.730236 13.7462 0.92524 13.5441L6.59144 7.87312L0.92524 2.20206C0.724562 2.00115 0.611816 1.72867 0.611816 1.44457C0.611816 1.16047 0.724562 0.887983 0.92524 0.687069Z" fill="currentColor"/>
11
+ </svg>
12
+ </button>
13
+ </div>
14
+ </div>
15
+ {% endif %}
16
+ <div class="form-wrapper">
17
+ <div class="form-container">
18
+ <form action="" method="post" class="form-control">
19
+ {% csrf_token %}
20
+ <h1>sing up</h1>
21
+
22
+ <label for="username">Usuario:</label>
23
+ {{ form.username }}
24
+
25
+ <label for="password1">Contraseña:</label>
26
+ {{ form.password1 }}
27
+
28
+ <label for="password2">Confirmar Contraseña:</label>
29
+ {{ form.password2 }}
30
+
31
+ <button type="submit">sing Up</button>
32
+ </form>
33
+ </div>
34
+ </div>
35
+ {% endblock %}
36
+ {% block script %}
37
+ <script src="{% static 'js/alertErrors.js'%}"></script>
38
+ {% endblock %}
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: componentsDjangoType
3
- Version: 1.0.0
3
+ Version: 1.0.1
4
4
  Summary: A Django app for creating HTML components
5
5
  Home-page: https://github.com/jose-CR/componentsDjangoType
6
6
  Author: Alejandro
@@ -17,6 +17,7 @@ Classifier: Programming Language :: Python :: 3.7
17
17
  Classifier: Framework :: Django :: 3.2
18
18
  Description-Content-Type: text/markdown
19
19
  License-File: LICENSE
20
+ Requires-Dist: Django>=3.2
20
21
 
21
22
  # componentsDjangotype
22
23
 
@@ -0,0 +1,21 @@
1
+ LICENSE
2
+ MANIFEST.in
3
+ README.md
4
+ setup.py
5
+ componentsDjangoType/__init__.py
6
+ componentsDjangoType.egg-info/PKG-INFO
7
+ componentsDjangoType.egg-info/SOURCES.txt
8
+ componentsDjangoType.egg-info/dependency_links.txt
9
+ componentsDjangoType.egg-info/requires.txt
10
+ componentsDjangoType.egg-info/top_level.txt
11
+ componentsDjangoType/management/__init__.py
12
+ componentsDjangoType/management/commands/__init__.py
13
+ componentsDjangoType/management/commands/createApp.py
14
+ componentsDjangoType/management/commands/createcomponent.py
15
+ componentsDjangoType/management/commands/utils/css/authentication.css
16
+ componentsDjangoType/management/commands/utils/js/alertErrors.js
17
+ componentsDjangoType/management/commands/utils/layouts/index.html
18
+ componentsDjangoType/management/commands/utils/pages/home.html
19
+ componentsDjangoType/management/commands/utils/pages/logged.html
20
+ componentsDjangoType/management/commands/utils/pages/login.html
21
+ componentsDjangoType/management/commands/utils/pages/singup.html
@@ -2,7 +2,7 @@ from setuptools import setup, find_packages
2
2
 
3
3
  setup(
4
4
  name='componentsDjangoType',
5
- version='1.0.0',
5
+ version='1.0.1',
6
6
  packages=find_packages(),
7
7
  include_package_data=True,
8
8
  license='MIT',
@@ -1,14 +0,0 @@
1
- LICENSE
2
- MANIFEST.in
3
- README.md
4
- setup.py
5
- componentsDjangoType/__init__.py
6
- componentsDjangoType.egg-info/PKG-INFO
7
- componentsDjangoType.egg-info/SOURCES.txt
8
- componentsDjangoType.egg-info/dependency_links.txt
9
- componentsDjangoType.egg-info/requires.txt
10
- componentsDjangoType.egg-info/top_level.txt
11
- componentsDjangoType/management/__init__.py
12
- componentsDjangoType/management/commands/__init__.py
13
- componentsDjangoType/management/commands/createcomponent.py
14
- componentsDjangoType/management/commands/createcomponentApp.py