Skip to content

Commit

Permalink
Improved mobile ux (#260)
Browse files Browse the repository at this point in the history
* Banner padding
* Font scaling and sidebar repositioning
* Mobile logo logic, tweaked header display
  • Loading branch information
kelynch authored Apr 11, 2022
1 parent 1974121 commit 3d38cb7
Show file tree
Hide file tree
Showing 5 changed files with 50 additions and 0 deletions.
Binary file added app/assets/images/mobile_logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
22 changes: 22 additions & 0 deletions app/assets/stylesheets/blacklight.scss
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,25 @@ dd.blacklight-abstract_tsim {
-webkit-box-orient: vertical;
overflow: hidden;
}

// Responsive font sizes

@media all and (max-width: 860px) {
body {
font-size: 1rem;
}

h1 {
font-size: 2.5rem;
}
}

@media all and (max-width: 736px) {
body {
font-size: 1rem;
}

h1 {
font-size: 1.5rem;
}
}
6 changes: 6 additions & 0 deletions app/assets/stylesheets/components/banner.scss
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,9 @@
font-size: 18px;
}
}

@media all and (max-width: 860px) {
#banner {
padding: 10px 3px 5px 3px;
}
}
6 changes: 6 additions & 0 deletions app/assets/stylesheets/components/header.scss
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,12 @@
max-width: 75%;
}

@media all and (max-width: 550px) {
.navbar-logo {
background-image: asset_url("mobile_logo.png");
}
}

/* Hide responsive hamburger menu -- not using it */
.navbar .navbar-toggler {
display: none;
Expand Down
16 changes: 16 additions & 0 deletions app/assets/stylesheets/components/sidebar.scss
Original file line number Diff line number Diff line change
Expand Up @@ -60,3 +60,19 @@
line-height: 1.5;
border-radius: 0.2rem;
}

@media all and (max-width: 860px) {
}

@media all and (max-width: 736px) {
}

@media all and (max-width: 550px) {
.sidebar {
float: none;
}

#sidebar-usage {
padding: 10px 0px;
}
}

0 comments on commit 3d38cb7

Please sign in to comment.