bullet_train-themes-light 1.2.27 → 1.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/stylesheets/light/actiontext.css +10 -0
- data/app/assets/stylesheets/light/application.css +6 -12
- data/app/assets/stylesheets/light/fields/super_select.css +5 -1
- data/app/assets/stylesheets/light/fields/trix_editor.css +61 -11
- data/app/assets/stylesheets/light/tailwind/utilities/billing.css +4 -4
- data/app/views/showcase/engine/_head.html.erb +7 -0
- data/app/views/showcase/previews/partials/_breadcrumb.html.erb +3 -4
- data/app/views/showcase/previews/tailwind/utilities/_spacing.html.erb +17 -1
- data/app/views/themes/light/_alert.html.erb +2 -2
- data/app/views/themes/light/actions/_action.html.erb +7 -7
- data/app/views/themes/light/attributes/_block.html.erb +2 -2
- data/app/views/themes/light/attributes/_progress_bar.html.erb +1 -1
- data/app/views/themes/light/conversations/_card.html.erb +1 -1
- data/app/views/themes/light/conversations/_comment.html.erb +2 -1
- data/app/views/themes/light/conversations/_message.html.erb +2 -2
- data/app/views/themes/light/fields/_field.html.erb +17 -17
- data/app/views/themes/light/layouts/_pricing.html.erb +2 -2
- data/app/views/themes/light/menu/_close.html.erb +1 -1
- data/app/views/themes/light/menu/_item.html.erb +2 -2
- data/app/views/themes/light/menu/_open.html.erb +2 -2
- data/app/views/themes/light/menu/_subsection.html.erb +1 -1
- data/config/locales/en/action_models.en.yml +9 -0
- data/config/locales/en/conversations.en.yml +4 -0
- data/config/locales/en/navigation.en.yml +5 -0
- data/lib/bullet_train/themes/light/version.rb +1 -1
- data/lib/bullet_train/themes/light.rb +0 -1
- data/lib/tasks/application.rb +74 -7
- metadata +10 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 57383918ec8982b8d1c683609afb6a4447f42b37b04ae2371cb07447124090ae
|
4
|
+
data.tar.gz: e9b4d5fe69371f927b5661815716e931bd57a250fa7175ad7fd9df53bed52f9c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 491867d08206664c8869576d1ada071562f83400c0cc79bc274ac3e8c2994723ebd46d1d16a5470cb9156e1bfbc263c3cb3a3acdbc0ecab7b969d028dcf08586
|
7
|
+
data.tar.gz: 0176eeed1f1668ade63d167ab9c326c5eaf47ef50968a759fea55d398f4e6108652e7eaad04afda1c669eea1874607056ad0a057148624d1ffa9edf7493bac46
|
@@ -17,6 +17,16 @@
|
|
17
17
|
}
|
18
18
|
}
|
19
19
|
|
20
|
+
/* Override Tailwind's preflight styles */
|
21
|
+
/* https://github.com/tailwindlabs/tailwindcss/issues/989#issuecomment-506555308 */
|
22
|
+
ul {
|
23
|
+
list-style-type: disc;
|
24
|
+
}
|
25
|
+
|
26
|
+
ol {
|
27
|
+
list-style-type: decimal;
|
28
|
+
}
|
29
|
+
|
20
30
|
action-text-attachment {
|
21
31
|
.attachment {
|
22
32
|
padding: 0 !important;
|
@@ -9,18 +9,6 @@
|
|
9
9
|
@import './fields';
|
10
10
|
@import './turn';
|
11
11
|
|
12
|
-
/* TODO We should be able to do this in Tailwind CSS. */
|
13
|
-
.hover-indent-child {
|
14
|
-
.indent-child {
|
15
|
-
transition: transform 0.2s ease;
|
16
|
-
}
|
17
|
-
&:hover {
|
18
|
-
.indent-child {
|
19
|
-
transform:translateX(8px);
|
20
|
-
}
|
21
|
-
}
|
22
|
-
}
|
23
|
-
|
24
12
|
form.button_to {
|
25
13
|
@apply inline-block;
|
26
14
|
input[type=submit] {
|
@@ -33,3 +21,9 @@ form.button_to {
|
|
33
21
|
|
34
22
|
/* hide the first breadcrumb chevron */
|
35
23
|
ol.breadcrumb li:first-child svg { display: none; }
|
24
|
+
|
25
|
+
/* Override Turbo's progress bar color with the application's theme. */
|
26
|
+
.turbo-progress-bar {
|
27
|
+
height: 5px;
|
28
|
+
@apply bg-primary-500;
|
29
|
+
}
|
@@ -39,6 +39,10 @@
|
|
39
39
|
}
|
40
40
|
}
|
41
41
|
|
42
|
+
.select2-results__option--highlighted {
|
43
|
+
@apply bg-primary-400 !important;
|
44
|
+
}
|
45
|
+
|
42
46
|
@layer components {
|
43
47
|
.select2-container {
|
44
48
|
@apply w-full;
|
@@ -89,7 +93,7 @@
|
|
89
93
|
|
90
94
|
.select2-container .select2-dropdown {
|
91
95
|
@apply border-2 border-slate-300 shadow-sm overflow-hidden !important;
|
92
|
-
border-
|
96
|
+
@apply border-primary-500 !important;
|
93
97
|
}
|
94
98
|
|
95
99
|
.select2-container--default .select2-results__option[aria-selected=true] {
|
@@ -11,18 +11,8 @@ trix-toolbar {
|
|
11
11
|
|
12
12
|
/* Override Tailwind's preflight styles */
|
13
13
|
/* https://github.com/tailwindlabs/tailwindcss/issues/989#issuecomment-506555308 */
|
14
|
-
trix-editor ul {
|
15
|
-
list-style-type: disc;
|
16
|
-
padding-left: 2.5rem;
|
17
|
-
}
|
18
|
-
|
19
|
-
trix-editor ol {
|
20
|
-
list-style-type: decimal;
|
21
|
-
padding-left: 2.5rem;
|
22
|
-
}
|
23
|
-
|
24
14
|
.trix-button {
|
25
|
-
@apply dark:bg-slate-
|
15
|
+
@apply dark:bg-slate-800 !important;
|
26
16
|
}
|
27
17
|
|
28
18
|
/* Prevent red ring on Trix Editor */
|
@@ -113,3 +103,63 @@ trix-editor {
|
|
113
103
|
.trix-content {
|
114
104
|
@apply text-base md:text-sm;
|
115
105
|
}
|
106
|
+
|
107
|
+
/* The Trix Editor uses SVGs for its buttons, so we manually override them here for dark mode */
|
108
|
+
/* Icons taken from https://react-icons.github.io/react-icons/icons?name=md */
|
109
|
+
@media (prefers-color-scheme: dark) {
|
110
|
+
.trix-button--icon-bold::before {
|
111
|
+
background-image: url('data:image/svg+xml;utf-8,<svg stroke="currentColor" fill="%23FFFFFF" stroke-width="0" viewBox="0 0 24 24" height="1em" width="1em" xmlns="http://www.w3.org/2000/svg"><path fill="none" d="M0 0h24v24H0z"></path><path d="M15.6 10.79c.97-.67 1.65-1.77 1.65-2.79 0-2.26-1.75-4-4-4H7v14h7.04c2.09 0 3.71-1.7 3.71-3.79 0-1.52-.86-2.82-2.15-3.42zM10 6.5h3c.83 0 1.5.67 1.5 1.5s-.67 1.5-1.5 1.5h-3v-3zm3.5 9H10v-3h3.5c.83 0 1.5.67 1.5 1.5s-.67 1.5-1.5 1.5z"></path></svg>') !important;
|
112
|
+
}
|
113
|
+
|
114
|
+
.trix-button--icon-italic::before {
|
115
|
+
background-image: url('data:image/svg+xml;utf-8,<svg stroke="currentColor" fill="%23FFFFFF" stroke-width="0" viewBox="0 0 24 24" height="1em" width="1em" xmlns="http://www.w3.org/2000/svg"><path fill="none" d="M0 0h24v24H0z"></path><path d="M10 4v3h2.21l-3.42 8H6v3h8v-3h-2.21l3.42-8H18V4z"></path></svg>') !important;
|
116
|
+
}
|
117
|
+
|
118
|
+
.trix-button--icon-strike::before {
|
119
|
+
background-image: url('data:image/svg+xml;utf8,<svg stroke="currentColor" fill="%23FFFFFF" stroke-width="0" viewBox="0 0 24 24" height="1em" width="1em" xmlns="http://www.w3.org/2000/svg"><path fill="none" d="M0 0h24v24H0z"></path><path d="M6.85 7.08C6.85 4.37 9.45 3 12.24 3c1.64 0 3 .49 3.9 1.28.77.65 1.46 1.73 1.46 3.24h-3.01c0-.31-.05-.59-.15-.85-.29-.86-1.2-1.28-2.25-1.28-1.86 0-2.34 1.02-2.34 1.7 0 .48.25.88.74 1.21.38.25.77.48 1.41.7H7.39c-.21-.34-.54-.89-.54-1.92zM21 12v-2H3v2h9.62c1.15.45 1.96.75 1.96 1.97 0 1-.81 1.67-2.28 1.67-1.54 0-2.93-.54-2.93-2.51H6.4c0 .55.08 1.13.24 1.58.81 2.29 3.29 3.3 5.67 3.3 2.27 0 5.3-.89 5.3-4.05 0-.3-.01-1.16-.48-1.94H21V12z"></path></svg>') !important;
|
120
|
+
}
|
121
|
+
|
122
|
+
.trix-button--icon-link::before {
|
123
|
+
background-image: url('data:image/svg+xml;utf8,<svg stroke="currentColor" fill="%23FFFFFF" stroke-width="0" viewBox="0 0 24 24" height="1em" width="1em" xmlns="http://www.w3.org/2000/svg"><path fill="none" d="M0 0h24v24H0z"></path><path d="M8 11h8v2H8v-2zm12.1 1H22c0-2.76-2.24-5-5-5h-4v1.9h4c1.71 0 3.1 1.39 3.1 3.1zM3.9 12c0-1.71 1.39-3.1 3.1-3.1h4V7H7c-2.76 0-5 2.24-5 5s2.24 5 5 5h4v-1.9H7c-1.71 0-3.1-1.39-3.1-3.1zM19 12h-2v3h-3v2h3v3h2v-3h3v-2h-3v-3z"></path></svg>') !important;
|
124
|
+
}
|
125
|
+
|
126
|
+
.trix-button--icon-heading-1::before {
|
127
|
+
background-image: url('data:image/svg+xml;utf8,<svg stroke="currentColor" fill="%23FFFFFF" stroke-width="0" viewBox="0 0 24 24" height="1em" width="1em" xmlns="http://www.w3.org/2000/svg"><path fill="none" d="M0 0h24v24H0z"></path><path d="M9 4v3h5v12h3V7h5V4H9zm-6 8h3v7h3v-7h3V9H3v3z"></path></svg>') !important;
|
128
|
+
}
|
129
|
+
|
130
|
+
.trix-button--icon-quote::before {
|
131
|
+
background-image: url('data:image/svg+xml;utf8,<svg stroke="currentColor" fill="%23FFFFFF" stroke-width="0" viewBox="0 0 24 24" height="1em" width="1em" xmlns="http://www.w3.org/2000/svg"><path fill="none" d="M0 0h24v24H0z"></path><path d="M6 17h3l2-4V7H5v6h3zm8 0h3l2-4V7h-6v6h3z"></path></svg>') !important;
|
132
|
+
}
|
133
|
+
|
134
|
+
.trix-button--icon-code::before {
|
135
|
+
background-image: url('data:image/svg+xml;utf8,<svg stroke="currentColor" fill="%23FFFFFF" stroke-width="0" viewBox="0 0 24 24" height="1em" width="1em" xmlns="http://www.w3.org/2000/svg"><path fill="none" d="M0 0h24v24H0V0z"></path><path d="M9.4 16.6L4.8 12l4.6-4.6L8 6l-6 6 6 6 1.4-1.4zm5.2 0l4.6-4.6-4.6-4.6L16 6l6 6-6 6-1.4-1.4z"></path></svg>') !important;
|
136
|
+
}
|
137
|
+
|
138
|
+
.trix-button--icon-bullet-list::before {
|
139
|
+
background-image: url('data:image/svg+xml;utf8,<svg stroke="currentColor" fill="%23FFFFFF" stroke-width="0" viewBox="0 0 24 24" height="1em" width="1em" xmlns="http://www.w3.org/2000/svg"><path fill="none" d="M0 0h24v24H0V0z"></path><path d="M4 10.5c-.83 0-1.5.67-1.5 1.5s.67 1.5 1.5 1.5 1.5-.67 1.5-1.5-.67-1.5-1.5-1.5zm0-6c-.83 0-1.5.67-1.5 1.5S3.17 7.5 4 7.5 5.5 6.83 5.5 6 4.83 4.5 4 4.5zm0 12c-.83 0-1.5.68-1.5 1.5s.68 1.5 1.5 1.5 1.5-.68 1.5-1.5-.67-1.5-1.5-1.5zM7 19h14v-2H7v2zm0-6h14v-2H7v2zm0-8v2h14V5H7z"></path></svg>') !important;
|
140
|
+
}
|
141
|
+
|
142
|
+
.trix-button--icon-number-list::before {
|
143
|
+
background-image: url('data:image/svg+xml;utf8,<svg stroke="currentColor" fill="%23FFFFFF" stroke-width="0" viewBox="0 0 24 24" height="1em" width="1em" xmlns="http://www.w3.org/2000/svg"><path fill="none" d="M0 0h24v24H0z"></path><path d="M2 17h2v.5H3v1h1v.5H2v1h3v-4H2v1zm1-9h1V4H2v1h1v3zm-1 3h1.8L2 13.1v.9h3v-1H3.2L5 10.9V10H2v1zm5-6v2h14V5H7zm0 14h14v-2H7v2zm0-6h14v-2H7v2z"></path></svg>') !important;
|
144
|
+
}
|
145
|
+
|
146
|
+
.trix-button--icon-decrease-nesting-level::before {
|
147
|
+
background-image: url('data:image/svg+xml;utf8,<svg stroke="currentColor" fill="%23FFFFFF" stroke-width="0" viewBox="0 0 24 24" height="1em" width="1em" xmlns="http://www.w3.org/2000/svg"><path fill="none" d="M0 0h24v24H0z"></path><path d="M11 17h10v-2H11v2zm-8-5l4 4V8l-4 4zm0 9h18v-2H3v2zM3 3v2h18V3H3zm8 6h10V7H11v2zm0 4h10v-2H11v2z"></path></svg>') !important;
|
148
|
+
}
|
149
|
+
|
150
|
+
.trix-button--icon-increase-nesting-level::before {
|
151
|
+
background-image: url('data:image/svg+xml;utf8,<svg stroke="currentColor" fill="%23FFFFFF" stroke-width="0" viewBox="0 0 24 24" height="1em" width="1em" xmlns="http://www.w3.org/2000/svg"><path fill="none" d="M0 0h24v24H0z"></path><path d="M3 21h18v-2H3v2zM3 8v8l4-4-4-4zm8 9h10v-2H11v2zM3 3v2h18V3H3zm8 6h10V7H11v2zm0 4h10v-2H11v2z"></path></svg>') !important;
|
152
|
+
}
|
153
|
+
|
154
|
+
.trix-button--icon-attach::before {
|
155
|
+
background-image: url('data:image/svg+xml;utf8,<svg stroke="currentColor" fill="%23FFFFFF" stroke-width="0" viewBox="0 0 24 24" height="1em" width="1em" xmlns="http://www.w3.org/2000/svg"><path fill="none" d="M0 0h24v24H0z"></path><path d="M16.5 6v11.5c0 2.21-1.79 4-4 4s-4-1.79-4-4V5a2.5 2.5 0 015 0v10.5c0 .55-.45 1-1 1s-1-.45-1-1V6H10v9.5a2.5 2.5 0 005 0V5c0-2.21-1.79-4-4-4S7 2.79 7 5v12.5c0 3.04 2.46 5.5 5.5 5.5s5.5-2.46 5.5-5.5V6h-1.5z"></path></svg>') !important;
|
156
|
+
}
|
157
|
+
|
158
|
+
.trix-button--icon-undo::before {
|
159
|
+
background-image: url('data:image/svg+xml;utf8,<svg stroke="currentColor" fill="%23FFFFFF" stroke-width="0" viewBox="0 0 24 24" height="1em" width="1em" xmlns="http://www.w3.org/2000/svg"><path fill="none" d="M0 0h24v24H0V0z"></path><path d="M12.5 8c-2.65 0-5.05.99-6.9 2.6L2 7v9h9l-3.62-3.62c1.39-1.16 3.16-1.88 5.12-1.88 3.54 0 6.55 2.31 7.6 5.5l2.37-.78C21.08 11.03 17.15 8 12.5 8z"></path></svg>') !important;
|
160
|
+
}
|
161
|
+
|
162
|
+
.trix-button--icon-redo::before {
|
163
|
+
background-image: url('data:image/svg+xml;utf8,<svg stroke="currentColor" fill="%23FFFFFF" stroke-width="0" viewBox="0 0 24 24" height="1em" width="1em" xmlns="http://www.w3.org/2000/svg"><path fill="none" d="M0 0h24v24H0z"></path><path d="M18.4 10.6C16.55 8.99 14.15 8 11.5 8c-4.65 0-8.58 3.03-9.96 7.22L3.9 16a8.002 8.002 0 017.6-5.5c1.95 0 3.73.72 5.12 1.88L13 16h9V7l-3.6 3.6z"></path></svg>') !important;
|
164
|
+
}
|
165
|
+
}
|
@@ -26,8 +26,8 @@
|
|
26
26
|
top: -200px;
|
27
27
|
width: 1000px;
|
28
28
|
height: 600px;
|
29
|
-
background-image: linear-gradient(90deg, rgba(227,231,248,0) 0%, #E8F2FC 100%);
|
30
29
|
z-index: -1;
|
30
|
+
@apply bg-primary-200 bg-gradient-to-r from-white
|
31
31
|
}
|
32
32
|
|
33
33
|
position: absolute;
|
@@ -35,9 +35,9 @@
|
|
35
35
|
top: 0px;
|
36
36
|
width: 800px;
|
37
37
|
height: 600px;
|
38
|
-
background-image: linear-gradient(90deg, rgba(227,231,248,0) 0%, #8BBAF5 100%);
|
39
38
|
transform: translate(-360px, 0px) rotate(-45deg);
|
40
39
|
z-index: -1;
|
40
|
+
@apply bg-primary-400 bg-gradient-to-r from-white
|
41
41
|
}
|
42
42
|
|
43
43
|
.brand-title {
|
@@ -66,6 +66,6 @@
|
|
66
66
|
background-attachment: scroll;
|
67
67
|
background-clip: text;
|
68
68
|
background-color: rgba(0,0,0,0);
|
69
|
-
|
69
|
+
@apply bg-slate-800 bg-gradient-to-r from-primary-500
|
70
70
|
}
|
71
|
-
}
|
71
|
+
}
|
@@ -0,0 +1,7 @@
|
|
1
|
+
<script>
|
2
|
+
const color = "<%= BulletTrain::Themes::Light.color %>"
|
3
|
+
const secondaryColor = "<%= BulletTrain::Themes::Light.secondary_color %>"
|
4
|
+
|
5
|
+
if (color) document.documentElement.classList.add(`theme-${color}`)
|
6
|
+
if (secondaryColor) document.documentElement.classList.add(`theme-secondary-${secondaryColor}`)
|
7
|
+
</script>
|
@@ -5,10 +5,9 @@
|
|
5
5
|
</ul>
|
6
6
|
<% end %>
|
7
7
|
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
<%# end %>
|
8
|
+
<% showcase.sample "With model url_for" do %>
|
9
|
+
<%= render 'account/shared/breadcrumb', label: t('memberships.label'), url: [:account, current_team, :memberships] %>
|
10
|
+
<% end %>
|
12
11
|
|
13
12
|
<% showcase.options do |o| %>
|
14
13
|
<% o.required :label, "The breadcrumb text, either shown in the link or the plain label" %>
|
@@ -18,4 +18,20 @@
|
|
18
18
|
</div>
|
19
19
|
<% end %>
|
20
20
|
|
21
|
-
<%
|
21
|
+
<% showcase.sample "Vertical Gaps" do %>
|
22
|
+
<div class="grid gap-y">
|
23
|
+
<div class="button block">Item</div>
|
24
|
+
<div class="button block">Item</div>
|
25
|
+
<div class="button block">Item</div>
|
26
|
+
<div class="button block">Item</div>
|
27
|
+
</div>
|
28
|
+
<% end %>
|
29
|
+
|
30
|
+
<% showcase.sample "Horizontal Gaps" do %>
|
31
|
+
<div class="flex gap-x">
|
32
|
+
<div class="flex-1 button">Item</div>
|
33
|
+
<div class="flex-1 button">Item</div>
|
34
|
+
<div class="flex-1 button">Item</div>
|
35
|
+
<div class="flex-1 button">Item</div>
|
36
|
+
</div>
|
37
|
+
<% end %>
|
@@ -7,8 +7,8 @@ when :yellow
|
|
7
7
|
div_classes = "bg-amber-100 border-amber-200"
|
8
8
|
header_classes = "text-amber-800"
|
9
9
|
when :red
|
10
|
-
div_classes = "bg-red-
|
11
|
-
header_classes = "text-red-
|
10
|
+
div_classes = "bg-red-100 dark:bg-red-900 border-red-200 dark:border-red-700"
|
11
|
+
header_classes = "text-red-900 dark:text-red-100"
|
12
12
|
end
|
13
13
|
%>
|
14
14
|
|
@@ -34,22 +34,22 @@
|
|
34
34
|
<% if action.completed? %>
|
35
35
|
<% if action.is_a?(Actions::HasProgress) %>
|
36
36
|
<div class="uppercase text-xs text-slate-400">
|
37
|
-
|
37
|
+
<%= t('action_models.processed_of', performed_count: action.performed_count, target_count: action.target_count, at: display_date_and_time(action.completed_at)) %>
|
38
38
|
</div>
|
39
39
|
<% else %>
|
40
40
|
<div class="uppercase text-xs text-slate-400">
|
41
|
-
|
41
|
+
<%= t('action_models.processed', at: display_date_and_time(action.completed_at)) %>
|
42
42
|
</div>
|
43
43
|
<% end %>
|
44
44
|
|
45
45
|
<% elsif action.is_a?(Actions::RequiresApproval) && !action.approved? %>
|
46
46
|
<div class="uppercase text-xs text-slate-400">
|
47
|
-
|
47
|
+
<%= t('action_models.awaiting') %>
|
48
48
|
</div>
|
49
49
|
|
50
50
|
<% elsif action.is_a?(Actions::SupportsScheduling) && action.scheduled_for && !action.started? %>
|
51
51
|
<div class="uppercase text-xs text-slate-400">
|
52
|
-
|
52
|
+
<%= t('action_models.scheduled_for', at: display_date_and_time(action.scheduled_for)) %>
|
53
53
|
</div>
|
54
54
|
|
55
55
|
<% elsif action.is_a?(Actions::HasProgress) && action.started? %>
|
@@ -58,17 +58,17 @@
|
|
58
58
|
</div>
|
59
59
|
|
60
60
|
<div class="mt-2 uppercase text-xs text-slate-400">
|
61
|
-
|
61
|
+
<%= t('action_models.processing_of', performed_count: action.performed_count, target_count: action.target_count) %>
|
62
62
|
</div>
|
63
63
|
|
64
64
|
<% elsif action.is_a?(Actions::HasProgress) %>
|
65
65
|
<div class="uppercase text-xs text-slate-400">
|
66
|
-
|
66
|
+
<%= t('action_models.preparing_to_process_of', performed_count: action.performed_count, target_count: action.target_count) %>
|
67
67
|
</div>
|
68
68
|
|
69
69
|
<% else %>
|
70
70
|
<div class="uppercase text-xs text-slate-400">
|
71
|
-
|
71
|
+
<%= t('action_models.preparing_to_process') %>
|
72
72
|
</div>
|
73
73
|
|
74
74
|
<% end %>
|
@@ -2,8 +2,8 @@
|
|
2
2
|
<% strategy ||= current_attributes_strategy || :none %>
|
3
3
|
<% url ||= nil %>
|
4
4
|
|
5
|
-
<% if object.
|
5
|
+
<% if object.public_send(attribute).present? %>
|
6
6
|
<%= render 'shared/attributes/attribute', object: object, attribute: attribute, strategy: strategy, url: url do %>
|
7
|
-
<pre><%= object.
|
7
|
+
<pre><%= object.public_send(attribute) %></pre>
|
8
8
|
<% end %>
|
9
9
|
<% end %>
|
@@ -4,7 +4,7 @@
|
|
4
4
|
<% hide_completed ||= false %>
|
5
5
|
|
6
6
|
<% if object.send(total).present? %>
|
7
|
-
<% completion_percent = (object.
|
7
|
+
<% completion_percent = (object.public_send(attribute).to_f / object.send(total).to_f) * 100.0 %>
|
8
8
|
|
9
9
|
<% unless completion_percent == 100 && hide_completed %>
|
10
10
|
<%= render 'shared/attributes/attribute', object: object, attribute: "#{attribute}_over_#{total}".to_sym, strategy: strategy, url: url do %>
|
@@ -7,7 +7,7 @@
|
|
7
7
|
<img src="<%= membership_profile_photo_url(conversation.last_message&.membership || current_membership) %>" title="<%= current_membership.name %>" alt="<%= current_membership.name %>" class="md:w-14 md:h-14 w-12 h-12 rounded-full mx-auto border-1 border-white border-2 flex-none">
|
8
8
|
</div>
|
9
9
|
<div class="w-4/5 md:w-full lg:w-4/5 pl-4 pr-1 flex-initial truncate">
|
10
|
-
<p class="text-xs text-slate-300 text-right hover:no-underline"><%= "#{time_ago_in_words
|
10
|
+
<p class="text-xs text-slate-300 text-right hover:no-underline"><%= "#{t('global.time_ago', time: time_ago_in_words(conversation.last_message.created_at))}" if conversation.last_message.present? %></p>
|
11
11
|
<h2 class="<%= subscription.unread? ? 'font-bold text-slate-800' : 'font-semibold text-slate-600' %> "><%= conversation.subject&.label_string %></h2>
|
12
12
|
<div class="text-slate-300">
|
13
13
|
<%= conversation.last_message&.user&.label_string %>
|
@@ -7,7 +7,8 @@
|
|
7
7
|
<div class="flex py-3 px-2 text-slate-700 <%= message.reply? ? 'border w-full bg-slate-50 rounded-md' : 'border-b' %> <%= 'opacity-30' if new_message %>">
|
8
8
|
<div class="mr-3 min-w-max"><%= avatar %></div>
|
9
9
|
<div class="flex flex-col w-full">
|
10
|
-
<div class=""><span class="uppercase font-bold text-slate-500"><%= message.user.name %></span><span class="font-extralight text-xs text-slate-400"> • <%= time_ago_in_words
|
10
|
+
<div class=""><span class="uppercase font-bold text-slate-500"><%= message.user.name %></span><span class="font-extralight text-xs text-slate-400"> • <%= t("global.time_ago", time: time_ago_in_words(message.created_at)) %>
|
11
|
+
</span></div>
|
11
12
|
<div class="py-2"><%= trix_sanitize message.body %></div>
|
12
13
|
<% if message.replies.any? %>
|
13
14
|
<div class="space-y-2 mt-2 mb-2">
|
@@ -34,7 +34,7 @@
|
|
34
34
|
|
35
35
|
<% rounding_modifier = message_corner_class(next_message_in_series, current_user_message) %>
|
36
36
|
|
37
|
-
<% timestamp = next_message_in_series || show_as_thread ? '' : time_ago_in_words(message.created_at)
|
37
|
+
<% timestamp = next_message_in_series || show_as_thread ? '' : t("global.time_ago", time: time_ago_in_words(message.created_at)) %>
|
38
38
|
|
39
39
|
<% threaded_message = message.threaded? %>
|
40
40
|
<% thread_started_by_current_user = message.thread_origin_user == current_author %>
|
@@ -126,7 +126,7 @@
|
|
126
126
|
<path d="M0 57.7c.1 145.1 4.1 224 14.5 281.1 19.4 106.3 65.2 156.4 166.3 181.7 48.7 12.1 111.4 18.8 211.7 22.5 23.8.9 196.6 2.8 268.2 3H683l.2 67.8.3 67.8 170.3-102.1L1024 477.3l-170.2-102-170.3-102-.3 67.8-.2 67.9h-75.8c-184.7 0-266.9-4.8-327.2-19-34.2-8.1-62.8-21.1-81.2-37-36.1-31.3-52.3-76.8-58.8-165.5-2-28-3-69.2-3-127.8V0H0v57.7z"/>
|
127
127
|
</svg>
|
128
128
|
<div class="flex flex-col mr-10 min-w-max">
|
129
|
-
<div class="pt-0 mr-2 ml-4 text-xxs"><%= reply.membership.label_string %> reply
|
129
|
+
<div class="pt-0 mr-2 ml-4 text-xxs"><%= reply.membership.label_string %> <%= t('conversations.message.reply') %></div>
|
130
130
|
<div class="bg-slate-100 rounded py-2 px-4 mt-0 text-slate-400 max-w-md"><%= reply.body.html_safe %></div>
|
131
131
|
</div>
|
132
132
|
</div>
|
@@ -1,4 +1,11 @@
|
|
1
|
-
<%
|
1
|
+
<%
|
2
|
+
%i[label field error help after_help].each do |key|
|
3
|
+
if (content = content_for(key).presence)
|
4
|
+
flush_content_for key
|
5
|
+
partial.section key, content
|
6
|
+
end
|
7
|
+
end
|
8
|
+
%>
|
2
9
|
|
3
10
|
<%
|
4
11
|
form ||= current_fields_form
|
@@ -12,7 +19,7 @@ other_options ||= {}
|
|
12
19
|
other_options[:help] = [other_options[:help], labels.help].compact.join(" ")
|
13
20
|
|
14
21
|
errors = [method, method.to_s.gsub(/_id$/, '').to_sym].uniq.map { |attribute| form.object.errors.full_messages_for(attribute) }.flatten
|
15
|
-
has_errors = errors.any? ||
|
22
|
+
has_errors = errors.any? || partial.error? || other_options[:error].present?
|
16
23
|
|
17
24
|
options[:class] = "#{options[:class]} block w-full rounded-md shadow-sm font-light text-sm dark:bg-slate-800 dark:text-slate-300"
|
18
25
|
|
@@ -28,9 +35,8 @@ end
|
|
28
35
|
|
29
36
|
<% # the label. %>
|
30
37
|
<% unless other_options[:hide_label] == true %>
|
31
|
-
<% if
|
32
|
-
<%=
|
33
|
-
<% flush_content_for :label %>
|
38
|
+
<% if partial.label? %>
|
39
|
+
<%= partial.label %>
|
34
40
|
<% else %>
|
35
41
|
<% # allow the label to be defined via an inline option or else one of the locale yaml definitions. %>
|
36
42
|
<% label = (other_options[:label].presence || labels.label || legacy_label_for(form, method)) %>
|
@@ -39,24 +45,20 @@ end
|
|
39
45
|
<% end %>
|
40
46
|
|
41
47
|
<div class="mt-1.5">
|
42
|
-
|
43
48
|
<% # the actual field. %>
|
44
|
-
<% if
|
45
|
-
<%=
|
46
|
-
<% flush_content_for :field %>
|
49
|
+
<% if partial.field? %>
|
50
|
+
<%= partial.field %>
|
47
51
|
<% else %>
|
48
52
|
<% # e.g. form.text_field(method, options) %>
|
49
53
|
<%= form.send(helper, method, options) %>
|
50
54
|
<% end %>
|
51
|
-
|
52
55
|
</div>
|
53
56
|
|
54
57
|
<% # any error messages. %>
|
55
58
|
<% if has_errors %>
|
56
59
|
<p class="mt-1.5 text-xs text-red-500">
|
57
60
|
<%= errors.map { |error| error + ". " }.join %>
|
58
|
-
<%=
|
59
|
-
<% flush_content_for :error %>
|
61
|
+
<%= partial.error %>
|
60
62
|
<% if other_options[:hide_custom_error].blank? %>
|
61
63
|
<%= other_options[:error]&.html_safe %>
|
62
64
|
<% end %>
|
@@ -64,13 +66,11 @@ end
|
|
64
66
|
<% end %>
|
65
67
|
|
66
68
|
<% # any help text. %>
|
67
|
-
<% if
|
69
|
+
<% if partial.help? || other_options[:help].present? || partial.after_help? %>
|
68
70
|
<p class="mt-1.5 text-xs text-slate-500 dark:text-slate-400">
|
69
|
-
<%=
|
70
|
-
<% flush_content_for :help %>
|
71
|
+
<%= partial.help %>
|
71
72
|
<%= other_options[:help]&.html_safe %>
|
72
|
-
<%=
|
73
|
-
<% flush_content_for :after_help %>
|
73
|
+
<%= partial.after_help %>
|
74
74
|
</p>
|
75
75
|
<% end %>
|
76
76
|
|
@@ -1,5 +1,5 @@
|
|
1
1
|
<!DOCTYPE html>
|
2
|
-
<html>
|
2
|
+
<html class="theme-<%= BulletTrain::Themes::Light.color %> <%= "theme-secondary-#{BulletTrain::Themes::Light.secondary_color}" if BulletTrain::Themes::Light.secondary_color %>">
|
3
3
|
<head>
|
4
4
|
<%= render 'shared/layouts/head' %>
|
5
5
|
</head>
|
@@ -13,7 +13,7 @@
|
|
13
13
|
<div class="m-5 -mb-5">
|
14
14
|
<%= link_to @back, class: 'button-secondary hover:no-underline group' do %>
|
15
15
|
<i class="ti ti-angle-left text-lg group-hover:no-underline"></i>
|
16
|
-
<span class="text-base ml-3 group-hover:underline"
|
16
|
+
<span class="text-base ml-3 group-hover:underline"><%= t('navigation.back') %></span>
|
17
17
|
<% end %>
|
18
18
|
</div>
|
19
19
|
<% end %>
|
@@ -3,7 +3,7 @@
|
|
3
3
|
id="mobile-menu-close"
|
4
4
|
data-action="mobile-menu#close"
|
5
5
|
>
|
6
|
-
<span class="sr-only"
|
6
|
+
<span class="sr-only"><%= t('navigation.close_app_menu') %></span>
|
7
7
|
<svg class="h-6 w-6 text-white" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" aria-hidden="true">
|
8
8
|
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12" />
|
9
9
|
</svg>
|
@@ -1,8 +1,8 @@
|
|
1
1
|
<% method ||= nil %>
|
2
2
|
<% active ||= request.path == url %>
|
3
3
|
|
4
|
-
<%= send (method ? :button_to : :link_to), url, class: "block group hover:text-white hover:no-underline #{'bg-primary-900 dark:bg-black dark:bg-opacity-10' if active} text-white #{@menu_orientation == :top ? "px-5 py-5" : "px-
|
5
|
-
<div class="inline-block
|
4
|
+
<%= send (method ? :button_to : :link_to), url, class: "block group/item hover:text-white hover:no-underline #{'bg-primary-900 dark:bg-black dark:bg-opacity-10' if active} text-white #{@menu_orientation == :top ? "px-5 py-5" : "px-3 py-2 rounded-md"} #{"rounded-tl-lg" unless @not_first || BulletTrain::Themes::Light.show_logo_in_account} dark:text-white", data: {"desktop-menu-target": "menuItemLink"}, tabIndex: 0, method: method do %>
|
5
|
+
<div class="inline-block <%= "transition group-hover/item:translate-x-3 duration-200" if @menu_orientation == :side %> flex items-center">
|
6
6
|
<!-- Heroicon name: home -->
|
7
7
|
<% if partial.icon? %>
|
8
8
|
<span class="mr-3 h-6 w-6 text-center text-secondary-300 text-xl leading-6 dark:text-slate-400">
|
@@ -2,8 +2,8 @@
|
|
2
2
|
id="mobile-menu-open"
|
3
3
|
data-action="mobile-menu#open"
|
4
4
|
>
|
5
|
-
<span class="sr-only"
|
5
|
+
<span class="sr-only"><%= t('navigation.open_app_menu') %></span>
|
6
6
|
<svg class="h-6 w-6" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" aria-hidden="true">
|
7
7
|
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 6h16M4 12h16M4 18h16" />
|
8
8
|
</svg>
|
9
|
-
</button>
|
9
|
+
</button>
|
@@ -10,7 +10,7 @@
|
|
10
10
|
</div>
|
11
11
|
<% else %>
|
12
12
|
<div>
|
13
|
-
<div class="inline-block relative group" data-controller="desktop-menu" data-action="keydown->desktop-menu#hideSubmenu" id="<%= title.
|
13
|
+
<div class="inline-block relative group" data-controller="desktop-menu" data-action="keydown->desktop-menu#hideSubmenu" id="<%= title.parameterize(separator: '_') %>">
|
14
14
|
<%= render 'account/shared/menu/heading' do %>
|
15
15
|
<%= title %>
|
16
16
|
|
@@ -0,0 +1,9 @@
|
|
1
|
+
en:
|
2
|
+
action_models:
|
3
|
+
processed: Processed %{at}
|
4
|
+
processed_of: Processed %{performed_count} of %{target_count} %{at}
|
5
|
+
awaiting: Awaiting approval
|
6
|
+
scheduled_for: Scheduled for %{for}
|
7
|
+
processing_of: Processing %{performed_count} of %{target_count}
|
8
|
+
preparing_to_process: Preparing to process
|
9
|
+
preparing_to_process_of: Preparing to process %{performed_count} of %{target_count}
|
@@ -14,7 +14,6 @@ module BulletTrain
|
|
14
14
|
mattr_accessor :logo_color_shift, default: false
|
15
15
|
mattr_accessor :show_logo_in_account, default: false
|
16
16
|
mattr_accessor :navigation, default: :top
|
17
|
-
mattr_accessor :original_devise_path # TODO: Obsolete: remove after shipping a new BulletTrain version with usage removed.
|
18
17
|
|
19
18
|
class Theme < BulletTrain::Themes::TailwindCss::Theme
|
20
19
|
def directory_order
|
data/lib/tasks/application.rb
CHANGED
@@ -180,14 +180,81 @@ module BulletTrain
|
|
180
180
|
end
|
181
181
|
|
182
182
|
def self.clean_theme(theme_name, args)
|
183
|
-
|
184
|
-
`
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
183
|
+
light_base_path = `bundle show --paths bullet_train-themes-light`.chomp
|
184
|
+
tailwind_base_path = `bundle show --paths bullet_train-themes-tailwind_css`.chomp
|
185
|
+
theme_base_path = `bundle show --paths bullet_train-themes`.chomp
|
186
|
+
|
187
|
+
directory_content = `find . | grep 'app/.*#{args[:theme]}'`.lines.map(&:chomp)
|
188
|
+
directory_content = directory_content.reject { |content| content.match?("app/assets/builds/") }
|
189
|
+
files = directory_content.select { |file| file.match?(/(\.erb)|(\.rb)|(\.css)|(\.js)$/) }
|
190
|
+
|
191
|
+
# Files that exist outside of "./app/" that we need to check.
|
192
|
+
files += [
|
193
|
+
"tailwind.#{args[:theme]}.config.js",
|
194
|
+
"tailwind.mailer.#{args[:theme]}.config.js",
|
195
|
+
]
|
196
|
+
|
197
|
+
# This file doesn't exist under "app/" in its original gem, so we handle it differently.
|
198
|
+
# Also, don't remove this file from the starter repository in case
|
199
|
+
# the developer has any ejected files that have been customized.
|
200
|
+
files.delete("./app/lib/bullet_train/themes/#{args[:theme]}.rb")
|
201
|
+
|
202
|
+
files.each do |file|
|
203
|
+
original_theme_path = nil
|
204
|
+
|
205
|
+
# Remove the current directory syntax for concatenation with the gem base path.
|
206
|
+
file.gsub!("./", "")
|
207
|
+
|
208
|
+
[light_base_path, tailwind_base_path, theme_base_path].each do |theme_path|
|
209
|
+
# Views exist under "base" when the gem is "bullet_train-themes".
|
210
|
+
theme_gem_name = theme_path.scan(/(.*themes-)(.*$)/).flatten.pop || "base"
|
211
|
+
original_theme_path = file.gsub(args[:theme], theme_gem_name)
|
212
|
+
|
213
|
+
if File.exist?("#{theme_path}/#{original_theme_path}")
|
214
|
+
original_theme_path = "#{theme_path}/#{original_theme_path}"
|
215
|
+
break
|
216
|
+
end
|
190
217
|
end
|
218
|
+
|
219
|
+
ejected_file_content = File.read(file)
|
220
|
+
|
221
|
+
# These are the only files where we replace the theme name inside of them when ejecting,
|
222
|
+
# so we revert the contents and check if the file has been changed or not.
|
223
|
+
transformed_files = [
|
224
|
+
"app/views/themes/foo/layouts/_head.html.erb",
|
225
|
+
"app/assets/stylesheets/foo.tailwind.css",
|
226
|
+
"tailwind.mailer.#{args[:theme]}.config.js"
|
227
|
+
]
|
228
|
+
ejected_file_content.gsub!(/#{args[:theme]}/i, theme_name) if transformed_files.include?(file)
|
229
|
+
|
230
|
+
if ejected_file_content == File.read(original_theme_path)
|
231
|
+
puts "No changes in `#{file}` since being ejected. Removing."
|
232
|
+
`rm #{file}`
|
233
|
+
end
|
234
|
+
end
|
235
|
+
|
236
|
+
# Delete all leftover directories with empty content.
|
237
|
+
[
|
238
|
+
"./app/assets/stylesheets/",
|
239
|
+
"./app/views/themes/"
|
240
|
+
].each do |remaining_directory|
|
241
|
+
puts "Cleaning out directory: #{remaining_directory}"
|
242
|
+
remaining_directory_content = Dir.glob(remaining_directory + "**/*")
|
243
|
+
remaining_directories = remaining_directory_content.select { |content| File.directory?(content) }
|
244
|
+
remaining_directories.reverse_each { |dir| Dir.rmdir dir if Dir.empty?(dir) }
|
245
|
+
FileUtils.rmdir(remaining_directory) if Dir.empty?(remaining_directory)
|
246
|
+
end
|
247
|
+
|
248
|
+
# These are files from the starter repository that need to be set back to the original theme.
|
249
|
+
[
|
250
|
+
"Procfile.dev",
|
251
|
+
"app/helpers/application_helper.rb",
|
252
|
+
"package.json",
|
253
|
+
"test/system/resolver_system_test.rb"
|
254
|
+
].each do |file|
|
255
|
+
puts "Reverting changes in #{file}."
|
256
|
+
new_lines = File.open(file).readlines.join.gsub(/#{args[:theme]}/i, theme_name)
|
257
|
+
File.write(file, new_lines)
|
191
258
|
end
|
192
259
|
end
|
193
260
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bullet_train-themes-light
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andrew Culver
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-08-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: standard
|
@@ -130,6 +130,7 @@ files:
|
|
130
130
|
- app/assets/stylesheets/tailwindcss/components.css
|
131
131
|
- app/assets/stylesheets/tailwindcss/utilities.css
|
132
132
|
- app/javascript/application.light.js
|
133
|
+
- app/views/showcase/engine/_head.html.erb
|
133
134
|
- app/views/showcase/previews/partials/_alert.html.erb
|
134
135
|
- app/views/showcase/previews/partials/_box.html.erb
|
135
136
|
- app/views/showcase/previews/partials/_breadcrumb.html.erb
|
@@ -195,6 +196,9 @@ files:
|
|
195
196
|
- app/views/themes/light/menu/_top.html.erb
|
196
197
|
- app/views/themes/light/menu/_user.html.erb
|
197
198
|
- app/views/themes/light/workflow/_box.html.erb
|
199
|
+
- config/locales/en/action_models.en.yml
|
200
|
+
- config/locales/en/conversations.en.yml
|
201
|
+
- config/locales/en/navigation.en.yml
|
198
202
|
- config/routes.rb
|
199
203
|
- lib/bullet_train/themes/light.rb
|
200
204
|
- lib/bullet_train/themes/light/custom_theme_file_replacer.rb
|
@@ -204,12 +208,12 @@ files:
|
|
204
208
|
- lib/tasks/application.rb
|
205
209
|
- lib/tasks/bullet_train/themes/light_tasks.rake
|
206
210
|
- tailwind.light.config.js
|
207
|
-
homepage: https://github.com/bullet-train-co/bullet_train-themes-light
|
211
|
+
homepage: https://github.com/bullet-train-co/bullet_train-core/tree/main/bullet_train-themes-light
|
208
212
|
licenses:
|
209
213
|
- MIT
|
210
214
|
metadata:
|
211
|
-
homepage_uri: https://github.com/bullet-train-co/bullet_train-themes-light
|
212
|
-
source_code_uri: https://github.com/bullet-train-co/bullet_train-themes-light
|
215
|
+
homepage_uri: https://github.com/bullet-train-co/bullet_train-core/tree/main/bullet_train-themes-light
|
216
|
+
source_code_uri: https://github.com/bullet-train-co/bullet_train-core/tree/main/bullet_train-themes-light
|
213
217
|
post_install_message:
|
214
218
|
rdoc_options: []
|
215
219
|
require_paths:
|
@@ -225,7 +229,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
225
229
|
- !ruby/object:Gem::Version
|
226
230
|
version: '0'
|
227
231
|
requirements: []
|
228
|
-
rubygems_version: 3.
|
232
|
+
rubygems_version: 3.3.7
|
229
233
|
signing_key:
|
230
234
|
specification_version: 4
|
231
235
|
summary: 'Bullet Train Themes: Light'
|