Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve font icons #258

Merged
merged 6 commits into from
Mar 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file removed public/fonts/icomoon.woff
Binary file not shown.
Binary file removed public/fonts/icomoon.woff2
Binary file not shown.
Binary file added public/fonts/icons.ttf
Binary file not shown.
Binary file added public/fonts/icons.woff
Binary file not shown.
Binary file added public/fonts/icons.woff2
Binary file not shown.
11 changes: 11 additions & 0 deletions public/fonts/svg/arrow.clockwise.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 12 additions & 0 deletions public/fonts/svg/arrow.up.arrow.down.circle.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 11 additions & 0 deletions public/fonts/svg/chevron.left.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 11 additions & 0 deletions public/fonts/svg/heart.fill.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 11 additions & 0 deletions public/fonts/svg/heart.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 11 additions & 0 deletions public/fonts/svg/magnifyingglass.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 11 additions & 0 deletions public/fonts/svg/map.fill.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<style type="text/css">
@font-face {
font-family: "icons";
src: url("data:font/woff2;charset=utf-8;base64,d09GMgABAAAAAAVoAA0AAAAACwAAAAUSAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP0ZGVE0cGh4GYACCXhEICoo4iD8LGgABNgIkAy4EIAWDGweBARsCCcieg3Hj3Fxcawtr2UZ2zOJ8NAn+qbXy/e4e2uW7CyAoZEUIswFgBwg+ClgYdLFJzfH3896vtXVZgzVVJVAJD2QjitJ5D+VZsyRqZLJyurB+aXsUggNfxGuvb4CVyf3/+7n6387uLDQxSW0l73SH+yaWMLdEpoqlNZqIRg+dlAmhcmhnLi95KzX2VYAAPp43mAPwfZzHsvzdAjJAZcAgRBrhAANYuxEdBB6YU4ZvgQMoG/2mgxjInlQA+/YA/fTt60R6WCwEEGBdFwE2XjO7cTQ4iu7n6AKkCDHa/qLuTz/5nyQAAZuTkqt4YBEpVBQxDOSDLJWFAQz4PyNwIBehJCGPIENBVcBGegAwnQlJV7EZhDY6ZgO06slNg0O9VVZFB5+IiDgDtM+s7R5kG6hxnCnfu6QXoHo9a4+Wh2i1EF9m7tbxYWSAIbXH6C0lW6LTaVJS54BVnmdl91w0vsBMKb2HbEukpm0hRekKgxJK0wqrPQhJIkj9yR6IdjXE15m7d/DhOWLkougubbuHSolH7oPuWO7m3yLMtyFud/g28DY2gmV2nOATVtVxr9dmN8TDCUJfyHKgxuM6qNMVhseeOcqdEy5IKedDs2PkGaYLt3uQVzpoQPV6gWk2sw1pfmRnZ+Uu3qctWcetrtOt4YvWCrC0hvgkt6Z22qzLtNmIU8Mpko4+Bt8tI0fQtNUsuE1a7kwo0ObMlGrUHr2AHrsP+voeOHd6ytxNtMwK9JQ6cLc6p5861jwL8RpuRLRaFuobVte1sdnsY0sqk6/7WbLBIMfyfPSYaXAfce7tEJplCzbUA3Yu837MHU4H2/8AOyOfsdH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fMCWVmSdLoRtX5eWNqnSaOlSk3tbzzkl01MJCpr9Mt2f2SYf45Dtfo9Zn0TVexL9/Rxerj9JO/MWqNmsp3c7QYps3xgYY05HHp0+ggZhRKonQD/SWCLqpKnJwU++bNoo6JoVjoxPnS6zfDaTMLq6pUQkn/AFTnmqsicdTAwAm6qhqtvNxiObpFK27ZKrCWL2MtW+aydauo3Xr0OZfJInDd/xFM3qWfxlpa/2h7+vm0qtDFPfS3mgtllWhl22+DgcOvhDnR/LKyyBnoP4YzBZd+mwlTdwCAtwPgJ8XHHtHU3ogs4pPHIAAI3P7l+fEm/qPHCpYAAICffU80EiEsDrvbBMD+XXcEysgaBOdmG0q2QB5gIvpYeLCwi0f0+fjfuQwAwY3mAyHMY3RydgGatpIEsR1DM9pxpCyCoLfZSSzeTiF9ejkj1BAcKl6AMMjYjuFU2XGMPIKgd9hJgULtFIYIXJnSZ8flw4ahU5t+fYav2ffIzsgCM6shFZjLTpAtQxY6VzL4O8A/gnJWdqN6tBjS8VOKWVd2keJK/PcX86GAHT9CYGfVN7V7ixFW7f1bTSYonqbcoF/efgacAQA=")
format("woff2");
font-weight: normal;
font-style: normal;
Expand Down
2 changes: 1 addition & 1 deletion src/components/HeartIcon.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const HeartIconStyled = styled.button`
animation: fade-in 0.2s;

&:after {
content: "${(props) => (props.$state > 1 ? "\\e905" : "\\e906")}";
content: "${(props) => (props.$state > 1 ? "\\e903" : "\\e904")}";
}
`;

Expand Down
2 changes: 1 addition & 1 deletion src/components/Nav.js
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ const Nav = (props) => {
<NavStyled $borderOpacity={borderOpacity}>
<NavLeftStyled>
<BackButtonStyled onClick={goBack}>
<BackIconStyled></BackIconStyled>
<BackIconStyled></BackIconStyled>
<span>Atrás</span>
</BackButtonStyled>
</NavLeftStyled>
Expand Down
7 changes: 1 addition & 6 deletions src/components/RefreshIcon.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,12 @@ const RefreshIconStyled = styled.button`
animation: fade-in 0.2s;
line-height: 74px;
bottom: 28px;

& span {
position: relative;
top: -2px;
}
`;

const RefreshIcon = (props) => {
return (
<RefreshIconStyled aria-label="Refrescar" onClick={props.refreshContent}>
<span></span>
</RefreshIconStyled>
);
};
Expand Down
6 changes: 3 additions & 3 deletions src/components/home/HomeMenu.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,18 +72,18 @@ const HomeMenu = (props) => {
selected={subViewId === SUB_VIEW_ID_FAVORITES}
onClick={loadFavoritesSubView}
>
<ItemIcon></ItemIcon>
<ItemIcon></ItemIcon>
<ItemText>Favoritos</ItemText>
</Item>
<Item selected={subViewId === SUB_VIEW_ID_MAP} onClick={loadMapSubView}>
<ItemIcon></ItemIcon>
<ItemIcon></ItemIcon>
<ItemText>Mapa</ItemText>
</Item>
<Item
selected={subViewId === SUB_VIEW_ID_SEARCH}
onClick={loadSearchSubView}
>
<ItemIcon></ItemIcon>
<ItemIcon></ItemIcon>
<ItemText>Buscar</ItemText>
</Item>
</HomeMenuStyled>
Expand Down
22 changes: 12 additions & 10 deletions src/views/home/subviews/HomeFavoritesSubview.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,12 @@ import Nav from "../../../components/Nav.js";
import Error from "../../../components/Error.js";
import HomeDesktop from "../../../components/home/HomeDesktop.js";

const EditLinkStyled = styled.button`
const SortIconAndDoneLinkStyled = styled.button`
color: var(--color-blue);
align-self: flex-end;
padding: 0 0px;

&[disabled] {
opacity: 0.5;
}
font-family: ${(props) => (props.editMode ? "revert" : "icons")};
font-size: ${(props) => (props.editMode ? "inherit" : "24px")};
`;

const ContentStyled = styled.div`
Expand Down Expand Up @@ -70,7 +68,7 @@ const HomeFavoritesSubview = (props) => {

// Edit mode
const [editMode, setEditMode] = useState(false);
const [editHidden, setEditHidden] = useState(true);
const [sortIconHidden, setSortIconHidden] = useState(true);

const toggleEditMode = () => {
setEditMode(editMode ? false : true);
Expand Down Expand Up @@ -156,9 +154,13 @@ const HomeFavoritesSubview = (props) => {
return (
<Fragment>
<Nav isHeader={true} titleText="Favoritos" hidden={isDesktop}>
<EditLinkStyled onClick={toggleEditMode} hidden={editHidden}>
{editMode ? "Hecho" : "Editar"}
</EditLinkStyled>
<SortIconAndDoneLinkStyled
onClick={toggleEditMode}
editMode={editMode}
hidden={sortIconHidden}
>
{editMode ? "Hecho" : ""}
</SortIconAndDoneLinkStyled>
</Nav>
<ContentStyled hidden={isDesktop}>
{error && (
Expand Down Expand Up @@ -198,7 +200,7 @@ const HomeFavoritesSubview = (props) => {
if (favorites.length === 0) {
setError(true);
} else {
setEditHidden(false);
setSortIconHidden(false);
setFavorites(favorites);
}
}, []);
Expand Down
4 changes: 2 additions & 2 deletions src/views/home/subviews/HomeSearchSubview.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ const IconStyled = styled.div`

&:before {
font-family: icons;
content: "\\e901";
content: "\\e905";
color: #8e8e92;
z-index: 1;
margin: auto;
Expand Down Expand Up @@ -68,7 +68,7 @@ const ResultStyled = styled.button`

&:before {
font-family: icons;
content: "\\e901";
content: "\\e905";
color: var(--color-blue);
margin-right: 12px;
position: relative;
Expand Down
Loading