Skip to content

Commit

Permalink
Merge pull request #321 from Arquisoft/develop-hugo
Browse files Browse the repository at this point in the history
Add button to download the Android apk
  • Loading branch information
uo288543 authored Apr 27, 2024
2 parents d85a4df + d787974 commit c0a2070
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 4 deletions.
1 change: 1 addition & 0 deletions webapp/src/components/Footer.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import * as React from 'react';
import { AppBar, Toolbar, Typography, Link } from '@mui/material';
import { useTranslation } from 'react-i18next';


const Footer = () => {
const { t } = useTranslation();

Expand Down
3 changes: 2 additions & 1 deletion webapp/src/localize/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@

"Footer": {
"api_questions": "QUESTIONS API DOC",
"api_users": "USERS API DOC"
"api_users": "USERS API DOC",
"apk_link": "Download for Android"
},

"Games": {
Expand Down
3 changes: 2 additions & 1 deletion webapp/src/localize/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@

"Footer": {
"api_questions": "DOCUMENTACIÓN DE LA API DE PREGUNTAS",
"api_users": "DOCUMENTACIÓN DE LA API DE USUARIOS"
"api_users": "DOCUMENTACIÓN DE LA API DE USUARIOS",
"apk_link": "Descargar para Android"
},

"Games": {
Expand Down
3 changes: 2 additions & 1 deletion webapp/src/localize/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@

"Footer": {
"api_questions": "DOCUMENTATION DE L'API DES QUESTIONS",
"api_users": "DOCUMENTATION DE L'API DES UTILISATEURS"
"api_users": "DOCUMENTATION DE L'API DES UTILISATEURS",
"apk_link": "Télécharger pour Android"
},

"Games": {
Expand Down
29 changes: 28 additions & 1 deletion webapp/src/pages/Home.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
import * as React from "react";
import {Box, Button} from "@mui/material";
import {Box, Button, useTheme } from "@mui/material";
import useMediaQuery from '@mui/material/useMediaQuery';
import { useTranslation } from 'react-i18next';
import AndroidIcon from '@mui/icons-material/Android';

const Home = () => {
const xxl = useMediaQuery('(min-width:1920px)');
const { t } = useTranslation();
const theme = useTheme();
const isMobile = useMediaQuery(theme.breakpoints.down('sm'));

const styles = {
logo:{
Expand Down Expand Up @@ -102,6 +105,30 @@ const Home = () => {
<video data-testid="video" ref={videoRef} autoPlay muted loop style={{ ...styles.video}}>
<source src="./home/Background-White.webm" type="video/mp4" />
</video>


<a
href="https://mega.nz/file/vNVkhQwT#l3K-nttaNWJ1tjdUVXJlCClmYm9rmpgBS_ULNewASL4"
target="_blank"
rel="noopener noreferrer"
>
<Button
variant="contained"
size={isMobile ? 'small' : 'big'}
color="primary"
startIcon={<AndroidIcon style={{ marginRight: '0.2em', color: "3DDC84", fontSize: '2em' }} />}
style={{ marginTop: '0.8em' }}
sx={{
'&:hover': {
border: `2px solid #3DDC84`,
backgroundColor: 'primary.light',
},
}}
>
{t("Footer.apk_link")}
</Button>
</a>

</Box>
);
};
Expand Down

0 comments on commit c0a2070

Please sign in to comment.