Skip to content

Commit

Permalink
Optimize for mobile
Browse files Browse the repository at this point in the history
* Added CSS for responsivity
  • Loading branch information
JohannesLares authored and hjhsalo committed May 24, 2023
1 parent 9538c27 commit ecbdfa9
Show file tree
Hide file tree
Showing 34 changed files with 92 additions and 23 deletions.
103 changes: 91 additions & 12 deletions webui/app/css/app.css
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ html, body {
margin: 0px;
padding: 0px;
color: #333;
width:100vw;
}

html {
Expand Down Expand Up @@ -249,14 +250,24 @@ input:focus, select:focus, textarea:focus, button:focus, a:focus {
font-size:14px;
color: #c73118;
overflow: auto;
white-space: nowrap;
}

.doi {
font-size:14px;
color: #0027ff;
overflow: auto;
white-space: nowrap;
}

@media (min-width: 1200px) {
.doi, .epic_pid {
white-space: nowrap;
}
}

@media (max-width: 1200px) {
.doi, .epic_pid {
word-break: break-all;
}
}

.checksum {
Expand Down Expand Up @@ -441,21 +452,72 @@ a.navbar-brand {
display: table;
padding: 15px;
}
@media (min-width: 768px) {

.navbar-center {
align-content: flex-start;
}

@media (min-width: 890px) {
.nav-search {
margin-right: 220px;
}

.logo-container {
width: 80%;
margin-left: 175px;
}
}

@media (max-width: 890px) {
.logo-container {
padding-left: 20px;
width: 100%;
}

.logo-container>a>img {
max-width: 70%;
}

.logo-container>a>img:first-child {
max-width: 15%;
}
}

#header-navbar-collapse ul {
text-align: center;
}

.navbar-nav {
margin-top: 0.5em;
@media (min-width: 768px) {
.navbar-nav {
margin-top: 0.5em;
margin-left: 155px;
}

.navbar-lower {
width: 90%;
}

.navbar-nav.user {
padding-right: 1em;
}
}
.navbar-nav.user {
padding-right: 1em;

@media (max-width: 768px) {
.navbar-nav {
margin-left: 0px !important;
margin-top: 0.5em;
width: 100%;
}

.navbar-lower {
width: 100%;
}
}

.navbar-lower {
background: white no-repeat right top;
white-space: nowrap;
display: table;
}

.navbar-default .navbar-nav >.open .dropdown-toggle.btn-primary {
Expand Down Expand Up @@ -489,6 +551,15 @@ a.navbar-brand {
float:right;
}
}
@media (max-width: 768px) {
.navbar-nav.user {
float: left;
}

.navbar-hidden {
height: 0;
}
}

.navbar-default .navbar-nav > li > a {
font-size: 15px;
Expand All @@ -500,9 +571,12 @@ a.navbar-brand {
font-weight: 400;
}

.header-nav .navbar-header {
min-height: 120px;
@media (min-width: 768px) {
.header-nav .navbar-header {
min-height: 120px;
}
}

.header-nav .in .navbar-nav {
margin-top: 5px;
}
Expand Down Expand Up @@ -694,7 +768,6 @@ a.navbar-brand {
}

.pid-number {
white-space: nowrap;
overflow: auto;
border: none;
padding: 0;
Expand Down Expand Up @@ -735,8 +808,7 @@ a.navbar-brand {
color: black;
display: block;
font-weight: bold;
min-height: 10em;
max-width: 10em;
min-height: 11em;
overflow: hidden;
padding: 10px 4px;
text-align: center;
Expand Down Expand Up @@ -767,6 +839,12 @@ a.navbar-brand {
}
}

/* @media (min-width: 992px) {
.community-small-wrapper {
float:right;
}
} */

.community-small:hover {
border: 1px solid gray;
box-shadow: 0 0 10px gray !important;
Expand All @@ -786,6 +864,7 @@ a.navbar-brand {
.community-small img.logo {
max-width: 96px;
max-height: 64px;
margin-top: 15px;
}

.community-small.inactive img{
Expand Down
Empty file modified webui/app/css/bootstrap-theme.css
100755 → 100644
Empty file.
Empty file modified webui/app/css/font.css
100755 → 100644
Empty file.
Empty file modified webui/src/.eslintrc
100755 → 100644
Empty file.
Empty file modified webui/src/__tests__/common.js
100755 → 100644
Empty file.
Empty file modified webui/src/__tests__/homepage.js
100755 → 100644
Empty file.
Empty file modified webui/src/components/accessrequest.jsx
100755 → 100644
Empty file.
Empty file modified webui/src/components/animate.jsx
100755 → 100644
Empty file.
Empty file modified webui/src/components/common.jsx
100755 → 100644
Empty file.
Empty file modified webui/src/components/communities.jsx
100755 → 100644
Empty file.
Empty file modified webui/src/components/community_admin.jsx
100755 → 100644
Empty file.
Empty file modified webui/src/components/components.jsx
100755 → 100644
Empty file.
9 changes: 0 additions & 9 deletions webui/src/components/editfiles.jsx
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -863,12 +863,3 @@ export function copyToClipboard(text, info) {
}
document.body.removeChild(textArea);
}

// export function FetchStats(url, requestOptions){

// fetch(url, requestOptions)
// .then(response => {if(response.ok){return response.text()}}).then(text=>this.setState({data: text.replace(/<\/?i>/g, "")}))
// console.log("")
// return "something"

// }
Empty file modified webui/src/components/editrecord.jsx
100755 → 100644
Empty file.
Empty file modified webui/src/components/help.jsx
100755 → 100644
Empty file.
Empty file modified webui/src/components/home.jsx
100755 → 100644
Empty file.
Empty file modified webui/src/components/latest_records.jsx
100755 → 100644
Empty file.
2 changes: 1 addition & 1 deletion webui/src/components/navbar.jsx
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ const NavbarSearch = React.createClass({
const setStateEvent = ev => this.setState({q: ev.target.value});
const visibility = this.props.visibility ? "visible" : "hidden";
return (
<form onSubmit={this.search} style={{visibility}}>
<form onSubmit={this.search} style={{visibility}} className={`navbar-${visibility}`} >
<div className="nav-search">
<span className="input-group-btn">
<button onClick={this.searchHelp} className="btn btn-default" type="button">
Expand Down
Empty file modified webui/src/components/newrecord.jsx
100755 → 100644
Empty file.
1 change: 0 additions & 1 deletion webui/src/components/record.jsx
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -560,7 +560,6 @@ const Record = React.createClass({
renderFileList(files, b2noteUrl, showDownloads) {
const openAccess = this.props.record.getIn(['metadata', 'open_access']);
const showAccessRequest = (!openAccess && !isRecordOwner(this.props.record));
const showLinkCreation = !openAccess && isRecordOwner(this.props.record) && (files && files.count && files.count());
let fileComponent = false;
if (!(files && files.count && files.count())) {
fileComponent = <div>No files available.</div>;
Expand Down
Empty file modified webui/src/components/reportabuse.jsx
100755 → 100644
Empty file.
Empty file modified webui/src/components/schema.jsx
100755 → 100644
Empty file.
Empty file modified webui/src/components/search.jsx
100755 → 100644
Empty file.
Empty file modified webui/src/components/selectbig.jsx
100755 → 100644
Empty file.
Empty file modified webui/src/components/selectlicense.jsx
100755 → 100644
Empty file.
Empty file modified webui/src/components/user.jsx
100755 → 100644
Empty file.
Empty file modified webui/src/components/versions.jsx
100755 → 100644
Empty file.
Empty file modified webui/src/components/waiting.jsx
100755 → 100644
Empty file.
Empty file modified webui/src/data/ajax.js
100755 → 100644
Empty file.
Empty file modified webui/src/data/misc.js
100755 → 100644
Empty file.
Empty file modified webui/src/data/server.js
100755 → 100644
Empty file.
Empty file modified webui/src/data/store.js
100755 → 100644
Empty file.
Empty file modified webui/src/documentation.md
100755 → 100644
Empty file.
Empty file modified webui/src/main.jsx
100755 → 100644
Empty file.

0 comments on commit ecbdfa9

Please sign in to comment.