foreman_theme_custom 0.1.3 → 0.2.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 +4 -4
- data/README.md +7 -8
- data/lib/foreman_theme_custom/engine.rb +6 -9
- data/public/foreman_theme_custom/custom.css +33 -0
- metadata +2 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: dd0146d8f130fb6cba5bcf43859384dbac30f3c35775b2923d70309585eba60e
|
|
4
|
+
data.tar.gz: cb2978a84bfbf91895337deced4399ead64106aeb47fea361be2c9645326de06
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 64739ccd550645564079ff21cd3f3f36c9f00538734c37d073b7e18f61afd30611a92e9968ecd5e8df41b3947220988b1b6f19b995538395d5e931996831cc1c
|
|
7
|
+
data.tar.gz: 6979d77b6e21c34c530f919467ed55db605dcda6d3f85bcd7f8ec29db6ca4f7d1e9bf80774fac23f09935eaf0d2ecc139a902e17d256621fcc41550c1d662336
|
data/README.md
CHANGED
|
@@ -8,24 +8,23 @@ Bu plugin, Foreman arayüzünde renkleri ve logoları override etmek için basit
|
|
|
8
8
|
|
|
9
9
|
```ruby
|
|
10
10
|
# /etc/foreman/plugins/foreman_theme_custom.rb veya bundler.d/*.rb icine
|
|
11
|
-
gem 'foreman_theme_custom',
|
|
11
|
+
gem 'foreman_theme_custom', '>= 0.2.0' # veya git/path
|
|
12
12
|
```
|
|
13
13
|
|
|
14
|
-
2. Üretim için
|
|
14
|
+
2. Üretim için servisleri yeniden başlatın (precompile gerektirmez):
|
|
15
15
|
|
|
16
16
|
```bash
|
|
17
|
-
foreman-rake assets:precompile RAILS_ENV=production
|
|
18
17
|
systemctl restart httpd || systemctl restart foreman
|
|
19
18
|
```
|
|
20
19
|
|
|
21
20
|
## Özelleştirme
|
|
22
21
|
|
|
23
|
-
- Renkler: `app/assets/stylesheets/foreman_theme_custom.scss` içindeki
|
|
24
|
-
- Logolar: `app/assets/images/logo_header.svg` ve `app/assets/images/logo_login.svg` dosyalarını
|
|
22
|
+
- Renkler: `app/assets/stylesheets/foreman_theme_custom.scss` içindeki kuralları düzenleyin. Paket yayınlarken bu dosya `public/foreman_theme_custom/custom.css` olarak statik servis edilir.
|
|
23
|
+
- Logolar: `app/assets/images/logo_header.svg` ve `app/assets/images/logo_login.svg` dosyalarını değiştirin veya `custom.css` içinde farklı yollar kullanın.
|
|
25
24
|
|
|
26
|
-
## Notlar
|
|
25
|
+
## Teknik Notlar
|
|
27
26
|
|
|
28
|
-
-
|
|
29
|
-
-
|
|
27
|
+
- Plugin, precompile gereksinimini ortadan kaldırmak için `public/foreman_theme_custom/custom.css` statik dosyasını doğrudan kaydeder. `register_assets { |a| a.stylesheets << '/foreman_theme_custom/custom.css' }` kullanılır.
|
|
28
|
+
- JS eklemediği için terser/execjs gibi bağımlılıklar gerekmez.
|
|
30
29
|
|
|
31
30
|
|
|
@@ -4,20 +4,17 @@ module ForemanThemeCustom
|
|
|
4
4
|
class Engine < ::Rails::Engine
|
|
5
5
|
engine_name 'foreman_theme_custom'
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
logo_header.svg
|
|
11
|
-
logo_login.svg
|
|
12
|
-
]
|
|
7
|
+
# Engine public/ klasorunden statik dosyalari servis et
|
|
8
|
+
initializer 'foreman_theme_custom.static_assets' do |app|
|
|
9
|
+
app.middleware.use(::ActionDispatch::Static, File.expand_path('../../../public', __dir__))
|
|
13
10
|
end
|
|
14
11
|
|
|
12
|
+
# Precompile bagimliligi olmadan dogrudan public yolundan CSS ekle
|
|
13
|
+
|
|
15
14
|
initializer 'foreman_theme_custom.assets' do
|
|
16
15
|
# Foreman asset pipeline icine SCSS'imizi dahil et
|
|
17
16
|
Foreman::Plugin.register :foreman_theme_custom do
|
|
18
|
-
register_assets
|
|
19
|
-
foreman_theme_custom.css
|
|
20
|
-
]
|
|
17
|
+
register_assets { |assets| assets.stylesheets << '/foreman_theme_custom/custom.css' }
|
|
21
18
|
end
|
|
22
19
|
end
|
|
23
20
|
end
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/* built as plain CSS for static serve */
|
|
2
|
+
// Foreman tema override'lari
|
|
3
|
+
// Ornek renk degiskenleri (PatternFly/Bootstrap uzerine gelir)
|
|
4
|
+
|
|
5
|
+
:root {
|
|
6
|
+
--pf-global--primary-color--100: #0052cc; // primary
|
|
7
|
+
--pf-global--link--Color: #0052cc;
|
|
8
|
+
--pf-global--danger-color--100: #d04141;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
// Navbar ve butonlar
|
|
12
|
+
.navbar-pf {
|
|
13
|
+
background-color: var(--pf-global--primary-color--100) !important;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.btn-primary {
|
|
17
|
+
background-color: var(--pf-global--primary-color--100) !important;
|
|
18
|
+
border-color: var(--pf-global--primary-color--100) !important;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
// Login sayfasi logo ve arka plan
|
|
22
|
+
.login-pf-page .login-pf-brand {
|
|
23
|
+
background-image: image-url('logo_login.svg') !important;
|
|
24
|
+
background-size: contain;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
// Header icin logo
|
|
28
|
+
.navbar-brand img, .branding .brand {
|
|
29
|
+
content: url(asset-path('logo_header.svg'));
|
|
30
|
+
height: 24px;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: foreman_theme_custom
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.2.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Ender K
|
|
@@ -25,6 +25,7 @@ files:
|
|
|
25
25
|
- config/initializers/assets.rb
|
|
26
26
|
- lib/foreman_theme_custom.rb
|
|
27
27
|
- lib/foreman_theme_custom/engine.rb
|
|
28
|
+
- public/foreman_theme_custom/custom.css
|
|
28
29
|
homepage: https://github.com/enderk/foreman_theme_custom
|
|
29
30
|
licenses:
|
|
30
31
|
- MIT
|