diff --git a/Gemfile.lock b/Gemfile.lock index 4cab0be..9eb0700 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -156,7 +156,7 @@ GEM kaminari-core (= 1.2.2) kaminari-core (1.2.2) language_server-protocol (3.17.0.6) - lexxy (0.9.29) + lexxy (0.9.30) rails (>= 8.0.2) lint_roller (1.1.0) logger (1.7.0) @@ -223,7 +223,7 @@ GEM activesupport (>= 7.2) pp (0.6.4) prettyprint - premailer (1.29.0) + premailer (1.30.0) addressable css_parser (>= 1.19.0) htmlentities (>= 4.0.0) @@ -332,7 +332,7 @@ GEM ffi (~> 1.12) logger securerandom (0.4.1) - sidekiq (8.1.6) + sidekiq (8.1.7) connection_pool (>= 3.0.0) json (>= 2.16.0) logger (>= 1.7.0) @@ -471,7 +471,7 @@ CHECKSUMS kaminari-activerecord (1.2.2) sha256=0dd3a67bab356a356f36b3b7236bcb81cef313095365befe8e98057dd2472430 kaminari-core (1.2.2) sha256=3bd26fec7370645af40ca73b9426a448d09b8a8ba7afa9ba3c3e0d39cdbb83ff language_server-protocol (3.17.0.6) sha256=5ef2c0c138f8267e1bc631d3328347d354f96724b0af22f2c79516120443b7f0 - lexxy (0.9.29) sha256=67421fef9a72c303189780cb419287e2a5aa550b492dee7a153a582add00e29c + lexxy (0.9.30) sha256=6594fc83c3af21975ac66e4a2646a8ed5ae1508cf088f6b30bdd584c21730f91 lint_roller (1.1.0) sha256=2c0c845b632a7d172cb849cc90c1bce937a28c5c8ccccb50dfd46a485003cc87 logger (1.7.0) sha256=196edec7cc44b66cfb40f9755ce11b392f21f7967696af15d274dde7edff0203 loofah (2.25.2) sha256=2007f746959ac65552456e04b433e83deb22759ab38c838b4445c70e43425918 @@ -507,7 +507,7 @@ CHECKSUMS pg (1.6.3-x86_64-linux-musl) sha256=9c9c90d98c72f78eb04c0f55e9618fe55d1512128e411035fe229ff427864009 pg_search (2.3.8) sha256=10e2d365d76ac432c79875c3ce17cf285c97c029548d84990b02406e52347c06 pp (0.6.4) sha256=dfcb0fce700c41456265922884f9fe195d7fbb0674a3578e6c0f69588e82b570 - premailer (1.29.0) sha256=015f30c520701f3d47fd898886a3eaf4e5171efcc5fd239b872efd1ba61d3da0 + premailer (1.30.0) sha256=55f7cfa5099c18f3698a0b5548da448f402e8bf4cbc9410e32e37fb211078c21 premailer-rails (1.12.0) sha256=c13815d161b9bc7f7d3d81396b0bb0a61a90fa9bd89931548bf4e537c7710400 prettyprint (0.2.0) sha256=2bc9e15581a94742064a3cc8b0fb9d45aae3d03a1baa6ef80922627a0766f193 prism (1.9.0) sha256=7b530c6a9f92c24300014919c9dcbc055bf4cdf51ec30aed099b06cd6674ef85 @@ -540,7 +540,7 @@ CHECKSUMS ruby-progressbar (1.13.0) sha256=80fc9c47a9b640d6834e0dc7b3c94c9df37f08cb072b7761e4a71e22cff29b33 ruby-vips (2.3.0) sha256=e685ec02c13969912debbd98019e50492e12989282da5f37d05f5471442f5374 securerandom (0.4.1) sha256=cc5193d414a4341b6e225f0cb4446aceca8e50d5e1888743fac16987638ea0b1 - sidekiq (8.1.6) sha256=be20cd051124b1a16cf97ea9157137abbd30a515c16a5ae9312d2eadd045e40f + sidekiq (8.1.7) sha256=91ad48c7e6c32e1846bf1d5b74c27948758049b93fed0cb539f8d586c7de3415 ssrf_filter (1.5.0) sha256=e03dcdb9d1730d7f6710532a606b3543df2a448a0293ce04a2d995523c5a97f6 stimulus-rails (1.3.4) sha256=765676ffa1f33af64ce026d26b48e8ffb2e0b94e0f50e9119e11d6107d67cb06 thor (1.5.0) sha256=e3a9e55fe857e44859ce104a84675ab6e8cd59c650a49106a05f55f136425e73 diff --git a/README.txt b/README.txt index c97d78d..d69672f 100644 --- a/README.txt +++ b/README.txt @@ -7,7 +7,7 @@ https://ssmidt79.github.io/save-this-tomato/ API ------------------- curl -H "Authorization: Bearer ikea-tomato-2026" http://localhost:3000/api/v1/leaderboard -curl -H "Authorization: Bearer ikea-tomato-2026" https://ikea-foundation-week-2026.onc.dk/api/v1/leaderboard +curl -H "Authorization: Bearer ikea-tomato-2026" https://savethetomato.ikeafoundation.org/api/v1/leaderboard Assets ------------------- diff --git a/app/assets/stylesheets/application.css b/app/assets/stylesheets/application.css index 4962abd..a9022d0 100644 --- a/app/assets/stylesheets/application.css +++ b/app/assets/stylesheets/application.css @@ -487,7 +487,6 @@ body:has(header) { form:has(.cta) { display: flex; - } .cta { @@ -511,22 +510,7 @@ form:has(.cta) { text-decoration: none; } -.share-container { - display: flex; - margin-block-start: 1rem; - - button { - font-size: var(--fs-base); - font-weight: 700; - color: var(--clr-black); - border: none; - background-color: transparent; - display: inline-flex; - align-items: center; - gap: 0.5rem; - padding: 0; - } -} + .arrow { display: block; @@ -545,8 +529,11 @@ form:has(.cta) { gap: 0.5rem; justify-content: stretch; align-items: stretch; - margin: 0 1rem; - + margin: 0 1rem; +} + +.share-container { + display: flex; } .cta-link { @@ -776,6 +763,15 @@ dialog::backdrop { background-image: url("inter-ikea-systems.svg"); background-repeat: no-repeat; background-position: calc(100% - 0.5rem) 0.5rem; + + button { + appearance: none; + background-color: transparent; + border: none; + display: flex; + align-items: center; + gap: 0.5rem; + } } diff --git a/app/views/game/_stage_header.html.erb b/app/views/game/_stage_header.html.erb index 61b6559..6aefb9e 100644 --- a/app/views/game/_stage_header.html.erb +++ b/app/views/game/_stage_header.html.erb @@ -11,7 +11,7 @@
<%= svg (is_last_save ? t("icons.last_save") : t("icons.stages")[stage_index]) %>
- <%= tag.div t("game.stage_i_of_n", i: (is_last_save ? n_stages : stage_index), n: n_stages), class: "stage-progress" %> + <%= tag.div t("game.stage_i_of_n", i: stage_index, n: n_stages), class: "stage-progress" unless is_last_save %> <%= tag.h1 @node.title %>
diff --git a/app/views/game/results.html.erb b/app/views/game/results.html.erb index 11b19d7..f95725b 100644 --- a/app/views/game/results.html.erb +++ b/app/views/game/results.html.erb @@ -2,13 +2,11 @@

<%= result_headline(current_player) %>

- -
- -
+ + <%= button_to start_path(skip_facts: true) do %> + + <%= tag.span(t("game.save_another_tomato")) %> + <% end %>
@@ -82,8 +80,13 @@
- <%= link_to tag.span(t("game.subscribe_to_newsletter")), "#", class: "cta cta-link" %> - <%= button_to tag.span(t("game.save_another_tomato")), start_path(skip_facts: true), class: "cta" %> + <%= link_to tag.span(t("game.subscribe_to_newsletter")), "#", class: "cta cta-link" %> + +
+ +
diff --git a/config/question_scores.json b/config/question_scores.json index f8aa61d..1f049ff 100644 --- a/config/question_scores.json +++ b/config/question_scores.json @@ -132,19 +132,24 @@ "impact": { "food_waste": 1, "emissions": 2, "income": 2 } }, { - "type": "bad_answer", + "type": "good_answer", "overall": 2, "impact": { "food_waste": 1, "emissions": 2, "income": 2 } }, { - "type": "bad_answer", - "overall": 1, - "impact": { "food_waste": 1, "emissions": 1, "income": 1 } - }, - { - "type": "bad_answer", - "overall": 0, - "impact": { "food_waste": 1, "emissions": 0, "income": -1 } + "type": "chance", + "outcomes": [ + { + "type": "good_answer", + "overall": 1, + "impact": { "food_waste": 1, "emissions": 0, "income": 2 } + }, + { + "type": "bad_answer", + "overall": 0, + "impact": { "food_waste": 0, "emissions": -2, "income": -1 } + } + ] } ] }