Merge pull request #2958 from mempool/mononaut/ln-mobile-css-fixes

Assorted mobile/tablet CSS fixes
This commit is contained in:
softsimon 2023-01-26 19:54:44 +04:00 committed by GitHub
commit 94add379d0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
12 changed files with 75 additions and 57 deletions

View File

@ -213,6 +213,7 @@ export class BlockFeeRatesGraphComponent implements OnInit {
}, },
}, },
legend: (data.series.length === 0) ? undefined : { legend: (data.series.length === 0) ? undefined : {
padding: [10, 75],
data: data.legends, data: data.legends,
selected: JSON.parse(this.storageService.getValue('fee_rates_legend')) ?? { selected: JSON.parse(this.storageService.getValue('fee_rates_legend')) ?? {
'Min': true, 'Min': true,

View File

@ -2,7 +2,7 @@
display: flex; display: flex;
flex-direction: row; flex-direction: row;
@media (max-width: 768px) { @media (max-width: 767.98px) {
flex-direction: column; flex-direction: column;
} }
} }
@ -10,16 +10,13 @@
.tx-link { .tx-link {
display: flex; display: flex;
flex-grow: 1; flex-grow: 1;
@media (min-width: 650px) { @media (min-width: 768px) {
top: 1px;
position: relative;
align-self: end; align-self: end;
margin-left: 15px; margin-left: 15px;
margin-top: 0px; margin-top: 0px;
margin-bottom: -3px;
}
@media (min-width: 768px) {
margin-bottom: 4px; margin-bottom: 4px;
top: 1px;
position: relative;
} }
@media (max-width: 768px) { @media (max-width: 768px) {
order: 2; order: 2;

View File

@ -56,7 +56,7 @@
<!-- Top nodes per capacity --> <!-- Top nodes per capacity -->
<div class="col"> <div class="col">
<div class="card" style="height: 409px"> <div class="card">
<div class="card-body"> <div class="card-body">
<a class="title-link" href="" [routerLink]="['/lightning/nodes/rankings/liquidity' | relativeUrl]"> <a class="title-link" href="" [routerLink]="['/lightning/nodes/rankings/liquidity' | relativeUrl]">
<h5 class="card-title d-inline" i18n="lightning.liquidity-ranking">Liquidity Ranking</h5> <h5 class="card-title d-inline" i18n="lightning.liquidity-ranking">Liquidity Ranking</h5>
@ -70,7 +70,7 @@
<!-- Top nodes per channels --> <!-- Top nodes per channels -->
<div class="col"> <div class="col">
<div class="card" style="height: 409px"> <div class="card">
<div class="card-body"> <div class="card-body">
<a class="title-link" href="" [routerLink]="['/lightning/nodes/rankings/connectivity' | relativeUrl]"> <a class="title-link" href="" [routerLink]="['/lightning/nodes/rankings/connectivity' | relativeUrl]">
<h5 class="card-title d-inline" i18n="lightning.connectivity-ranking">Connectivity Ranking</h5> <h5 class="card-title d-inline" i18n="lightning.connectivity-ranking">Connectivity Ranking</h5>

View File

@ -21,7 +21,7 @@
<div class="spinner-border text-light"></div> <div class="spinner-border text-light"></div>
</div> </div>
<table class="table table-borderless text-center m-auto" style="max-width: 900px"> <table class="table table-borderless table-fixed text-center m-auto" style="max-width: 900px">
<thead> <thead>
<tr> <tr>
<th class="text-left rank" i18n="mining.rank">Rank</th> <th class="text-left rank" i18n="mining.rank">Rank</th>

View File

@ -42,14 +42,14 @@
} }
.rank { .rank {
width: 20%; width: 8%;
@media (max-width: 576px) { @media (max-width: 576px) {
display: none display: none
} }
} }
.name { .name {
width: 20%; width: 36%;
@media (max-width: 576px) { @media (max-width: 576px) {
width: 80%; width: 80%;
max-width: 150px; max-width: 150px;
@ -59,21 +59,21 @@
} }
.share { .share {
width: 20%; width: 15%;
@media (max-width: 576px) { @media (max-width: 576px) {
display: none display: none
} }
} }
.nodes { .nodes {
width: 20%; width: 15%;
@media (max-width: 576px) { @media (max-width: 576px) {
width: 10%; width: 10%;
} }
} }
.capacity { .capacity {
width: 20%; width: 26%;
@media (max-width: 576px) { @media (max-width: 576px) {
width: 10%; width: 10%;
max-width: 100px; max-width: 100px;
@ -91,3 +91,8 @@ a:hover .link {
.flag { .flag {
font-size: 20px; font-size: 20px;
} }
.text-truncate .link {
overflow: hidden;
text-overflow: ellipsis;
}

View File

@ -51,7 +51,7 @@
<app-toggle [textLeft]="'Sort by nodes'" [textRight]="'capacity'" [checked]="true" (toggleStatusChanged)="onGroupToggleStatusChanged($event)"></app-toggle> <app-toggle [textLeft]="'Sort by nodes'" [textRight]="'capacity'" [checked]="true" (toggleStatusChanged)="onGroupToggleStatusChanged($event)"></app-toggle>
</div> </div>
<table class="table table-borderless text-center m-auto" style="max-width: 900px" *ngIf="!widget"> <table class="table table-borderless table-fixed text-center m-auto" style="max-width: 900px" *ngIf="!widget">
<thead> <thead>
<tr> <tr>
<th class="rank text-left pl-0" i18n="mining.rank">Rank</th> <th class="rank text-left pl-0" i18n="mining.rank">Rank</th>

View File

@ -4,7 +4,7 @@
</h1> </h1>
<div [class]="widget ? 'widget' : 'full'"> <div [class]="widget ? 'widget' : 'full'">
<table class="table table-borderless"> <table class="table table-borderless table-fixed">
<thead> <thead>
<th class="rank"></th> <th class="rank"></th>
<th class="alias text-left" i18n="nodes.alias">Alias</th> <th class="alias text-left" i18n="nodes.alias">Alias</th>
@ -29,10 +29,10 @@
{{ node.channels | number }} {{ node.channels | number }}
</td> </td>
<td *ngIf="!widget" class="timestamp-first text-left"> <td *ngIf="!widget" class="timestamp-first text-left">
<app-timestamp [customFormat]="'yyyy-MM-dd'" [unixTime]="node.firstSeen"></app-timestamp> <app-timestamp [customFormat]="'yyyy-MM-dd'" [unixTime]="node.firstSeen" [hideTimeSince]="true"></app-timestamp>
</td> </td>
<td *ngIf="!widget" class="timestamp-update text-left"> <td *ngIf="!widget" class="timestamp-update text-left">
<app-timestamp [customFormat]="'yyyy-MM-dd'" [unixTime]="node.updatedAt"></app-timestamp> <app-timestamp [customFormat]="'yyyy-MM-dd'" [unixTime]="node.updatedAt" [hideTimeSince]="true"></app-timestamp>
</td> </td>
<td *ngIf="!widget" class="location text-right text-truncate"> <td *ngIf="!widget" class="location text-right text-truncate">
<app-geolocation [data]="node.geolocation" [type]="'list-isp'"></app-geolocation> <app-geolocation [data]="node.geolocation" [type]="'list-isp'"></app-geolocation>

View File

@ -1,7 +1,7 @@
.container-xl { .container-xl {
max-width: 1400px; max-width: 1400px;
padding-bottom: 100px; padding-bottom: 100px;
@media (min-width: 767.98px) { @media (min-width: 960px) {
padding-left: 50px; padding-left: 50px;
padding-right: 50px; padding-right: 50px;
} }
@ -15,40 +15,44 @@
width: 5%; width: 5%;
} }
.widget .rank { .widget .rank {
@media (min-width: 767.98px) { @media (min-width: 960px) {
width: 13%; width: 13%;
} }
@media (max-width: 767.98px) { @media (max-width: 960px) {
padding-left: 0px; padding-left: 0px;
padding-right: 0px; padding-right: 0px;
} }
} }
.full .alias { .full .alias {
width: 10%; width: 20%;
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
max-width: 350px; max-width: 350px;
@media (max-width: 767.98px) { @media (max-width: 960px) {
max-width: 175px; width: 40%;
max-width: 500px;
} }
} }
.widget .alias { .widget .alias {
width: 55%; width: 60%;
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
max-width: 350px; max-width: 350px;
@media (max-width: 767.98px) { @media (max-width: 960px) {
max-width: 175px; max-width: 175px;
} }
} }
.full .capacity { .full .capacity {
width: 10%; width: 10%;
@media (max-width: 960px) {
width: 30%;
}
} }
.widget .capacity { .widget .capacity {
width: 32%; width: 32%;
@media (max-width: 767.98px) { @media (max-width: 960px) {
padding-left: 0px; padding-left: 0px;
padding-right: 0px; padding-right: 0px;
} }
@ -57,28 +61,31 @@
.full .channels { .full .channels {
width: 15%; width: 15%;
padding-right: 50px; padding-right: 50px;
@media (max-width: 767.98px) { @media (max-width: 960px) {
display: none; display: none;
} }
} }
.full .timestamp-first { .full .timestamp-first {
width: 15%; width: 10%;
@media (max-width: 767.98px) { @media (max-width: 960px) {
display: none; display: none;
} }
} }
.full .timestamp-update { .full .timestamp-update {
width: 15%; width: 10%;
@media (max-width: 767.98px) { @media (max-width: 960px) {
display: none; display: none;
} }
} }
.full .location { .full .location {
width: 10%; width: 15%;
@media (max-width: 767.98px) { @media (max-width: 960px) {
width: 30%;
}
@media (max-width: 600px) {
display: none; display: none;
} }
} }

View File

@ -29,10 +29,10 @@
<app-amount [satoshis]="node.capacity" [digitsInfo]="'1.2-2'" [noFiat]="true"></app-amount> <app-amount [satoshis]="node.capacity" [digitsInfo]="'1.2-2'" [noFiat]="true"></app-amount>
</td> </td>
<td *ngIf="!widget" class="timestamp-first text-left"> <td *ngIf="!widget" class="timestamp-first text-left">
<app-timestamp [customFormat]="'yyyy-MM-dd'" [unixTime]="node.firstSeen"></app-timestamp> <app-timestamp [customFormat]="'yyyy-MM-dd'" [unixTime]="node.firstSeen" [hideTimeSince]="true"></app-timestamp>
</td> </td>
<td *ngIf="!widget" class="timestamp-update text-left"> <td *ngIf="!widget" class="timestamp-update text-left">
<app-timestamp [customFormat]="'yyyy-MM-dd'" [unixTime]="node.updatedAt"></app-timestamp> <app-timestamp [customFormat]="'yyyy-MM-dd'" [unixTime]="node.updatedAt" [hideTimeSince]="true"></app-timestamp>
</td> </td>
<td *ngIf="!widget" class="location text-right text-truncate"> <td *ngIf="!widget" class="location text-right text-truncate">
<app-geolocation [data]="node.geolocation" [type]="'list-isp'"></app-geolocation> <app-geolocation [data]="node.geolocation" [type]="'list-isp'"></app-geolocation>

View File

@ -1,7 +1,7 @@
.container-xl { .container-xl {
max-width: 1400px; max-width: 1400px;
padding-bottom: 100px; padding-bottom: 100px;
@media (min-width: 767.98px) { @media (min-width: 960px) {
padding-left: 50px; padding-left: 50px;
padding-right: 50px; padding-right: 50px;
} }
@ -15,70 +15,77 @@
width: 5%; width: 5%;
} }
.widget .rank { .widget .rank {
@media (min-width: 767.98px) { @media (min-width: 960px) {
width: 13%; width: 13%;
} }
@media (max-width: 767.98px) { @media (max-width: 960px) {
padding-left: 0px; padding-left: 0px;
padding-right: 0px; padding-right: 0px;
} }
} }
.full .alias { .full .alias {
width: 10%; width: 20%;
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
max-width: 350px; max-width: 350px;
@media (max-width: 767.98px) { @media (max-width: 960px) {
max-width: 175px; width: 40%;
max-width: 500px;
} }
} }
.widget .alias { .widget .alias {
width: 55%; width: 60%;
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
max-width: 350px; max-width: 350px;
@media (max-width: 767.98px) { @media (max-width: 960px) {
max-width: 175px; max-width: 175px;
} }
} }
.full .channels { .full .capacity {
width: 10%; width: 10%;
@media (max-width: 960px) {
width: 30%;
}
} }
.widget .channels { .widget .capacity {
width: 32%; width: 32%;
@media (max-width: 767.98px) { @media (max-width: 960px) {
padding-left: 0px; padding-left: 0px;
padding-right: 0px; padding-right: 0px;
} }
} }
.full .capacity { .full .channels {
width: 15%; width: 15%;
padding-right: 50px; padding-right: 50px;
@media (max-width: 767.98px) { @media (max-width: 960px) {
display: none; display: none;
} }
} }
.full .timestamp-first { .full .timestamp-first {
width: 15%; width: 10%;
@media (max-width: 767.98px) { @media (max-width: 960px) {
display: none; display: none;
} }
} }
.full .timestamp-update { .full .timestamp-update {
width: 15%; width: 10%;
@media (max-width: 767.98px) { @media (max-width: 960px) {
display: none; display: none;
} }
} }
.full .location { .full .location {
width: 10%; width: 15%;
@media (max-width: 767.98px) { @media (max-width: 960px) {
width: 30%;
}
@media (max-width: 600px) {
display: none; display: none;
} }
} }

View File

@ -1,7 +1,7 @@
<span *ngIf="seconds === undefined">-</span> <span *ngIf="seconds === undefined">-</span>
<span *ngIf="seconds !== undefined"> <span *ngIf="seconds !== undefined">
&lrm;{{ seconds * 1000 | date: customFormat ?? 'yyyy-MM-dd HH:mm' }} &lrm;{{ seconds * 1000 | date: customFormat ?? 'yyyy-MM-dd HH:mm' }}
<div class="lg-inline"> <div class="lg-inline" *ngIf="!hideTimeSince">
<i class="symbol">(<app-time-since [time]="seconds" [fastRender]="true"></app-time-since>)</i> <i class="symbol">(<app-time-since [time]="seconds" [fastRender]="true"></app-time-since>)</i>
</div> </div>
</span> </span>

View File

@ -10,6 +10,7 @@ export class TimestampComponent implements OnChanges {
@Input() unixTime: number; @Input() unixTime: number;
@Input() dateString: string; @Input() dateString: string;
@Input() customFormat: string; @Input() customFormat: string;
@Input() hideTimeSince: boolean = false;
seconds: number | undefined = undefined; seconds: number | undefined = undefined;