Skip to content

Commit f216211

Browse files
committed
* Sort currencies
* Blog posts are now inside cards * Footer is now at the bottom of the page
1 parent 3b88dde commit f216211

4 files changed

Lines changed: 32 additions & 13 deletions

File tree

src/components/Footer/index.jsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,9 @@ const Footer = ({ facebookUrl, githubUrl, twitterUrl }) => {
2020
return (
2121
<BottomNavigation
2222
showLabels
23-
style={{ marginTop: 20 }}
23+
style={{
24+
position: 'fixed', bottom: 0, width: '100%',
25+
}}
2426
>
2527
<BottomNavigationAction
2628
icon={(

src/components/Layout/index.jsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@ const Layout = ({ children }) => {
8888
</Button>
8989
</Alert>
9090
)}
91+
<div style={{ marginBottom: 65 }} />
9192
<Footer
9293
facebookUrl={data.site.siteMetadata.facebook}
9394
githubUrl={data.site.siteMetadata.github}

src/pages/software/egld-price-calculator/index.jsx

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,12 @@
11
import React, { useContext, useEffect, useState } from 'react';
22
import {
33
Card,
4-
Container, FormControl, InputLabel, MenuItem, Select, TextField,
4+
Container,
5+
FormControl,
6+
InputLabel,
7+
MenuItem,
8+
Select,
9+
TextField,
510
} from '@material-ui/core';
611
import axios from 'axios';
712
import Grid from '@material-ui/core/Grid';
@@ -47,7 +52,7 @@ const EgldPriceCalculator = () => {
4752

4853
axios.get('https://api.coingecko.com/api/v3/simple/supported_vs_currencies')
4954
.then((res) => {
50-
setSupportedCurrencies(res.data);
55+
setSupportedCurrencies(res.data.sort((a, b) => a.localeCompare(b)));
5156
})
5257
.catch((err) => {
5358
setError(err);
@@ -207,7 +212,11 @@ const EgldPriceCalculator = () => {
207212
>
208213
{item.toUpperCase()}
209214
</MenuItem>
210-
)) : null}
215+
)) : (
216+
<MenuItem value="usd">
217+
USD
218+
</MenuItem>
219+
)}
211220
</Select>
212221
</FormControl>
213222
</Grid>

src/templates/BlogTemplate/index.jsx

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ import Container from '@material-ui/core/Container';
33
import { graphql } from 'gatsby';
44
import Typography from '@material-ui/core/Typography';
55
import Divider from '@material-ui/core/Divider';
6+
import { Card } from '@material-ui/core';
7+
import CardContent from '@material-ui/core/CardContent';
68
import PageHeader from '../../components/PageHeader';
79
import Layout from '../../components/Layout';
810
import { MainContext } from '../../contexts/MainContextProvider';
@@ -38,16 +40,21 @@ const BlogTemplate = ({ data }) => {
3840
title={frontmatter.title}
3941
/>
4042
<Container maxWidth="md">
41-
<Typography variant="subtitle1" gutterBottom style={{ marginTop: 10 }}>
42-
{frontmatter.author}
43-
{' | '}
44-
{frontmatter.date}
45-
{' | '}
46-
{frontmatter.categories}
47-
</Typography>
43+
<Card style={{ marginTop: 20 }}>
44+
<CardContent>
45+
<Typography gutterBottom>
46+
{`${frontmatter.author} | ${frontmatter.date} | ${frontmatter.categories}`}
47+
</Typography>
48+
<Divider />
49+
<Typography
50+
variant="body2"
51+
color="textSecondary"
52+
component="p"
53+
dangerouslySetInnerHTML={{ __html: html }}
54+
/>
55+
</CardContent>
56+
</Card>
4857
<Divider />
49-
{/* eslint-disable-next-line react/no-danger */}
50-
<div dangerouslySetInnerHTML={{ __html: html }} />
5158
</Container>
5259
</Layout>
5360
);

0 commit comments

Comments
 (0)