Improve mobile support for the toolbar and the drive

This commit is contained in:
yflory
2017-02-06 18:06:59 +01:00
parent 9f1789b2d2
commit ac79fbb5a2
10 changed files with 256 additions and 150 deletions

View File

@@ -64,7 +64,7 @@
.alertify .dialog > *,
.alertify .alert > * {
width: 30%;
min-width: 500px;
width: 500px;
max-width: 95%;
margin: 0 auto;
text-align: center;

View File

@@ -72,7 +72,7 @@
> * {
width: 30%;
min-width: 500px;
width: 500px;
max-width: 95%;
margin: 0 auto;
text-align: center;

View File

@@ -41,6 +41,7 @@
button {
&#shareButton {
// Bootstrap 4 colors
color: #fff;
background: #5cb85c;
border-color: #5cb85c;
@@ -51,6 +52,9 @@
span {
color: #fff;
}
.large {
margin-left: 5px;
}
}
}
@@ -97,24 +101,6 @@
background-image:linear-gradient(to bottom,#f2f2f2,#ccc);
}
}
.large {
@media screen and (max-width: 800px) {
display: none;
}
@media screen and (min-width: 801px) {
display: inline-block;
}
}
.small {
@media screen and (max-width: 800px) {
display: inline-block;
}
@media screen and (min-width: 801px) {
display: none;
}
}
.cryptpad-state {
line-height: 32px; /* equivalent to 26px + 2*2px margin used for buttons */
}
@@ -150,6 +136,74 @@
height: 24px;
}
}
.big {
@media screen and (max-width: @media-not-big) {
display: none;
}
@media screen and (min-width: @media-not-small) {
display: inline-block;
}
}
.small {
@media screen and (max-width: @media-not-big) {
display: inline-block;
}
@media screen and (min-width: @media-not-small) {
display: none;
}
}
.med-big {
@media screen and (max-width: @media-medium-screen) {
display: none;
}
@media screen and (min-width: (@media-medium-screen + 1px)) {
display: inline-block;
}
}
.med-small {
@media screen and (max-width: @media-medium-screen) {
display: inline-block;
}
@media screen and (min-width: (@media-medium-screen + 1px)) {
display: none;
}
}
.large {
@media screen and (max-width: @media-narrow-screen) {
display: none;
}
@media screen and (min-width: (@media-narrow-screen + 1px)) {
display: inline-block;
}
}
.narrow {
@media screen and (max-width: @media-narrow-screen) {
display: inline-block;
}
@media screen and (min-width: (@media-narrow-screen + 1px)) {
display: none;
}
}
}
.cryptpad-toolbar:not(.notitle) {
.cryptpad-toolbar-top {
@media screen and (max-width: @media-medium-screen) {
height: 67px;
}
.cryptpad-link, .cryptpad-user {
@media screen and (max-width: @media-medium-screen) {
top: 35px;
}
@media screen and (min-width: (@media-medium-screen + 1px)) {
top: 0px;
}
}
}
}
.cryptpad-toolbar-top {
@@ -157,9 +211,6 @@
text-align: center;
height: 32px;
position: relative;
@media screen and (max-width: @media-narrow-screen) {
height: 67px;
}
.cryptpad-title {
.title, .pencilIcon {
font-size: 1.5em;
@@ -212,12 +263,6 @@
position: absolute;
left: 0px;
height: 32px;
@media screen and (max-width: (@media-short-screen - 1px)) {
top: 35px;
}
@media screen and (min-width: @media-short-screen) {
top: 0px;
}
a.cryptpad-logo {
cursor: pointer;
@@ -242,41 +287,19 @@
cursor: pointer;
}
}
.big {
@media screen and (max-width: @media-narrow-screen) {
display: none;
}
@media screen and (min-width: (@media-narrow-screen + 1px)) {
display: inline-block;
}
}
.small {
@media screen and (max-width: @media-narrow-screen) {
display: inline-block;
}
@media screen and (min-width: (@media-narrow-screen + 1px)) {
display: none;
}
}
}
.cryptpad-user {
position: absolute;
right: 0;
span:not(.cryptpad-lag) {
vertical-align: top;
display: inline-block;
//display: inline-block;
}
button {
span.fa {
vertical-align: baseline;
}
}
@media screen and (max-width: @media-narrow-screen) {
top: 3em;
}
@media screen and (min-width: (@media-narrow-screen + 1px)) {
top: 0px;
}
}
}
.cryptpad-toolbar-leftside {

View File

@@ -69,6 +69,7 @@
@media-short-screen: 450px;
@media-narrow-screen: 400px;
@media-medium-screen: 600px;
@toolbar-gradient-start: #f5f5f5;
@toolbar-gradient-end: #DDDDDD;

View File

@@ -124,6 +124,9 @@
.cryptpad-toolbar button#shareButton span {
color: #fff;
}
.cryptpad-toolbar button#shareButton .large {
margin-left: 5px;
}
.cryptpad-toolbar .cryptpad-lag {
box-sizing: content-box;
height: 16px;
@@ -166,26 +169,6 @@
.cryptpad-toolbar button:hover {
background-image: linear-gradient(to bottom, #f2f2f2, #ccc);
}
@media screen and (max-width: 800px) {
.cryptpad-toolbar .large {
display: none;
}
}
@media screen and (min-width: 801px) {
.cryptpad-toolbar .large {
display: inline-block;
}
}
@media screen and (max-width: 800px) {
.cryptpad-toolbar .small {
display: inline-block;
}
}
@media screen and (min-width: 801px) {
.cryptpad-toolbar .small {
display: none;
}
}
.cryptpad-toolbar .cryptpad-state {
line-height: 32px;
/* equivalent to 26px + 2*2px margin used for buttons */
@@ -218,17 +201,89 @@
.cryptpad-toolbar select option {
height: 24px;
}
@media screen and (max-width: 800px) {
.cryptpad-toolbar .big {
display: none;
}
}
@media screen and (min-width: 801px) {
.cryptpad-toolbar .big {
display: inline-block;
}
}
@media screen and (max-width: 800px) {
.cryptpad-toolbar .small {
display: inline-block;
}
}
@media screen and (min-width: 801px) {
.cryptpad-toolbar .small {
display: none;
}
}
@media screen and (max-width: 600px) {
.cryptpad-toolbar .med-big {
display: none;
}
}
@media screen and (min-width: 601px) {
.cryptpad-toolbar .med-big {
display: inline-block;
}
}
@media screen and (max-width: 600px) {
.cryptpad-toolbar .med-small {
display: inline-block;
}
}
@media screen and (min-width: 601px) {
.cryptpad-toolbar .med-small {
display: none;
}
}
@media screen and (max-width: 400px) {
.cryptpad-toolbar .large {
display: none;
}
}
@media screen and (min-width: 401px) {
.cryptpad-toolbar .large {
display: inline-block;
}
}
@media screen and (max-width: 400px) {
.cryptpad-toolbar .narrow {
display: inline-block;
}
}
@media screen and (min-width: 401px) {
.cryptpad-toolbar .narrow {
display: none;
}
}
@media screen and (max-width: 600px) {
.cryptpad-toolbar:not(.notitle) .cryptpad-toolbar-top {
height: 67px;
}
}
@media screen and (max-width: 600px) {
.cryptpad-toolbar:not(.notitle) .cryptpad-toolbar-top .cryptpad-link,
.cryptpad-toolbar:not(.notitle) .cryptpad-toolbar-top .cryptpad-user {
top: 35px;
}
}
@media screen and (min-width: 601px) {
.cryptpad-toolbar:not(.notitle) .cryptpad-toolbar-top .cryptpad-link,
.cryptpad-toolbar:not(.notitle) .cryptpad-toolbar-top .cryptpad-user {
top: 0px;
}
}
.cryptpad-toolbar-top {
display: block;
text-align: center;
height: 32px;
position: relative;
}
@media screen and (max-width: 400px) {
.cryptpad-toolbar-top {
height: 67px;
}
}
.cryptpad-toolbar-top .cryptpad-title .title,
.cryptpad-toolbar-top .cryptpad-title .pencilIcon {
font-size: 1.5em;
@@ -278,16 +333,6 @@
left: 0px;
height: 32px;
}
@media screen and (max-width: 449px) {
.cryptpad-toolbar-top .cryptpad-link {
top: 35px;
}
}
@media screen and (min-width: 450px) {
.cryptpad-toolbar-top .cryptpad-link {
top: 0px;
}
}
.cryptpad-toolbar-top .cryptpad-link a.cryptpad-logo {
cursor: pointer;
height: 32px;
@@ -309,47 +354,16 @@
vertical-align: middle;
cursor: pointer;
}
@media screen and (max-width: 400px) {
.cryptpad-toolbar-top .cryptpad-link .big {
display: none;
}
}
@media screen and (min-width: 401px) {
.cryptpad-toolbar-top .cryptpad-link .big {
display: inline-block;
}
}
@media screen and (max-width: 400px) {
.cryptpad-toolbar-top .cryptpad-link .small {
display: inline-block;
}
}
@media screen and (min-width: 401px) {
.cryptpad-toolbar-top .cryptpad-link .small {
display: none;
}
}
.cryptpad-toolbar-top .cryptpad-user {
position: absolute;
right: 0;
}
.cryptpad-toolbar-top .cryptpad-user span:not(.cryptpad-lag) {
vertical-align: top;
display: inline-block;
}
.cryptpad-toolbar-top .cryptpad-user button span.fa {
vertical-align: baseline;
}
@media screen and (max-width: 400px) {
.cryptpad-toolbar-top .cryptpad-user {
top: 3em;
}
}
@media screen and (min-width: 401px) {
.cryptpad-toolbar-top .cryptpad-user {
top: 0px;
}
}
.cryptpad-toolbar-leftside {
float: left;
margin-bottom: -1px;