activeadmin-claude-theme 0.1.0

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 ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 4237be44f1157ffc330cfb1b5ffbf1fb7c91c5dd1de12b2541f386fc3004c414
4
+ data.tar.gz: ea318e397949ed5546083e144418b0ec9178ccd18c164484cd4b53e88eafd024
5
+ SHA512:
6
+ metadata.gz: 715ee53ff65c0baced0bc9de6f646fa7cc38bb157cce796743d16f474c12aea3457db128ac9f84ca3f6f42e5db36ea4b434e24ae5b01ef559766269580b684fb
7
+ data.tar.gz: ef0b5886a35e3d89d77cb7c60fccec89e187f31add7045196e85c320a84c77736784b91a59c1b08e0aa2cfe5a92036d4c725df502a27ec73663dacfb6ee198a6
@@ -0,0 +1,26 @@
1
+ # Contributor Covenant Code of Conduct
2
+
3
+ ## Our Pledge
4
+
5
+ We pledge to make participation in our community a harassment-free experience for everyone.
6
+
7
+ ## Our Standards
8
+
9
+ Examples of positive behavior:
10
+
11
+ * Demonstrating empathy and kindness
12
+ * Being respectful of differing opinions
13
+ * Accepting constructive feedback gracefully
14
+
15
+ Examples of unacceptable behavior:
16
+
17
+ * Harassment, trolling, or personal attacks
18
+ * Publishing others' private information without permission
19
+
20
+ ## Enforcement
21
+
22
+ Report issues to **fpaladini@gmail.com**.
23
+
24
+ ## Attribution
25
+
26
+ Adapted from the [Contributor Covenant](https://www.contributor-covenant.org/), version 2.1.
data/CONTRIBUTING.md ADDED
@@ -0,0 +1,56 @@
1
+ # Contributing to Active Admin Claude Theme
2
+
3
+ Thank you for contributing! This gem targets **Active Admin 4** (Tailwind v4 beta).
4
+
5
+ ## Development setup
6
+
7
+ ```bash
8
+ bundle install
9
+ cd test/dummy
10
+ npm install
11
+ npm run build:css
12
+ ruby bin/rails db:setup db:seed
13
+ ruby bin/rails server
14
+ ```
15
+
16
+ Visit `http://localhost:3000/admin` — login `admin@example.com` / `password`.
17
+
18
+ ## Making changes
19
+
20
+ - **CSS tokens:** edit `app/assets/stylesheets/activeadmin_claude_theme.css`
21
+ - **View overrides:** `app/views/active_admin/` — preserve Flowbite `data-*` hooks and `.dark-mode-toggle`
22
+ - **Install flow:** `lib/generators/activeadmin_claude_theme/install/install_generator.rb`
23
+ - **AA4 map:** update `docs/aa4-override-map.md` when overriding new partials
24
+
25
+ After CSS changes, rebuild in dummy:
26
+
27
+ ```bash
28
+ cd test/dummy
29
+ cp ../../app/assets/stylesheets/activeadmin_claude_theme.css app/assets/tailwind/
30
+ npm run build:css
31
+ ```
32
+
33
+ ## Tests
34
+
35
+ ```bash
36
+ cd test/dummy && ruby bin/rails db:test:prepare
37
+ cd ../..
38
+ ruby -Itest test/activeadmin_claude_theme_test.rb test/integration/theme_integration_test.rb
39
+ ```
40
+
41
+ ## Commit messages
42
+
43
+ Use [Conventional Commits](https://www.conventionalcommits.org/):
44
+
45
+ - `feat:` new feature
46
+ - `fix:` bug fix
47
+ - `docs:` documentation
48
+ - `test:` tests
49
+ - `chore:` maintenance
50
+
51
+ ## Pull requests
52
+
53
+ 1. Fork and branch from `main`
54
+ 2. Add/update tests when behavior changes
55
+ 3. Rebuild dummy CSS if styles changed
56
+ 4. Open PR with screenshots for visual changes
data/DESIGN.md ADDED
@@ -0,0 +1,64 @@
1
+ ---
2
+ version: alpha
3
+ name: activeadmin-claude-theme
4
+ description: >
5
+ Community Active Admin 4 theme inspired by Claude/Anthropic aesthetics.
6
+ Warm cream canvas, coral accents, editorial serif headlines, and dark charcoal surfaces.
7
+ Not affiliated with Anthropic.
8
+
9
+ colors:
10
+ primary: "#cc785c"
11
+ primary-active: "#a9583e"
12
+ primary-disabled: "#e6dfd8"
13
+ ink: "#141413"
14
+ body: "#3d3d3a"
15
+ body-strong: "#252523"
16
+ muted: "#6c6a64"
17
+ muted-soft: "#8e8b82"
18
+ hairline: "#e6dfd8"
19
+ hairline-soft: "#ebe6df"
20
+ canvas: "#faf9f5"
21
+ surface-soft: "#f5f0e8"
22
+ surface-card: "#efe9de"
23
+ surface-cream-strong: "#e8e0d2"
24
+ surface-dark: "#181715"
25
+ surface-dark-elevated: "#252320"
26
+ surface-dark-soft: "#1f1e1b"
27
+ on-primary: "#ffffff"
28
+ on-dark: "#faf9f5"
29
+ on-dark-soft: "#a09d96"
30
+ accent-teal: "#5db8a6"
31
+ accent-amber: "#e8a55a"
32
+ success: "#5db872"
33
+ warning: "#d4a017"
34
+ error: "#c64545"
35
+
36
+ typography:
37
+ display:
38
+ fontFamily: "Source Serif 4, Georgia, Times New Roman, serif"
39
+ note: "Substitute for proprietary Copernicus / Tiempos Headline"
40
+ body:
41
+ fontFamily: "Inter, system-ui, sans-serif"
42
+ note: "Substitute for proprietary StyreneB / Anthropic Sans"
43
+ mono:
44
+ fontFamily: "JetBrains Mono, ui-monospace, monospace"
45
+
46
+ rounded:
47
+ sm: 6px
48
+ md: 8px
49
+ lg: 12px
50
+ xl: 16px
51
+
52
+ css_variables:
53
+ prefix: "--claude-"
54
+ implementation: app/assets/stylesheets/activeadmin_claude_theme.css
55
+
56
+ implementation_notes:
57
+ - Remaps Tailwind gray/blue/indigo scales via @theme for AA4 chrome
58
+ - Uses :root and .dark for semantic --claude-* tokens
59
+ - Preserves AA4 dark-mode toggle and Flowbite drawer hooks
60
+ - Fonts loaded from Google Fonts in host active_admin.css entry
61
+
62
+ source:
63
+ - https://raw.githubusercontent.com/VoltAgent/awesome-design-md/main/design-md/claude/DESIGN.md
64
+ - https://getdesign.md/
data/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Fernando Paladini
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
data/MIT-LICENSE ADDED
@@ -0,0 +1,20 @@
1
+ Copyright Fernando Paladini
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,176 @@
1
+ # Active Admin Claude Theme
2
+
3
+ [![Gem Version](https://badge.fury.io/rb/activeadmin-claude-theme.svg)](https://badge.fury.io/rb/activeadmin-claude-theme)
4
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
5
+ [![CI](https://github.com/paladini/activeadmin-claude-theme/actions/workflows/ci.yml/badge.svg)](https://github.com/paladini/activeadmin-claude-theme/actions/workflows/ci.yml)
6
+
7
+ A warm, editorial **Active Admin 4** theme inspired by Claude/Anthropic aesthetics — cream canvas, coral accents, serif headlines, native dark mode, and mobile-ready chrome.
8
+
9
+ > **Community theme.** Not affiliated with or endorsed by Anthropic.
10
+
11
+ Requires **Active Admin `4.0.0.beta22+`** (Tailwind CSS v4).
12
+
13
+ ---
14
+
15
+ ## AI & Agent-Readable Summary
16
+
17
+ - **What is it?** A Rails Engine gem that themes Active Admin 4 via Tailwind v4 `@theme` token remaps, CSS variables, and minimal view overrides.
18
+ - **Stack:** Active Admin 4 beta, Tailwind v4 CLI, cssbundling-rails, importmap-rails, Rails 7.2+ / 8.x.
19
+ - **Design source:** [DESIGN.md](./DESIGN.md) (adapted from [getdesign.md / Claude DESIGN.md](https://raw.githubusercontent.com/VoltAgent/awesome-design-md/main/design-md/claude/DESIGN.md)).
20
+ - **Install:** Gemfile → `rails g activeadmin_claude_theme:install` → rebuild CSS.
21
+ - **Keywords:** `active admin theme`, `activeadmin 4`, `tailwind admin`, `claude theme`, `rails admin dark mode`.
22
+
23
+ ---
24
+
25
+ ## Features
26
+
27
+ - Warm Claude-inspired palette (`#faf9f5` canvas, `#cc785c` coral accent)
28
+ - Tailwind v4 `@theme` remaps for AA4's gray/blue/indigo chrome
29
+ - Semantic `--claude-*` CSS variables (light + `.dark`)
30
+ - Branded header + navigation active indicator
31
+ - Preserves AA4 dark-mode toggle, mobile drawer, and Flowbite hooks
32
+ - Install generator for host apps
33
+
34
+ ---
35
+
36
+ ## Screenshots
37
+
38
+ | Login | Dashboard |
39
+ | --- | --- |
40
+ | ![Login](docs/images/login.png) | ![Dashboard](docs/images/dashboard.png) |
41
+
42
+ | Admin Users | Dark Mode |
43
+ | --- | --- |
44
+ | ![Admin Users](docs/images/admin_users.png) | ![Dark Mode](docs/images/dashboard_dark.png) |
45
+
46
+ ---
47
+
48
+ ## Installation
49
+
50
+ ### 1. Prerequisites
51
+
52
+ Your Rails app must already use **Active Admin 4** with Tailwind v4 assets:
53
+
54
+ ```bash
55
+ # Gemfile
56
+ gem "activeadmin", "4.0.0.beta22"
57
+ gem "cssbundling-rails"
58
+ gem "importmap-rails"
59
+
60
+ bundle install
61
+ rails generate active_admin:install
62
+ rails generate active_admin:assets
63
+ npm install @activeadmin/activeadmin@4.0.0-beta22
64
+ ```
65
+
66
+ See [Active Admin UPGRADING.md](https://github.com/activeadmin/activeadmin/blob/master/UPGRADING.md) for full AA4 setup.
67
+
68
+ ### 2. Add the theme gem
69
+
70
+ ```ruby
71
+ # Gemfile
72
+ gem "activeadmin-claude-theme"
73
+ ```
74
+
75
+ ```bash
76
+ bundle install
77
+ rails generate activeadmin_claude_theme:install
78
+ ```
79
+
80
+ ### 3. Rebuild CSS
81
+
82
+ The install generator moves the Tailwind **source** to `app/assets/tailwind/active_admin.css` so Propshaft only serves the compiled file from `app/assets/builds/active_admin.css`.
83
+
84
+ ```bash
85
+ npm run build:css
86
+ # or: bin/rails css:build
87
+ ```
88
+
89
+ Restart the Rails server after rebuilding.
90
+
91
+ ---
92
+
93
+ ## Troubleshooting
94
+
95
+ ### `active_admin.css` not present in the asset pipeline
96
+
97
+ Active Admin 4 builds CSS with Tailwind CLI. The **source** file must live outside Propshaft's served paths:
98
+
99
+ ```
100
+ app/assets/tailwind/active_admin.css # Tailwind source (NOT served)
101
+ app/assets/builds/active_admin.css # compiled output (served as "active_admin")
102
+ ```
103
+
104
+ Run `rails generate activeadmin_claude_theme:install` — it moves the source to `app/assets/tailwind/` and updates your `package.json` build script. Then:
105
+
106
+ ```bash
107
+ npm run build:css
108
+ ```
109
+
110
+ Restart the Rails server.
111
+
112
+ ### Do not use legacy SCSS imports
113
+
114
+ AA4 does not use `@import "active_admin/base"`. Remove old Sprockets manifest entries such as `active_admin/base.css` or `activeadmin_claude_theme/index.css`.
115
+
116
+ ---
117
+
118
+ ## Customization
119
+
120
+ Override semantic tokens in your host CSS after the theme import:
121
+
122
+ ```css
123
+ :root {
124
+ --claude-primary: #d4845f;
125
+ --claude-canvas: #fff8f0;
126
+ }
127
+
128
+ .dark {
129
+ --claude-canvas: #121110;
130
+ }
131
+ ```
132
+
133
+ | Token | Default (light) | Role |
134
+ | --- | --- | --- |
135
+ | `--claude-primary` | `#cc785c` | Accent / CTA |
136
+ | `--claude-canvas` | `#faf9f5` | Page background |
137
+ | `--claude-ink` | `#141413` | Headings |
138
+ | `--claude-body` | `#3d3d3a` | Body text |
139
+ | `--claude-hairline` | `#e6dfd8` | Borders |
140
+ | `--claude-surface-card` | `#efe9de` | Panels |
141
+
142
+ Full token list: [DESIGN.md](./DESIGN.md)
143
+
144
+ ---
145
+
146
+ ## Development
147
+
148
+ ```bash
149
+ git clone https://github.com/paladini/activeadmin-claude-theme.git
150
+ cd activeadmin-claude-theme
151
+ bundle install
152
+
153
+ cd test/dummy
154
+ npm install
155
+ npm run build:css
156
+ ruby bin/rails db:setup db:seed
157
+ ruby bin/rails server
158
+ ```
159
+
160
+ Login: `admin@example.com` / `password`
161
+
162
+ Run tests from gem root:
163
+
164
+ ```bash
165
+ cd test/dummy && ruby bin/rails db:test:prepare
166
+ cd ../..
167
+ ruby -Itest test/activeadmin_claude_theme_test.rb test/integration/theme_integration_test.rb
168
+ ```
169
+
170
+ See [CONTRIBUTING.md](./CONTRIBUTING.md).
171
+
172
+ ---
173
+
174
+ ## License
175
+
176
+ MIT — see [LICENSE](./LICENSE).
@@ -0,0 +1,200 @@
1
+ /* Active Admin Claude Theme — Tailwind v4 design tokens + components.
2
+ Inspired by Claude/Anthropic aesthetics (community theme, not affiliated). */
3
+
4
+ /* Fonts load from the host entry file to keep @import order valid for Tailwind v4. */
5
+ @theme {
6
+ --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
7
+ --font-serif: "Source Serif 4", Georgia, "Times New Roman", serif;
8
+ --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", monospace;
9
+
10
+ --radius-claude-sm: 6px;
11
+ --radius-claude-md: 8px;
12
+ --radius-claude-lg: 12px;
13
+ --radius-claude-xl: 16px;
14
+ }
15
+
16
+ /* Recolor AA4's neutral chrome (bg-white / gray-* / dark:gray-*) to warm Claude canvas. */
17
+ @theme {
18
+ --color-white: #ffffff;
19
+ --color-gray-50: #faf9f5;
20
+ --color-gray-100: #f5f0e8;
21
+ --color-gray-200: #e6dfd8;
22
+ --color-gray-300: #d6c8b6;
23
+ --color-gray-400: #8e8b82;
24
+ --color-gray-500: #6c6a64;
25
+ --color-gray-600: #3d3d3a;
26
+ --color-gray-700: #2e2a26;
27
+ --color-gray-800: #252320;
28
+ --color-gray-900: #1f1e1b;
29
+ --color-gray-950: #181715;
30
+ }
31
+
32
+ /* Recolor AA4 accent scale (blue/indigo hardwired in plugin.js) to Claude coral. */
33
+ @theme {
34
+ --color-blue-50: #fdf5f1;
35
+ --color-indigo-50: #fdf5f1;
36
+ --color-blue-100: #f8e8df;
37
+ --color-indigo-100: #f8e8df;
38
+ --color-blue-200: #efd3c4;
39
+ --color-indigo-200: #efd3c4;
40
+ --color-blue-300: #e0b39c;
41
+ --color-indigo-300: #e0b39c;
42
+ --color-blue-400: #d49378;
43
+ --color-indigo-400: #d49378;
44
+ --color-blue-500: #cc785c;
45
+ --color-indigo-500: #cc785c;
46
+ --color-blue-600: #a9583e;
47
+ --color-indigo-600: #a9583e;
48
+ --color-blue-700: #8f4a34;
49
+ --color-indigo-700: #8f4a34;
50
+ --color-blue-800: #733c2b;
51
+ --color-indigo-800: #733c2b;
52
+ --color-blue-900: #5c3124;
53
+ --color-indigo-900: #5c3124;
54
+ --color-blue-950: #3a1e16;
55
+ --color-indigo-950: #3a1e16;
56
+ }
57
+
58
+ :root {
59
+ --claude-primary: #cc785c;
60
+ --claude-primary-active: #a9583e;
61
+ --claude-primary-disabled: #e6dfd8;
62
+ --claude-ink: #141413;
63
+ --claude-body: #3d3d3a;
64
+ --claude-body-strong: #252523;
65
+ --claude-muted: #6c6a64;
66
+ --claude-muted-soft: #8e8b82;
67
+ --claude-hairline: #e6dfd8;
68
+ --claude-hairline-soft: #ebe6df;
69
+ --claude-canvas: #faf9f5;
70
+ --claude-surface-soft: #f5f0e8;
71
+ --claude-surface-card: #efe9de;
72
+ --claude-surface-cream: #e8e0d2;
73
+ --claude-on-primary: #ffffff;
74
+ --claude-success: #5db872;
75
+ --claude-warning: #d4a017;
76
+ --claude-error: #c64545;
77
+ --claude-accent-teal: #5db8a6;
78
+ --claude-accent-amber: #e8a55a;
79
+ }
80
+
81
+ .dark {
82
+ --claude-primary: #cc785c;
83
+ --claude-primary-active: #a9583e;
84
+ --claude-primary-disabled: #3d3530;
85
+ --claude-ink: #faf9f5;
86
+ --claude-body: #c9c4bc;
87
+ --claude-body-strong: #f5f0e8;
88
+ --claude-muted: #a09d96;
89
+ --claude-muted-soft: #8e8b82;
90
+ --claude-hairline: #2e2a26;
91
+ --claude-hairline-soft: #252320;
92
+ --claude-canvas: #181715;
93
+ --claude-surface-soft: #1f1e1b;
94
+ --claude-surface-card: #252320;
95
+ --claude-surface-cream: #2e2a26;
96
+ --claude-on-primary: #ffffff;
97
+ --claude-success: #5db872;
98
+ --claude-warning: #e8a55a;
99
+ --claude-error: #f07171;
100
+ --claude-accent-teal: #5db8a6;
101
+ --claude-accent-amber: #e8a55a;
102
+ }
103
+
104
+ @layer base {
105
+ body {
106
+ font-family: var(--font-sans);
107
+ background-color: var(--claude-canvas);
108
+ color: var(--claude-body);
109
+ }
110
+ }
111
+
112
+ @layer components {
113
+ .claude-brand-mark {
114
+ display: inline-flex;
115
+ align-items: center;
116
+ gap: 0.625rem;
117
+ font-family: var(--font-serif);
118
+ font-weight: 600;
119
+ letter-spacing: -0.02em;
120
+ color: var(--claude-ink);
121
+ }
122
+
123
+ .claude-brand-dot {
124
+ width: 0.625rem;
125
+ height: 0.625rem;
126
+ border-radius: 9999px;
127
+ background: linear-gradient(135deg, var(--claude-primary), var(--claude-primary-active));
128
+ box-shadow: 0 0 0 3px color-mix(in srgb, var(--claude-primary) 18%, transparent);
129
+ }
130
+
131
+ .claude-nav-active-indicator {
132
+ position: relative;
133
+ }
134
+
135
+ .claude-nav-active-indicator.selected::before {
136
+ content: "";
137
+ position: absolute;
138
+ inset-inline-start: -0.5rem;
139
+ top: 0.35rem;
140
+ bottom: 0.35rem;
141
+ width: 3px;
142
+ border-radius: 9999px;
143
+ background: linear-gradient(180deg, var(--claude-primary), var(--claude-primary-active));
144
+ }
145
+
146
+ .claude-btn-primary {
147
+ background: var(--claude-primary);
148
+ color: var(--claude-on-primary);
149
+ border-radius: var(--radius-claude-md);
150
+ font-weight: 500;
151
+ transition: background-color 150ms ease;
152
+ }
153
+
154
+ .claude-btn-primary:hover {
155
+ background: var(--claude-primary-active);
156
+ }
157
+
158
+ .claude-tag {
159
+ display: inline-flex;
160
+ align-items: center;
161
+ border-radius: 9999px;
162
+ padding: 0.125rem 0.625rem;
163
+ font-size: 0.75rem;
164
+ font-weight: 600;
165
+ letter-spacing: 0.01em;
166
+ }
167
+
168
+ .claude-tag-success {
169
+ background: color-mix(in srgb, var(--claude-success) 16%, transparent);
170
+ color: var(--claude-success);
171
+ }
172
+
173
+ .claude-tag-warning {
174
+ background: color-mix(in srgb, var(--claude-warning) 16%, transparent);
175
+ color: var(--claude-warning);
176
+ }
177
+
178
+ .claude-tag-error {
179
+ background: color-mix(in srgb, var(--claude-error) 16%, transparent);
180
+ color: var(--claude-error);
181
+ }
182
+
183
+ .claude-num {
184
+ font-family: var(--font-mono);
185
+ font-variant-numeric: tabular-nums;
186
+ }
187
+
188
+ .claude-panel {
189
+ background: var(--claude-surface-card);
190
+ border: 1px solid var(--claude-hairline-soft);
191
+ border-radius: var(--radius-claude-lg);
192
+ }
193
+
194
+ [data-test-site-title] {
195
+ font-family: var(--font-serif);
196
+ font-weight: 600;
197
+ letter-spacing: -0.02em;
198
+ color: var(--claude-ink);
199
+ }
200
+ }
@@ -0,0 +1,45 @@
1
+ <div id="main-menu" class="fixed top-0 xl:top-16 bottom-0 inset-s-0 z-40 w-72 xl:w-60 p-4 overflow-y-auto transition-transform duration-200 -translate-x-full xl:translate-x-0 bg-white dark:bg-gray-950 xl:border-e xl:border-gray-200 xl:dark:border-white/10" tabindex="-1">
2
+ <ul role="list" class="flex flex-1 flex-col space-y-1.5">
3
+ <% current_menu.items(self).each do |item| %>
4
+ <% children = item.items(self).presence %>
5
+ <% url = item.url(self) %>
6
+ <% label = capture do %>
7
+ <% if url.present? %>
8
+ <%= link_to item.label(self), url, item.html_options.merge(class: "claude-nav-active-indicator text-gray-600 hover:text-gray-900 dark:text-gray-400 dark:hover:text-white flex items-center w-full rounded-md p-2 gap-x-2 text-sm no-underline #{(current_menu_item?(item, children: false) ? "bg-gray-100 dark:bg-white/5 text-gray-900 dark:text-white selected" : "")}") %>
9
+ <% else %>
10
+ <%= item.label(self) %>
11
+ <% end %>
12
+ <% end %>
13
+ <li <%= current_menu_item?(item) && "data-open" %> class="group" data-item-id="<%= item.id %>">
14
+ <% if children %>
15
+ <% if url.present? && url == "#" %>
16
+ <button data-menu-button class="text-gray-600 hover:text-gray-900 dark:text-gray-400 dark:hover:text-white flex items-center w-full rounded-md p-2 gap-x-2 text-sm" aria-label="<%= t('active_admin.toggle_section') %>">
17
+ <%= item.label(self) %>
18
+ <svg class="group-data-open:rotate-90 group-data-open:rtl:-rotate-90 ms-auto h-5 w-5 shrink-0 rtl:-scale-x-100" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true">
19
+ <path fill-rule="evenodd" d="M7.21 14.77a.75.75 0 01.02-1.06L11.168 10 7.23 6.29a.75.75 0 111.04-1.08l4.5 4.25a.75.75 0 010 1.08l-4.5 4.25a.75.75 0 01-1.06-.02z" clip-rule="evenodd" />
20
+ </svg>
21
+ </button>
22
+ <% elsif url.present? && url != "#" %>
23
+ <div data-parent-id="<%= item.id %>" data-menu-button class="flex">
24
+ <%= label %>
25
+ <button class="text-gray-600 hover:text-gray-900 dark:text-gray-400 dark:hover:text-white flex items-center p-2 text-sm" aria-label="<%= t('active_admin.toggle_section') %>">
26
+ <svg class="group-data-open:rotate-90 group-data-open:rtl:-rotate-90 ms-auto h-5 w-5 shrink-0 rtl:-scale-x-100" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true">
27
+ <path fill-rule="evenodd" d="M7.21 14.77a.75.75 0 01.02-1.06L11.168 10 7.23 6.29a.75.75 0 111.04-1.08l4.5 4.25a.75.75 0 010 1.08l-4.5 4.25a.75.75 0 01-1.06-.02z" clip-rule="evenodd" />
28
+ </svg>
29
+ </button>
30
+ </div>
31
+ <% end %>
32
+ <ul role="list" class="mt-1 space-y-1 hidden group-data-open:block ms-1 ps-2 border-s-2 border-gray-100 dark:border-white/5">
33
+ <% children.each do |j| %>
34
+ <li data-item-id="<%= j.id %>">
35
+ <%= link_to j.label(self), j.url(self), j.html_options.merge(class: "claude-nav-active-indicator text-gray-600 hover:text-gray-900 dark:text-gray-400 dark:hover:text-white block rounded-md py-1.5 px-2 text-sm no-underline #{(current_menu_item?(j) ? "bg-gray-100 dark:bg-white/5 text-gray-900 dark:text-white selected" : "")}") %>
36
+ </li>
37
+ <% end %>
38
+ </ul>
39
+ <% else %>
40
+ <%= label %>
41
+ <% end %>
42
+ </li>
43
+ <% end %>
44
+ </ul>
45
+ </div>
@@ -0,0 +1,33 @@
1
+ <div class="border-b border-gray-200 dark:border-white/10 dark:bg-gray-950/75 px-4 py-2 flex items-center fixed top-0 z-20 h-16 w-full backdrop-blur-md bg-white/80">
2
+ <button class="xl:hidden pe-3 inline-flex items-center w-8 h-8 justify-center text-sm text-gray-500 dark:text-gray-400 focus-visible:outline-hidden focus-visible:ring-ring focus-visible:bg-transparent focus-visible:ring-0 focus-visible:ring-offset-0" data-drawer-target="main-menu" data-drawer-show="main-menu" aria-controls="main-menu" aria-label="<%= t('active_admin.toggle_main_navigation_menu') %>">
3
+ <svg class="w-5 h-5 text-gray-800 dark:text-white" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 17 14"><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M1 1h15M1 7h15M1 13h15"/></svg>
4
+ </button>
5
+
6
+ <div class="grow flex items-center gap-3 min-w-0">
7
+ <div class="claude-brand-mark shrink-0 hidden sm:inline-flex">
8
+ <span class="claude-brand-dot" aria-hidden="true"></span>
9
+ <span>Claude Admin</span>
10
+ </div>
11
+ <h1 data-test-site-title class="text-lg font-semibold truncate">
12
+ <%= title %>
13
+ </h1>
14
+ </div>
15
+
16
+ <button type="button" class="dark-mode-toggle flex items-center w-9 h-9 justify-center me-1 text-gray-400 hover:text-gray-500 dark:text-gray-500 dark:hover:text-gray-400 focus:outline-hidden text-sm" aria-label="<%= t('active_admin.toggle_dark_mode') %>">
17
+ <svg class="hidden dark:block w-5 h-5 rtl:-scale-x-100" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 18 20"><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8.509 5.75c0-1.493.394-2.96 1.144-4.25h-.081a8.5 8.5 0 1 0 7.356 12.746A8.5 8.5 0 0 1 8.509 5.75Z"/></svg>
18
+ <svg class="dark:hidden w-5 h-5" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 20 20"><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 3V1m0 18v-2M5.05 5.05 3.636 3.636m12.728 12.728L14.95 14.95M3 10H1m18 0h-2M5.05 14.95l-1.414 1.414M16.364 3.636 14.95 5.05M14 10a4 4 0 1 1-8 0 4 4 0 0 1 8 0Z"/></svg>
19
+ </button>
20
+
21
+ <button id="user-menu-button" class="flex items-center w-9 h-9 justify-center text-sm text-gray-500 focus:outline-hidden dark:text-gray-200" data-dropdown-toggle="user-menu" data-dropdown-offset-distance="3" data-dropdown-placement="bottom-end" aria-label="<%= t('active_admin.toggle_user_menu') %>">
22
+ <svg class="w-7 h-7" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 20 20"><path d="M10 0a10 10 0 1 0 10 10A10.011 10.011 0 0 0 10 0Zm0 5a3 3 0 1 1 0 6 3 3 0 0 1 0-6Zm0 13a8.949 8.949 0 0 1-4.951-1.488A3.987 3.987 0 0 1 9 13h2a3.987 3.987 0 0 1 3.951 3.512A8.949 8.949 0 0 1 10 18Z"/></svg>
23
+ </button>
24
+
25
+ <div id="user-menu" class="z-50 hidden min-w-max rounded shadow-lg outline outline-black/5 dark:-outline-offset-1 dark:outline-white/10 focus:outline-hidden py-1 text-sm bg-white dark:bg-gray-800 text-gray-700 dark:text-gray-300" aria-labelledby="user-menu-button">
26
+ <ul>
27
+ <% if current_active_admin_user? %>
28
+ <li><%= auto_link current_active_admin_user, class: "block px-2.5 py-2 no-underline text-gray-700 hover:bg-gray-100 hover:text-gray-900 dark:text-gray-300 dark:hover:bg-white/5 dark:hover:text-white" %></li>
29
+ <li><%= link_to I18n.t("active_admin.logout"), auto_logout_link_path, class: "block px-2.5 py-2 no-underline text-gray-700 hover:bg-gray-100 hover:text-gray-900 dark:text-gray-300 dark:hover:bg-white/5 dark:hover:text-white", data: { method: :delete } %></li>
30
+ <% end %>
31
+ </ul>
32
+ </div>
33
+ </div>
data/config/routes.rb ADDED
@@ -0,0 +1,2 @@
1
+ Rails.application.routes.draw do
2
+ end
@@ -0,0 +1,17 @@
1
+ # frozen_string_literal: true
2
+
3
+ module ActiveadminClaudeTheme
4
+ class Engine < ::Rails::Engine
5
+ isolate_namespace ActiveadminClaudeTheme
6
+
7
+ rake_tasks do
8
+ load root.join("lib/tasks/activeadmin_claude_theme_tasks.rake")
9
+ end
10
+
11
+ initializer "activeadmin_claude_theme.prepend_views" do
12
+ ActiveSupport.on_load(:action_controller_base) do
13
+ prepend_view_path ActiveadminClaudeTheme::Engine.root.join("app/views")
14
+ end
15
+ end
16
+ end
17
+ end
@@ -0,0 +1,5 @@
1
+ # frozen_string_literal: true
2
+
3
+ module ActiveadminClaudeTheme
4
+ VERSION = "0.1.0"
5
+ end
@@ -0,0 +1,7 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "activeadmin_claude_theme/version"
4
+ require "activeadmin_claude_theme/engine"
5
+
6
+ module ActiveadminClaudeTheme
7
+ end
@@ -0,0 +1,90 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "rails/generators/base"
4
+
5
+ module ActiveadminClaudeTheme
6
+ module Generators
7
+ class InstallGenerator < Rails::Generators::Base
8
+ desc "Install the Claude theme into an Active Admin 4 app."
9
+
10
+ AA_TW_SRC = "app/assets/tailwind/active_admin.css"
11
+ AA_TW_SRC_LEGACY = "app/assets/stylesheets/active_admin.css"
12
+ TW_CONF = "tailwind-active_admin.config.js"
13
+ PACKAGE_JSON = "package.json"
14
+ FONTS_IMPORT = <<~CSS
15
+ @import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&family=Source+Serif+4:opsz,wght@8..60,400;8..60,600&display=swap");
16
+ CSS
17
+
18
+ def vendor_theme_css
19
+ css = ActiveadminClaudeTheme::Engine.root.join("app/assets/stylesheets/activeadmin_claude_theme.css").read
20
+ create_file "app/assets/tailwind/activeadmin_claude_theme.css", css
21
+ end
22
+
23
+ def relocate_active_admin_source
24
+ return if File.exist?(AA_TW_SRC)
25
+
26
+ if File.exist?(AA_TW_SRC_LEGACY)
27
+ create_file AA_TW_SRC, File.read(AA_TW_SRC_LEGACY)
28
+ remove_file AA_TW_SRC_LEGACY
29
+ say "Moved Active Admin Tailwind source to #{AA_TW_SRC} (keeps Propshaft from serving uncompiled CSS).", :green
30
+ else
31
+ say "Skipped relocate: run `rails g active_admin:assets` first.", :yellow
32
+ end
33
+ end
34
+
35
+ def import_into_build
36
+ return unless File.exist?(AA_TW_SRC)
37
+
38
+ import_line = %(@import "./activeadmin_claude_theme.css";\n)
39
+ return if File.read(AA_TW_SRC).include?("activeadmin_claude_theme.css")
40
+
41
+ inject_into_file AA_TW_SRC, import_line, after: /@import "tailwindcss";\n/
42
+
43
+ return if File.read(AA_TW_SRC).include?("fonts.googleapis.com")
44
+
45
+ inject_into_file AA_TW_SRC, FONTS_IMPORT, before: /@import "tailwindcss";\n/
46
+ end
47
+
48
+ def configure_build_script
49
+ return unless File.exist?(PACKAGE_JSON)
50
+
51
+ package = File.read(PACKAGE_JSON)
52
+ return if package.include?("app/assets/tailwind/active_admin.css")
53
+
54
+ gsub_file PACKAGE_JSON,
55
+ "./app/assets/stylesheets/active_admin.css",
56
+ "./app/assets/tailwind/active_admin.css"
57
+ end
58
+
59
+ def add_view_content_source
60
+ return unless File.exist?(TW_CONF)
61
+ return if File.read(TW_CONF).include?("activeadmin-claude-theme")
62
+
63
+ snippet = <<~JS
64
+ `${execSync('bundle show activeadmin-claude-theme', { encoding: 'utf-8' }).trim().split(/\\r?\\n/).pop()}/app/views/**/*.{erb,html,arb,rb}`,
65
+ JS
66
+
67
+ inject_into_file TW_CONF, snippet, after: "content: [\n"
68
+ end
69
+
70
+ def patch_tailwind_config_bundle_gemfile
71
+ return unless File.exist?(TW_CONF)
72
+ return if File.read(TW_CONF).include?("BUNDLE_GEMFILE")
73
+
74
+ inject_into_file TW_CONF,
75
+ "process.env.BUNDLE_GEMFILE ||= require('path').resolve(__dirname, 'Gemfile');\n\n",
76
+ before: "const activeAdminPath"
77
+ rescue StandardError
78
+ inject_into_file TW_CONF,
79
+ "process.env.BUNDLE_GEMFILE ||= require('path').resolve(__dirname, 'Gemfile');\n\n",
80
+ after: "import activeAdminPlugin from '@activeadmin/activeadmin/plugin';\n\n"
81
+ end
82
+
83
+ def done
84
+ say "Claude theme installed.", :green
85
+ say "Rebuild CSS: npm run build:css", :green
86
+ say "Restart your Rails server after rebuilding.", :green
87
+ end
88
+ end
89
+ end
90
+ end
@@ -0,0 +1,14 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "fileutils"
4
+
5
+ namespace :activeadmin_claude_theme do
6
+ desc "Build Active Admin CSS for the dummy app (Tailwind v4)"
7
+ task :build_css do
8
+ dummy = File.expand_path("test/dummy", __dir__)
9
+ env = ENV.to_h.merge("BUNDLE_GEMFILE" => File.expand_path("Gemfile", __dir__))
10
+ system(env, "npm", "run", "build:css", chdir: dummy, exception: true)
11
+ end
12
+ end
13
+
14
+ task "assets:precompile" => "activeadmin_claude_theme:build_css"
metadata ADDED
@@ -0,0 +1,93 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: activeadmin-claude-theme
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - Fernando Paladini
8
+ bindir: bin
9
+ cert_chain: []
10
+ date: 1980-01-02 00:00:00.000000000 Z
11
+ dependencies:
12
+ - !ruby/object:Gem::Dependency
13
+ name: rails
14
+ requirement: !ruby/object:Gem::Requirement
15
+ requirements:
16
+ - - ">="
17
+ - !ruby/object:Gem::Version
18
+ version: '7.2'
19
+ type: :runtime
20
+ prerelease: false
21
+ version_requirements: !ruby/object:Gem::Requirement
22
+ requirements:
23
+ - - ">="
24
+ - !ruby/object:Gem::Version
25
+ version: '7.2'
26
+ - !ruby/object:Gem::Dependency
27
+ name: activeadmin
28
+ requirement: !ruby/object:Gem::Requirement
29
+ requirements:
30
+ - - ">="
31
+ - !ruby/object:Gem::Version
32
+ version: 4.0.0.beta22
33
+ - - "<"
34
+ - !ruby/object:Gem::Version
35
+ version: '5'
36
+ type: :runtime
37
+ prerelease: false
38
+ version_requirements: !ruby/object:Gem::Requirement
39
+ requirements:
40
+ - - ">="
41
+ - !ruby/object:Gem::Version
42
+ version: 4.0.0.beta22
43
+ - - "<"
44
+ - !ruby/object:Gem::Version
45
+ version: '5'
46
+ description: Community theme gem for Active Admin 4 (Tailwind v4) inspired by Claude/Anthropic
47
+ aesthetics — warm canvas, coral accents, dark mode, and mobile-ready admin chrome.
48
+ email:
49
+ - fpaladini@gmail.com
50
+ executables: []
51
+ extensions: []
52
+ extra_rdoc_files: []
53
+ files:
54
+ - CODE_OF_CONDUCT.md
55
+ - CONTRIBUTING.md
56
+ - DESIGN.md
57
+ - LICENSE
58
+ - MIT-LICENSE
59
+ - README.md
60
+ - app/assets/stylesheets/activeadmin_claude_theme.css
61
+ - app/views/active_admin/_main_navigation.html.erb
62
+ - app/views/active_admin/_site_header.html.erb
63
+ - config/routes.rb
64
+ - lib/activeadmin_claude_theme.rb
65
+ - lib/activeadmin_claude_theme/engine.rb
66
+ - lib/activeadmin_claude_theme/version.rb
67
+ - lib/generators/activeadmin_claude_theme/install/install_generator.rb
68
+ - lib/tasks/activeadmin_claude_theme_tasks.rake
69
+ homepage: https://github.com/paladini/activeadmin-claude-theme
70
+ licenses:
71
+ - MIT
72
+ metadata:
73
+ homepage_uri: https://github.com/paladini/activeadmin-claude-theme
74
+ source_code_uri: https://github.com/paladini/activeadmin-claude-theme
75
+ rubygems_mfa_required: 'true'
76
+ rdoc_options: []
77
+ require_paths:
78
+ - lib
79
+ required_ruby_version: !ruby/object:Gem::Requirement
80
+ requirements:
81
+ - - ">="
82
+ - !ruby/object:Gem::Version
83
+ version: 3.2.0
84
+ required_rubygems_version: !ruby/object:Gem::Requirement
85
+ requirements:
86
+ - - ">="
87
+ - !ruby/object:Gem::Version
88
+ version: '0'
89
+ requirements: []
90
+ rubygems_version: 4.0.16
91
+ specification_version: 4
92
+ summary: A warm, editorial Claude-inspired theme for Active Admin 4.
93
+ test_files: []