Skip to content

Commit f21e192

Browse files
committed
Improve mobile responsiveness
1 parent ffcac98 commit f21e192

File tree

7 files changed

+16
-9
lines changed

7 files changed

+16
-9
lines changed

config.nims

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@
66

77
# disable annoying warnings
88
warning("GcUnsafe2", off)
9-
warning("ObservableStores", off)
9+
hint("XDeclaredButNotUsed", off)
10+
hint("User", off)
1011

1112
const
1213
nimVersion = (major: NimMajor, minor: NimMinor, patch: NimPatch)

src/sass/profile/_base.scss

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,10 @@
5151
margin-bottom: unset;
5252
}
5353

54-
@media(max-width: 600px) {
54+
@media(max-width: 700px) {
5555
.profile-tabs {
5656
width: 100vw;
57+
max-width: 600px;
5758

5859
.timeline-container {
5960
width: 100% !important;
@@ -71,3 +72,9 @@
7172
padding: 0;
7273
}
7374
}
75+
76+
@media (min-height: 900px) {
77+
.profile-tab.sticky {
78+
position: sticky;
79+
}
80+
}

src/sass/profile/card.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@
103103
color: var(--profile_stat);
104104
}
105105

106-
@media(max-width: 600px) {
106+
@media(max-width: 700px) {
107107
.profile-card-info {
108108
display: flex;
109109
}

src/sass/profile/photo-rail.scss

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@
5959
padding-bottom: 12px;
6060
}
6161

62-
@media(max-width: 600px) {
62+
@media(max-width: 700px) {
6363
.photo-rail-header {
6464
display: none;
6565
}
@@ -74,9 +74,7 @@
7474
overflow: hidden;
7575
transition: max-height 0.4s;
7676
}
77-
}
7877

79-
@media(max-width: 600px) {
8078
.photo-rail-grid {
8179
grid-template-columns: repeat(6, 1fr);
8280
}

src/sass/timeline.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@
7575

7676
&.wide {
7777
flex-grow: 1.2;
78+
flex-basis: 50px;
7879
}
7980
}
8081

src/views/general.nim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ proc renderHead*(prefs: Prefs; cfg: Config; titleText=""; desc=""; video="";
4545
let opensearchUrl = getUrlPrefix(cfg) & "/opensearch"
4646

4747
buildHtml(head):
48-
link(rel="stylesheet", type="text/css", href="/css/style.css?v=8")
48+
link(rel="stylesheet", type="text/css", href="/css/style.css?v=9")
4949
link(rel="stylesheet", type="text/css", href="/css/fontello.css?v=2")
5050

5151
if theme.len > 0:

src/views/profile.nim

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,8 +105,8 @@ proc renderProfile*(profile: Profile; timeline: var Timeline;
105105
tdiv(class="profile-banner"):
106106
renderBanner(profile)
107107

108-
let sticky = if prefs.stickyProfile: "sticky" else: "unset"
109-
tdiv(class="profile-tab", style={position: sticky}):
108+
let sticky = if prefs.stickyProfile: " sticky" else: ""
109+
tdiv(class=(&"profile-tab{sticky}")):
110110
renderProfileCard(profile, prefs)
111111
if photoRail.len > 0:
112112
renderPhotoRail(profile, photoRail)

0 commit comments

Comments
 (0)