sun-sword 0.0.9 → 0.0.11
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.
- checksums.yaml +4 -4
- data/Gemfile +12 -0
- data/Gemfile.lock +193 -0
- data/README.md +42 -16
- data/lib/generators/sun_sword/USAGE +1 -0
- data/lib/generators/sun_sword/frontend_generator.rb +7 -6
- data/lib/generators/sun_sword/scaffold_generator.rb +35 -17
- data/lib/generators/sun_sword/templates_frontend/controllers/application_controller.rb.tt +5 -1
- data/lib/generators/sun_sword/templates_frontend/frontend/entrypoints/application.js +1 -1
- data/lib/generators/sun_sword/templates_frontend/frontend/pages/web.js +103 -101
- data/lib/generators/sun_sword/templates_frontend/frontend/stylesheets/application.css +221 -0
- data/lib/generators/sun_sword/templates_frontend/views/components/_action_destroy.html.erb.tt +1 -1
- data/lib/generators/sun_sword/templates_frontend/views/layouts/application.html.erb.tt +1 -2
- data/lib/generators/sun_sword/templates_frontend/views/layouts/dashboard/application.html.erb.tt +10 -3
- data/lib/generators/sun_sword/templates_frontend/vite.config.ts.tt +3 -7
- data/lib/sun_sword/version.rb +1 -1
- metadata +111 -22
- data/.rspec +0 -3
- data/.rubocop.yml +0 -1141
- data/lib/generators/sun_sword/templates_frontend/frontend/stylesheets/application.scss +0 -198
- data/lib/generators/sun_sword/templates_frontend/postcss.config.js +0 -6
- data/lib/generators/sun_sword/templates_frontend/tailwind.config.js +0 -39
@@ -1,198 +0,0 @@
|
|
1
|
-
@use "tailwindcss/base";
|
2
|
-
@use "tailwindcss/components";
|
3
|
-
@use "tailwindcss/utilities";
|
4
|
-
|
5
|
-
@layer base {
|
6
|
-
* {
|
7
|
-
box-sizing: border-box;
|
8
|
-
}
|
9
|
-
|
10
|
-
*:before,
|
11
|
-
*:after {
|
12
|
-
box-sizing: border-box;
|
13
|
-
}
|
14
|
-
|
15
|
-
html {
|
16
|
-
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
|
17
|
-
}
|
18
|
-
|
19
|
-
body {
|
20
|
-
font-family: "Open Sans", sans-serif;
|
21
|
-
font-size: 1.6rem;
|
22
|
-
line-height: 1.75;
|
23
|
-
font-weight: 300;
|
24
|
-
color: #303030;
|
25
|
-
letter-spacing: 0.045em;
|
26
|
-
background-color: #fbfbfb;
|
27
|
-
}
|
28
|
-
|
29
|
-
.tooltip {
|
30
|
-
position: relative;
|
31
|
-
}
|
32
|
-
|
33
|
-
strong {
|
34
|
-
font-weight: 500;
|
35
|
-
}
|
36
|
-
|
37
|
-
.tooltip::before {
|
38
|
-
content: "";
|
39
|
-
position: absolute;
|
40
|
-
top: -6px;
|
41
|
-
left: 50%;
|
42
|
-
transform: translateX(-50%);
|
43
|
-
border-width: 4px 6px 0 6px;
|
44
|
-
border-style: solid;
|
45
|
-
border-color: rgba(0, 0, 0, 0.7) transparent transparent transparent;
|
46
|
-
z-index: 99;
|
47
|
-
opacity: 0;
|
48
|
-
transition: .3s opacity;
|
49
|
-
}
|
50
|
-
|
51
|
-
[tooltip-position='left']::before {
|
52
|
-
left: 0%;
|
53
|
-
top: 50%;
|
54
|
-
margin-left: -12px;
|
55
|
-
transform: translatey(-50%) rotate(-90deg)
|
56
|
-
}
|
57
|
-
|
58
|
-
[tooltip-position='top']::before {
|
59
|
-
left: 50%;
|
60
|
-
}
|
61
|
-
|
62
|
-
[tooltip-position='buttom']::before {
|
63
|
-
top: 100%;
|
64
|
-
margin-top: 8px;
|
65
|
-
transform: translateX(-50%) translatey(-100%) rotate(-180deg)
|
66
|
-
}
|
67
|
-
|
68
|
-
[tooltip-position='right']::before {
|
69
|
-
left: 100%;
|
70
|
-
top: 50%;
|
71
|
-
margin-left: 1px;
|
72
|
-
transform: translatey(-50%) rotate(90deg)
|
73
|
-
}
|
74
|
-
|
75
|
-
.tooltip::after {
|
76
|
-
content: attr(data-text);
|
77
|
-
position: absolute;
|
78
|
-
min-width: 10rem;
|
79
|
-
left: 50%;
|
80
|
-
top: -6px;
|
81
|
-
transform: translateX(-50%) translateY(-100%);
|
82
|
-
background: rgba(0, 0, 0, 0.7);
|
83
|
-
text-align: center;
|
84
|
-
color: #fff;
|
85
|
-
font-size: 12px;
|
86
|
-
border-radius: 5px;
|
87
|
-
pointer-events: none;
|
88
|
-
padding: 4px 4px;
|
89
|
-
z-index: 99;
|
90
|
-
opacity: 0;
|
91
|
-
transition: .3s opacity;
|
92
|
-
}
|
93
|
-
|
94
|
-
[tooltip-position='left']::after {
|
95
|
-
left: 0;
|
96
|
-
top: 50%;
|
97
|
-
margin-left: -8px;
|
98
|
-
transform: translateX(-100%) translateY(-50%);
|
99
|
-
}
|
100
|
-
|
101
|
-
[tooltip-position='top']::after {
|
102
|
-
left: 50%;
|
103
|
-
}
|
104
|
-
|
105
|
-
[tooltip-position='buttom']::after {
|
106
|
-
top: 100%;
|
107
|
-
margin-top: 8px;
|
108
|
-
transform: translateX(-50%) translateY(0%);
|
109
|
-
}
|
110
|
-
|
111
|
-
[tooltip-position='right']::after {
|
112
|
-
left: 100%;
|
113
|
-
top: 50%;
|
114
|
-
margin-left: 8px;
|
115
|
-
transform: translateX(0%) translateY(-50%);
|
116
|
-
}
|
117
|
-
|
118
|
-
.tooltip:hover::after, .tooltip:hover::before {
|
119
|
-
opacity: 1
|
120
|
-
}
|
121
|
-
|
122
|
-
|
123
|
-
pre {
|
124
|
-
white-space: pre-wrap;
|
125
|
-
word-wrap: break-word;
|
126
|
-
}
|
127
|
-
|
128
|
-
//#------------
|
129
|
-
h1 {
|
130
|
-
@apply text-2xl;
|
131
|
-
}
|
132
|
-
|
133
|
-
h2 {
|
134
|
-
@apply text-xl;
|
135
|
-
}
|
136
|
-
|
137
|
-
h3 {
|
138
|
-
@apply text-lg;
|
139
|
-
}
|
140
|
-
|
141
|
-
.class-button {
|
142
|
-
@apply rounded-md px-3 py-2 text-center text-sm font-semibold text-white shadow-sm focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2;
|
143
|
-
@apply focus-visible:outline-gray-500 bg-gray-500 hover:bg-white hover:text-gray-500 hover:border-gray-50 hover:outline;
|
144
|
-
}
|
145
|
-
|
146
|
-
.class-button-outline {
|
147
|
-
@apply rounded-md px-3 py-2 text-center text-sm font-semibold text-gray-500 shadow-sm focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2;
|
148
|
-
@apply outline outline-1 border-gray-500 focus-visible:outline-gray-500 bg-white hover:bg-gray-500 hover:text-white hover:border-gray-500 hover:outline;
|
149
|
-
}
|
150
|
-
|
151
|
-
.class-label {
|
152
|
-
@apply text-sm font-semibold leading-6 text-gray-900;
|
153
|
-
}
|
154
|
-
|
155
|
-
.class-text-field {
|
156
|
-
@apply block w-full rounded-md border-0 py-1.5 text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 placeholder:text-gray-400 focus:ring-2 focus:ring-inset focus:ring-indigo-600 sm:text-sm sm:leading-6;
|
157
|
-
}
|
158
|
-
|
159
|
-
.class-card-container {
|
160
|
-
@apply overflow-hidden bg-white shadow sm:rounded-lg p-5
|
161
|
-
}
|
162
|
-
|
163
|
-
.class-input {
|
164
|
-
@apply sm:grid sm:grid-cols-3 sm:items-start sm:gap-4 sm:py-6 pl-2
|
165
|
-
}
|
166
|
-
|
167
|
-
.class-tr {
|
168
|
-
@apply top-0 z-10 border-b border-gray-300 bg-white bg-opacity-75 px-3 py-3.5 text-left text-sm font-semibold text-gray-900 lg:table-cell
|
169
|
-
}
|
170
|
-
|
171
|
-
.class-td {
|
172
|
-
@apply whitespace-nowrap px-3 py-5 text-sm text-gray-500
|
173
|
-
}
|
174
|
-
|
175
|
-
.class-menu-link {
|
176
|
-
@apply hover:font-semibold hover:text-gray-500 block rounded-md py-2 pr-2 pl-9 text-sm leading-6 text-gray-700
|
177
|
-
}
|
178
|
-
|
179
|
-
.class-text-link {
|
180
|
-
@apply hover:font-semibold hover:text-gray-500 block rounded-md text-sm leading-6 text-gray-700
|
181
|
-
}
|
182
|
-
|
183
|
-
.class-menu-active-link {
|
184
|
-
@apply font-semibold block rounded-md py-2 pr-2 pl-9 text-sm leading-6 text-gray-700
|
185
|
-
}
|
186
|
-
}
|
187
|
-
|
188
|
-
@layer utilities {
|
189
|
-
/* Chrome, Safari and Opera */
|
190
|
-
.no-scrollbar::-webkit-scrollbar {
|
191
|
-
display: none;
|
192
|
-
}
|
193
|
-
|
194
|
-
.no-scrollbar {
|
195
|
-
-ms-overflow-style: none; /* IE and Edge */
|
196
|
-
scrollbar-width: none; /* Firefox */
|
197
|
-
}
|
198
|
-
}
|
@@ -1,39 +0,0 @@
|
|
1
|
-
/** @type {import('tailwindcss').Config} */
|
2
|
-
const defaultTheme = require('tailwindcss/defaultTheme')
|
3
|
-
|
4
|
-
module.exports = {
|
5
|
-
content: [
|
6
|
-
'./app/helpers/**/*.rb',
|
7
|
-
'./app/views/**/*.{.erb,erb}',
|
8
|
-
'./app/frontend/**/*.{js, css, scss, ejs}',
|
9
|
-
],
|
10
|
-
theme: {
|
11
|
-
screens: {
|
12
|
-
'sm': '640px',
|
13
|
-
// => @media (min-width: 640px) { ... }
|
14
|
-
|
15
|
-
'md': '768px',
|
16
|
-
// => @media (min-width: 768px) { ... }
|
17
|
-
|
18
|
-
'lg': '1024px',
|
19
|
-
// => @media (min-width: 1024px) { ... }
|
20
|
-
|
21
|
-
'xl': '1280px',
|
22
|
-
// => @media (min-width: 1280px) { ... }
|
23
|
-
|
24
|
-
'2xl': '1536px',
|
25
|
-
// => @media (min-width: 1536px) { ... }
|
26
|
-
},
|
27
|
-
extend: {
|
28
|
-
fontFamily: {
|
29
|
-
sans: ['Open Sans', ...defaultTheme.fontFamily.sans],
|
30
|
-
},
|
31
|
-
},
|
32
|
-
},
|
33
|
-
plugins: [
|
34
|
-
require('@tailwindcss/aspect-ratio'),
|
35
|
-
require('@tailwindcss/forms'),
|
36
|
-
require('@tailwindcss/typography'),
|
37
|
-
],
|
38
|
-
}
|
39
|
-
|