Compare commits

...

2 Commits

Author SHA1 Message Date
andrzej 0e7c514a8f write readme
Gitea/calculator/pipeline/head This commit looks good Details
2024-05-26 13:04:13 +02:00
andrzej f19a7e627a make responsive 2024-05-26 13:04:03 +02:00
2 changed files with 29 additions and 12 deletions

View File

@ -1,8 +1,8 @@
# React + Vite
# Responsive Calculator App
This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.
I built this as coursework for a [Frontend certification](https://www.freecodecamp.org/certification/fcc60e22726-0a94-4738-8702-3e216d14fdb2/front-end-development-libraries). [Check out the live demo.](https://demos.ajstepien.xyz/calculator)
Currently, two official plugins are available:
- [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react/README.md) uses [Babel](https://babeljs.io/) for Fast Refresh
- [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react-swc) uses [SWC](https://swc.rs/) for Fast Refresh
## This app is..
- fully functional as a calculator.
- designed to look good on a range of devices, in a range of aspect ratios.
- built with an elegant routing system (if I do say so myself), that leverages javascript's builtin hashmaps.

View File

@ -9,13 +9,29 @@
src: url("DS-DIGIB.TTF");
}
@media screen and (min-width:601px) {
html {
font-size: 16px;
}
}
@media screen and (max-width:600px) {
html {
font-size: 12px;
}
}
body {
padding: 0px;
margin: 0px;
}
#calculator {
height: 800px;
width: 550px;
background-color: white;
height: 50rem;
max-height: 100vh;
width: 35rem;
max-width: 100vw;
margin: auto;
background: rgb(68, 64, 64);
background: linear-gradient(351deg, rgba(68, 64, 64, 1) 0%, rgba(156, 150, 150, 1) 100%);
@ -25,6 +41,7 @@ html {
#calculator-content {
height: 100%;
max-width: 100%;
display: grid;
grid-template-columns: repeat(4, 1fr);
grid-template-rows: 1fr 1.6fr repeat(5, 1fr);
@ -37,7 +54,7 @@ html {
"numbers numbers numbers operators"
"numbers numbers numbers operators"
;
gap: 1rem;
gap: 1em;
}
@ -60,7 +77,7 @@ html {
grid-area: display;
justify-self: end;
align-self: end;
height: 9rem;
height: 9em;
width: 100%;
display: grid;
grid-template-rows: 1fr 6fr 1fr;