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

Mobile css #16

Merged
merged 5 commits into from
May 29, 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
2 changes: 1 addition & 1 deletion frontend/.env.example
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
REACT_APP_BACKEND_URL=tokentracker.hoprnet.workers.dev //'127.0.0.1:8787' if local server is used
REACT_APP_BACKEND_URL=backend.mytokentracker.xyz //'127.0.0.1:8787' if local server is used
REACT_APP_uHTTP_DP_ENDPOINT= //leave empty to use default
REACT_APP_uHTTP_TOKEN=
REACT_APP_uHTTP_FORCE_ZERO_HOP=true
97 changes: 95 additions & 2 deletions frontend/src/App.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
body {
min-width: 300px;
}

.App {
display: flex;
height: 100svh;
Expand All @@ -20,7 +24,7 @@
margin-bottom: 8px;
}

.portfolio-container img {
.portfolio-container img.mtt-img {
max-width: 100%;
}

Expand All @@ -30,6 +34,11 @@
align-items: center;
}

.mtt-search-engine input[type="text"] {
width: calc(100% - 32px);
max-width: 420px;
}

.portfolio-present .mtt-search-engine {
align-items: flex-start;
}
Expand All @@ -56,7 +65,7 @@
}
}

.portfolio-present img {
.portfolio-present img.mtt-img {
max-width: 220px;
width: 100%;
object-fit: contain;
Expand Down Expand Up @@ -126,13 +135,15 @@ th.icon, td.icon {

th.name, td.name {
max-width: 300px;
width: 300px;
text-align: left;
overflow: hidden;
text-overflow: ellipsis;
}

th.balance, td.balance {
max-width: 300px;
width: 300px;
text-align: left;
overflow: hidden;
text-overflow: ellipsis;
Expand Down Expand Up @@ -172,4 +183,86 @@ th.balance, td.balance {

.fingerprint > img {
width: 74%;
}


@media only screen and (max-width: 900px) {
.portfolio-table-container{
font-size: 13px;
}
.logs {
font-size: 10.5px;
}
}


@media only screen and (max-width: 630px) {
.App {
display: flex;
flex-direction: column;
}

.portfolio-container, .logs {
width: 100%;
height: calc(100svh / 2);
}
.portfolio-container {
display: flex;
flex-direction: column;
}
.portfolio-present > .mtt-search-engine-container {
flex-shrink: 0;
height: 97px;
}
.App .mtt-search-engine-container {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
}
.portfolio-container.no-portfolio img.mtt-img {
margin-top: 16svh;
}
.portfolio-present .mtt-search-engine {
align-items: center;
}
.mtt-search-engine input[type="button"] {
height: 24px;
font-size: 16px;
}
.portfolio-table-container{
margin: 0;
border: none;
font-size: 13px;
}
.portfolio-table{
width: calc( 100% - 8px );
margin: 0;
margin-left: 8px;
border: none;
}
.portfolio-table tbody {
height: 100%;
}
.logs {
padding: 8px 0 0 8px;
width: calc(100% - 8px);
border: none;
margin: 0;
flex-grow: 1;
}

}


@media only screen and (max-width: 630px) {
.mtt-search-engine input[type="text"] {
width: calc(100svw - 32px);
}
}

@media only screen and (max-width: 300px) {
.mtt-search-engine input[type="text"] {
width: calc(300px - 32px);
}
}
3 changes: 1 addition & 2 deletions frontend/src/Portfolio.js
Original file line number Diff line number Diff line change
Expand Up @@ -870,7 +870,7 @@ function Portfolio({ serverurl }) {
return (
<div className={`portfolio-container ${portfolio ? 'portfolio-present' : 'no-portfolio'}`}>
<div className="mtt-search-engine-container">
<img src='./MTT.png'/>
<img className="mtt-img" src='./MTT.png'/>
<div className="mtt-search-engine">
{
!portfolio && <div> Search 270,158,000 Ethereum mainnet addresses</div>
Expand All @@ -882,7 +882,6 @@ function Portfolio({ serverurl }) {
name="address"
required
minLength="4"
size="50"
value={ethAddress}
onChange={(event) => { set_ethAddress(event.target.value) }}
/>
Expand Down