1
0
mirror of https://gitlab.com/timvisee/send.git synced 2024-11-13 22:54:15 +01:00

minor ui fixes

This commit is contained in:
Emily 2018-08-08 17:24:58 -07:00
parent 49b9a1f452
commit 4ee497a83f
8 changed files with 58 additions and 38 deletions

View File

@ -26,7 +26,7 @@ body {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
margin: 0; margin: 0;
min-height: 100vh; height: 100vh;
} }
input, input,
@ -48,7 +48,7 @@ a {
box-sizing: border-box; box-sizing: border-box;
min-height: 500px; min-height: 500px;
max-height: 800px; max-height: 800px;
height: 100px; height: 100%;
} }
.stripedBox { .stripedBox {
@ -58,7 +58,8 @@ a {
margin-top: 32px; margin-top: 32px;
background-color: white; background-color: white;
border-radius: 6px; border-radius: 6px;
box-shadow: 0 0 0 3px rgba(12, 12, 13, 0.2); border: 3px solid rgba(12, 12, 12, 0.2);
background-clip: padding-box;
background-image: repeating-linear-gradient( background-image: repeating-linear-gradient(
45deg, 45deg,
white, white,
@ -88,7 +89,9 @@ a {
.uploads { .uploads {
flex: 0 0 262px; flex: 0 0 262px;
position: relative; box-sizing: border-box;
padding-top: 180px;
display: flex;
} }
.noscript { .noscript {
@ -276,13 +279,14 @@ a {
} }
.stripedBox { .stripedBox {
margin-top: 72; margin-top: 72px;
min-height: 400px; min-height: 400px;
flex: 1; flex: 1;
} }
.uploads { .uploads {
flex: none; flex: none;
padding-top: 6px;
} }
.footer { .footer {

View File

@ -22,7 +22,6 @@ function body(template) {
return function(state, emit) { return function(state, emit) {
const b = html`<body class="background ${activeBackground(state)}"> const b = html`<body class="background ${activeBackground(state)}">
${banner(state, emit)} ${banner(state, emit)}
${signupPromo(state)}
<main class="main"> <main class="main">
<noscript> <noscript>
<div class="noscript"> <div class="noscript">
@ -35,6 +34,7 @@ function body(template) {
<p>${state.translate('enableJavascript')}</p> <p>${state.translate('enableJavascript')}</p>
</div> </div>
</noscript> </noscript>
${signupPromo(state)}
<div class="stripedBox"> <div class="stripedBox">
<div class="mainContent"> <div class="mainContent">

View File

@ -1,18 +1,22 @@
.fileToast { .fileToast {
margin: 13px 0 0; flex: none;
display: block;
margin: 6px 0 0;
overflow: hidden; overflow: hidden;
font-size: 11px; font-size: 11px;
line-height: 18px; line-height: 18px;
color: var(--lightTextColor); color: var(--lightTextColor);
background-color: var(--pageBGColor); background-color: var(--pageBGColor);
position: relative; position: relative;
box-shadow: 0 0 0 3px rgba(12, 12, 12, 0.2); border: 3px solid rgba(12, 12, 12, 0.2);
background-clip: padding-box;
box-sizing: border-box; box-sizing: border-box;
height: 53px; height: 53px;
border-radius: 4px; border-radius: 4px;
} }
.fileToast__content { .fileToast__content {
height: 100%;
position: relative; position: relative;
z-index: 2; z-index: 2;
} }
@ -61,33 +65,35 @@
} }
.fileToast .fileIcon { .fileToast .fileIcon {
margin: 2px 8px; margin: 0 8px;
} }
@media (max-device-width: 750px), (max-width: 750px) { @media (max-device-width: 750px), (max-width: 750px) {
.fileToast { .fileToast {
height: 32px; height: 32px;
width: 400px;
} }
.fileToast__content { .fileToast__content {
display: flex; display: flex;
line-height: 13px;
margin: 0;
align-items: center;
} }
.fileData { .fileData {
flex: auto; flex: auto;
display: flex; display: flex;
flex-wrap: nowrap; flex-wrap: nowrap;
margin-left: 8px; margin: 0 6px 0 0;
} }
.fileInfo { .fileInfo {
flex-shrink: 0; flex: none;
margin-left: auto; margin-left: auto;
} }
.fileToast .fileIcon { .fileToast .fileIcon {
margin: 0; flex: none;
transform: scale(0.5); transform: scale(0.5);
color: transparent; color: transparent;
} }

View File

@ -20,23 +20,23 @@ module.exports = function(file, state) {
const activeClass = isOnSharePage() ? 'fileToast--active' : ''; const activeClass = isOnSharePage() ? 'fileToast--active' : '';
return html` return html`
<a href=${toastClick()}> <li id="${file.id}">
<li class="fileToast ${activeClass}" id="${file.id}"> <a class="fileToast ${activeClass}" href=${toastClick()}>
<div class="fileToast__content"> <div class="fileToast__content">
${fileIcon(file.name, file._hasPassword)} ${fileIcon(file.name, file._hasPassword)}
<div class="fileData"> <div class="fileData">
<p class="fileName">${fileName}</p> <p class="fileName">${fileName}</p>
<p class="fileInfo"> <p class="fileInfo">
<span>${bytes(file.size)}</span> · <span>${bytes(file.size)}</span> ·
<span>${state.translate('downloadCount', { <span>${state.translate('downloadCount', {
num: `${number(totalDownloads)} / ${number(downloadLimit)}` num: `${number(totalDownloads)} / ${number(downloadLimit)}`
})}</span> })}</span>
<span>${remainingTime}</span> <span>${remainingTime}</span>
</p> </p>
</div>
</div> </div>
</div> </a>
</li> </li>
</a>
`; `;
function toastClick() { function toastClick() {

View File

@ -25,4 +25,5 @@
font-size: 7px; font-size: 7px;
font-weight: 600; font-weight: 600;
text-transform: uppercase; text-transform: uppercase;
user-select: none;
} }

View File

@ -1,21 +1,28 @@
.fileList { .fileList {
position: absolute;
bottom: 0;
list-style-type: none;
margin: 0; margin: 0;
padding: 3px; padding: 0;
font-family: 'Segoe UI', 'SF Pro Text', sans-serif;
width: 262px; width: 262px;
max-height: 80%; min-height: 100%;
overflow-y: scroll; height: 100%;
overflow-x: hidden; flex-grow: 1;
display: flex;
flex-direction: column;
list-style-type: none;
overflow: scroll;
font-family: 'Segoe UI', 'SF Pro Text', sans-serif;
}
/* hack because justify-content:flex-end and overflow:scroll doesn't work together */
.fileList > :first-child {
margin-top: auto;
} }
@media (max-device-width: 750px), (max-width: 750px) { @media (max-device-width: 750px), (max-width: 750px) {
.fileList { .fileList {
flex: none;
position: static; position: static;
width: 400px; width: 406px;
max-height: 160px; max-height: 160px;
margin: 6px 0 0 -3px; margin: 0;
} }
} }

View File

@ -1,4 +1,5 @@
.fxPromo { .fxPromo {
flex: none;
padding: 0 15px; padding: 0 15px;
height: 48px; height: 48px;
background-color: #efeff1; background-color: #efeff1;

View File

@ -7,4 +7,5 @@
align-content: center; align-content: center;
flex: 1; flex: 1;
overflow-y: scroll; overflow-y: scroll;
overflow-x: hidden;
} }