File tree Expand file tree Collapse file tree 9 files changed +51
-17
lines changed
Expand file tree Collapse file tree 9 files changed +51
-17
lines changed Original file line number Diff line number Diff line change @@ -71,4 +71,29 @@ export const cardsData = [
7171 } ,
7272 ] ,
7373 } ,
74+ {
75+ project : "lowfuel" ,
76+ imageCover : "lowfuel.jpg" ,
77+ title : "Low-Fuel" ,
78+ author : "Paul" ,
79+ github : "https://github.com/Bit-Scripts/Low-Fuel" ,
80+ demo : "" ,
81+ translations : [
82+ {
83+ lang : "en" ,
84+ description :
85+ "Knowing the places where fuel prices are the cheapest (using government data) and sending SMS alerts if fuel prices drop" ,
86+ } ,
87+ {
88+ lang : "fr" ,
89+ description :
90+ "Connaître les lieux où les prix des carburants sont les moins chers (utilisation des données gouvernementales) et envoi de SMS si le prix du carburant baisse" ,
91+ } ,
92+ {
93+ lang : "es" ,
94+ description :
95+ "Conocer los lugares donde los precios de los combustibles son los más baratos (utilizando datos del gobierno) y enviar alertas por SMS si los precios de los combustibles bajan" ,
96+ } ,
97+ ] ,
98+ } ,
7499] ;
Original file line number Diff line number Diff line change @@ -11,8 +11,10 @@ function App() {
1111 // fetchReposData(ORGNAME);
1212 } , [ ] ) ;
1313
14+ console . log ( '"render app' ) ;
15+
1416 return (
15- < div className = "min-h-screen bg-neutral-800" >
17+ < div className = "min-h-screen overflow-x-hidden bg-neutral-800" >
1618 < Header />
1719 < LangageSwitcher />
1820 < Info />
Original file line number Diff line number Diff line change @@ -9,6 +9,7 @@ function Card({
99 translationKey,
1010 demoUrl,
1111 author,
12+ githubProjectUrl,
1213} ) {
1314 const { t } = useTranslation ( ) ;
1415
@@ -35,14 +36,18 @@ function Card({
3536 </ div >
3637
3738 < div className = "flex justify-center gap-x-4 py-2" >
38- < a className = { `${ buttonStyle } ` } >
39- < FaGithub size = { "20" } className = "mr-2" />
40- Github
41- </ a >
42-
43- < a className = { `${ buttonStyle } ` } href = { demoUrl } >
44- < MdOutlineRemoveRedEye size = { "24" } className = "mr-2" /> Demo
45- </ a >
39+ { githubProjectUrl && (
40+ < a className = { `${ buttonStyle } ` } href = { githubProjectUrl } >
41+ < FaGithub size = { "20" } className = "mr-2" />
42+ Github
43+ </ a >
44+ ) }
45+
46+ { demoUrl && (
47+ < a className = { `${ buttonStyle } ` } href = { demoUrl } >
48+ < MdOutlineRemoveRedEye size = { "24" } className = "mr-2" /> Demo
49+ </ a >
50+ ) }
4651 </ div >
4752 </ div >
4853 </ div >
Original file line number Diff line number Diff line change @@ -15,6 +15,7 @@ function CardsWrapper() {
1515 translationKey = { card . project }
1616 demoUrl = { card . demo }
1717 author = { card . author }
18+ githubProjectUrl = { card . github }
1819 />
1920 ) ;
2021 } ) }
Original file line number Diff line number Diff line change @@ -4,8 +4,8 @@ function Info() {
44 const { t } = useTranslation ( ) ;
55 return (
66 < div className = "flex justify-center" >
7- < div className = "flex max-w-[1280px] flex-wrap items-end justify-center py-10" >
8- < span className = "to-accent bg-gradient-to-r from-cyan-400 bg-clip-text py-2 text-5xl font-bold text-transparent" >
7+ < div className = "flex max-w-[1280px] flex-wrap items-end justify-center py-2 sm:py- 10" >
8+ < span className = "bg-gradient-to-r from-cyan-400 to-accent bg-clip-text text-3xl font-bold text-transparent sm:py-2 sm:text-5xl " >
99 { t ( "info" ) }
1010 </ span >
1111 </ div >
Original file line number Diff line number Diff line change @@ -8,12 +8,12 @@ function LangageSwitcher() {
88 const [ activeLang , setActiveLang ] = useState ( normalizeLang ( currentLanguage ) ) ;
99
1010 const btnStyleBase =
11- "py-2 px-6 pointer mr-2 rounded-full my-2 text-xs hover:bg-accentDarker transition-colors" ;
11+ "py-2 px-6 pointer rounded-full my-2 text-xs hover:bg-accentDarker transition-colors " ;
1212
1313 return (
14- < div className = "mr-2 flex justify-end" >
15- < div className = "flex text-white" >
16- < div >
14+ < div className = "flex justify-center sm: justify-end" >
15+ < div className = "flex justify-center text-white" >
16+ < div className = "flex gap-2 sm:gap-4" >
1717 < button
1818 className = { `${ btnStyleBase } ${ activeLang === "en" ? "bg-accentDarker" : "bg-neutral-700" } ` }
1919 onClick = { ( ) => {
Original file line number Diff line number Diff line change 4242 } ) ;
4343
4444function fillTranslations ( cardsData ) {
45- console . log ( "loading translations..." ) ;
45+ console . log ( "Populate translations object ..." ) ;
4646 cardsData . forEach ( ( card ) => {
4747 card . translations . forEach ( ( translation ) => {
4848 const { lang, description } = translation ;
@@ -62,7 +62,8 @@ function fillTranslations(cardsData) {
6262}
6363
6464fillTranslations ( cardsData ) ;
65+ console . log ( "Translations injected👍" ) ;
6566
66- console . log ( i18n . getResourceBundle ( "en" , "app.card" ) ) ;
67+ // console.log(i18n.getResourceBundle("en", "app.card"));
6768
6869export default i18n ;
You can’t perform that action at this time.
0 commit comments