Mattias Bodlund 1 year ago
parent
commit
b85a97820b
8 changed files with 116 additions and 122 deletions
  1. +9
    -9
      Gemfile
  2. +68
    -95
      Gemfile.lock
  3. +1
    -0
      app/assets/images/ikea-foundation-logo.svg
  4. +20
    -10
      app/assets/stylesheets/application.css
  5. +1
    -1
      app/views/layouts/application.html.erb
  6. +15
    -5
      app/views/site/tmpl_article.html.erb
  7. +1
    -1
      config/importmap.rb
  8. +1
    -1
      vendor/javascript/trix.js

+ 9
- 9
Gemfile View File

@ -49,10 +49,10 @@ gem "bootsnap", require: false
# Use Active Storage variants [https://guides.rubyonrails.org/active_storage_overview.html#transforming-images]
gem "image_processing", "~> 1.2"
group :development, :test do
# See https://guides.rubyonrails.org/debugging_rails_applications.html#debugging-with-the-debug-gem
gem "debug", platforms: %i[ mri windows ]
end
# group :development, :test do
# # See https://guides.rubyonrails.org/debugging_rails_applications.html#debugging-with-the-debug-gem
# gem "debug", platforms: %i[ mri windows ]
# end
group :development do
# Use console on exceptions pages [https://github.com/rails/web-console]
@ -65,8 +65,8 @@ group :development do
# gem "spring"
end
group :test do
# Use system testing [https://guides.rubyonrails.org/testing.html#system-testing]
gem "capybara"
gem "selenium-webdriver"
end
# group :test do
# # Use system testing [https://guides.rubyonrails.org/testing.html#system-testing]
# gem "capybara"
# gem "selenium-webdriver"
# end

+ 68
- 95
Gemfile.lock View File

@ -1,35 +1,35 @@
GEM
remote: https://rubygems.org/
specs:
actioncable (7.1.3.2)
actionpack (= 7.1.3.2)
activesupport (= 7.1.3.2)
actioncable (7.1.3.3)
actionpack (= 7.1.3.3)
activesupport (= 7.1.3.3)
nio4r (~> 2.0)
websocket-driver (>= 0.6.1)
zeitwerk (~> 2.6)
actionmailbox (7.1.3.2)
actionpack (= 7.1.3.2)
activejob (= 7.1.3.2)
activerecord (= 7.1.3.2)
activestorage (= 7.1.3.2)
activesupport (= 7.1.3.2)
actionmailbox (7.1.3.3)
actionpack (= 7.1.3.3)
activejob (= 7.1.3.3)
activerecord (= 7.1.3.3)
activestorage (= 7.1.3.3)
activesupport (= 7.1.3.3)
mail (>= 2.7.1)
net-imap
net-pop
net-smtp
actionmailer (7.1.3.2)
actionpack (= 7.1.3.2)
actionview (= 7.1.3.2)
activejob (= 7.1.3.2)
activesupport (= 7.1.3.2)
actionmailer (7.1.3.3)
actionpack (= 7.1.3.3)
actionview (= 7.1.3.3)
activejob (= 7.1.3.3)
activesupport (= 7.1.3.3)
mail (~> 2.5, >= 2.5.4)
net-imap
net-pop
net-smtp
rails-dom-testing (~> 2.2)
actionpack (7.1.3.2)
actionview (= 7.1.3.2)
activesupport (= 7.1.3.2)
actionpack (7.1.3.3)
actionview (= 7.1.3.3)
activesupport (= 7.1.3.3)
nokogiri (>= 1.8.5)
racc
rack (>= 2.2.4)
@ -37,35 +37,35 @@ GEM
rack-test (>= 0.6.3)
rails-dom-testing (~> 2.2)
rails-html-sanitizer (~> 1.6)
actiontext (7.1.3.2)
actionpack (= 7.1.3.2)
activerecord (= 7.1.3.2)
activestorage (= 7.1.3.2)
activesupport (= 7.1.3.2)
actiontext (7.1.3.3)
actionpack (= 7.1.3.3)
activerecord (= 7.1.3.3)
activestorage (= 7.1.3.3)
activesupport (= 7.1.3.3)
globalid (>= 0.6.0)
nokogiri (>= 1.8.5)
actionview (7.1.3.2)
activesupport (= 7.1.3.2)
actionview (7.1.3.3)
activesupport (= 7.1.3.3)
builder (~> 3.1)
erubi (~> 1.11)
rails-dom-testing (~> 2.2)
rails-html-sanitizer (~> 1.6)
activejob (7.1.3.2)
activesupport (= 7.1.3.2)
activejob (7.1.3.3)
activesupport (= 7.1.3.3)
globalid (>= 0.3.6)
activemodel (7.1.3.2)
activesupport (= 7.1.3.2)
activerecord (7.1.3.2)
activemodel (= 7.1.3.2)
activesupport (= 7.1.3.2)
activemodel (7.1.3.3)
activesupport (= 7.1.3.3)
activerecord (7.1.3.3)
activemodel (= 7.1.3.3)
activesupport (= 7.1.3.3)
timeout (>= 0.4.0)
activestorage (7.1.3.2)
actionpack (= 7.1.3.2)
activejob (= 7.1.3.2)
activerecord (= 7.1.3.2)
activesupport (= 7.1.3.2)
activestorage (7.1.3.3)
actionpack (= 7.1.3.3)
activejob (= 7.1.3.3)
activerecord (= 7.1.3.3)
activesupport (= 7.1.3.3)
marcel (~> 1.0)
activesupport (7.1.3.2)
activesupport (7.1.3.3)
base64
bigdecimal
concurrent-ruby (~> 1.0, >= 1.0.2)
@ -88,16 +88,7 @@ GEM
bootsnap (1.18.3)
msgpack (~> 1.2)
builder (3.2.4)
capybara (3.40.0)
addressable
matrix
mini_mime (>= 0.1.3)
nokogiri (~> 1.11)
rack (>= 1.6.0)
rack-test (>= 0.6.3)
regexp_parser (>= 1.5, < 3.0)
xpath (~> 3.2)
concurrent-ruby (1.2.3)
concurrent-ruby (1.3.1)
connection_pool (2.4.1)
crass (1.0.6)
css_parser (1.17.1)
@ -106,9 +97,6 @@ GEM
date_validator (0.12.0)
activemodel (>= 3)
activesupport (>= 3)
debug (1.9.2)
irb (~> 1.10)
reline (>= 0.3.8)
dkim (1.1.0)
dotenv (3.1.2)
dotenv-rails (3.1.2)
@ -157,10 +145,9 @@ GEM
net-pop
net-smtp
marcel (1.0.4)
matrix (0.4.2)
mini_magick (4.12.0)
mini_mime (1.1.5)
minitest (5.22.3)
minitest (5.23.1)
mobility (1.3.0.rc3)
i18n (>= 0.6.10, < 2)
request_store (~> 1.0)
@ -176,17 +163,17 @@ GEM
net-smtp (0.5.0)
net-protocol
nio4r (2.7.3)
nokogiri (1.16.4-aarch64-linux)
nokogiri (1.16.5-aarch64-linux)
racc (~> 1.4)
nokogiri (1.16.4-arm-linux)
nokogiri (1.16.5-arm-linux)
racc (~> 1.4)
nokogiri (1.16.4-arm64-darwin)
nokogiri (1.16.5-arm64-darwin)
racc (~> 1.4)
nokogiri (1.16.4-x86-linux)
nokogiri (1.16.5-x86-linux)
racc (~> 1.4)
nokogiri (1.16.4-x86_64-darwin)
nokogiri (1.16.5-x86_64-darwin)
racc (~> 1.4)
nokogiri (1.16.4-x86_64-linux)
nokogiri (1.16.5-x86_64-linux)
racc (~> 1.4)
pg (1.5.6)
pg_search (2.3.6)
@ -200,7 +187,7 @@ GEM
actionmailer (>= 3)
net-smtp
premailer (~> 1.7, >= 1.7.9)
propshaft (0.8.0)
propshaft (0.9.0)
actionpack (>= 7.0.0)
activesupport (>= 7.0.0)
rack
@ -210,7 +197,7 @@ GEM
public_suffix (5.0.5)
puma (6.4.2)
nio4r (~> 2.0)
racc (1.7.3)
racc (1.8.0)
rack (3.0.11)
rack-session (2.0.0)
rack (>= 3.0.0)
@ -219,20 +206,20 @@ GEM
rackup (2.1.0)
rack (>= 3)
webrick (~> 1.8)
rails (7.1.3.2)
actioncable (= 7.1.3.2)
actionmailbox (= 7.1.3.2)
actionmailer (= 7.1.3.2)
actionpack (= 7.1.3.2)
actiontext (= 7.1.3.2)
actionview (= 7.1.3.2)
activejob (= 7.1.3.2)
activemodel (= 7.1.3.2)
activerecord (= 7.1.3.2)
activestorage (= 7.1.3.2)
activesupport (= 7.1.3.2)
rails (7.1.3.3)
actioncable (= 7.1.3.3)
actionmailbox (= 7.1.3.3)
actionmailer (= 7.1.3.3)
actionpack (= 7.1.3.3)
actiontext (= 7.1.3.3)
actionview (= 7.1.3.3)
activejob (= 7.1.3.3)
activemodel (= 7.1.3.3)
activerecord (= 7.1.3.3)
activestorage (= 7.1.3.3)
activesupport (= 7.1.3.3)
bundler (>= 1.15.0)
railties (= 7.1.3.2)
railties (= 7.1.3.3)
rails-dom-testing (2.2.0)
activesupport (>= 5.0.0)
minitest
@ -240,35 +227,27 @@ GEM
rails-html-sanitizer (1.6.0)
loofah (~> 2.21)
nokogiri (~> 1.14)
railties (7.1.3.2)
actionpack (= 7.1.3.2)
activesupport (= 7.1.3.2)
railties (7.1.3.3)
actionpack (= 7.1.3.3)
activesupport (= 7.1.3.3)
irb
rackup (>= 1.0.0)
rake (>= 12.2)
thor (~> 1.0, >= 1.2.2)
zeitwerk (~> 2.6)
rake (13.2.1)
rdoc (6.6.3.1)
rdoc (6.7.0)
psych (>= 4.0.0)
redis (5.2.0)
redis-client (>= 0.22.0)
redis-client (0.22.1)
redis-client (0.22.2)
connection_pool
regexp_parser (2.9.1)
reline (0.5.6)
reline (0.5.8)
io-console (~> 0.5)
request_store (1.7.0)
rack (>= 1.4)
rexml (3.2.6)
ruby-vips (2.2.1)
ffi (~> 1.12)
rubyzip (2.3.2)
selenium-webdriver (4.20.1)
base64 (~> 0.2)
rexml (~> 3.2, >= 3.2.5)
rubyzip (>= 1.2.2, < 3.0)
websocket (~> 1.0)
sidekiq (7.2.4)
concurrent-ruby (< 2)
connection_pool (>= 2.3.0)
@ -291,13 +270,10 @@ GEM
bindex (>= 0.4.0)
railties (>= 6.0.0)
webrick (1.8.1)
websocket (1.2.10)
websocket-driver (0.7.6)
websocket-extensions (>= 0.1.0)
websocket-extensions (0.1.5)
xpath (3.2.0)
nokogiri (~> 1.8)
zeitwerk (2.6.13)
zeitwerk (2.6.15)
PLATFORMS
aarch64-linux
@ -312,9 +288,7 @@ DEPENDENCIES
ancestry
bcrypt (~> 3.1.7)
bootsnap
capybara
date_validator
debug
dkim
dotenv-rails
image_processing (~> 1.2)
@ -329,7 +303,6 @@ DEPENDENCIES
puma (>= 5.0)
rails (~> 7.1.3, >= 7.1.3.2)
redis (>= 4.0.1)
selenium-webdriver
sidekiq
stimulus-rails
turbo-rails
@ -339,4 +312,4 @@ RUBY VERSION
ruby 3.3.0p0
BUNDLED WITH
2.5.9
2.5.10

+ 1
- 0
app/assets/images/ikea-foundation-logo.svg View File

@ -0,0 +1 @@
<svg id="ikea-foundation-logo" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 80 49"><path d="M80,32.5H0V0h80v32.5Z" style="fill:#0058a3; stroke-width:0px;"/><path d="M1.56,16.25c0,7.86,16.11,14.38,38.44,14.38s38.44-6.52,38.44-14.38S62.33,1.87,40,1.87,1.56,8.39,1.56,16.25Z" style="fill:#ffdb00; stroke-width:0px;"/><path d="M37.73,20.86c.23.35.51.68.85,1.02h-8.65c0-.34-.33-1.04-.7-1.59-.37-.55-2.35-3.56-2.35-3.56v4.14c0,.34,0,.68.17,1.02h-7.21c.17-.34.17-.68.17-1.02v-9.84c0-.34,0-.68-.17-1.02h7.21c-.17.34-.17.68-.17,1.02v4.29s2.31-3,2.83-3.7c.4-.53.9-1.27.9-1.61h7.52c-.52.34-1.09.97-1.56,1.54-.41.5-2.76,3.36-2.76,3.36,0,0,3.47,5.28,3.92,5.96h0ZM40,11.02v9.84c0,.34,0,.68-.17,1.02h13.92v-3.3c-.34.17-.68.17-1.02.17h-5.86v-1.56h5.62v-2.5h-5.62v-1.56h5.86c.34,0,.68,0,1.02.17v-3.29h-13.92c.17.34.17.68.17,1.02h0ZM73.04,20.85c.13.34.26.68.56,1.02h-7.54c.04-.34-.1-.68-.23-1.02,0,0-.12-.28-.27-.68-.01-.03-.07-.18-.07-.18h-4.35l-.06.18s-.12.34-.24.68c-.12.34-.25.68-.19,1.02h-5.95c.29-.34.42-.68.54-1.02.2-.54,3.29-9.07,3.57-9.84.12-.34.25-.68.2-1.02h10.06c-.09.34.09.68.22,1.02.29.76,3.51,9.17,3.77,9.84ZM64.53,17.5c-.54-1.43-1-2.63-1.05-2.75-.13-.34-.23-.78-.23-.78,0,0-.08.44-.21.78-.04.11-.48,1.32-1,2.75h2.48ZM16.42,10h-7.84c.17.34.17.68.17,1.02v9.84c0,.34,0,.68-.17,1.02h7.84c-.17-.34-.17-.68-.17-1.02v-9.84c0-.34,0-.68.17-1.02ZM70.63,10.94c0-.91.66-1.56,1.56-1.56s1.56.66,1.56,1.56-.66,1.56-1.56,1.56-1.56-.66-1.56-1.56ZM70.94,10.94c0,.69.52,1.25,1.25,1.25.69,0,1.25-.52,1.25-1.25,0-.69-.52-1.25-1.25-1.25s-1.25.52-1.25,1.25ZM71.88,11.87h-.28v-1.87h.7c.32,0,.59.28.59.61,0,.23-.13.45-.33.55l.41.72h-.31l-.37-.66h-.4v.66h0ZM71.88,10.94h.38c.19,0,.35-.14.35-.33s-.16-.33-.35-.33h-.38v.66h0Z" style="fill:#0058a3; stroke-width:0px;"/><path d="M25.74,48.49v-7.38h4.13v.82h-3.2v2.62h3v.82h-3v3.13h-.93ZM33.13,48.59c-1.47,0-2.54-1.04-2.54-2.89s.98-2.87,2.58-2.87c1.5,0,2.55,1.03,2.55,2.87s-1,2.89-2.59,2.89ZM33.15,47.83c1.12,0,1.62-.82,1.62-2.13s-.51-2.1-1.63-2.1-1.61.79-1.61,2.1.5,2.13,1.62,2.13ZM41.53,48.49h-.75l-.13-.73h-.04c-.36.58-1.04.84-1.76.84-1.33,0-2.02-.61-2.02-2.02v-3.63h.92v3.57c0,.89.39,1.32,1.23,1.32,1.23,0,1.63-.71,1.63-2.01v-2.89h.91v5.54ZM47.74,44.88v3.61h-.9v-3.55c0-.89-.39-1.33-1.24-1.33-1.23,0-1.62.71-1.62,2.01v2.88h-.91v-5.54h.73l.13.76h.05c.36-.58,1.04-.86,1.75-.86,1.32,0,2.01.61,2.01,2.04ZM49.06,45.72c0-1.9.91-2.89,2.29-2.89.86,0,1.38.36,1.72.82h.06c-.02-.18-.06-.61-.06-.82v-2.21h.91v7.86h-.73l-.13-.75h-.04c-.33.48-.86.85-1.73.85-1.38,0-2.28-.96-2.28-2.87h0ZM53.08,45.9v-.17c0-1.38-.37-2.14-1.6-2.14-.98,0-1.47.84-1.47,2.15s.49,2.09,1.48,2.09c1.17,0,1.59-.64,1.59-1.93ZM59.73,44.71v3.78h-.66l-.18-.79h-.04c-.49.61-.93.89-1.86.89-1,0-1.75-.52-1.75-1.64s.85-1.72,2.66-1.77l.94-.03v-.33c0-.92-.42-1.23-1.15-1.23-.58,0-1.11.21-1.56.42l-.28-.68c.49-.26,1.17-.48,1.89-.48,1.34,0,1.99.57,1.99,1.86ZM58.02,45.81c-1.39.05-1.83.44-1.83,1.15,0,.62.41.9,1.01.9.93,0,1.63-.51,1.63-1.58v-.5l-.82.03h0ZM64.03,47.73v.69c-.2.09-.6.17-.93.17-.87,0-1.62-.37-1.62-1.72v-3.23h-.79v-.43l.8-.36.36-1.18h.54v1.27h1.6v.7h-1.6v3.21c0,.67.36.99.87.99.27,0,.6-.05.78-.11h0ZM66.13,41.44c0,.39-.25.58-.53.58-.3,0-.54-.19-.54-.58s.24-.58.54-.58c.28,0,.53.18.53.58ZM66.05,48.49h-.91v-5.54h.91v5.54ZM69.87,48.59c-1.47,0-2.54-1.04-2.54-2.89s.98-2.87,2.58-2.87c1.5,0,2.55,1.03,2.55,2.87s-1,2.89-2.59,2.89ZM69.89,47.83c1.12,0,1.62-.82,1.62-2.13s-.51-2.1-1.63-2.1-1.61.79-1.61,2.1.5,2.13,1.62,2.13ZM78.44,44.88v3.61h-.9v-3.55c0-.89-.39-1.33-1.24-1.33-1.23,0-1.62.71-1.62,2.01v2.88h-.91v-5.54h.73l.13.76h.05c.36-.58,1.04-.86,1.75-.86,1.32,0,2.01.61,2.01,2.04ZM1.56,41.1h.93v7.38h-.93v-7.38ZM8.81,48.49l-2.62-3.53-.76.66v2.87h-.93v-7.38h.93v3.64c.41-.47.85-.93,1.27-1.41l2-2.23h1.09l-2.93,3.22,3.04,4.17h-1.1ZM10.91,48.49v-7.38h4.13v.82h-3.2v2.31h3.01v.81h-3.01v2.64h3.2v.82h-4.13ZM20.41,46.2h-2.93l-.88,2.29h-.94l2.89-7.42h.84l2.88,7.42h-.96l-.89-2.29ZM19.3,43.14c-.06-.17-.28-.85-.35-1.11-.1.42-.24.87-.32,1.11l-.84,2.23h2.34l-.83-2.23h0Z" style="fill:#231f20; stroke-width:0px;"/></svg>

+ 20
- 10
app/assets/stylesheets/application.css View File

@ -113,7 +113,7 @@ header {
margin: 1rem;
& svg {
width: 59px;
width: 70px;
height: auto;
}
@ -173,7 +173,7 @@ main {
.msg__container {
max-width: 440px;
margin: 60px auto 40px auto;
margin: 40px auto 40px auto;
container-type: inline-size;
container-name: startbar;
}
@ -352,13 +352,22 @@ input[type=range] {
}
.link__container {
max-width: 900px;
max-width: 800px;
margin-left: auto;
margin-right: auto;
container-type: inline-size;
container-name: link;
}
.link__branding {
& svg {
width: 70px;
height: auto;
}
}
ul.card__stack {
max-width: 270px;
aspect-ratio: 0.72972972972973;
@ -447,9 +456,6 @@ ul.card__stack {
}
.link__body, .link__learn-more {
font-size: var(--fs-base);
line-height: 1.4;
@ -457,7 +463,7 @@ ul.card__stack {
.link__learn-more {
font-weight: 700;
margin-bottom: 20px;
margin-top: 20px;
border-top: 1px solid var(--clr-black);
border-bottom: 1px solid var(--clr-black);
@ -554,7 +560,7 @@ ul.card__stack {
margin-bottom: 40px;
& img {
aspect-ratio: 0.725;
aspect-ratio: 0.615101289134438;
}
}
@ -571,12 +577,12 @@ ul.card__stack {
grid-row: 1 / span 2;
}
.link__body {
.link__body-container {
grid-column: 1;
grid-row: 1;
}
.link__learn-more {
.link__branding {
grid-column: 1;
grid-row: 2;
}
@ -585,6 +591,10 @@ ul.card__stack {
@media (min-width: 815px) {
header {
margin: 4rem 4rem 2rem 4rem;
& svg {
width: 80px;
}
}
.icon__container img:nth-child(4) {


+ 1
- 1
app/views/layouts/application.html.erb View File

@ -16,7 +16,7 @@
</head>
<body>
<header>
<%= link_to svg('ikea-foundation-week'), root_url %>
<%= link_to svg('ikea-foundation-logo'), root_url %>
<div>
<%= t('can_you_spot_the_link').html_safe %>
</div>


+ 15
- 5
app/views/site/tmpl_article.html.erb View File

@ -28,13 +28,21 @@
loading: 'lazy' if asset&.file&.image? %>
<% end %>
<div class="link__body">
<%= article_parts[:html]&.html_safe %>
<div class="link__body-container">
<div class="link__body">
<%= article_parts[:html]&.html_safe %>
</div>
<%= tag.div class: "link__learn-more" do %>
<%= article_parts[:link].html_safe %>
<% end if article_parts[:link] %>
</div>
<%= tag.div class: "link__learn-more" do %>
<%= article_parts[:link].html_safe %>
<% end if article_parts[:link] %>
<div class="link__branding">
<%= svg 'ikea-foundation-week' %>
</div>
<% end %>
</div>
@ -48,4 +56,6 @@
</li>
</ul>
</article>

+ 1
- 1
config/importmap.rb View File

@ -10,7 +10,7 @@ pin "stimulus-use" # @0.52.2
pin "@rails/request.js", to: "@rails--request.js.js" # @0.0.9
pin "@rails/activestorage", to: "@rails--activestorage.js" # @7.1.3
pin "tom-select" # @2.3.1
pin "trix" # @2.1.0
pin "trix" # @2.1.1
# site_helper
pin "application", preload: false

+ 1
- 1
vendor/javascript/trix.js
File diff suppressed because it is too large
View File


Loading…
Cancel
Save