Mattias Bodlund 1 year ago
parent
commit
0c8992c8de
22 changed files with 472 additions and 82 deletions
  1. +2
    -2
      Gemfile.lock
  2. BIN
      app/assets/.DS_Store
  3. BIN
      app/assets/images/.DS_Store
  4. +1
    -0
      app/assets/images/ico-arrow-right.svg
  5. +1
    -0
      app/assets/images/ico-close.svg
  6. +244
    -23
      app/assets/stylesheets/application.css
  7. +23
    -0
      app/assets/stylesheets/forms.css
  8. +11
    -6
      app/controllers/admin/nodes_controller.rb
  9. +25
    -1
      app/controllers/site_controller.rb
  10. +9
    -0
      app/helpers/site_helper.rb
  11. +20
    -2
      app/javascript/application.js
  12. +1
    -1
      app/models/concerns/ancestry_with_sorted_url.rb
  13. +5
    -4
      app/models/node.rb
  14. +3
    -3
      app/views/admin/attachments/_attachment.html.erb
  15. +2
    -2
      app/views/admin/nodes/_form.html.erb
  16. +4
    -4
      app/views/languages/index.html.erb
  17. +0
    -7
      app/views/site/cards.html.erb
  18. +40
    -0
      app/views/site/tmpl_article.html.erb
  19. +6
    -7
      app/views/site/tmpl_index.html.erb
  20. +34
    -0
      app/views/site/tmpl_list.html.erb
  21. +41
    -17
      config/locales/en.yml
  22. +0
    -3
      config/routes.rb

+ 2
- 2
Gemfile.lock View File

@ -264,12 +264,12 @@ GEM
ruby-vips (2.2.1) ruby-vips (2.2.1)
ffi (~> 1.12) ffi (~> 1.12)
rubyzip (2.3.2) rubyzip (2.3.2)
selenium-webdriver (4.19.0)
selenium-webdriver (4.20.1)
base64 (~> 0.2) base64 (~> 0.2)
rexml (~> 3.2, >= 3.2.5) rexml (~> 3.2, >= 3.2.5)
rubyzip (>= 1.2.2, < 3.0) rubyzip (>= 1.2.2, < 3.0)
websocket (~> 1.0) websocket (~> 1.0)
sidekiq (7.2.2)
sidekiq (7.2.3)
concurrent-ruby (< 2) concurrent-ruby (< 2)
connection_pool (>= 2.3.0) connection_pool (>= 2.3.0)
rack (>= 2.2.4) rack (>= 2.2.4)


BIN
app/assets/.DS_Store View File


BIN
app/assets/images/.DS_Store View File


+ 1
- 0
app/assets/images/ico-arrow-right.svg View File

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path d="M6.86,15.87c0-.53.43-.96.96-.96h13.75l-3.91-4.08c-.37-.38-.35-.99.03-1.36.38-.37.99-.35,1.36.03l6.08,6.36-6.07,6.63c-.36.39-.97.42-1.36.06-.39-.36-.42-.97-.06-1.36l3.99-4.36H7.82c-.53,0-.96-.43-.96-.96Z" style="fill:#010101; fill-rule:evenodd; stroke-width:0px;"/></svg>

+ 1
- 0
app/assets/images/ico-close.svg View File

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 18 18"><path d="M.66,2.62c-.54-.54-.54-1.41,0-1.95.54-.54,1.41-.54,1.95,0l6.38,6.38L15.38.66c.54-.54,1.41-.54,1.95,0,.54.54.54,1.41,0,1.95l-6.38,6.38,6.38,6.38c.54.54.54,1.41,0,1.95s-1.41.54-1.95,0l-6.38-6.38-6.38,6.38c-.54.54-1.41.54-1.95,0-.54-.54-.54-1.41,0-1.95l6.38-6.38L.66,2.62Z" style="fill:#fff;"/></svg>

+ 244
- 23
app/assets/stylesheets/application.css View File

@ -99,6 +99,12 @@ body {
position: relative; position: relative;
} }
ul[class] {
margin: 0 auto;
padding: 0;
list-style: none;
}
header { header {
display: flex; display: flex;
@ -130,36 +136,39 @@ main {
} }
.msg__container-title {
margin: 0 0 0.4375em 0;
line-height: 1.1;
font-size: var(--fs-3xl);
font-weight: 700;
&:has(span) {
font-weight: 400;
& span {
font-weight: 700;
.msg__container {
& h1 {
margin: 0 0 0.4375em 0;
line-height: 1.1;
font-size: var(--fs-3xl);
font-weight: 700;
overflow-wrap: break-word;
word-wrap: break-word;
hyphens: auto;
&:has(em) {
font-weight: 400;
& em {
font-weight: 700;
}
} }
} }
}
& > div:not([class]) {
margin: 0;
line-height: 1.2;
font-size: var(--fs-lg);
font-weight: 400;
.msg__container-msg {
margin: 0;
line-height: 1.2;
font-size: var(--fs-lg);
font-weight: 400;
& + .msg__container-msg {
margin-top: 1.2em;
& + div:not([class]) {
margin-top: 1.2em;
}
} }
} }
.form__container { .form__container {
margin: 60px auto; margin: 60px auto;
} }
@ -172,7 +181,7 @@ main {
} }
@container startbar (min-width: 400px) { @container startbar (min-width: 400px) {
h1, p {
h1, p, div {
text-align: center; text-align: center;
} }
} }
@ -224,6 +233,11 @@ main {
padding: 0.888888888888889em 1.333333333333333em; padding: 0.888888888888889em 1.333333333333333em;
} }
.button__base-light {
background-color: transparent;
color: var(--clr-black);
}
.icon__container { .icon__container {
position: absolute; position: absolute;
z-index: -1; z-index: -1;
@ -267,3 +281,210 @@ main {
right: -3vw; right: -3vw;
bottom: 10svh; bottom: 10svh;
} }
.cards__container, .link__container {
margin-top: 2.4em;
margin-bottom: 2.4em;
}
.link__container {
max-width: 735;
margin-left: auto;
margin-right: auto;
container-type: inline-size;
container-name: link;
}
ul.card__stack {
max-width: 270px;
margin-bottom: 24px;
& a {
text-decoration: none;
color: var(--clr-black);
}
}
.card, .link {
background-color: var(--clr-white);
box-shadow: var(--shadow);
border-radius: 12px;
box-sizing: border-box;
}
.card {
max-width: 270px;
aspect-ratio: 0.72972972972973;
font-size: var(--fs-xl);
font-weight: 700;
display: grid;
padding: 1.142857142857143em 1em;
grid-template-rows: 1fr 4fr 1fr;
justify-items: center;
& div {
text-align: center;
}
svg {
width: 80%;
}
& > *:nth-child(1) {
align-self: start;
}
& > *:nth-child(2) {
align-self: center;
}
& > *:nth-child(3) {
align-self: end;
}
}
.link {
padding: 18px;
display: flex;
gap: 20px;
flex-direction: column;
position: relative;
margin-bottom: 24px;
& img {
display: block;
width: 100%;
aspect-ratio: 0.754545454545455;
height: auto;
border-radius: 8px;
}
& figure {
margin: 0;
}
& h1 {
font-size: var(--fs-2xl);
margin: 0 0 0.7em 0;
font-weight: 400;
line-height: 1.2;
& strong {
font-weight: 700;
}
}
}
.link__body, .link__learn-more {
font-size: var(--fs-base);
line-height: 1.4;
}
.link__learn-more {
font-weight: 700;
padding: 1em 0;
margin-bottom: 1em;
border-top: 1px solid var(--clr-black);
border-bottom: 1px solid var(--clr-black);
& a {
display: block;
color: var(--clr-black);
text-decoration: none;
background-image: url('ico-arrow-right.svg');
background-repeat: no-repeat;
background-position: right center;
background-size: 32px 32px;
}
}
.link__close {
position: absolute;
width: 46px;
aspect-ratio: 1;
background-color: var(--clr-black);
border-radius: 50%;
text-decoration: none;
right: 0;
top: -23px;
display: flex;
align-items: center;
justify-content: center;
& svg {
width: 18px;
aspect-ratio: 1;
}
}
.link__ctas, .cards__ctas {
display: flex;
flex-direction: column;
gap: 16px;
}
.cards__ctas {
max-width: 440px;
}
@media (min-width: 480px) {
ul.card__stack {
margin-bottom: 60px;
}
.link {
& img {
aspect-ratio: 1.536363636363636;
object-fit: cover;
}
}
}
@container link (min-width: 735px) {
.link {
display: grid;
grid-template-columns: 1fr 1fr;
grid-template-rows: auto;
gap: 32px;
margin-bottom: 40px;
& img {
aspect-ratio: 0.754545454545455;
}
}
.link__ctas {
flex-direction: row;
& li {
flex-grow: 1;
}
}
.link__image {
grid-column: 2;
grid-row: 1 / span 2;
}
.link__body {
grid-column: 1;
grid-row: 1;
}
.link__learn-more {
grid-column: 1;
grid-row: 2;
}
}

+ 23
- 0
app/assets/stylesheets/forms.css View File

@ -1082,4 +1082,27 @@ ul {
.ts-wrapper.multi .ts-control > div { .ts-wrapper.multi .ts-control > div {
background-color: var(--clr-grey-300); background-color: var(--clr-grey-300);
}
.destroy__field-btn {
appearance: none;
position: absolute;
top: 4px;
right: 4px;
border: none;
border-radius: 50%;
display: flex;
width: 32px;
height: 32px;
justify-content: center;
align-items: center;
font-family: var(--font-icons);
background-color: transparent;
font-size: 2.2rem;
color: var(--clr-grey-400);
&:hover {
background-color: var(--clr-grey-200);
color: var(--clr-grey-700);
}
} }

+ 11
- 6
app/controllers/admin/nodes_controller.rb View File

@ -138,12 +138,12 @@ private
def node_params def node_params
params.require(:node).permit( params.require(:node).permit(
:parent_id, :parent_id,
:title_da, :title_en, :title_de,
:page_title_da, :page_title_en, :page_title_de,
:page_description_da, :page_description_en, :page_description_de,
:slug_da, :slug_en, :slug_de,
:title_en, :title_zh, :title_hr, :title_cs, :title_da, :title_nl, :title_fi, :title_fr, :title_de, :title_hu, :title_it, :title_ja, :title_ko, :title_nb, :title_pl, :title_pt, :title_ro, :title_sr, :title_sk, :title_sl, :title_es, :title_sv, :title_uk,
:page_title_en, :page_title_zh, :page_title_hr, :page_title_cs, :page_title_da, :page_title_nl, :page_title_fi, :page_title_fr, :page_title_de, :page_title_hu, :page_title_it, :page_title_ja, :page_title_ko, :page_title_nb, :page_title_pl, :page_title_pt, :page_title_ro, :page_title_sr, :page_title_sk, :page_title_sl, :page_title_es, :page_title_sv, :page_title_uk,
:page_description_en, :page_description_zh, :page_description_hr, :page_description_cs, :page_description_da, :page_description_nl, :page_description_fi, :page_description_fr, :page_description_de, :page_description_hu, :page_description_it, :page_description_ja, :page_description_ko, :page_description_nb, :page_description_pl, :page_description_pt, :page_description_ro, :page_description_sr, :page_description_sk, :page_description_sl, :page_description_es, :page_description_sv, :page_description_uk,
:slug_en, :slug_zh, :slug_hr, :slug_cs, :slug_da, :slug_nl, :slug_fi, :slug_fr, :slug_de, :slug_hu, :slug_it, :slug_ja, :slug_ko, :slug_nb, :slug_pl, :slug_pt, :slug_ro, :slug_sr, :slug_sk, :slug_sl, :slug_es, :slug_sv, :slug_uk,
:template, :template,
:href_da, :href_en, :href_de,
:href_en, :href_zh, :href_hr, :href_cs, :href_da, :href_nl, :href_fi, :href_fr, :href_de, :href_hu, :href_it, :href_ja, :href_ko, :href_nb, :href_pl, :href_pt, :href_ro, :href_sr, :href_sk, :href_sl, :href_es, :href_sv, :href_uk,
:status, :status,
:page_description, :page_description,
:parent_id, :parent_id,
@ -153,7 +153,12 @@ private
:is_allowlist, :is_allowlist,
excluded_locales: [], excluded_locales: [],
settings: [], settings: [],
attachments_attributes: [:id, :asset_id, :body_da, :body_en, :body_de, :fg_color, :bg_color, :alignment, :template, :position, :_destroy]
tags_en: [], tags_zh: [], tags_hr: [], tags_cs: [], tags_da: [], tags_nl: [], tags_fi: [], tags_fr: [], tags_de: [], tags_hu: [], tags_it: [], tags_ja: [], tags_ko: [], tags_nb: [], tags_pl: [], tags_pt: [], tags_ro: [], tags_sr: [], tags_sk: [], tags_sl: [], tags_es: [], tags_sv: [], tags_uk: [],
attachments_attributes: [
:id, :asset_id,
:body_en, :body_zh, :body_hr, :body_cs, :body_da, :body_nl, :body_fi, :body_fr, :body_de, :body_hu, :body_it, :body_ja, :body_ko, :body_nb, :body_pl, :body_pt, :body_ro, :body_sr, :body_sk, :body_sl, :body_es, :body_sv, :body_uk,
:fg_color, :bg_color, :alignment, :template, :position, :_destroy
]
) )
end end


+ 25
- 1
app/controllers/site_controller.rb View File

@ -3,11 +3,35 @@ class SiteController < ApplicationController
before_action :set_locale before_action :set_locale
def index def index
@node = Node.roots.viewable.first
not_found and return unless @node
render(template: "site/#{@node.template}")
end end
def cards
def page
@node = Node.find_by!("url->>'#{I18n.locale}' = ?", url_from_param)
not_found and return unless (@node and @node.viewable?)
# Redirect to first child if index?
redirect_to @node.children.viewable.ordered.first.url and return if @node.index? and @node.children.viewable.any?
# Link or render
# @node.href.present? ? redirect_to(@node.href) :
# render(template: "site/#{@node.template}")
render(template: "site/#{@node.template}")
end
private
def url_from_param
return '' unless params[:url]
# return File.join('', params[:url]) if I18n.default_locale == I18n.locale
File.join('', I18n.locale.to_s, params[:url])
end end
end end

+ 9
- 0
app/helpers/site_helper.rb View File

@ -10,4 +10,13 @@ module SiteHelper
], "\n" ], "\n"
end end
def node_title(node)
parts = [node.page_title.blank? ? node.title : node.page_title ]
parts << t(:client_name)
parts.uniq.join(' - ')
rescue
t(:client_name)
end
end end

+ 20
- 2
app/javascript/application.js View File

@ -1,7 +1,25 @@
// Choose language confirmation button
document.querySelectorAll('#confirm_btn').forEach((confirm_btn) => { document.querySelectorAll('#confirm_btn').forEach((confirm_btn) => {
confirm_btn.addEventListener('click', (e) => { confirm_btn.addEventListener('click', (e) => {
window.location.href = '/' + document.getElementById('language_select').value window.location.href = '/' + document.getElementById('language_select').value
}) })
})
})
// Copy link to clipboard
document.querySelectorAll('[data-share-url]').forEach((share_btn) => {
share_btn.addEventListener('click', (e) => {
navigator.clipboard.writeText(e.currentTarget.getAttribute('data-share-url'))
alert('URL copied to clipboard!')
})
})
// Open all external links in ny tab
for (const link of document.links) {
if (link.hostname.replace(/^www\./i, "") != window.location.hostname.replace(/^www\./i, "") && (link.protocol == 'https:' || link.protocol == 'http:'))
link.target = '_blank'
}

+ 1
- 1
app/models/concerns/ancestry_with_sorted_url.rb View File

@ -39,7 +39,7 @@ private
I18n.available_locales.each do |l| I18n.available_locales.each do |l|
Mobility.with_locale(l) do Mobility.with_locale(l) do
v = File.join(self.ancestors.map { |node| node.slug || '' }, self.slug || '') v = File.join(self.ancestors.map { |node| node.slug || '' }, self.slug || '')
#v = File.join('', v) unless I18n.default_locale == l
v = File.join('', v) #unless I18n.default_locale == l
self.send(:url=, v, locale: l) self.send(:url=, v, locale: l)
end end
end end


+ 5
- 4
app/models/node.rb View File

@ -1,6 +1,6 @@
class Node < ApplicationRecord class Node < ApplicationRecord
MENUS = %i"main_menu sub_menu footer_node cta_link opening_hours negative_menu buy_ticket newsletter"
MENUS = %i""
COOKIE_POLICY = :cookie_policy COOKIE_POLICY = :cookie_policy
SETTINGS = MENUS << COOKIE_POLICY SETTINGS = MENUS << COOKIE_POLICY
@ -21,12 +21,13 @@ class Node < ApplicationRecord
fallbacks: :en, fallbacks: :en,
locale_accessors: I18n.available_locales locale_accessors: I18n.available_locales
NODE_TEMPLATES = %w"tmpl_article tmpl_index"
NODE_TEMPLATES = %w"tmpl_article tmpl_index tmpl_list"
enum status: { status_published: 0, status_draft: 1, status_archived: 2 } enum status: { status_published: 0, status_draft: 1, status_archived: 2 }
enum template: { tmpl_index: 0, enum template: { tmpl_index: 0,
tmpl_article: 1
tmpl_article: 1,
tmpl_list: 2
} }
include PgSearch::Model include PgSearch::Model
@ -126,7 +127,7 @@ class Node < ApplicationRecord
private private
def remove_empty_tags def remove_empty_tags
%w"tags_da tags_en tags_de settings excluded_locales".map do |k|
%w"settings excluded_locales tags_en tags_zh tags_hr tags_cs tags_da tags_nl tags_fi tags_fr tags_de tags_hu tags_it tags_ja tags_ko tags_nb tags_pl tags_pt tags_ro tags_sr tags_sk tags_sl tags_es tags_sv tags_uk ".map do |k|
self.send "#{k}=", self.send(k).reject { |v| v.blank? } unless self.send(k).blank? self.send "#{k}=", self.send(k).reject { |v| v.blank? } unless self.send(k).blank?
end end
end end


+ 3
- 3
app/views/admin/attachments/_attachment.html.erb View File

@ -2,10 +2,10 @@
<div class="attachment__content"> <div class="attachment__content">
<%= render partial: 'admin/attachments/asset', collection: Array(f.object.asset) %> <%= render partial: 'admin/attachments/asset', collection: Array(f.object.asset) %>
<%= render partial: 'material/trix_field_i18n', locals: { f: f, attr: :body } %>
<%= render partial: 'material/trix_field_i18n', locals: { f: f, attr: :body, label: t('activerecord.attributes.attachment.body', locale: I18n.default_locale) } %>
<div class="attachment__content-three">
<!--<div class="attachment__content-three">
<%= render partial: 'material/text_field', locals: { f: f, attr: :bg_color } %> <%= render partial: 'material/text_field', locals: { f: f, attr: :bg_color } %>
<%= render partial: 'material/text_field', locals: { f: f, attr: :fg_color } %> <%= render partial: 'material/text_field', locals: { f: f, attr: :fg_color } %>
@ -25,7 +25,7 @@
choices: Array(Attachment::TEMPLATE_SITE_ASSET).map { |k,v| [t(k, scope: :'attachments.templates'), k] }, choices: Array(Attachment::TEMPLATE_SITE_ASSET).map { |k,v| [t(k, scope: :'attachments.templates'), k] },
include_blank: true include_blank: true
} %> } %>
</div>
</div>-->
</div> </div>


+ 2
- 2
app/views/admin/nodes/_form.html.erb View File

@ -81,7 +81,7 @@
<%= render partial: 'material/text_field_i18n', locals: { f: form, attr: :href } unless form.object.root? %> <%= render partial: 'material/text_field_i18n', locals: { f: form, attr: :href } unless form.object.root? %>
<%# render partial: 'material/tom_select_field_i18n',
<%= render partial: 'material/tom_select_field_i18n',
locals: { locals: {
f: form, f: form,
attr: :tags, attr: :tags,
@ -180,7 +180,7 @@
locals: { locals: {
f: form, f: form,
attr: :excluded_locales, attr: :excluded_locales,
choices: options_for_select(I18n.available_locales.map{ |v| [t(v, scope: :'nodes.langs'), v.to_s] }, form.object.excluded_locales),
choices: options_for_select(I18n.available_locales.map{ |v| [t(v, scope: 'language_names'), v.to_s] }, form.object.excluded_locales),
multiple: true multiple: true
} %> } %>


+ 4
- 4
app/views/languages/index.html.erb View File

@ -1,16 +1,16 @@
<%- content_for :title, t('project_name') %> <%- content_for :title, t('project_name') %>
<div class="msg__container msg__container-language"> <div class="msg__container msg__container-language">
<%= tag.h1 t('start.hello'), class: 'msg__container-title' %>
<%= tag.h1 t('hello') %>
<%= tag.p t('start.please_select_a_language_to_get_started'), class: 'msg__container-msg' %>
<%= tag.div t('please_select_a_language_to_get_started') %>
<div class="form__container"> <div class="form__container">
<div class="language__selector-select"> <div class="language__selector-select">
<%= select_tag :language, options_for_select(languages_for_select, accept_language), id: 'language_select' %> <%= select_tag :language, options_for_select(languages_for_select, accept_language), id: 'language_select' %>
</div> </div>
<button type="button" class="button__base" id="confirm_btn"> <button type="button" class="button__base" id="confirm_btn">
<%= t 'start.confirm' %>
<%= t 'confirm' %>
</button> </button>
</div> </div>
</div>
</div>s

+ 0
- 7
app/views/site/cards.html.erb View File

@ -1,7 +0,0 @@
<%- content_for :title, t('project_name') %>
<div class="msg__container msg__container-start">
<%= tag.h1 t('can_you_spot_the_link').html_safe, class: 'msg__container-title' %>
</div>

+ 40
- 0
app/views/site/tmpl_article.html.erb View File

@ -0,0 +1,40 @@
<%- content_for :title, node_title(@node) %>
<article class="link__container">
<div class="link">
<%= link_to svg('ico-close'), @node.parent.url, class: 'link__close' %>
<% @node.attachments.limit(1).each do |attachment| %>
<% asset = attachment.asset %>
<%= tag.figure class: 'link__image' do %>
<%= image_tag rails_storage_proxy_url(asset.file.variant(resize_to_fill: [355,440])),
alt: asset.title,
loading: 'lazy' if asset&.file&.image? %>
<% end %>
<div class="link__body">
<%= attachment.body.html_safe %>
</div>
<%= tag.div class: "link__learn-more" do %>
<%= link_to t('learn_more'), @node.href %>
<% end %>
<% end %>
</div>
<ul class="link__ctas">
<li><%= link_to t('spot_another_link'), @node.parent.url, class: 'button__base' %></li>
<li>
<button type="button" class="button__base button__base-light" data-share-url="<%= root_url %>">
<%= t 'challange_a_friend' %>
</button>
</li>
</ul>
</article>

app/views/site/index.html.erb → app/views/site/tmpl_index.html.erb View File

@ -1,14 +1,13 @@
<%- content_for :title, t('project_name') %>
<%- content_for :title, node_title(@node) %>
<div class="msg__container msg__container-start"> <div class="msg__container msg__container-start">
<%= tag.h1 t('can_you_spot_the_link').html_safe, class: 'msg__container-title' %>
<% t('intro.msg').split("\n\n").each do |msg| %>
<%= tag.p msg, class: 'msg__container-msg' %>
<% @node.attachments.each do |attachment| %>
<%= attachment.body.html_safe %>
<% end %> <% end %>
<div class="form__container"> <div class="form__container">
<%= link_to t('intro.get_started'), {action: 'cards'}, class: 'button__base' %>
<%= link_to t('get_started'), @node.children.viewable.first.url, class: 'button__base' %>
</div> </div>
</div> </div>

+ 34
- 0
app/views/site/tmpl_list.html.erb View File

@ -0,0 +1,34 @@
<%- content_for :title, node_title(@node) %>
<div class="cards__container">
<ul class="card__stack">
<% @node.children.viewable.ordered.each do |node| %>
<li>
<%= link_to node.url do %>
<div class="card">
<%= tag.div node.tags[0] %>
<%= svg "ico-arrow-updown" %>
<%= tag.div node.tags[1] %>
</div>
<% end %>
</li>
<% end %>
</ul>
<ul class="cards__ctas">
<li>
<button type="button" class="button__base" data-share-url="<%= root_url %>">
<%= t 'Drag to reveal' %>
</button>
</li>
<li>
<button type="button" class="button__base button__base-light" data-share-url="<%= root_url %>">
<%= t 'Shuffle cards' %>
</button>
</li>
</ul>
</div>

+ 41
- 17
config/locales/en.yml View File

@ -1,7 +1,7 @@
en: en:
domain: week2024.ikeafoundation.org domain: week2024.ikeafoundation.org
project_name: IKEA Foundation Week 2024 project_name: IKEA Foundation Week 2024
client_name: IKEA Foundation
languages: languages:
en: English en: English
@ -28,6 +28,32 @@ en:
sv: Svenska sv: Svenska
uk: Українська uk: Українська
language_names:
en: English
zh: Chinese
hr: Croatian
cs: Czech
da: Danish
nl: Dutch
fi: Finnish
fr: French
de: German
hu: Hungarian
it: Italian
ja: Japanese
ko: Korean
nb: Norwegian Bokmål
pl: Polish
pt: Portuguese
ro: Romanian
sr: Serbian
sk: Slovak
sl: Slovenian
es: Spanish
sv: Swedish
uk: Ukrainian
flags: flags:
en: 🇬🇧 en: 🇬🇧
zh: 🇨🇳 zh: 🇨🇳
@ -53,21 +79,21 @@ en:
sv: 🇸🇪 sv: 🇸🇪
uk: 🇺🇦 uk: 🇺🇦
can_you_spot_the_link: Can you spot <span>the link?</span> can_you_spot_the_link: Can you spot <span>the link?</span>
start:
hello: Hello!
please_select_a_language_to_get_started: Please select a language to get started.
confirm: Confirm
intro:
get_started: Get started
msg: |
Poverty and climate change are among the world's greatest challenges, but fortunately, transformation is happening.
hello: Hello!
please_select_a_language_to_get_started: Please select a language to get started.
confirm: Confirm
get_started: Get started
See if you can spot the link between our partners’ game-changing initiatives and their remarkable impact.
learn_more: Learn more
spot_another_link: Spot another link
challange_a_friend: Challange a friend
drag_to_reveal: Drag to reveal
shuffel_cards: Shuffel cards
ui: ui:
'yes': Yes 'yes': Yes
'no': No 'no': No
@ -206,8 +232,9 @@ en:
en: English en: English
de: German de: German
templates: templates:
tmpl_index: Home page
tmpl_article: Page
tmpl_index: Get started
tmpl_list: Cards
tmpl_article: Link
categories: categories:
box: Box box: Box
folder: Folder folder: Folder
@ -320,9 +347,6 @@ en:
attachment: attachment:
body: Content body: Content
body_da: Content
body_en: Content
body_de: Content
url: Link url: Link
fg_color: Text Color fg_color: Text Color
bg_color: Background Color bg_color: Background Color


+ 0
- 3
config/routes.rb View File

@ -48,9 +48,6 @@ Rails.application.routes.draw do
scope ':locale', constraints: { locale: /en|zh|hr|cs|da|nl|fi|fr|fr|de|hu|it|ja|ko|nb|pl|pt|ro|sr|sk|sl|es|sv|uk/ } do scope ':locale', constraints: { locale: /en|zh|hr|cs|da|nl|fi|fr|fr|de|hu|it|ja|ko|nb|pl|pt|ro|sr|sk|sl|es|sv|uk/ } do
get '', to: 'site#index' get '', to: 'site#index'
get 'cards', to: 'site#cards'
get '*url', to: 'site#page', constraints: lambda { |req| req.path.exclude?('storage') } get '*url', to: 'site#page', constraints: lambda { |req| req.path.exclude?('storage') }
end end


Loading…
Cancel
Save