@phantompixeldev/retrocss 1.0.0
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/README.md +171 -0
- package/dist/retro.css +5346 -0
- package/dist/retro.css.map +1 -0
- package/dist/retro.js +1251 -0
- package/dist/retro.min.css +1 -0
- package/dist/retro.min.css.map +1 -0
- package/dist/retro.min.js +11 -0
- package/package.json +51 -0
package/README.md
ADDED
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
# RetroCSS
|
|
2
|
+
|
|
3
|
+
A retro-inspired CSS framework that brings the nostalgic Windows 95/98 aesthetic to modern web applications.
|
|
4
|
+
|
|
5
|
+
## Features
|
|
6
|
+
|
|
7
|
+
- **Authentic Retro Look**: Carefully crafted to mimic the classic Windows 95/98 UI
|
|
8
|
+
- **Modern CSS**: Built with modern CSS features while maintaining the retro aesthetic
|
|
9
|
+
- **Responsive**: Works on all screen sizes while preserving the retro feel
|
|
10
|
+
- **Modular JS**: Organized component-based JavaScript architecture using ES modules
|
|
11
|
+
- **Dark Mode**: Built-in dark mode support
|
|
12
|
+
- **Accessible**: Designed with accessibility in mind
|
|
13
|
+
- **Data Attribute API**: Use data attributes for easy component triggers (modals, toasts, tooltips, etc.)
|
|
14
|
+
- **Beautiful Examples**: Includes dashboard, blog, login, register, and more, all with retro style
|
|
15
|
+
|
|
16
|
+
## Installation
|
|
17
|
+
|
|
18
|
+
### NPM
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
npm install retrocss
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
### CDN
|
|
25
|
+
|
|
26
|
+
```html
|
|
27
|
+
<!-- CSS -->
|
|
28
|
+
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/retrocss/dist/retro.min.css">
|
|
29
|
+
|
|
30
|
+
<!-- JavaScript -->
|
|
31
|
+
<script src="https://cdn.jsdelivr.net/npm/retrocss/dist/retro.min.js"></script>
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
### Download
|
|
35
|
+
|
|
36
|
+
Download the latest release from GitHub and include the CSS and JS files in your project:
|
|
37
|
+
|
|
38
|
+
```html
|
|
39
|
+
<link rel="stylesheet" href="path/to/retro.min.css">
|
|
40
|
+
<script src="path/to/retro.min.js"></script>
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
## Usage
|
|
44
|
+
|
|
45
|
+
RetroCSS provides a wide range of components and utilities to build retro-styled interfaces:
|
|
46
|
+
|
|
47
|
+
```html
|
|
48
|
+
<div class="retro-card">
|
|
49
|
+
<div class="retro-card-header">Windows 95</div>
|
|
50
|
+
<div class="retro-card-content">
|
|
51
|
+
<p>Welcome to RetroCSS!</p>
|
|
52
|
+
<button class="retro-btn retro-btn-primary">OK</button>
|
|
53
|
+
</div>
|
|
54
|
+
</div>
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
See the [documentation](documentation.html) for detailed usage instructions and examples.
|
|
58
|
+
|
|
59
|
+
### Example Pages
|
|
60
|
+
|
|
61
|
+
Check out the beautiful, ready-to-use examples in the `examples/` folder:
|
|
62
|
+
|
|
63
|
+
- [Dashboard](examples/dashboard.html)
|
|
64
|
+
- [Blog](examples/blog.html)
|
|
65
|
+
- [Blog Post](examples/blog-post.html)
|
|
66
|
+
- [Login](examples/login.html)
|
|
67
|
+
- [Register](examples/register.html)
|
|
68
|
+
|
|
69
|
+
Each page demonstrates best practices, retro layouts, and interactive components.
|
|
70
|
+
|
|
71
|
+
## JavaScript Architecture & Data Attribute API
|
|
72
|
+
|
|
73
|
+
RetroCSS uses a modular JavaScript architecture with ES modules. All interactive components can be triggered via JavaScript or data attributes:
|
|
74
|
+
|
|
75
|
+
```javascript
|
|
76
|
+
// Import all components (bundled version)
|
|
77
|
+
import RetroCSS from 'retrocss';
|
|
78
|
+
|
|
79
|
+
// Initialize all components
|
|
80
|
+
RetroCSS.init();
|
|
81
|
+
|
|
82
|
+
// Use individual components
|
|
83
|
+
RetroCSS.modal.show('myModal');
|
|
84
|
+
RetroCSS.toast.show('Hello World', { type: 'success' });
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
**Data Attribute API Example:**
|
|
88
|
+
|
|
89
|
+
```html
|
|
90
|
+
<!-- Show a toast on click -->
|
|
91
|
+
<button data-retro-toast="Hello from RetroCSS!">Show Toast</button>
|
|
92
|
+
|
|
93
|
+
<!-- Show a modal on click -->
|
|
94
|
+
<button data-retro-modal="myModal">Open Modal</button>
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
## HTML Toasts
|
|
98
|
+
|
|
99
|
+
Show toast notifications with rich HTML content:
|
|
100
|
+
|
|
101
|
+
```html
|
|
102
|
+
<button
|
|
103
|
+
data-retro-toast="<b>Custom Toast</b><br>With <i>HTML</i> content!"
|
|
104
|
+
data-retro-toast-html>
|
|
105
|
+
Show Custom Toast
|
|
106
|
+
</button>
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
Or via JavaScript:
|
|
110
|
+
|
|
111
|
+
```javascript
|
|
112
|
+
RetroCSS.toast.show('<b>Custom Toast</b><br>With <i>HTML</i> content!', { html: true });
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
> **Note:** Only use trusted HTML for toasts. HTML toasts get a `.retro-toast-html` class for custom styling.
|
|
116
|
+
|
|
117
|
+
## Customization
|
|
118
|
+
|
|
119
|
+
RetroCSS can be customized using CSS variables:
|
|
120
|
+
|
|
121
|
+
```css
|
|
122
|
+
:root {
|
|
123
|
+
--retro-primary: #0000aa;
|
|
124
|
+
--retro-success: #008000;
|
|
125
|
+
--retro-danger: #ff0000;
|
|
126
|
+
--retro-body-bg: #c0c0c0;
|
|
127
|
+
/* And many more variables */
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
/* Dark mode customization */
|
|
131
|
+
[data-theme="dark"] {
|
|
132
|
+
--retro-body-bg: #3a3a3a;
|
|
133
|
+
--retro-primary: #00aaff;
|
|
134
|
+
/* Override other variables for dark mode */
|
|
135
|
+
}
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
## Browser Support
|
|
139
|
+
|
|
140
|
+
RetroCSS supports all modern browsers:
|
|
141
|
+
|
|
142
|
+
- Chrome/Edge (latest)
|
|
143
|
+
- Firefox (latest)
|
|
144
|
+
- Safari (latest)
|
|
145
|
+
- Opera (latest)
|
|
146
|
+
|
|
147
|
+
## Development
|
|
148
|
+
|
|
149
|
+
Clone the repository:
|
|
150
|
+
|
|
151
|
+
```bash
|
|
152
|
+
git clone https://github.com/phantompixeldev/retrocss.git
|
|
153
|
+
cd retrocss
|
|
154
|
+
npm install
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
Build the project:
|
|
158
|
+
|
|
159
|
+
```bash
|
|
160
|
+
npm run build
|
|
161
|
+
```
|
|
162
|
+
|
|
163
|
+
Watch for changes:
|
|
164
|
+
|
|
165
|
+
```bash
|
|
166
|
+
npm run watch
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
## License
|
|
170
|
+
|
|
171
|
+
MIT
|