Skip to content

Commit 5031a86

Browse files
committed
Remove redundant code
I saw no difference visually or in functionality after removing this code.
1 parent 5be3481 commit 5031a86

File tree

1 file changed

+3
-158
lines changed

1 file changed

+3
-158
lines changed

app/views/layouts/session.html.erb

Lines changed: 3 additions & 158 deletions
Original file line numberDiff line numberDiff line change
@@ -29,116 +29,6 @@
2929
<body style="background: #f8f9fa;">
3030
<script src="https://cdn.jsdelivr.net/gh/zuramai/mazer@docs/demo/assets/static/js/initTheme.js"></script>
3131

32-
<style>
33-
/* Modern form styling */
34-
.form-control:focus {
35-
border-color: #667eea;
36-
box-shadow: 0 0 0 0.25rem rgba(102, 126, 234, 0.25);
37-
}
38-
39-
.form-floating > .form-control:focus ~ label,
40-
.form-floating > .form-control:not(:placeholder-shown) ~ label {
41-
opacity: 0.65;
42-
transform: scale(0.85) translateY(-0.5rem) translateX(0.15rem);
43-
color: #667eea;
44-
}
45-
46-
/* Button animations */
47-
.btn {
48-
transition: all 0.3s ease;
49-
transform: translateY(0);
50-
}
51-
52-
.btn:hover {
53-
transform: translateY(-2px);
54-
box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
55-
}
56-
57-
.btn:active {
58-
transform: translateY(0);
59-
}
60-
61-
/* Card animations */
62-
.auth-card {
63-
animation: fadeInUp 0.6s ease-out;
64-
}
65-
66-
@keyframes fadeInUp {
67-
from {
68-
opacity: 0;
69-
transform: translateY(30px);
70-
}
71-
to {
72-
opacity: 1;
73-
transform: translateY(0);
74-
}
75-
}
76-
77-
/* Background patterns */
78-
.pattern-bg {
79-
background-image:
80-
radial-gradient(circle at 25% 25%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
81-
radial-gradient(circle at 75% 75%, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
82-
}
83-
84-
/* Loading states */
85-
.btn.loading {
86-
pointer-events: none;
87-
opacity: 0.7;
88-
}
89-
90-
.btn.loading::after {
91-
content: "";
92-
display: inline-block;
93-
width: 16px;
94-
height: 16px;
95-
margin-left: 10px;
96-
border: 2px solid transparent;
97-
border-top-color: currentColor;
98-
border-radius: 50%;
99-
animation: spin 1s linear infinite;
100-
}
101-
102-
@keyframes spin {
103-
0% { transform: rotate(0deg); }
104-
100% { transform: rotate(360deg); }
105-
}
106-
107-
/* Alert animations */
108-
.alert {
109-
animation: slideInRight 0.5s ease-out;
110-
}
111-
112-
@keyframes slideInRight {
113-
from {
114-
opacity: 0;
115-
transform: translateX(100%);
116-
}
117-
to {
118-
opacity: 1;
119-
transform: translateX(0);
120-
}
121-
}
122-
123-
/* Form validation styling */
124-
.form-control.is-invalid {
125-
border-color: #dc3545;
126-
box-shadow: 0 0 0 0.25rem rgba(220, 53, 69, 0.25);
127-
}
128-
129-
.form-control.is-valid {
130-
border-color: #198754;
131-
box-shadow: 0 0 0 0.25rem rgba(25, 135, 84, 0.25);
132-
}
133-
134-
/* Responsive adjustments */
135-
@media (max-width: 991.98px) {
136-
.auth-card {
137-
margin: 2rem 1rem;
138-
}
139-
}
140-
</style>
141-
14232
<!-- Start content here -->
14333
<%= yield %>
14434
<!-- End content -->
@@ -151,55 +41,10 @@
15141
<!-- Need: Apexcharts -->
15242
<script src="https://cdn.jsdelivr.net/gh/zuramai/mazer@docs/demo/assets/extensions/apexcharts/apexcharts.min.js"></script>
15343
<script src="https://cdn.jsdelivr.net/gh/zuramai/mazer@docs/demo/assets/static/js/pages/dashboard.js"></script>
154-
44+
15545
<script>
156-
// Form validation
157-
(function() {
158-
'use strict';
159-
window.addEventListener('load', function() {
160-
var forms = document.getElementsByClassName('needs-validation');
161-
var validation = Array.prototype.filter.call(forms, function(form) {
162-
form.addEventListener('submit', function(event) {
163-
if (form.checkValidity() === false) {
164-
event.preventDefault();
165-
event.stopPropagation();
166-
} else {
167-
// Add loading state to submit button
168-
const submitBtn = form.querySelector('input[type="submit"], button[type="submit"]');
169-
if (submitBtn) {
170-
submitBtn.classList.add('loading');
171-
submitBtn.disabled = true;
172-
}
173-
}
174-
form.classList.add('was-validated');
175-
}, false);
176-
});
177-
}, false);
178-
})();
179-
180-
// Auto-dismiss alerts after 5 seconds
181-
setTimeout(function() {
182-
const alerts = document.querySelectorAll('.alert');
183-
alerts.forEach(alert => {
184-
const bsAlert = new bootstrap.Alert(alert);
185-
bsAlert.close();
186-
});
187-
}, 5000);
188-
18946
// Enhanced form interactions
19047
document.addEventListener('DOMContentLoaded', function() {
191-
// Add focus effects to form controls
192-
const formControls = document.querySelectorAll('.form-control');
193-
formControls.forEach(control => {
194-
control.addEventListener('focus', function() {
195-
this.parentElement.classList.add('focused');
196-
});
197-
198-
control.addEventListener('blur', function() {
199-
this.parentElement.classList.remove('focused');
200-
});
201-
});
202-
20348
// Password visibility toggle (if needed)
20449
const passwordFields = document.querySelectorAll('input[type="password"]');
20550
passwordFields.forEach(field => {
@@ -210,10 +55,10 @@
21055
toggleBtn.style.zIndex = '10';
21156
toggleBtn.style.border = 'none';
21257
toggleBtn.style.background = 'none';
213-
58+
21459
field.parentElement.style.position = 'relative';
21560
field.parentElement.appendChild(toggleBtn);
216-
61+
21762
toggleBtn.addEventListener('click', function() {
21863
const type = field.getAttribute('type') === 'password' ? 'text' : 'password';
21964
field.setAttribute('type', type);

0 commit comments

Comments
 (0)