ruby_cms 0.1.7 → 0.1.9

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: cf4ff917e02707c3a9d4ed7cec086d357b3c7de708ebc58475a4b5c0276a64bd
4
- data.tar.gz: be5e98bda847b6b1129210ba575fb29951f7e2ac96d53e9fcdb7cf58af7e97b6
3
+ metadata.gz: 1f7daf58804d218f4b8e2e87841c9b8f66dbc78668b3b0819bb902cb82952c97
4
+ data.tar.gz: acb0830e517c078c8e5fe62eb1f148935adac513ba761f12d166e5c99d400622
5
5
  SHA512:
6
- metadata.gz: 97f3797085020d26908c8189324fc3f157241be0aa1eecc4a7575d4a7839ea3920662ee7e9e2f6ad509c1fd7810cc291fc9c09f23630f98c4b2d208ef50dd1af
7
- data.tar.gz: 7ce9c3b67c447847f407b3fa96ee3dacee1780bd14352f3da9cc310d71868cccbed42e5de0c13cd1f9a6e8edc0bfbf6c96acc0a3cad37e5c2dcbaf7db448715b
6
+ metadata.gz: 6ddd67cc13c744e97c345185f68c3db4919f6115cb8440eeed9e17afb262bac749241282afec071e25e04429fdfd059ef9ac6113e1c47d0473b242aed397f3d3
7
+ data.tar.gz: c85d346d3b65f7ce7a51578b3d654ad1ca15c7e6f121dbc4387abd23f562b70bfb2255edaa06aa12b56f34ae02b985a92cd89d2ea1c578bc3005f6e0f64d2c01
data/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  ## [Unreleased]
2
2
 
3
+ ## [0.1.0.9] - 2026-03-25
4
+
5
+ - Update gems
6
+
7
+ ## [0.1.0.8] - 2026-03-25
8
+
9
+ - Update admin page styling
10
+
3
11
  ## [0.1.0.7] - 2026-03-25
4
12
 
5
13
  - Improve some styling and fix rich text
@@ -31,15 +31,15 @@ module RubyCms
31
31
  CARD_CLASS = "bg-card shadow-sm rounded-xl border border-border/60 ring-1 ring-black/[0.03] overflow-hidden"
32
32
  GRID_CLASS = "grid grid-cols-1 lg:grid-cols-3"
33
33
  MAIN_CLASS = "lg:col-span-2 p-6 space-y-6"
34
- SIDEBAR_CLASS = "border-t lg:border-t-0 lg:border-l border-border/60 bg-muted/20 p-6 space-y-6"
35
- ACTIONS_CLASS = "flex items-center justify-end gap-3 border-t border-border/60 px-6 py-4 bg-muted/20"
34
+ SIDEBAR_CLASS = "border-t lg:border-t-0 lg:border-l border-border/60 bg-background p-6 space-y-6"
35
+ ACTIONS_CLASS = "flex items-center justify-end gap-3 border-t border-border/60 px-6 py-4 bg-background"
36
36
 
37
37
  INPUT_CLASS = "block w-full rounded-lg border border-border bg-background px-3 py-2 text-sm text-foreground shadow-sm placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-primary/30 focus:border-primary transition-colors"
38
38
  LABEL_CLASS = "block text-sm font-medium text-foreground mb-1.5"
39
39
  HINT_CLASS = "mt-1 text-xs text-muted-foreground"
40
40
  FILE_INPUT_CLASS = "block w-full text-sm text-muted-foreground file:mr-3 file:py-1.5 file:px-3 file:rounded-lg file:border-0 file:text-sm file:font-medium file:bg-primary/10 file:text-primary hover:file:bg-primary/20 transition-colors"
41
41
 
42
- SECTION_CLASS = "rounded-xl border border-border/60 bg-muted/30 p-5"
42
+ SECTION_CLASS = "rounded-xl border border-border/60 bg-background p-5"
43
43
  SECTION_TITLE_CLASS = "text-sm font-semibold text-foreground tracking-tight mb-4"
44
44
  DETAIL_LABEL_CLASS = "text-xs font-medium text-muted-foreground uppercase tracking-wider"
45
45
  DETAIL_VALUE_CLASS = "mt-1 text-sm text-foreground"
@@ -78,33 +78,28 @@
78
78
 
79
79
  <%# ── Locale Tabs ── %>
80
80
  <% if @blocks_by_locale.present? %>
81
- <% active_locale = @blocks_by_locale.key?(@content_block.locale.to_s) ? @content_block.locale.to_s : @blocks_by_locale.keys.first %>
82
81
  <div class="rounded-xl border border-border/60 overflow-hidden" data-controller="ruby-cms--locale-tabs">
83
- <div class="flex gap-1 p-2 bg-muted/30 border-b border-border/60" role="tablist">
84
- <% @blocks_by_locale.each do |locale_s, _| %>
85
- <% selected = locale_s == active_locale %>
82
+ <div class="flex gap-1 p-2 bg-background border-b border-border/60" role="tablist">
83
+ <% @blocks_by_locale.each_with_index do |(locale_s, _), idx| %>
86
84
  <button type="button"
87
85
  role="tab"
88
- aria-selected="<%= selected %>"
86
+ aria-selected="<%= idx == 0 %>"
89
87
  aria-controls="locale-panel-<%= locale_s %>"
90
88
  id="locale-tab-<%= locale_s %>"
91
89
  data-ruby-cms--locale-tabs-target="tab"
92
90
  data-panel-id="locale-panel-<%= locale_s %>"
93
- data-active-classes="bg-background text-primary shadow-sm ring-1 ring-border/60"
94
- data-inactive-classes="bg-transparent text-muted-foreground hover:bg-muted hover:text-foreground"
95
91
  data-action="click->ruby-cms--locale-tabs#switchTab"
96
- class="px-3 py-1.5 rounded-md text-xs font-medium border-none cursor-pointer transition-colors <%= selected ? 'bg-background text-primary shadow-sm ring-1 ring-border/60' : 'bg-transparent text-muted-foreground hover:bg-muted hover:text-foreground' %>">
92
+ class="px-3 py-1.5 rounded-md text-xs font-medium border-none cursor-pointer transition-colors <%= idx == 0 ? 'bg-background text-primary shadow-sm ring-1 ring-border/60' : 'bg-transparent text-muted-foreground hover:bg-muted hover:text-foreground' %>">
97
93
  <%= ruby_cms_locale_display_name(locale_s) %>
98
94
  </button>
99
95
  <% end %>
100
96
  </div>
101
97
 
102
- <% @blocks_by_locale.each do |locale_s, block| %>
103
- <% selected = locale_s == active_locale %>
98
+ <% @blocks_by_locale.each_with_index do |(locale_s, block), idx| %>
104
99
  <div id="locale-panel-<%= locale_s %>"
105
100
  role="tabpanel"
106
101
  aria-labelledby="locale-tab-<%= locale_s %>"
107
- class="p-5 <%= selected ? '' : 'hidden' %>"
102
+ class="p-5 <%= idx > 0 ? 'hidden' : '' %>"
108
103
  data-locale-panel>
109
104
 
110
105
  <%= hidden_field_tag "content_block[locales][#{locale_s}][locale]", locale_s %>
@@ -209,8 +204,8 @@
209
204
  <div class="space-y-3">
210
205
  <% @blocks_by_locale.each do |locale_s, block| %>
211
206
  <% next if block.title.blank? && block.content_body.blank? %>
212
- <div class="py-1">
213
- <span class="text-[10px] font-semibold uppercase tracking-wide text-muted-foreground"><%= ruby_cms_locale_display_name(locale_s) %></span>
207
+ <div class="rounded-lg border border-border/60 bg-background p-3">
208
+ <span class="inline-flex items-center rounded-md bg-background px-1.5 py-0.5 text-[10px] font-medium text-muted-foreground ring-1 ring-border/60 mb-2"><%= ruby_cms_locale_display_name(locale_s) %></span>
214
209
  <% if block.title.present? %>
215
210
  <p class="text-xs font-medium text-foreground"><%= block.title %></p>
216
211
  <% end %>
@@ -399,9 +399,7 @@ module RubyCms
399
399
  content = File.read(importmap_path)
400
400
  lines_to_add = []
401
401
  lines_to_add << %(pin "trix") unless content.include?('pin "trix"')
402
- unless content.include?('pin "@rails/actiontext"')
403
- lines_to_add << %(pin "@rails/actiontext", to: "actiontext.esm.js")
404
- end
402
+ lines_to_add << %(pin "@rails/actiontext", to: "actiontext.esm.js") unless content.include?('pin "@rails/actiontext"')
405
403
  return if lines_to_add.empty?
406
404
 
407
405
  inject_into_file importmap_path.to_s, before: /^end/ do
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module RubyCms
4
- VERSION = "0.1.7"
4
+ VERSION = "0.1.9"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruby_cms
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.7
4
+ version: 0.1.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Codebyjob