bullet_train-themes-light 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (35) hide show
  1. checksums.yaml +7 -0
  2. data/MIT-LICENSE +20 -0
  3. data/README.md +28 -0
  4. data/Rakefile +8 -0
  5. data/app/assets/config/bullet_train_themes_light_manifest.js +0 -0
  6. data/app/views/themes/light/_alert.html.erb +13 -0
  7. data/app/views/themes/light/_box.html.erb +57 -0
  8. data/app/views/themes/light/_breadcrumb.html.erb +23 -0
  9. data/app/views/themes/light/_cell.html.erb +41 -0
  10. data/app/views/themes/light/_decision_line.html.erb +12 -0
  11. data/app/views/themes/light/_line.html.erb +3 -0
  12. data/app/views/themes/light/_notices.html.erb +15 -0
  13. data/app/views/themes/light/_page.html.erb +12 -0
  14. data/app/views/themes/light/_title.html.erb +18 -0
  15. data/app/views/themes/light/attributes/_base.html.erb +30 -0
  16. data/app/views/themes/light/attributes/_block.html.erb +9 -0
  17. data/app/views/themes/light/breadcrumbs/_actions.html.erb +22 -0
  18. data/app/views/themes/light/commentary/_box.html.erb +13 -0
  19. data/app/views/themes/light/fields/_field.html.erb +81 -0
  20. data/app/views/themes/light/forms/_errors.html.erb +14 -0
  21. data/app/views/themes/light/layouts/_account.html.erb +138 -0
  22. data/app/views/themes/light/layouts/_devise.html.erb +11 -0
  23. data/app/views/themes/light/layouts/_head.html.erb +6 -0
  24. data/app/views/themes/light/memberships/_photos.html.erb +18 -0
  25. data/app/views/themes/light/menu/_heading.html.erb +3 -0
  26. data/app/views/themes/light/menu/_item.html.erb +16 -0
  27. data/app/views/themes/light/menu/_section.html.erb +7 -0
  28. data/app/views/themes/light/workflow/_box.html.erb +31 -0
  29. data/config/routes.rb +2 -0
  30. data/lib/bullet_train/themes/light/engine.rb +10 -0
  31. data/lib/bullet_train/themes/light/path_snitch.rb +9 -0
  32. data/lib/bullet_train/themes/light/version.rb +7 -0
  33. data/lib/bullet_train/themes/light.rb +10 -0
  34. data/lib/tasks/bullet_train/themes/light_tasks.rake +4 -0
  35. metadata +92 -0
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 8bb52ca8b4e3add6017bf1b1c1c88e4c417410606137812102fb701f9804930b
4
+ data.tar.gz: c15ac4eaeea216a632931b6448320dea43054973503fa644521e2e9194f1b724
5
+ SHA512:
6
+ metadata.gz: 02cd8ee4c8888fa030ba0c3b70e08d34896cfc121b9be6c7263c2e0f999a40d81bf94cadb2cedbeee5fe87cbc501744db3d2c9a2f97590d0e99814eb41098051
7
+ data.tar.gz: 7aef527ab20970e98bae6e3b23526e4b4063b22f1a491058d7a5cccc2c5dbc013fda5cf228ce92385d84d89396d8e294139b62883fb4fc83c06442538b2f91be
data/MIT-LICENSE ADDED
@@ -0,0 +1,20 @@
1
+ Copyright 2022 Andrew Culver
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining
4
+ a copy of this software and associated documentation files (the
5
+ "Software"), to deal in the Software without restriction, including
6
+ without limitation the rights to use, copy, modify, merge, publish,
7
+ distribute, sublicense, and/or sell copies of the Software, and to
8
+ permit persons to whom the Software is furnished to do so, subject to
9
+ the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be
12
+ included in all copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,28 @@
1
+ # BulletTrain::Themes::Light
2
+ Short description and motivation.
3
+
4
+ ## Usage
5
+ How to use my plugin.
6
+
7
+ ## Installation
8
+ Add this line to your application's Gemfile:
9
+
10
+ ```ruby
11
+ gem "bullet_train-themes-light"
12
+ ```
13
+
14
+ And then execute:
15
+ ```bash
16
+ $ bundle
17
+ ```
18
+
19
+ Or install it yourself as:
20
+ ```bash
21
+ $ gem install bullet_train-themes-light
22
+ ```
23
+
24
+ ## Contributing
25
+ Contribution directions go here.
26
+
27
+ ## License
28
+ The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
data/Rakefile ADDED
@@ -0,0 +1,8 @@
1
+ require "bundler/setup"
2
+
3
+ APP_RAKEFILE = File.expand_path("test/dummy/Rakefile", __dir__)
4
+ load "rails/tasks/engine.rake"
5
+
6
+ load "rails/tasks/statistics.rake"
7
+
8
+ require "bundler/gem_tasks"
@@ -0,0 +1,13 @@
1
+ <% color ||= 'yellow' %>
2
+
3
+ <div class="rounded-md bg-<%= color %>-light border border-<%= color %> py-4 px-5 mb-3">
4
+ <h3 class="text-sm text-<%= color %>-darker font-light">
5
+ <%= yield %>
6
+ </h3>
7
+ </div>
8
+
9
+ <% # we have to list out the evaluations we want possible above so purgecss includes them in production. %>
10
+ <% if false %>
11
+ <div class="bg-yellow-light border-yellow text-yellow-darker"></div>
12
+ <div class="bg-red-light border-red text-red-darker"></div>
13
+ <% end %>
@@ -0,0 +1,57 @@
1
+ <% yield p = np %>
2
+
3
+ <% divider ||= nil %>
4
+ <% no_background ||= false %>
5
+ <% title_size ||= "text-xl" %>
6
+
7
+ <div class="<%= "bg-white rounded-md shadow dark:bg-sealBlue-400" unless no_background %> overflow-hidden">
8
+ <div class="py-6 px-8 space-y-2 <%= 'border-b shadow-sm dark:border-sealBlue-500' if divider %>">
9
+ <% if p.content_for? :title %>
10
+ <h2 class="<%= title_size %> font-semibold dark:text-white">
11
+ <%= p.content_for :title %>
12
+ </h2>
13
+ <% end %>
14
+
15
+ <% if p.content_for? :description %>
16
+ <p class="text-gray-400 font-light leading-normal">
17
+ <%= p.content_for :description %>
18
+ </p>
19
+ <% end %>
20
+ </div>
21
+
22
+ <div class="space-y-4">
23
+ <% if p.content_for? :table %>
24
+ <div class="box-table <%= divider ? 'mt-4' : '-mt-1' %> pb-0.5">
25
+ <%= p.content_for :table %>
26
+ </div>
27
+ <% end %>
28
+
29
+ <% if p.content_for?(:body) || p.content_for?(:actions) %>
30
+ <div class="<%= p.content_for?(:body) ? 'py-7' : 'pb-7' %> px-8 space-y-7">
31
+ <% if p.content_for? :body %>
32
+ <div class="space-y-4 <%= '-mt-4' unless divider %>">
33
+ <%= p.content_for :body %>
34
+ </div>
35
+ <% end %>
36
+
37
+ <% if p.content_for? :actions %>
38
+ <div class="space-x">
39
+ <%= p.content_for :actions %>
40
+ </div>
41
+ <% end %>
42
+ </div>
43
+ <% end %>
44
+ </div>
45
+
46
+ <% if p.content_for? :footer %>
47
+ <div class="py-4 px-8 bg-gray-50 border-t dark:bg-sealBlue-300 dark:border-sealBlue-500">
48
+ <%= p.content_for :footer %>
49
+ </div>
50
+ <% end %>
51
+
52
+ <% if p.content_for? :raw_footer %>
53
+ <div class="bg-gray-50 dark:bg-sealBlue-300">
54
+ <%= p.content_for :raw_footer %>
55
+ </div>
56
+ <% end %>
57
+ </div>
@@ -0,0 +1,23 @@
1
+ <% first ||= false %>
2
+ <% url ||= nil %>
3
+
4
+ <% # convert [:account, model] "urls" to strings. %>
5
+ <% url = url.is_a?(String) ? url : main_app.url_for(url) if url %>
6
+
7
+ <li>
8
+ <div class="flex items-center">
9
+ <!-- Heroicon name: chevron-right -->
10
+ <svg class="flex-shrink-0 h-3 w-3 text-gray-400" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true">
11
+ <path fill-rule="evenodd" d="M7.293 14.707a1 1 0 010-1.414L10.586 10 7.293 6.707a1 1 0 011.414-1.414l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414 0z" clip-rule="evenodd" />
12
+ </svg>
13
+
14
+ <% item_style = "ml-3 text-gray-500 uppercase text-2xs tracking-widest" %>
15
+
16
+ <% # don't link to the same page we're already on. %>
17
+ <% if url && url != request.url %>
18
+ <%= link_to label, url, class: "#{item_style} hover:text-gray-700 hover:underline dark:text-blue-300" %>
19
+ <% else %>
20
+ <span class="<%= item_style %>"><%= label %></span>
21
+ <% end %>
22
+ </div>
23
+ </li>
@@ -0,0 +1,41 @@
1
+ <% yield p = np %>
2
+
3
+ <% completion_percent ||= nil %>
4
+
5
+ <div class="py-4 px-8 w-full space-y-3">
6
+ <div class="flex space-x-4">
7
+ <% if p.content_for? :memberships %>
8
+ <div class="flex-0">
9
+ <%= p.content_for :memberships %>
10
+ </div>
11
+ <% end %>
12
+
13
+ <div class="flex-1">
14
+ <div class="flex">
15
+ <div class="flex-1 space-y-4 py-1">
16
+ <div>
17
+ <%= p.content_for :title %>
18
+ </div>
19
+ </div>
20
+
21
+ <% if p.content_for? :actions %>
22
+ <div class="flex-0">
23
+ <%= p.content_for :actions %>
24
+ </div>
25
+ <% end %>
26
+ </div>
27
+
28
+ <% if completion_percent %>
29
+ <div class="mt-3 h-4 bg-gray-100 shadow-inner rounded w-full">
30
+ <div class="h-4 animate-pulse bg-blue rounded" style="width: <%= completion_percent %>%"></div>
31
+ </div>
32
+ <% end %>
33
+
34
+ <% if p.content_for? :status %>
35
+ <div class="<% "mt-2" if completion_percent %> uppercase text-xs text-gray-400">
36
+ <%= p.content_for :status %>
37
+ </div>
38
+ <% end %>
39
+ </div>
40
+ </div>
41
+ </div>
@@ -0,0 +1,12 @@
1
+ <% label ||= t('global.or') %>
2
+
3
+ <div class="relative">
4
+ <div class="absolute inset-0 flex items-center">
5
+ <div class="w-full border-t border-gray-300 dark:border-gray-500"></div>
6
+ </div>
7
+ <div class="relative flex justify-center">
8
+ <span class="px-2 bg-white text-gray-500 uppercase text-xs dark:text-gray-300 dark:bg-sealBlue-400">
9
+ <%= label %>
10
+ </span>
11
+ </div>
12
+ </div>
@@ -0,0 +1,3 @@
1
+ <div class="border-b border-gray-200 pb-4 dark:border-gray-500" style="position: relative;">
2
+ <div style="background-color: #047bf8; width: 26px; height: 4px; position: absolute; left: 0; bottom: -2px; border: 1px solid #047bf8; border-radius: 1px;"></div>
3
+ </div>
@@ -0,0 +1,15 @@
1
+ <% attributes ||= [] %>
2
+ <% attributes.select! { |attribute| form.object.errors[attribute].any? } %>
3
+
4
+ <% if notice.present? %>
5
+ <%= render 'account/shared/alert' do %>
6
+ <%= notice %>
7
+ <% end %>
8
+ <% end %>
9
+
10
+ <% if alert.present? || flash[:error] %>
11
+ <%= render 'account/shared/alert', color: 'red' do %>
12
+ <%= alert %>
13
+ <%= flash[:error] %>
14
+ <% end %>
15
+ <% end %>
@@ -0,0 +1,12 @@
1
+ <% yield p = np %>
2
+
3
+ <%= render 'account/shared/title' do |cp| %>
4
+ <% cp.content_for :title, p.content_for(:title) %>
5
+ <% cp.content_for :actions, p.content_for(:actions) %>
6
+ <% end %>
7
+
8
+ <%= render 'account/shared/notices' %>
9
+
10
+ <div class="space-y-8 py-4 xl:py-8 xl:px-8">
11
+ <%= p.yield :body %>
12
+ </div>
@@ -0,0 +1,18 @@
1
+ <% yield p = np %>
2
+
3
+ <div class="flex flex-row items-center">
4
+ <div class="flex-auto">
5
+ <h1 class="font-semibold text-base dark:text-white">
6
+ <%= p.content_for(:title) %>
7
+ </h1>
8
+ </div>
9
+ <div class="flex-auto text-right leading-none">
10
+ <% if p.content_for? :actions %>
11
+ <%= p.content_for :actions %>
12
+ <% end %>
13
+ </div>
14
+ </div>
15
+
16
+ <div class="mb-4">
17
+ <%= render "themes/light/line" %>
18
+ </div>
@@ -0,0 +1,30 @@
1
+ <% yield p = np %>
2
+
3
+ <% url ||= nil %>
4
+ <% strategy ||= current_attributes_strategy || :none %>
5
+
6
+ <% body = capture do %>
7
+ <% if url.present? %>
8
+ <% link_to url do %>
9
+ <%= p.content_for :body %>
10
+ <% end %>
11
+ <% else %>
12
+ <%= p.content_for :body %>
13
+ <% end %>
14
+ <% end %>
15
+
16
+ <% case strategy %>
17
+ <% when :label %>
18
+ <div>
19
+ <label class="block text-2xs font-semibold py-2 dark:text-white">
20
+ <%= p.content_for :heading %>
21
+ </label>
22
+ <div class="dark:text-gray-400">
23
+ <%= body %>
24
+ </div>
25
+ </div>
26
+
27
+ <% else %>
28
+ <%= body %>
29
+
30
+ <% end %>
@@ -0,0 +1,9 @@
1
+ <% object ||= current_attributes_object %>
2
+ <% strategy ||= current_attributes_strategy || :none %>
3
+ <% url ||= nil %>
4
+
5
+ <% if object.send(attribute).present? %>
6
+ <%= render 'shared/attributes/attribute', object: object, attribute: attribute, strategy: strategy, url: url do %>
7
+ <pre><%= object.send(attribute) %></pre>
8
+ <% end %>
9
+ <% end %>
@@ -0,0 +1,22 @@
1
+ <% yield p = np %>
2
+
3
+ <% p.helpers do
4
+ def account_controller_name_with_namespace
5
+ params[:controller].gsub(/^account\//, '')
6
+ end
7
+ end %>
8
+
9
+ <%
10
+ # don't add controller-specific actions in this file. instead, include them right below where this partial is
11
+ # included. see `app/views/account/teams/_breadcrumbs.html.erb` for an example.
12
+ %>
13
+
14
+ <% if p.account_controller_name_with_namespace == only_for %>
15
+ <% label = if action_name == 'edit'
16
+ ot("#{p.account_controller_name_with_namespace}.breadcrumbs.edit") || t('breadcrumbs.actions.edit')
17
+ elsif action_name == 'new'
18
+ ot("#{p.account_controller_name_with_namespace}.breadcrumbs.new") || t('breadcrumbs.actions.new')
19
+ end %>
20
+
21
+ <%= render 'account/shared/breadcrumb', label: label if label %>
22
+ <% end %>
@@ -0,0 +1,13 @@
1
+ <% yield p = np %>
2
+
3
+ <div class="-m-0.5">
4
+ <div class="border-2 border-dashed rounded-lg border-yellow-300 bg-yellow-100 dark:bg-opacity-10 dark:border-yellow-200 dark:border-opacity-70 -m-3 p-3 xl:py-4 xl:px-4 xl:-mx-4">
5
+ <%= p.content_for :content %>
6
+
7
+ <div class="py-3 px-3 space-y-2 pt-6">
8
+ <p class="text-yellow-600 dark:text-yellow-200 font-light leading-normal">
9
+ <%= p.content_for :commentary %>
10
+ </p>
11
+ </div>
12
+ </div>
13
+ </div>
@@ -0,0 +1,81 @@
1
+ <% yield %>
2
+
3
+ <%
4
+ form ||= current_fields_form
5
+ # returns a struct with `label`, `placeholder`, and `help` methods.
6
+ labels = labels_for(form, method)
7
+ options ||= {}
8
+ options[:id] ||= id_for(form, method)
9
+ # options[:disabled] ||= !field_editable?(form.object, method) if user_signed_in?
10
+ options[:placeholder] ||= labels.placeholder if labels.placeholder
11
+ other_options ||= {}
12
+ other_options[:help] = [other_options[:help], labels.help].compact.join(" ")
13
+
14
+ 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? || content_for(:error).present? || other_options[:error].present?
16
+
17
+ options[:class] = "#{options[:class]} block w-full rounded-md shadow-sm font-light text-sm"
18
+
19
+ options[:class] += if has_errors
20
+ " pr-10 border-red text-red-darker placeholder-red focus:outline-none focus:ring-red focus:border-red dark:bg-sealBlue-300 dark:text-sealBlue-900"
21
+ else
22
+ " focus:ring-blue focus:border-blue border-gray-300 dark:bg-sealBlue-300 dark:border-sealBlue-100 dark:text-sealBlue-900"
23
+ end
24
+
25
+ %>
26
+
27
+ <div class="<%= 'required' if presence_validated?(form.object, method) %>">
28
+
29
+ <% # the label. %>
30
+ <% unless other_options[:hide_label] == true %>
31
+ <% if content_for? :label %>
32
+ <%= yield :label %>
33
+ <% flush_content_for :label %>
34
+ <% else %>
35
+ <% # allow the label to be defined via an inline option or else one of the locale yaml definitions. %>
36
+ <% label = (other_options[:label].presence || labels.label || legacy_label_for(form, method)) %>
37
+ <%= form.label method, label&.html_safe, class: 'block', for: options[:id] %>
38
+ <% end %>
39
+ <% end %>
40
+
41
+ <div class="mt-1.5">
42
+
43
+ <% # the actual field. %>
44
+ <% if content_for? :field %>
45
+ <%= yield :field %>
46
+ <% flush_content_for :field %>
47
+ <% else %>
48
+ <% # e.g. form.text_field(method, options) %>
49
+ <%= form.send(helper, method, options) %>
50
+ <% end %>
51
+
52
+ </div>
53
+
54
+ <% # any error messages. %>
55
+ <% if has_errors %>
56
+ <p class="mt-1.5 text-xs text-red">
57
+ <%= errors.map { |error| error + ". " }.join %>
58
+ <%= yield :error %>
59
+ <% flush_content_for :error %>
60
+ <% if other_options[:hide_custom_error].blank? %>
61
+ <%= other_options[:error]&.html_safe %>
62
+ <% end %>
63
+ </p>
64
+ <% end %>
65
+
66
+ <% # any help text. %>
67
+ <% if content_for?(:help) || other_options[:help] || content_for?(:after_help) %>
68
+ <p class="mt-1.5 text-xs text-gray-500">
69
+ <%= yield :help %>
70
+ <% flush_content_for :help %>
71
+ <%= other_options[:help]&.html_safe %>
72
+ <%= yield :after_help %>
73
+ <% flush_content_for :after_help %>
74
+ </p>
75
+ <% end %>
76
+
77
+ <% if other_options[:icon] %>
78
+ <div class="pre-icon os-icon <%= other_options[:icon] %>"></div>
79
+ <% end %>
80
+
81
+ </div>
@@ -0,0 +1,14 @@
1
+ <% attributes ||= [] %>
2
+ <% attributes.select! { |attribute| form.object.errors[attribute].any? } %>
3
+ <% if form.object.errors[:base].any? || form.object.errors.present? || attributes.any? %>
4
+ <%= render 'account/shared/alert', color: 'red' do %>
5
+ <% if form.object.errors[:base].any? || attributes.any? %>
6
+ <%= form.object.errors[:base].join(' ') %>
7
+ <% attributes.each do |attribute| %>
8
+ <%= resource.class.human_attribute_name(attribute) %> <%= resource.errors[attribute].to_sentence %>.
9
+ <% end %>
10
+ <% else %>
11
+ Please correct the errors below.
12
+ <% end %>
13
+ <% end %>
14
+ <% end %>
@@ -0,0 +1,138 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <%= render 'themes/light/layouts/head' %>
5
+ </head>
6
+ <body class="bg-light-blue-gradient text-gray-700 text-sm font-normal dark:bg-dark-blue-gradient dark:text-sealBlue-900">
7
+ <div class="p-4 bg-blue-darker electron-draggable electron-title-bar hidden electron-mobile-only"></div>
8
+ <div class="md:p-5 main-container-padding">
9
+ <div class="h-screen md:h-auto overflow-hidden md:rounded-lg flex shadow main-container"
10
+ data-controller="mobile-menu"
11
+ data-mobile-menu-hidden-class="hidden"
12
+ data-mobile-menu-show-event-name-value="mobile-menu:show"
13
+ data-mobile-menu-hide-event-name-value="mobile-menu:hide"
14
+ >
15
+
16
+ <% menu = capture do %>
17
+ <div class="flex items-center flex-shrink-0 p-4 bg-blue-darker md:rounded-tl-lg electron-draggable electron-title-bar dark:bg-black dark:bg-opacity-10">
18
+ <%= image_tag asset_pack_path('media/images/light/logo/logo.png'), class: 'h-5 w-auto mx-auto' %>
19
+
20
+ <div class="lg:hidden absolute right-0">
21
+ <button class="ml-1 flex items-center justify-center h-10 w-10 rounded-full focus:outline-none focus:ring-2 focus:ring-inset focus:ring-white dark:ring-transparent"
22
+ data-action="reveal#hide"
23
+ >
24
+ <span class="sr-only">Close Application Menu</span>
25
+ <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">
26
+ <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12" />
27
+ </svg>
28
+ </button>
29
+ </div>
30
+ </div>
31
+
32
+ <nav class="flex-1 space-y-1 overflow-y-auto select-none">
33
+ <div class="flex-shrink-0 flex shadow px-5 py-4">
34
+ <div class="flex-shrink-0 w-full group block no-underline">
35
+ <div class="flex items-center">
36
+ <div class="inline-block rounded-full border border-white p-1">
37
+ <%= image_tag membership_profile_photo_url(current_membership), class: 'h-9 w-9 rounded-full', alt: current_user.name %>
38
+ </div>
39
+ <div class="ml-3">
40
+ <div class="text-white">
41
+ <%= current_user.name %>
42
+ </div>
43
+ <div class="text-2xs tracking-widest uppercase text-blue-light group-hover:text-white dark:text-gray-500">
44
+ <%= current_team.name %>
45
+ </div>
46
+ </div>
47
+ </div>
48
+ </div>
49
+ </div>
50
+
51
+ <div class="px-5 py-4 menu">
52
+ <%= render 'account/shared/menu' %>
53
+ </div>
54
+ </nav>
55
+ <% end %>
56
+
57
+ <div class="lg:hidden hidden"
58
+ data-mobile-menu-target="wrapper"
59
+
60
+ data-controller="reveal"
61
+ data-reveal-away-value="true"
62
+ data-reveal-hide-keys-value="escape"
63
+
64
+ data-action="mobile-menu:show->reveal#show mobile-menu:hide->reveal#hide mobile-menu-toggle->reveal#toggle reveal:hidden->mobile-menu#hideWrapper"
65
+ >
66
+ <div class="fixed inset-0 flex z-40">
67
+ <button
68
+ data-action="reveal#hide"
69
+
70
+ hidden
71
+ data-reveal
72
+ data-transition
73
+ data-transition-enter="transition-opacity ease-linear duration-200"
74
+ data-transition-enter-start="opacity-0"
75
+ data-transition-enter-end="opacity-100"
76
+ data-transition-leave="transition-opacity ease-linear duration-200"
77
+ data-transition-leave-start="opacity-100"
78
+ data-transition-leave-end="opacity-0"
79
+
80
+ class="fixed inset-0" aria-hidden="true"
81
+ >
82
+ <div class="absolute inset-0 bg-light-blue-gradient opacity-75"></div>
83
+ </button>
84
+ <div
85
+ hidden
86
+ data-reveal
87
+ data-transition
88
+ data-transition-enter="transition ease-in-out duration-200 transform"
89
+ data-transition-enter-start="-translate-x-full"
90
+ data-transition-enter-end="translate-x-0"
91
+ data-transition-leave="transition ease-in-out duration-200 transform"
92
+ data-transition-leave-start="translate-x-0"
93
+ data-transition-leave-end="-translate-x-full"
94
+
95
+ class="relative flex-1 flex flex-col max-w-xs w-full pb-4 bg-dark-blue-gradient shadow-xl"
96
+ >
97
+ <%= menu %>
98
+ </div>
99
+ <div class="flex-shrink-0 w-14" aria-hidden="true"></div>
100
+ </div>
101
+ </div>
102
+
103
+ <div class="hidden lg:flex lg:flex-shrink-0 overflow-y-auto bg-gradient-to-b from-vividBlue-700 to-vividBlue-800 dark:from-sealBlue-200 dark:to-sealBlue-200">
104
+ <div class="w-64">
105
+ <%= menu %>
106
+ </div>
107
+ </div>
108
+
109
+ <div class="flex flex-col w-0 flex-1 overflow-y-auto bg-gray-100 dark:bg-sealBlue-200 lg:border-l dark:border-gray-500">
110
+ <main class="flex-1 relative z-0 focus:outline-none" tabindex="0">
111
+ <div class="flex flex-row items-center shadow-sm electron-draggable">
112
+ <button class="mobile-menu-trigger lg:hidden h-12 w-12 ml-1 flex-none inline-flex items-center justify-center rounded-md text-gray-500 hover:text-gray-900 focus:outline-none focus:ring-2 focus:ring-inset focus:ring-blue"
113
+ data-action="mobile-menu#toggle"
114
+ >
115
+ <span class="sr-only">Open Application Menu</span>
116
+ <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">
117
+ <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 6h16M4 12h16M4 18h16" />
118
+ </svg>
119
+ </button>
120
+
121
+ <nav class="flex px-1 lg:px-4 py-2 overflow-x-auto select-none" aria-label="Breadcrumb">
122
+ <ol class="breadcrumb whitespace-nowrap flex items-center space-x-3 py-0.5 pr-3">
123
+ <%= render('breadcrumbs').strip.html_safe %>
124
+ </ol>
125
+ </nav>
126
+ </div>
127
+
128
+ <div class="py-2 px-1">
129
+ <div class="mx-auto px-4 sm:px-6 py-4">
130
+ <%= yield %>
131
+ </div>
132
+ </div>
133
+ </main>
134
+ </div>
135
+ </div>
136
+ </div>
137
+ </body>
138
+ </html>
@@ -0,0 +1,11 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <%= render 'themes/light/layouts/head' %>
5
+ </head>
6
+ <body class="bg-light-blue-gradient text-gray-700 text-sm font-normal electron-draggable dark:bg-dark-blue-gradient dark:text-sealBlue-900">
7
+ <div data-turbo="false">
8
+ <%= yield %>
9
+ </div>
10
+ </body>
11
+ </html>
@@ -0,0 +1,6 @@
1
+ <%= stylesheet_link_tag 'https://rsms.me/inter/inter.css', media: 'all', 'data-turbo-track': 'reload' %>
2
+ <link href="<%= asset_pack_path('media/images/light/logo/favicon.png') %>" rel="shortcut icon" />
3
+ <link href="<%= asset_pack_path('media/images/light/logo/logo-square-bg.png') %>" rel="apple-touch-icon" />
4
+ <%= stylesheet_pack_tag 'light', media: 'all', 'data-turbo-track': 'reload' %>
5
+ <%= javascript_pack_tag 'light', 'data-turbo-track': 'reload' %>
6
+ <%= render 'layouts/head' %>
@@ -0,0 +1,18 @@
1
+ <% size ||= 12 %>
2
+ <% align ||= nil %>
3
+
4
+ <% valid_sizes = [7, 9, 12] %>
5
+ <% raise "Invalid membership photo size: #{size}. Valid options are #{valid_sizes.to_sentence}." unless valid_sizes.include?(size) %>
6
+
7
+ <div class="flex overflow-hidden <%= 'place-content-center' if align == :center %>">
8
+ <% memberships.each_with_index do |membership, index| %>
9
+ <%= image_tag membership_profile_photo_url(membership), class: "#{'-ml-1' if index > 0} inline-block h-#{size} w-#{size} rounded-full ring-2 ring-white dark:ring-transparent" %>
10
+ <% end %>
11
+ </div>
12
+
13
+ <% # we have to list out the evaluations we want possible above so purgecss includes them in production. %>
14
+ <% if false %>
15
+ <div class="h-12 w-12"></div>
16
+ <div class="h-9 w-9"></div>
17
+ <div class="h-7 w-7"></div>
18
+ <% end %>
@@ -0,0 +1,3 @@
1
+ <div class="text-xs py-2 uppercase tracking-wider text-blue-lightish">
2
+ <%= yield %>
3
+ </div>
@@ -0,0 +1,16 @@
1
+ <% yield p = np %>
2
+
3
+ <% method ||= nil %>
4
+ <% active ||= request.path == url %>
5
+
6
+ <%= send (method ? :button_to : :link_to), url, class: "block group hover:text-white hover:no-underline hover-indent-child #{'bg-blue-darker dark:bg-black dark:bg-opacity-10' if active} text-white px-2 py-2 rounded-md dark:text-white", method: method do %>
7
+ <div class="inline-block indent-child flex items-center">
8
+ <!-- Heroicon name: home -->
9
+ <% if p.content_for? :icon %>
10
+ <span class="mr-3 h-6 w-6 text-center text-blue-light text-xl leading-6 dark:text-gray-400">
11
+ <%= p.content_for :icon %>
12
+ </span>
13
+ <% end %>
14
+ <%= label %>
15
+ </div>
16
+ <% end %>
@@ -0,0 +1,7 @@
1
+ <div class="pb-3">
2
+ <%= render 'account/shared/menu/heading' do %>
3
+ <%= title %>
4
+ <% end %>
5
+
6
+ <%= yield %>
7
+ </div>
@@ -0,0 +1,31 @@
1
+ <% yield p = np %>
2
+
3
+ <% width ||= "max-w-md" %>
4
+
5
+ <div class="min-h-screen flex flex-col justify-center sm:py-12">
6
+ <div class="mx-auto w-full <%= width %> p-1.5">
7
+ <div class="bg-white py-8 px-10 shadow rounded-lg dark:bg-sealBlue-400">
8
+ <div class="sm:mx-auto sm:w-full sm:max-w-md py-5">
9
+ <a href="<%= main_app.root_path %>" class="block py-3">
10
+ <img alt="" src="<%= asset_pack_path("media/images/light/logo/logo.png") %>" width="<%= image_width_for_height('light/logo/logo.png', 54) %>" height="54" class="mx-auto h-12 w-auto" />
11
+ </a>
12
+
13
+ <h1 class="mt-6 text-center text-3xl font-semibold tracking-tight dark:text-white">
14
+ <%= p.yield :title %>
15
+ </h1>
16
+
17
+ <%= render "themes/light/line" %>
18
+ </div>
19
+
20
+ <div class="electron-undraggable pt-5 space-y-5">
21
+ <%= p.content_for :body %>
22
+ </div>
23
+ </div>
24
+ </div>
25
+ </div>
26
+
27
+ <% # we have to list out the evaluations we want possible above so purgecss includes them in production. %>
28
+ <% if false %>
29
+ <div class="max-w-md"></div>
30
+ <div class="max-w-lg"></div>
31
+ <% end %>
data/config/routes.rb ADDED
@@ -0,0 +1,2 @@
1
+ Rails.application.routes.draw do
2
+ end
@@ -0,0 +1,10 @@
1
+ require_relative "path_snitch"
2
+
3
+ module BulletTrain
4
+ module Themes
5
+ module Light
6
+ class Engine < ::Rails::Engine
7
+ end
8
+ end
9
+ end
10
+ end
@@ -0,0 +1,9 @@
1
+ # TODO This is my best attempt at allowing us to figure out where theme partials might be getting served from.
2
+ # We can only inspect the source location of a class (not a module), and this gem has no other classes, so we need this.
3
+ # See https://stackoverflow.com/questions/13012109/get-class-location-from-class-object for context.
4
+ class BulletTrain::Themes::Light::PathSnitch
5
+ def self.confess
6
+ # This method allows us to call `BulletTrain::Themes::PathSnitch.method(:confess).source_location` and see where
7
+ # this gem is being served from... which allows us to check it's `view/themes` directory for partials.
8
+ end
9
+ end
@@ -0,0 +1,7 @@
1
+ module BulletTrain
2
+ module Themes
3
+ module Light
4
+ VERSION = "1.0.0"
5
+ end
6
+ end
7
+ end
@@ -0,0 +1,10 @@
1
+ require "bullet_train/themes/light/version"
2
+ require "bullet_train/themes/light/engine"
3
+
4
+ module BulletTrain
5
+ module Themes
6
+ module Light
7
+ # Your code goes here...
8
+ end
9
+ end
10
+ end
@@ -0,0 +1,4 @@
1
+ # desc "Explaining what the task does"
2
+ # task :bullet_train_themes_light do
3
+ # # Task goes here
4
+ # end
metadata ADDED
@@ -0,0 +1,92 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: bullet_train-themes-light
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.0.0
5
+ platform: ruby
6
+ authors:
7
+ - Andrew Culver
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2022-01-24 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: rails
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: 7.0.0
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: 7.0.0
27
+ description: 'Bullet Train Themes: Light'
28
+ email:
29
+ - andrew.culver@gmail.com
30
+ executables: []
31
+ extensions: []
32
+ extra_rdoc_files: []
33
+ files:
34
+ - MIT-LICENSE
35
+ - README.md
36
+ - Rakefile
37
+ - app/assets/config/bullet_train_themes_light_manifest.js
38
+ - app/views/themes/light/_alert.html.erb
39
+ - app/views/themes/light/_box.html.erb
40
+ - app/views/themes/light/_breadcrumb.html.erb
41
+ - app/views/themes/light/_cell.html.erb
42
+ - app/views/themes/light/_decision_line.html.erb
43
+ - app/views/themes/light/_line.html.erb
44
+ - app/views/themes/light/_notices.html.erb
45
+ - app/views/themes/light/_page.html.erb
46
+ - app/views/themes/light/_title.html.erb
47
+ - app/views/themes/light/attributes/_base.html.erb
48
+ - app/views/themes/light/attributes/_block.html.erb
49
+ - app/views/themes/light/breadcrumbs/_actions.html.erb
50
+ - app/views/themes/light/commentary/_box.html.erb
51
+ - app/views/themes/light/fields/_field.html.erb
52
+ - app/views/themes/light/forms/_errors.html.erb
53
+ - app/views/themes/light/layouts/_account.html.erb
54
+ - app/views/themes/light/layouts/_devise.html.erb
55
+ - app/views/themes/light/layouts/_head.html.erb
56
+ - app/views/themes/light/memberships/_photos.html.erb
57
+ - app/views/themes/light/menu/_heading.html.erb
58
+ - app/views/themes/light/menu/_item.html.erb
59
+ - app/views/themes/light/menu/_section.html.erb
60
+ - app/views/themes/light/workflow/_box.html.erb
61
+ - config/routes.rb
62
+ - lib/bullet_train/themes/light.rb
63
+ - lib/bullet_train/themes/light/engine.rb
64
+ - lib/bullet_train/themes/light/path_snitch.rb
65
+ - lib/bullet_train/themes/light/version.rb
66
+ - lib/tasks/bullet_train/themes/light_tasks.rake
67
+ homepage: https://github.com/bullet-train-co/bullet_train-themes-light
68
+ licenses:
69
+ - MIT
70
+ metadata:
71
+ homepage_uri: https://github.com/bullet-train-co/bullet_train-themes-light
72
+ source_code_uri: https://github.com/bullet-train-co/bullet_train-themes-light
73
+ post_install_message:
74
+ rdoc_options: []
75
+ require_paths:
76
+ - lib
77
+ required_ruby_version: !ruby/object:Gem::Requirement
78
+ requirements:
79
+ - - ">="
80
+ - !ruby/object:Gem::Version
81
+ version: '0'
82
+ required_rubygems_version: !ruby/object:Gem::Requirement
83
+ requirements:
84
+ - - ">="
85
+ - !ruby/object:Gem::Version
86
+ version: '0'
87
+ requirements: []
88
+ rubygems_version: 3.2.22
89
+ signing_key:
90
+ specification_version: 4
91
+ summary: 'Bullet Train Themes: Light'
92
+ test_files: []