Skip to content

Commit a35815c

Browse files
committed
Migrate templates from Slim to ERB and update dependencies
1 parent 23b9921 commit a35815c

20 files changed

Lines changed: 305 additions & 282 deletions

Gemfile

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,10 @@
11
source 'https://rubygems.org'
22

3-
gem 'middleman', '~> 4.5'
3+
gem 'middleman'
44
gem 'middleman-favicon-maker'
55
gem 'middleman-gh-pages'
66
gem 'middleman-inline_svg'
77
gem 'middleman-livereload'
88
gem 'middleman-minify-html'
99
gem 'middleman-robots'
1010
gem "middleman-tailwind", github: "teaforthecat/middleman-tailwind", branch: "upgrade-execs-to-3.4.1"
11-
12-
# Version 5 not yet supported
13-
# https://github.com/middleman/middleman/issues/2619
14-
gem 'slim', '~> 4.0'
15-
gem 'builder'
16-
17-
# Ruby 3.4 support
18-
gem "bigdecimal"
19-
gem "mutex_m"
20-
gem "base64"
21-
gem "csv"

Gemfile.lock

Lines changed: 64 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -9,86 +9,95 @@ GIT
99
GEM
1010
remote: https://rubygems.org/
1111
specs:
12-
activesupport (7.0.8.4)
13-
concurrent-ruby (~> 1.0, >= 1.0.2)
12+
activesupport (8.0.3)
13+
base64
14+
benchmark (>= 0.3)
15+
bigdecimal
16+
concurrent-ruby (~> 1.0, >= 1.3.1)
17+
connection_pool (>= 2.2.5)
18+
drb
1419
i18n (>= 1.6, < 2)
20+
logger (>= 1.4.2)
1521
minitest (>= 5.1)
16-
tzinfo (~> 2.0)
22+
securerandom (>= 0.3)
23+
tzinfo (~> 2.0, >= 2.0.5)
24+
uri (>= 0.13.1)
1725
addressable (2.8.7)
1826
public_suffix (>= 2.0.2, < 7.0)
19-
backports (3.25.0)
20-
base64 (0.2.0)
21-
bigdecimal (3.1.8)
22-
builder (3.3.0)
27+
base64 (0.3.0)
28+
benchmark (0.4.1)
29+
bigdecimal (3.2.3)
2330
coffee-script (2.4.1)
2431
coffee-script-source
2532
execjs
2633
coffee-script-source (1.12.2)
27-
concurrent-ruby (1.3.4)
28-
contracts (0.17)
29-
csv (3.3.0)
34+
concurrent-ruby (1.3.5)
35+
connection_pool (2.5.4)
36+
contracts (0.17.2)
3037
docile (1.4.1)
31-
dotenv (3.1.2)
38+
dotenv (3.1.8)
39+
drb (2.2.3)
3240
em-websocket (0.5.3)
3341
eventmachine (>= 0.12.9)
3442
http_parser.rb (~> 0)
35-
erubis (2.7.0)
43+
erubi (1.13.1)
3644
eventmachine (1.2.7)
37-
execjs (2.9.1)
45+
execjs (2.10.0)
3846
fast_blank (1.0.1)
39-
fastimage (2.3.1)
47+
fastimage (2.4.0)
4048
favicon_maker (1.3.1)
4149
docile (~> 1.1)
42-
ffi (1.17.0)
50+
ffi (1.17.2)
4351
haml (6.3.0)
4452
temple (>= 0.8.2)
4553
thor
4654
tilt
4755
hamster (3.0.0)
4856
concurrent-ruby (~> 1.0)
49-
hashie (3.6.0)
57+
hashie (5.0.0)
5058
htmlcompressor (0.2.0)
5159
http_parser.rb (0.8.0)
52-
i18n (1.6.0)
60+
i18n (1.14.7)
5361
concurrent-ruby (~> 1.0)
54-
kramdown (2.4.0)
55-
rexml
62+
kramdown (2.5.1)
63+
rexml (>= 3.3.9)
5664
listen (3.9.0)
5765
rb-fsevent (~> 0.10, >= 0.10.3)
5866
rb-inotify (~> 0.9, >= 0.9.10)
67+
logger (1.7.0)
5968
memoist (0.16.2)
60-
middleman (4.5.0)
61-
coffee-script (~> 2.2)
62-
haml (>= 4.0.5)
63-
kramdown (>= 2.3.0)
64-
middleman-cli (= 4.5.0)
65-
middleman-core (= 4.5.0)
66-
middleman-cli (4.5.0)
67-
thor (>= 0.17.0, < 2.0)
68-
middleman-core (4.5.0)
69-
activesupport (>= 6.1, < 7.1)
69+
middleman (4.6.2)
70+
middleman-cli (= 4.6.2)
71+
middleman-core (= 4.6.2)
72+
middleman-cli (4.6.2)
73+
thor (>= 0.17.0, < 2)
74+
middleman-core (4.6.2)
75+
activesupport (>= 6.1)
7076
addressable (~> 2.4)
71-
backports (~> 3.6)
7277
bundler (~> 2.0)
73-
contracts (~> 0.13)
78+
coffee-script (~> 2.2)
79+
contracts
7480
dotenv
75-
erubis
81+
erubi
7682
execjs (~> 2.0)
7783
fast_blank
7884
fastimage (~> 2.0)
85+
haml (>= 4.0.5)
7986
hamster (~> 3.0)
80-
hashie (~> 3.4)
81-
i18n (~> 1.6.0)
87+
hashie (>= 3.4, < 6.0)
88+
i18n (>= 1.6, < 1.15)
89+
kramdown (~> 2.4)
8290
listen (~> 3.0)
8391
memoist (~> 0.14)
8492
padrino-helpers (~> 0.15.0)
8593
parallel
86-
rack (>= 1.4.5, < 3)
94+
rack (>= 3)
95+
rackup
8796
sassc (~> 2.0)
8897
servolux
89-
tilt (~> 2.0.9)
98+
tilt (~> 2.2)
9099
toml
91-
uglifier (~> 3.0)
100+
uglifier (>= 3, < 5)
92101
webrick
93102
middleman-favicon-maker (4.1.0)
94103
favicon_maker (~> 1.3, >= 1.3.1)
@@ -108,66 +117,58 @@ GEM
108117
middleman-robots (1.3.7)
109118
middleman-cli (~> 4.0)
110119
middleman-core (~> 4.0)
111-
mini_portile2 (2.8.7)
112-
minitest (5.25.1)
113-
mutex_m (0.2.0)
114-
nokogiri (1.16.7)
120+
mini_portile2 (2.8.9)
121+
minitest (5.25.5)
122+
nokogiri (1.18.10)
115123
mini_portile2 (~> 2.8.2)
116124
racc (~> 1.4)
117125
padrino-helpers (0.15.3)
118126
i18n (>= 0.6.7, < 2)
119127
padrino-support (= 0.15.3)
120128
tilt (>= 1.4.1, < 3)
121129
padrino-support (0.15.3)
122-
parallel (1.26.3)
130+
parallel (1.27.0)
123131
parslet (2.0.0)
124-
public_suffix (6.0.1)
132+
public_suffix (6.0.2)
125133
racc (1.8.1)
126-
rack (2.2.9)
134+
rack (3.2.1)
127135
rack-livereload (0.3.17)
128136
rack
129-
rake (13.2.1)
137+
rackup (2.2.1)
138+
rack (>= 3)
139+
rake (13.3.0)
130140
rb-fsevent (0.11.2)
131141
rb-inotify (0.11.1)
132142
ffi (~> 1.0)
133-
rexml (3.3.6)
134-
strscan
143+
rexml (3.4.4)
135144
sassc (2.4.0)
136145
ffi (~> 1.9)
146+
securerandom (0.4.1)
137147
servolux (0.13.0)
138-
slim (4.1.0)
139-
temple (>= 0.7.6, < 0.9)
140-
tilt (>= 2.0.6, < 2.1)
141-
strscan (3.1.0)
142-
temple (0.8.2)
143-
thor (1.3.2)
144-
tilt (2.0.11)
148+
temple (0.10.4)
149+
thor (1.4.0)
150+
tilt (2.6.1)
145151
toml (0.3.0)
146152
parslet (>= 1.8.0, < 3.0.0)
147153
tzinfo (2.0.6)
148154
concurrent-ruby (~> 1.0)
149-
uglifier (3.2.0)
155+
uglifier (4.2.1)
150156
execjs (>= 0.3.0, < 3)
151-
webrick (1.8.1)
157+
uri (1.0.3)
158+
webrick (1.9.1)
152159

153160
PLATFORMS
154161
ruby
155162

156163
DEPENDENCIES
157-
base64
158-
bigdecimal
159-
builder
160-
csv
161-
middleman (~> 4.5)
164+
middleman
162165
middleman-favicon-maker
163166
middleman-gh-pages
164167
middleman-inline_svg
165168
middleman-livereload
166169
middleman-minify-html
167170
middleman-robots
168171
middleman-tailwind!
169-
mutex_m
170-
slim (~> 4.0)
171172

172173
BUNDLED WITH
173174
2.5.10

config.rb

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
require 'slim'
2-
31
Dir['./*/*.rb'].each { |file| load file }
42
include FaviconsHelper
53

source/_feature.erb

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<dl class="mt-12 md:mt-6 relative bg-green-50 rounded-md p-4 pb-6">
2+
<dt>
3+
<div class="absolute -top-6 left-1/2 flex items-center bg-green-400 rounded-full -ml-6 p-2 drop-shadow">
4+
<%= inline_svg "#{logo}.svg", class: 'w-8 h-8 text-white' %>
5+
</div>
6+
<h3 class="mt-6 text-center text-lg font-extrabold">
7+
<%= title %>
8+
</h3>
9+
</dt>
10+
<dd class="mt-2 text-center text font-light">
11+
<%== description %>
12+
</dd>
13+
</dl>

source/_feature.slim

Lines changed: 0 additions & 8 deletions
This file was deleted.

source/_footer.erb

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
<footer class="w-full pt-32 pb-4">
2+
<ul class="flex justify-center items-center tracking-tight gap-2 text-lg">
3+
<li>
4+
<%= link_to 'EN', '/', class: 'font-semibold p-1' %>
5+
</li>
6+
<li class="text-gray-500 font-extralight text-xs">
7+
/
8+
</li>
9+
<li>
10+
<%= link_to 'FR', '/acp', class: 'font-semibold p-1' %>
11+
</li>
12+
<li class="text-gray-500 font-extralight text-xs">
13+
/
14+
</li>
15+
<li>
16+
<%= link_to 'DE', '/solawi', class: 'font-semibold p-1' %>
17+
</li>
18+
</ul>
19+
20+
<div class="mt-8 md:mt-16 flex items-center justify-center">
21+
<%= inline_svg 'logo.svg', class: 'fill-current w-8 h-8', alt: t("logo_alt") %>
22+
<strong class="text-logo-green ml-2 font-bold text-lg tracking-tight">
23+
<%= data.site.name %>
24+
</strong>
25+
</div>
26+
27+
<div class="mt-4 md:mt-8 flex flex-col md:flex-row items-center md:justify-center">
28+
<%= link_to (inline_svg('envelope.svg', class: 'w-5 h-5 mr-2 mt-0.5', alt: t('email')) + content_tag(:strong, data.site.contact.email, class: 'font-semibold')).html_safe, data.site.contact.email_link, class: 'md:mr-8 flex items-center no-underline', title: t('email') %>
29+
<%= link_to (inline_svg('phone.svg', class: 'w-5 h-5 mr-2', alt: t('phone')) + content_tag(:strong, data.site.contact.phone, class: 'font-semibold')).html_safe, data.site.contact.phone_link, class: 'mt-2 md:mt-0 flex items-center no-underline', title: t('phone') %>
30+
</div>
31+
32+
<p class="mt-4 md:mt-8 text-center text-sm text-gray-500">
33+
<%= I18n.t("footer.developed_by", author_link: link_to(data.site.author.name, data.site.author.website, class: 'whitespace-nowrap no-underline text-gray-500 font-normal', title: "thibaud.gg")) %>
34+
</p>
35+
</footer>

source/_footer.slim

Lines changed: 0 additions & 30 deletions
This file was deleted.

source/_header.erb

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
<header class="my-6 md:my-12 flex flex-wrap md:flex-nowrap justify-between">
2+
<div class="flex items-center grow w-full md:w-fit justify-center md:justify-start">
3+
<%= inline_svg 'logo.svg', class: 'fill-current w-10 h-10 md:w-12 md:h-12', alt: t("logo_alt") %>
4+
<nav class="text-logo-green ml-3 font-bold text-2xl tracking-tight flex items-center">
5+
<span>
6+
<%= link_to "CSA", "/", class: "font-bold #{"no-underline" unless I18n.locale == :en} decoration-2 hover:underline" %>
7+
</span>
8+
<span class="font-extralight text-base px-1 md:px-2">
9+
/
10+
</span>
11+
<span>
12+
<%= link_to "ACP", "/acp", class: "font-bold #{"no-underline" unless I18n.locale == :fr} decoration-2 hover:underline" %>
13+
</span>
14+
<span class="font-extralight text-base px-1 md:px-2">
15+
/
16+
</span>
17+
<span>
18+
<%= link_to "Solawi", "/solawi", class: "font-bold #{"no-underline" unless I18n.locale == :de} decoration-2 hover:underline" %>
19+
</span>
20+
<span class="ml-3">
21+
Admin
22+
</span>
23+
</nav>
24+
</div>
25+
26+
<div class="flex items-center gap-4 w-full md:text-base md:w-fit mt-6 md:mt-0 justify-center md:justify-end">
27+
<%= link_to t('header.features'), '#features', class: 'text-gray-800 text-lg font-medium' %>
28+
<%= link_to t('header.demo'), '#contact', class: 'text-gray-800 text-lg font-medium' %>
29+
<%= link_to t('header.about'), '#about', class: 'text-gray-800 text-lg font-medium' %>
30+
</div>
31+
32+
<div class="flex flex-col items-center md:items-end w-full md:w-fit mt-6 md:mt-0 md:ml-16 justify-center md:justify-end">
33+
<%= link_to (inline_svg('envelope.svg', class: 'w-5 h-5 md:order-2 mr-2 md:mr-0 md:ml-3 mt-0.5', alt: t('email')) + content_tag(:strong, data.site.contact.email, class: 'font-semibold md:order-1')).html_safe, data.site.contact.email_link, class: 'flex items-center no-underline text-gray-800', title: t('email') %>
34+
<%= link_to (inline_svg('phone.svg', class: 'w-5 h-5 md:order-2 mr-2 md:mr-0 md:ml-3', alt: t('phone')) + content_tag(:strong, data.site.contact.phone, class: 'font-semibold md:order-1')).html_safe, data.site.contact.phone_link, class: 'mt-0.5 flex items-center no-underline text-gray-800', title: t('phone') %>
35+
</div>
36+
</header

0 commit comments

Comments
 (0)