bullet_train 1.37.0 → 1.37.1

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: ac0619828c18dd73c0bd24b703b49c9055b3e2dbc8e9e17b3093c1f0b902c1dd
4
- data.tar.gz: a7656a675b55ca274086d9001b35c7d32c46616198d8cec19c38357d2796eebb
3
+ metadata.gz: 1dabb35a975775f9912af481e118c8e7a500e0ae622c10f50e999a2f22a86482
4
+ data.tar.gz: 946f16163a0e7a71530f7d4ce9cf71c593b1251fa9e4b2e645d023a048ba8917
5
5
  SHA512:
6
- metadata.gz: 5be720efef93b47c086bf5432ca141d244c22996aaed1ce73325833caedb006fa795ae32fc910068dde432398f87373b36bf0ddfb96bc5eeecc492d9c9bae3cc
7
- data.tar.gz: db0d4c4fdecb6f0a5f0f6e8f8b35420bc412f508948700443eb3ab4b65c16dc0629cfdc5d1ae24060f6466023f24598b818fd6a1aa8c232a00bbb86e827c6c8d
6
+ metadata.gz: 6f4d1a1cafc2d2087fea34ce131b809e154ee9a61d2fe42c9d0fcffd97ccbe7ef25a74d867ae77f780d70e06050ff94dc2c4a6af5ece94ece67179bcba0bb0e3
7
+ data.tar.gz: 1987c53b1c4d33badb48edf8202aba6d1d0a882f2e2df2863976d61960b48e2e31feb4ef6f0ba5dda980e8ad64744315a0c4f8cc0a78a98da2288ecba5725588
data/docs/stylesheets.md CHANGED
@@ -13,4 +13,8 @@ You can eject only the theme files you wish to override or you can eject the who
13
13
 
14
14
  To add your own custom CSS, add to the `app/assets/stylesheets/application.css` file found in your app. In this file, you'll be able to use Tailwind `@apply` directives and add `@import` statements to include the CSS from third-party `npm` packages.
15
15
 
16
- For further modifications to the theme's style sheet (for example, to change the order in which base Tailwind stylesheets are included), you can eject the theme's css by using the command `rake bullet_train:themes:light:eject_css`.
16
+ For further modifications to the theme's style sheet (for example, to change the order in which base Tailwind stylesheets are included), you can eject the theme's css by using the command `rake bullet_train:themes:light:eject_css`.
17
+
18
+ ## Using Custom Fonts
19
+
20
+ For information on customizing fonts in your application, see the [Customizing Fonts](/docs/themes.md#customizing-fonts) section in the Themes documentation.
data/docs/themes.md CHANGED
@@ -52,6 +52,52 @@ themeConfig.theme.extend.colors = ({colors}) => ({
52
52
  Here you need to include `primary` and `secondary` as well as `base`. The settings in `tailwind.config.js` will **mostly** clobber the settings
53
53
  in `theme.rb`, but not entirely. So for the best results you should make sure that those two files agree about the primary and secondary colors.
54
54
 
55
+ ## Customizing Fonts
56
+
57
+ By default, Bullet Train uses [Inter](https://rsms.me/inter/) as its font family. You can customize this to use your own fonts.
58
+
59
+ ### Removing the Default Font
60
+
61
+ To remove the default Inter font, which appears as a stylesheet `<link>` tag in the `<head>`, you'll need to eject the `shared/layouts/head/_fonts.html.erb` partial locally and modify or remove the link tag. To eject this partial, use `bin/resolve shared/layouts/head/fonts --eject` (see [Dealing with Indirection](#dealing-with-indirection) below for more details).
62
+
63
+ Once ejected to `app/views/themes/light/layouts/head/_fonts.html.erb` (or your custom theme directory), you can remove the stylesheet `<link>` tag.
64
+
65
+ ### Adding a Custom Font
66
+
67
+ To add your own custom fonts, hosted locally:
68
+
69
+ _Note: if you'd like to use a CDN-hosted font different than `inter`, you can replace the stylesheet `<link>` tag for inter found in the head (see Removing the Default Font above) and skip to step 3 below on updating the Tailwind config._
70
+
71
+ 1. **Add font files** to your application's `app/assets/fonts/` directory.
72
+
73
+ 2. **Add `@font-face` rules** in your `app/assets/stylesheets/application.css` file:
74
+
75
+ ```css
76
+ @font-face {
77
+ font-family: 'YourFontName';
78
+ src: url('YourFontFile.woff2') format('woff2');
79
+ font-weight: normal;
80
+ font-style: normal;
81
+ }
82
+ ```
83
+
84
+ Note: When you use `url('FontFileName.woff2')`, Propshaft will automatically replace it with a full fingerprinted public path to the font file.
85
+
86
+ 3. **Update `tailwind.config.js`** to use your custom font in the Tailwind configuration:
87
+
88
+ ```javascript
89
+ const defaultTheme = require('tailwindcss/defaultTheme')
90
+
91
+ // ... existing config ...
92
+
93
+ themeConfig.theme.extend.fontFamily.sans = [
94
+ 'YourFontName',
95
+ ...defaultTheme.fontFamily.sans,
96
+ ]
97
+ ```
98
+
99
+ This configuration sets your custom font as the primary sans-serif font while keeping the default system font stack as fallbacks.
100
+
55
101
  ## The Theme Subsystem
56
102
 
57
103
  Bullet Train has a theme subsystem designed to allow you the flexibility to either extend or completely replace the stock “Light” UI theme.
@@ -1,3 +1,3 @@
1
1
  module BulletTrain
2
- VERSION = "1.37.0"
2
+ VERSION = "1.37.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bullet_train
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.37.0
4
+ version: 1.37.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew Culver