Skip to content

Commit a20d16c

Browse files
committed
temp broken bulma/fa commit
1 parent 73f34ec commit a20d16c

File tree

17 files changed

+893
-1294
lines changed

17 files changed

+893
-1294
lines changed

Gemfile

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,17 +18,13 @@ gem "puma"
1818
gem "bootsnap"
1919
gem "listen"
2020

21-
# Sass
22-
gem "sassc-rails"
23-
2421
# Not sure why
2522
gem "net-imap", require: false
2623
gem "net-pop", require: false
2724
gem "net-smtp", require: false
2825

29-
# Bulma
30-
gem "bulma-rails", "~> 0.9"
31-
gem "font-awesome-sass", "~> 5.15"
26+
# Rails component: Static assets.
27+
gem "sprockets-rails"
3228

3329
# Add nested forms support
3430
gem "vanilla_nested"

Gemfile.lock

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -92,8 +92,6 @@ GEM
9292
bootsnap (1.19.0)
9393
msgpack (~> 1.2)
9494
builder (3.3.0)
95-
bulma-rails (0.9.4)
96-
sassc (~> 2.0)
9795
byebug (12.0.0)
9896
cancancan (3.6.1)
9997
capistrano (3.20.0)
@@ -163,8 +161,6 @@ GEM
163161
ffi (1.17.2-x86_64-darwin)
164162
ffi (1.17.2-x86_64-linux-gnu)
165163
ffi (1.17.2-x86_64-linux-musl)
166-
font-awesome-sass (5.15.1)
167-
sassc (>= 1.11)
168164
foreman (0.90.0)
169165
thor (~> 1.4)
170166
friendly_id (5.6.0)
@@ -404,14 +400,6 @@ GEM
404400
rubocop (~> 1.72, >= 1.72.1)
405401
rubocop-rspec (~> 3.5)
406402
ruby-progressbar (1.13.0)
407-
sassc (2.4.0)
408-
ffi (~> 1.9)
409-
sassc-rails (2.1.2)
410-
railties (>= 4.0.0)
411-
sassc (>= 2.0)
412-
sprockets (> 3.0)
413-
sprockets-rails
414-
tilt
415403
sdoc (2.6.5)
416404
rdoc (>= 5.0)
417405
securerandom (0.4.1)
@@ -452,7 +440,6 @@ GEM
452440
terrapin (1.1.1)
453441
climate_control
454442
thor (1.4.0)
455-
tilt (2.6.1)
456443
timeout (0.5.0)
457444
tqdm (0.4.1)
458445
tsort (0.2.0)
@@ -494,7 +481,6 @@ DEPENDENCIES
494481
annotate
495482
bcrypt_pbkdf
496483
bootsnap
497-
bulma-rails (~> 0.9)
498484
byebug
499485
cancancan
500486
capistrano
@@ -512,7 +498,6 @@ DEPENDENCIES
512498
factory_bot
513499
factory_bot_rails
514500
faker
515-
font-awesome-sass (~> 5.15)
516501
foreman
517502
friendly_id
518503
httparty
@@ -535,11 +520,11 @@ DEPENDENCIES
535520
rubocop-rails
536521
rubocop-rspec
537522
rubocop-rspec_rails
538-
sassc-rails
539523
sdoc
540524
sentry-rails
541525
sentry-ruby
542526
spring
527+
sprockets-rails
543528
sqlite3
544529
stackprof
545530
tqdm

Procfile.dev

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
11
rails: env RUBY_DEBUG_OPEN=true ./bin/rails server --binding=0.0.0.0 --port=3000
2+
23
js: npm run watch:js
4+
css: npm run watch:css

app/assets/config/manifest.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
11
//= link_tree ../images
2-
//= link application.css
32
//= link_tree ../builds

app/assets/stylesheets/application.scss

Lines changed: 31 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,29 @@
1-
/*
2-
* This is a manifest file that'll be compiled into application.css, which will include all the files
3-
* listed below.
4-
*
5-
* Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
6-
* or vendor/assets/stylesheets of plugins, if any, can be referenced here using a relative path.
7-
*
8-
* You're free to add application-wide styles to this file and they'll appear at the bottom of the
9-
* compiled file so the styles you add here take precedence over styles defined in any styles
10-
* defined in the other CSS/SCSS files in this directory. It is generally better to create a new
11-
* file per style scope.
12-
*
13-
*= require_tree .
14-
*= require_self
15-
*/
16-
171
// Bulma variable overrides
18-
$primary: #ff7f00;
19-
$radius-small: 8px;
20-
$radius: 8px;
21-
$card-radius: 16px;
22-
$card-background-color: #fff;
23-
$link: $primary;
24-
$modal-card-head-background-color: white;
25-
$modal-card-head-border-bottom: 2px solid whitesmoke;
26-
$modal-card-foot-border-top: 2px solid whitesmoke;
272

283
// Custom variables
29-
$logo-height: 155px;
30-
31-
// Include Bulma SCSS
32-
@import "bulma";
33-
34-
// Incluse Font Awesome SCSS
35-
@import "font-awesome-sprockets";
36-
@import "font-awesome";
4+
$tap-primary: #ff7f00;
5+
$tap-logo-height: 155px;
6+
7+
@use "bulma/sass" with (
8+
$primary: $tap-primary,
9+
$radius-small: 8px,
10+
$radius: 8px,
11+
$card-radius: 16px,
12+
$card-background-color: white,
13+
$link: $tap-primary,
14+
$modal-card-head-background-color: white,
15+
//$modal-card-head-border-bottom: 2px solid whitesmoke,
16+
//$modal-card-foot-border-top: 2px solid whitesmoke,
17+
);
18+
@use "bulma/sass" as *;
19+
@use "bulma/sass/utilities/mixins" as *;
20+
21+
@use "@fortawesome/fontawesome-free/scss/variables" with (
22+
$font-path: ".",
23+
);
24+
@use "@fortawesome/fontawesome-free/scss/fontawesome";
25+
@use "@fortawesome/fontawesome-free/scss/fa" as fa;
26+
@use "@fortawesome/fontawesome-free/scss/solid" as fa-solid;
3727

3828
html {
3929
max-height: 100vh;
@@ -83,11 +73,9 @@ body {
8373
.back {
8474
margin-bottom: 0.5rem;
8575

86-
&::before {
87-
content: "\f104";
88-
font-family: "Font Awesome 5 Free";
89-
font-weight: 900;
90-
color: $primary;
76+
::before {
77+
@include fa-solid.icon(fa.$var-angle-left);
78+
content: fa.fa-content(fa.$var-angle-left);
9179
margin-right: 0.2rem;
9280
}
9381
}
@@ -473,7 +461,7 @@ body {
473461
&-logo {
474462
display: flex;
475463
justify-content: center;
476-
height: $logo-height;
464+
height: $tap-logo-height;
477465
}
478466

479467
&-title {
@@ -1049,7 +1037,7 @@ body {
10491037

10501038
.modal-card-body {
10511039
background-color: black;
1052-
border-color: lighten(black, 10%);
1040+
border-color: bulmaLighten(black, 10%);
10531041
}
10541042
}
10551043

@@ -1141,7 +1129,7 @@ body {
11411129

11421130
// Better contrast between background and elements
11431131
body {
1144-
background-color: darken($white, 5%);
1132+
background-color: bulmaDarken($white, 5%);
11451133
}
11461134

11471135
// Modal background should not be white
@@ -1173,7 +1161,7 @@ body {
11731161
border-color: $grey;
11741162

11751163
&:hover {
1176-
border-color: darken($grey, 20%);
1164+
border-color: bulmaDarken($grey, 20%);
11771165
}
11781166
}
11791167

@@ -1197,7 +1185,7 @@ body {
11971185
@extend .theme-no-blend;
11981186
font-size: $size-7;
11991187
color: $grey;
1200-
color: darken($primary, 20%);
1188+
color: bulmaDarken($primary, 20%);
12011189
}
12021190
}
12031191

app/form_builders/formatted_form_builder.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ def price_field(attribute, options = {})
111111
options[:step] ||= 0.01
112112

113113
# Set the prefix icon
114-
options[:prefix_icon] = "fas fa-euro-sign"
114+
options[:prefix_icon] = "fa-solid fa-euro-sign"
115115

116116
# Regular number field
117117
number_field(attribute, options)

app/views/layouts/application.html.erb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
<%= stylesheet_link_tag "application", media: "all", 'data-turbo-track': "reload", defer: true %>
1313

1414
<!-- JS -->
15-
<%= javascript_include_tag "application", "data-turbo-track": "reload", type: "module" %>
15+
<%= javascript_include_tag "application", "data-turbo-track": "reload", type: "module", defer: true %>
1616

1717
<!-- Icons -->
1818
<link rel="apple-touch-icon" sizes="180x180" href="/icons/apple-touch-icon.png">

app/views/orders/_form.html.erb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151
session: stringify_order_session(@order_session),
5252
} do
5353
%>
54-
<%= icon('fas', 'trash-alt') %>
54+
<i class="fa-solid fa-trash-alt"></i>
5555
<% end %>
5656
</td>
5757
</tr>

app/views/orders/new.html.erb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747

4848
<!-- Product Select -->
4949
<a class="button is-primary is-large" href="#modalOrderProducts" data-turbo="false">
50-
<%= icon('fas', 'list', class: "mr-3") %> Select product
50+
<i class="fa-solid fa-list mr-3"></i> Select product
5151
</a>
5252

5353

@@ -59,7 +59,7 @@
5959

6060
<div>
6161
<a class="button is-primary is-large" href="#modalOrderScanner" data-turbo="false" v-cloak>
62-
<%= icon('fas', 'camera', class: "mr-3") %> Scan barcode
62+
<i class="fa-solid fa-camera mr-3"></i> Scan barcode
6363
</a>
6464
</div>
6565
<% end %>

app/views/products/_form.html.erb

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,8 @@
1717

1818
<%= f.text_field :name %>
1919
<%= f.price_field :price, label: "Price" %>
20-
<a href="#modalPriceCalculator" class="button is-primary" data-turbo="false">
21-
<%= icon('fas', 'calculator', class: "mr-3") %>
22-
Price Calculator
20+
<a href="#modalPriceCalculator" class="button is-light is-primary" data-turbo="false">
21+
<i class="fa-solid fa-calculator mr-3"></i> Price Calculator
2322
</a>
2423
<%= f.collection_select :category, Product.categories.keys, :to_s, :titlecase %>
2524
<%= f.number_field :stock %>

0 commit comments

Comments
 (0)