this repo has no description
lustre frontent oat-ui gleam
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

๐ŸŒ translate home page

+84 -20
+1 -1
src/client.gleam
··· 133 133 case model { 134 134 // HOME PAGE --------------------------------------------------------------- 135 135 Model(route: route.Home, page: page.Home, ..) -> 136 - layout(model, home.view(model.session), HomeMsg) 136 + layout(model, home.view(model.session, model.lang), HomeMsg) 137 137 138 138 // LOGIN PAGE -------------------------------------------------------------- 139 139 Model(route: route.Login, page: page.Login(page), ..) ->
+81 -17
src/client/page/home.gleam
··· 1 1 import client/icon 2 + import client/language as lang 2 3 import client/session 3 4 import lustre/attribute.{class} 4 5 import lustre/effect ··· 13 14 #(model, effect.none()) 14 15 } 15 16 16 - pub fn view(_session: session.Session) -> element.Element(Msg) { 17 + pub fn view( 18 + _session: session.Session, 19 + lang: lang.Language, 20 + ) -> element.Element(Msg) { 17 21 element.fragment([ 18 22 html.section( 19 23 [ ··· 24 28 // Title 25 29 html.h1( 26 30 [ 27 - class("text-3xl text-center md:text-4xl lg:text-5xl"), 31 + class("max-w-xl text-3xl text-center md:text-4xl lg:text-5xl"), 28 32 class("py-2 my-0 font-bold text-balance"), 29 33 class("text-transparent bg-clip-text"), 30 34 class("from-blue-600 via-teal-600 to-green-600 bg-linear-to-r"), 31 35 ], 32 - [html.text("Reduza atรฉ 40% nos Custos de Energia da sua Empresa")], 36 + [ 37 + html.text(case lang { 38 + lang.BrazillianPortuguese | lang.Portuguese -> 39 + "Reduza atรฉ 40% nos Custos de Energia da sua Empresa" 40 + lang.English -> "Reduce your company's energy costs by up to 40%." 41 + lang.German -> 42 + "Reduzieren Sie die Energiekosten Ihres Unternehmens um bis zu 40 %." 43 + lang.Spanish -> 44 + "Reduzca los costes energรฉticos de su empresa hasta en un 40%." 45 + }), 46 + ], 33 47 ), 34 48 35 49 // Subtitle 36 50 html.h2([class("my-0 max-w-lg text-center text-subtext text-balance")], [ 37 - html.text( 38 - "Soluรงรตes financeiras inteligentes para gestรฃo energรฉtica:" 39 - <> " economia garantida, financiamento solar e contratos otimizados.", 40 - ), 51 + html.text(case lang { 52 + lang.BrazillianPortuguese | lang.Portuguese -> 53 + "Soluรงรตes financeiras inteligentes para a gestรฃo energรฉtica:" 54 + <> " poupanรงas garantidas, financiamento solar e contratos otimizados" 55 + lang.English -> 56 + "Smart financial solutions for energy management: " 57 + <> "guaranteed savings, solar financing, and optimized contracts." 58 + lang.German -> 59 + "Intelligente Finanzlรถsungen fรผr das Energiemanagement:" 60 + <> " garantierte Einsparungen, Solarfinanzierung und optimierte Vertrรคge." 61 + lang.Spanish -> 62 + "Soluciones financieras inteligentes para la gestiรณn energรฉtica:" 63 + <> " ahorros garantizados, financiaciรณn solar y contratos optimizados." 64 + }), 41 65 ]), 42 66 43 67 // Buttons 44 - html.div([class("grid grid-cols-1 gap-4 sm:grid-cols-2 lg:gap-6")], [ 68 + html.div([class("grid grid-cols-1 gap-4 lg:grid-cols-2 lg:gap-6")], [ 45 69 // Simulator 46 70 html.a( 47 71 [ ··· 49 73 class("bg-primary text-primary-foreground"), 50 74 class("hover:cursor-pointer hstack"), 51 75 ], 52 - [icon.calculator([]), html.text("Simular Economia Grรกtis")], 76 + [ 77 + icon.calculator([]), 78 + html.text(case lang { 79 + lang.BrazillianPortuguese | lang.Portuguese -> 80 + "Simular Economia Grรกtis" 81 + lang.English -> "Simulate Savings for Free" 82 + lang.German -> "Kostenlose Ersparnisse simulieren" 83 + lang.Spanish -> "Simula ahorros gratis" 84 + }), 85 + ], 53 86 ), 54 87 // Talk to a specialist 55 88 html.a( ··· 58 91 class("rounded-md border border-subtext"), 59 92 class("bg-white hover:cursor-pointer"), 60 93 ], 61 - [html.text("Falar com Especialista")], 94 + [ 95 + html.text(case lang { 96 + lang.BrazillianPortuguese | lang.Portuguese -> 97 + "Falar com Especialista" 98 + lang.English -> "Speak to a Specialist" 99 + lang.German -> "Sprechen Sie mit einem Spezialisten" 100 + lang.Spanish -> "Hable con un especialista" 101 + }), 102 + ], 62 103 ), 63 104 ]), 64 105 65 106 // ๏’ž 66 107 html.div( 67 - [class("grid grid-cols-1 gap-2 md:gap-4 lg:grid-cols-3 text-subtext")], 108 + [ 109 + class("text-subtext"), 110 + class("grid grid-cols-1 gap-2 xl:grid-cols-3"), 111 + ], 68 112 [ 69 - html.div([class("hstack")], [ 113 + html.p([class("hstack")], [ 70 114 icon.circle_check([class("text-success")]), 71 - html.text("Sem investimento inicial"), 115 + html.text(case lang { 116 + lang.BrazillianPortuguese | lang.Portuguese -> 117 + "Sem investimento inicial" 118 + lang.English -> "Speak to a Specialist" 119 + lang.German -> "Sprechen Sie mit einem Spezialisten" 120 + lang.Spanish -> "Hable con un especialista." 121 + }), 72 122 ]), 73 - html.div([class("hstack")], [ 123 + 124 + html.p([class("hstack")], [ 74 125 icon.circle_check([class("text-success")]), 75 - html.text("Economia garantida"), 126 + html.text(case lang { 127 + lang.BrazillianPortuguese | lang.Portuguese -> 128 + "Economia garantida" 129 + lang.English -> "Guaranteed savings" 130 + lang.German -> "Garantierte Einsparungen" 131 + lang.Spanish -> "Ahorros garantizados" 132 + }), 76 133 ]), 77 - html.div([class("hstack")], [ 134 + 135 + html.p([class("hstack")], [ 78 136 icon.circle_check([class("text-success")]), 79 - html.text("Suporte dedicado"), 137 + html.text(case lang { 138 + lang.BrazillianPortuguese | lang.Portuguese -> 139 + "Suporte dedicado" 140 + lang.English -> "Dedicated support" 141 + lang.German -> "Engagierter Support" 142 + lang.Spanish -> "Soporte especializado" 143 + }), 80 144 ]), 81 145 ], 82 146 ),
+2 -2
test/client_test/dummy.gleam
··· 1 1 import client 2 - import client/language 2 + import client/language as lang 3 3 import client/page 4 4 import client/route 5 5 import client/session ··· 36 36 session session: session.Session, 37 37 route route: route.Route, 38 38 ) -> client.Model { 39 - client.Model(session:, route:, page: page.init(route), lang: language.English) 39 + client.Model(session:, route:, page: page.init(route), lang: lang.English) 40 40 }