create-template-html-css 1.7.0 → 1.8.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +102 -0
- package/COMPONENTS-GALLERY.html +773 -0
- package/PUBLISH-GUIDE.md +112 -0
- package/README.md +177 -1
- package/bin/cli.js +153 -5
- package/create-template-html-css-1.8.0.tgz +0 -0
- package/package.json +3 -2
- package/src/generator.js +204 -3
- package/src/inserter.js +7 -1
- package/templates/login/index.html +58 -0
- package/templates/login/script.js +83 -0
- package/templates/login/style.css +232 -0
- package/templates/navigation/index.html +51 -0
- package/templates/navigation/script.js +109 -3
- package/templates/navigation/style.css +269 -0
- package/templates/register/index.html +85 -0
- package/templates/register/script.js +205 -0
- package/templates/register/style.css +298 -0
- package/templates/skeleton/index.html +115 -0
- package/templates/skeleton/script.js +28 -0
- package/templates/skeleton/style.css +409 -0
- package/demo/css/accordion-component.css +0 -135
- package/demo/css/button-component.css +0 -110
- package/demo/css/card-component.css +0 -381
- package/demo/index.html +0 -169
- package/demo/js/accordion-component.js +0 -31
- package/demo/js/button-component.js +0 -17
- package/demo/js/card-component.js +0 -124
|
@@ -1,124 +0,0 @@
|
|
|
1
|
-
// CARD Component Script
|
|
2
|
-
|
|
3
|
-
document.addEventListener('DOMContentLoaded', function() {
|
|
4
|
-
// Action buttons functionality
|
|
5
|
-
const actionBtns = document.querySelectorAll('.action-btn');
|
|
6
|
-
actionBtns.forEach(btn => {
|
|
7
|
-
btn.addEventListener('click', function(e) {
|
|
8
|
-
e.stopPropagation();
|
|
9
|
-
const action = this.getAttribute('data-action');
|
|
10
|
-
const card = this.closest('.card');
|
|
11
|
-
|
|
12
|
-
if (action === 'like') {
|
|
13
|
-
this.classList.toggle('liked');
|
|
14
|
-
this.textContent = this.classList.contains('liked') ? '❤️ Liked' : '🤍 Like';
|
|
15
|
-
} else if (action === 'share') {
|
|
16
|
-
showNotification('Shared!');
|
|
17
|
-
} else if (action === 'save') {
|
|
18
|
-
this.classList.toggle('saved');
|
|
19
|
-
this.textContent = this.classList.contains('saved') ? '✓ Saved' : '🔖 Save';
|
|
20
|
-
}
|
|
21
|
-
});
|
|
22
|
-
});
|
|
23
|
-
|
|
24
|
-
// Social buttons functionality
|
|
25
|
-
const socialBtns = document.querySelectorAll('.social-btn');
|
|
26
|
-
socialBtns.forEach(btn => {
|
|
27
|
-
btn.addEventListener('click', function(e) {
|
|
28
|
-
e.preventDefault();
|
|
29
|
-
const platform = this.getAttribute('data-platform');
|
|
30
|
-
showNotification(`Opening ${platform}...`);
|
|
31
|
-
});
|
|
32
|
-
});
|
|
33
|
-
|
|
34
|
-
// Tags click functionality
|
|
35
|
-
const tags = document.querySelectorAll('.tag');
|
|
36
|
-
tags.forEach(tag => {
|
|
37
|
-
tag.style.cursor = 'pointer';
|
|
38
|
-
tag.addEventListener('click', function() {
|
|
39
|
-
showNotification(`Filtered by: ${this.textContent}`);
|
|
40
|
-
});
|
|
41
|
-
});
|
|
42
|
-
|
|
43
|
-
// Card click animations
|
|
44
|
-
const cards = document.querySelectorAll('.card');
|
|
45
|
-
cards.forEach(card => {
|
|
46
|
-
card.addEventListener('mousedown', function() {
|
|
47
|
-
this.style.transition = 'all 0.1s ease';
|
|
48
|
-
});
|
|
49
|
-
card.addEventListener('mouseup', function() {
|
|
50
|
-
this.style.transition = 'all 0.3s cubic-bezier(0.4, 0, 0.2, 1)';
|
|
51
|
-
});
|
|
52
|
-
});
|
|
53
|
-
|
|
54
|
-
// Categories click
|
|
55
|
-
const categories = document.querySelectorAll('.card-category');
|
|
56
|
-
categories.forEach(cat => {
|
|
57
|
-
cat.style.cursor = 'pointer';
|
|
58
|
-
cat.addEventListener('click', function(e) {
|
|
59
|
-
e.stopPropagation();
|
|
60
|
-
showNotification(`Category: ${this.textContent}`);
|
|
61
|
-
});
|
|
62
|
-
});
|
|
63
|
-
|
|
64
|
-
// Notification system
|
|
65
|
-
function showNotification(message) {
|
|
66
|
-
const notification = document.createElement('div');
|
|
67
|
-
notification.style.cssText = `
|
|
68
|
-
position: fixed;
|
|
69
|
-
top: 20px;
|
|
70
|
-
right: 20px;
|
|
71
|
-
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
|
|
72
|
-
color: white;
|
|
73
|
-
padding: 15px 25px;
|
|
74
|
-
border-radius: 8px;
|
|
75
|
-
font-weight: 600;
|
|
76
|
-
z-index: 9999;
|
|
77
|
-
animation: slideInRight 0.3s ease;
|
|
78
|
-
box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
|
|
79
|
-
`;
|
|
80
|
-
notification.textContent = message;
|
|
81
|
-
document.body.appendChild(notification);
|
|
82
|
-
|
|
83
|
-
setTimeout(() => {
|
|
84
|
-
notification.style.animation = 'slideOutRight 0.3s ease';
|
|
85
|
-
setTimeout(() => notification.remove(), 300);
|
|
86
|
-
}, 2000);
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
// Add animation styles
|
|
90
|
-
if (!document.getElementById('card-animations')) {
|
|
91
|
-
const style = document.createElement('style');
|
|
92
|
-
style.id = 'card-animations';
|
|
93
|
-
style.textContent = `
|
|
94
|
-
@keyframes slideInRight {
|
|
95
|
-
from {
|
|
96
|
-
opacity: 0;
|
|
97
|
-
transform: translateX(100px);
|
|
98
|
-
}
|
|
99
|
-
to {
|
|
100
|
-
opacity: 1;
|
|
101
|
-
transform: translateX(0);
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
@keyframes slideOutRight {
|
|
105
|
-
from {
|
|
106
|
-
opacity: 1;
|
|
107
|
-
transform: translateX(0);
|
|
108
|
-
}
|
|
109
|
-
to {
|
|
110
|
-
opacity: 0;
|
|
111
|
-
transform: translateX(100px);
|
|
112
|
-
}
|
|
113
|
-
}
|
|
114
|
-
.action-btn.liked, .action-btn.saved {
|
|
115
|
-
border-color: #667eea;
|
|
116
|
-
background: rgba(102, 126, 234, 0.1);
|
|
117
|
-
color: #667eea;
|
|
118
|
-
}
|
|
119
|
-
`;
|
|
120
|
-
document.head.appendChild(style);
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
console.log('✨ Card interactions loaded successfully!');
|
|
124
|
-
});
|