railsui 3.1.3 → 3.1.4

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: df855964349c35161137f0bfdd3cf50c5d2848a98c54a576908c141cb5f63b2e
4
- data.tar.gz: 02afd4796e2c37f767ece3081c1ea6e80a2d8761ab4afb398a2f783406c36a27
3
+ metadata.gz: 3a50459023882f904ec9c9c65d16c10c40df5ea71b68609788fdf7faaa648754
4
+ data.tar.gz: 80705182bfbf26f90efa906da3cb5a7783294fb30af91c2e1bad0927463fce29
5
5
  SHA512:
6
- metadata.gz: 7df7fcabd4b9c96566d883c7d0a3ec9038f44e54f1df6bb455c7081f82ec5ec6aa355dead06247db5c3a8bf2cda5917e5a750a4854c1cd9ec2e3461bf8a58428
7
- data.tar.gz: 075b23a0339c5ed855f7fb68714116979f1e3115f4874fc61c4a5cb5c3052f09db965ae607cb2c6f01395c92b4b270563b75ced4e2c64ff35f7eaedca90e2fab
6
+ metadata.gz: 94a990e878c21fcf9d72ef62de7fe5ae01eac8fcaa1d2bca1581adca6e9e7c99423b8bf8599bbbb3432f449557c7065870259e7cfed76dee04b002ac46f085fc
7
+ data.tar.gz: 4b29dc49fe711b5e18acb8f049f2a518d77fc06c901c95347508f018548cda13b0a0564da4b6f088c881d62231b1c5221b739b96335360f26f0e79eb35ba8236
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- railsui (3.1.3)
4
+ railsui (3.1.4)
5
5
  meta-tags
6
6
  psych
7
7
  rails (>= 7.0)
@@ -0,0 +1,11 @@
1
+ require_dependency "railsui/application_controller"
2
+
3
+ module Railsui
4
+ class PagesController < ApplicationController
5
+ layout "railsui/fullwidth"
6
+
7
+ def show
8
+ @theme_pages = Railsui::Pages.installed_pages
9
+ end
10
+ end
11
+ end
@@ -0,0 +1,43 @@
1
+ <div class="py-8" data-controller="railsui-pages">
2
+ <%= heading text: "Pages", id: "pages", tag: "h2", class: "font-bold text-3xl tracking-tight mb-6" %>
3
+
4
+ <div class="prose prose-neutra dark:prose-invert mb-6">
5
+ <p>Prototype rapidly with ready-made pages that look great with the <%= theme_name.humanize %> theme.</p>
6
+ </div>
7
+
8
+ <div class="mb-10">
9
+ <div class="divide-y divide-neutral-200/80 dark:divide-neutral-700/80 py-2.5">
10
+ <% @theme_pages.each do |page, details| %>
11
+ <div class="flex flex-wrap items-start justify-between py-3">
12
+ <%= render "railsui/admin/fields/page", page: page, details: details %>
13
+ </div>
14
+ <% end %>
15
+ </div>
16
+ </div>
17
+
18
+ <div class="flex items-start gap-5 py-5">
19
+ <div class="flex-shrink-0">
20
+ <div class="size-10 rounded-full flex items-center justify-center bg-neutral-50 dark:bg-neutral-800/80">
21
+ <%= icon "document-plus", class: "size-5 text-neutral-600 dark:text-neutral-400" %>
22
+ </div>
23
+ </div>
24
+
25
+ <div class="prose prose-sm max-w-full prose-neutral dark:prose-invert">
26
+ <h4>Adding pages</h4>
27
+ <p>Installed pages are found inside the <code>app/views/rui/pages</code> folder.</p>
28
+ </div>
29
+ </div>
30
+
31
+ <div class="flex items-start gap-5 py-5">
32
+ <div class="flex-shrink-0">
33
+ <div class="size-10 rounded-full flex items-center justify-center bg-neutral-50 dark:bg-neutral-800/80">
34
+ <%= icon "hand-thumb-up", class: "size-5 text-neutral-600 dark:text-neutral-400" %>
35
+ </div>
36
+ </div>
37
+
38
+ <div class="prose prose-sm max-w-full prose-neutral dark:prose-invert">
39
+ <h4>Best practices</h4>
40
+ <p>Pages are a starting point. Copy them to other views you're working on and make changes there as opposed to directly inside the <code>app/views/rui/pages</code> directory. Treat this directory as read-only. <strong>Changing your Rails UI configuration will override the directory</strong>.</p>
41
+ </div>
42
+ </div>
43
+ </div>
@@ -30,8 +30,6 @@
30
30
 
31
31
  <% if Railsui.config.theme.present? %>
32
32
  <a href="#color" data-action="click->railsui-smooth#scroll" class="pl-1 pr-2 py-1.5 block relative hover:transition hover:duration-200 hover:ease-in-out dark:focus:text-white hover:bg-neutral-50/90 rounded transition dark:text-neutral-200 dark:hover:bg-neutral-800/70 dark:hover:text-white group">Color</a>
33
-
34
- <a href="#pages" data-action="click->railsui-smooth#scroll" class="pl-1 pr-2 py-1.5 block relative hover:transition hover:duration-200 hover:ease-in-out dark:focus:text-white hover:bg-neutral-50/90 rounded transition dark:text-neutral-200 dark:hover:bg-neutral-800/70 dark:hover:text-white group">Pages</a>
35
33
  <% end %>
36
34
  </div>
37
35
  <% end %>
@@ -39,6 +37,8 @@
39
37
  <% if Railsui.config.theme.present? %>
40
38
  <%= render "railsui/shared/global_nav_item", path: systems_path, icon: "cube", label:"Components" %>
41
39
 
40
+ <%= render "railsui/shared/global_nav_item", path: pages_url, icon: "window", label: "Pages" %>
41
+
42
42
  <% if params[:controller].include?('systems') %>
43
43
  <%= render "railsui/shared/system_nav" %>
44
44
  <% end %>
data/config/routes.rb CHANGED
@@ -7,6 +7,7 @@ Railsui::Engine.routes.draw do
7
7
  resource :routes, only: :show
8
8
  resources :mailers, only: [:index, :show]
9
9
  get :delete_page, to: "configurations#delete_page"
10
+ get :pages, to: "pages#show"
10
11
 
11
12
  namespace :systems do
12
13
  get :authentication
@@ -1,3 +1,3 @@
1
1
  module Railsui
2
- VERSION = "3.1.3"
2
+ VERSION = "3.1.4"
3
3
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: railsui
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.1.3
4
+ version: 3.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andy Leverenz
8
8
  bindir: bin
9
9
  cert_chain: []
10
- date: 2025-03-28 00:00:00.000000000 Z
10
+ date: 2025-05-01 00:00:00.000000000 Z
11
11
  dependencies:
12
12
  - !ruby/object:Gem::Dependency
13
13
  name: rails
@@ -750,6 +750,7 @@ files:
750
750
  - app/controllers/railsui/application_controller.rb
751
751
  - app/controllers/railsui/configurations_controller.rb
752
752
  - app/controllers/railsui/default_controller.rb
753
+ - app/controllers/railsui/pages_controller.rb
753
754
  - app/controllers/railsui/routes_controller.rb
754
755
  - app/controllers/railsui/systems/authentication/devise_controller.rb
755
756
  - app/controllers/railsui/systems/authentication/static_controller.rb
@@ -806,6 +807,7 @@ files:
806
807
  - app/views/railsui/default/_link.html.erb
807
808
  - app/views/railsui/default/index.html.erb
808
809
  - app/views/railsui/default/start.html.erb
810
+ - app/views/railsui/pages/show.html.erb
809
811
  - app/views/railsui/routes/_nav.html.erb
810
812
  - app/views/railsui/routes/show.html.erb
811
813
  - app/views/railsui/shared/_callout.html.erb