mirror of
https://github.com/schlagmichdoch/PairDrop.git
synced 2025-04-30 03:29:14 -04:00
Lots of small improvements, websockets fallback
This commit is contained in:
parent
e5eab64c6b
commit
22be7c5cb9
35 changed files with 2672 additions and 916 deletions
|
@ -1,214 +1,31 @@
|
|||
<!--
|
||||
@license
|
||||
Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
|
||||
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
||||
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
||||
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
||||
Code distributed by Google as part of the polymer project is also
|
||||
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
||||
-->
|
||||
|
||||
<link rel="import" href="../bower_components/polymer/polymer.html">
|
||||
|
||||
<style is="custom-style">
|
||||
|
||||
/*
|
||||
Polymer includes a shim for CSS Custom Properties that we can use for application theming.
|
||||
Below, you'll find the default palette for the Share With Me layout. Feel free to play
|
||||
with changing the colors used or generate your own palette of colours at MaterialPalette.com.
|
||||
|
||||
See https://www.polymer-project.org/1.0/docs/devguide/styling.html#xscope-styling-details
|
||||
for further information on custom CSS properties.
|
||||
*/
|
||||
|
||||
/* Application theme */
|
||||
|
||||
:root {
|
||||
:root {
|
||||
--dark-primary-color: #303F9F;
|
||||
--default-primary-color: #3F51B5;
|
||||
--light-primary-color: #C5CAE9;
|
||||
--text-primary-color: #ffffff; /*text/icons*/
|
||||
--text-primary-color: #ffffff;
|
||||
/*text/icons*/
|
||||
--accent-color: #FF4081;
|
||||
--primary-background-color: #c5cae9;
|
||||
--primary-text-color: #212121;
|
||||
--secondary-text-color: #727272;
|
||||
--disabled-text-color: #bdbdbd;
|
||||
--divider-color: #B6B6B6;
|
||||
|
||||
/* Components */
|
||||
|
||||
/* paper-drawer-panel */
|
||||
--drawer-menu-color: #ffffff;
|
||||
--drawer-border-color: 1px solid #ccc;
|
||||
--drawer-toolbar-border-color: 1px solid rgba(0, 0, 0, 0.22);
|
||||
|
||||
/* paper-menu */
|
||||
--paper-menu-background-color: #fff;
|
||||
--menu-link-color: #111111;
|
||||
}
|
||||
}
|
||||
|
||||
/* General styles */
|
||||
|
||||
#drawerToolbar {
|
||||
color: var(--secondary-text-color);
|
||||
background-color: var(--drawer-menu-color);
|
||||
border-bottom: var(--drawer-toolbar-border-color);
|
||||
}
|
||||
|
||||
paper-scroll-header-panel {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
paper-material {
|
||||
border-radius: 2px;
|
||||
height: 100%;
|
||||
padding: 16px 0 16px 0;
|
||||
width: calc(98.66% - 16px);
|
||||
margin: 16px auto;
|
||||
background: white;
|
||||
}
|
||||
|
||||
paper-menu iron-icon {
|
||||
margin-right: 33px;
|
||||
opacity: 0.54;
|
||||
}
|
||||
|
||||
.paper-menu > .iron-selected {
|
||||
color: var(--default-primary-color);
|
||||
}
|
||||
|
||||
paper-menu a {
|
||||
@apply(--layout-horizontal);
|
||||
@apply(--layout-center);
|
||||
text-decoration: none;
|
||||
color: var(--menu-link-color);
|
||||
font-family: 'Roboto', 'Noto', sans-serif;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
text-rendering: optimizeLegibility;
|
||||
font-size: 14px;
|
||||
font-weight: 400;
|
||||
line-height: 24px;
|
||||
min-height: 48px;
|
||||
padding: 0 16px;
|
||||
}
|
||||
|
||||
paper-toolbar.tall .app-name {
|
||||
font-size: 40px;
|
||||
font-weight: 300;
|
||||
/* Required for main area's paper-scroll-header-panel custom condensing transformation */
|
||||
-webkit-transform-origin: left center;
|
||||
transform-origin: left center;
|
||||
}
|
||||
|
||||
#mainToolbar .middle-container {
|
||||
height: 100%;
|
||||
margin-left: 48px;
|
||||
}
|
||||
|
||||
#mainToolbar:not(.tall) .middle {
|
||||
font-size: 18px;
|
||||
padding-bottom: 0;
|
||||
}
|
||||
|
||||
#mainToolbar .bottom {
|
||||
margin-left: 48px;
|
||||
/* Required for main area's paper-scroll-header-panel custom condensing transformation */
|
||||
-webkit-transform-origin: left center;
|
||||
transform-origin: left center;
|
||||
}
|
||||
|
||||
/* Height of the scroll area */
|
||||
.content {
|
||||
height: 900px;
|
||||
}
|
||||
|
||||
#toast .toast-hide-button {
|
||||
color: #eeff41;
|
||||
margin: 10px;
|
||||
}
|
||||
|
||||
/* Breakpoints */
|
||||
|
||||
/* Small */
|
||||
@media (max-width: 600px) {
|
||||
|
||||
paper-material {
|
||||
--menu-container-display: none;
|
||||
width: calc(97.33% - 32px);
|
||||
padding-left: 16px;
|
||||
padding-right: 16px;
|
||||
}
|
||||
|
||||
paper-toolbar.tall .app-name {
|
||||
font-size: 24px;
|
||||
font-weight: 400;
|
||||
}
|
||||
|
||||
#drawer .paper-toolbar {
|
||||
margin-left: 16px;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/* Tablet+ */
|
||||
@media (min-width: 601px) {
|
||||
|
||||
paper-material {
|
||||
width: calc(98% - 46px);
|
||||
margin-bottom: 32px;
|
||||
padding-left: 30px;
|
||||
padding-right: 30px;
|
||||
}
|
||||
|
||||
#drawer.paper-drawer-panel > [drawer] {
|
||||
border-right: 1px solid rgba(0, 0, 0, 0.14);
|
||||
}
|
||||
|
||||
iron-pages {
|
||||
padding: 48px 62px;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/* Material Design Adaptive Breakpoints */
|
||||
/*
|
||||
Below you'll find CSS media queries based on the breakpoint guidance
|
||||
published by the Material Design team. You can choose to use, customise
|
||||
or remove these breakpoints based on your needs.
|
||||
|
||||
http://www.google.com/design/spec/layout/adaptive-ui.html#adaptive-ui-breakpoints
|
||||
*/
|
||||
|
||||
/* mobile-small */
|
||||
@media all and (min-width: 0) and (max-width: 360px) and (orientation: portrait) { }
|
||||
/* mobile-large */
|
||||
@media all and (min-width: 361px) and (orientation: portrait) { }
|
||||
/* mobile-small-landscape */
|
||||
@media all and (min-width: 0) and (max-width: 480px) and (orientation: landscape) { }
|
||||
/* mobile-large-landscape */
|
||||
@media all and (min-width: 481px) and (orientation: landscape) { }
|
||||
/* tablet-small-landscape */
|
||||
@media all and (min-width: 600px) and (max-width: 960px) and (orientation: landscape) { }
|
||||
/* tablet-large-landscape */
|
||||
@media all and (min-width: 961px) and (orientation: landscape) { }
|
||||
/* tablet-small */
|
||||
@media all and (min-width: 600px) and (orientation: portrait) { }
|
||||
/* tablet-large */
|
||||
@media all and (min-width: 601px) and (max-width: 840px) and (orientation : portrait) { }
|
||||
/* desktop-x-small-landscape */
|
||||
@media all and (min-width: 0) and (max-width: 480px) and (orientation: landscape) { }
|
||||
/* desktop-x-small */
|
||||
@media all and (min-width: 0) and (max-width: 480px) and (max-aspect-ratio: 4/3) { }
|
||||
/* desktop-small-landscape */
|
||||
@media all and (min-width: 481px) and (max-width: 840px) and (orientation: landscape) { }
|
||||
/* desktop-small */
|
||||
@media all and (min-width: 481px) and (max-width: 840px) and (max-aspect-ratio: 4/3) { }
|
||||
/* desktop-medium-landscape */
|
||||
@media all and (min-width: 841px) and (max-width: 1280px) and (orientation: landscape) { }
|
||||
/* desktop-medium */
|
||||
@media all and (min-width: 841px) and (max-width: 1280px) and (max-aspect-ratio: 4/3) { }
|
||||
/* desktop-large */
|
||||
@media all and (min-width: 1281px) and (max-width: 1600px) { }
|
||||
/* desktop-xlarge */
|
||||
@media all and (min-width: 1601px) and (max-width: 1920px) { }
|
||||
paper-progress {
|
||||
width: 100%;
|
||||
z-index: 1;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
}
|
||||
</style>
|
||||
|
|
37
app/styles/icons.html
Normal file
37
app/styles/icons.html
Normal file
|
@ -0,0 +1,37 @@
|
|||
<link rel="import" href="../bower_components/iron-iconset-svg/iron-iconset-svg.html">
|
||||
<iron-iconset-svg name="chat" size="24">
|
||||
<svg>
|
||||
<defs>
|
||||
<g id="notifications-off">
|
||||
<path d="M11.5 22c1.1 0 2-.9 2-2h-4c0 1.1.9 2 2 2zM18 10.5c0-3.07-2.13-5.64-5-6.32V3.5c0-.83-.67-1.5-1.5-1.5S10 2.67 10 3.5v.68c-.51.12-.99.32-1.45.56L18 14.18V10.5zm-.27 8.5l2 2L21 19.73 4.27 3 3 4.27l2.92 2.92C5.34 8.16 5 9.29 5 10.5V16l-2 2v1h14.73z" />
|
||||
</g>
|
||||
<g id="share">
|
||||
<path d="M18 16.08c-.76 0-1.44.3-1.96.77L8.91 12.7c.05-.23.09-.46.09-.7s-.04-.47-.09-.7l7.05-4.11c.54.5 1.25.81 2.04.81 1.66 0 3-1.34 3-3s-1.34-3-3-3-3 1.34-3 3c0 .24.04.47.09.7L8.04 9.81C7.5 9.31 6.79 9 6 9c-1.66 0-3 1.34-3 3s1.34 3 3 3c.79 0 1.5-.31 2.04-.81l7.12 4.16c-.05.21-.08.43-.08.65 0 1.61 1.31 2.92 2.92 2.92 1.61 0 2.92-1.31 2.92-2.92s-1.31-2.92-2.92-2.92z" />
|
||||
</g>
|
||||
<g id="call">
|
||||
<path d="M6.62 10.79c1.44 2.83 3.76 5.14 6.59 6.59l2.2-2.2c.27-.27.67-.36 1.02-.24 1.12.37 2.33.57 3.57.57.55 0 1 .45 1 1V20c0 .55-.45 1-1 1-9.39 0-17-7.61-17-17 0-.55.45-1 1-1h3.5c.55 0 1 .45 1 1 0 1.25.2 2.45.57 3.57.11.35.03.74-.25 1.02l-2.2 2.2z" />
|
||||
</g>
|
||||
<g id="wifi-tethering">
|
||||
<path d="M12 11c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm6 2c0-3.31-2.69-6-6-6s-6 2.69-6 6c0 2.22 1.21 4.15 3 5.19l1-1.74c-1.19-.7-2-1.97-2-3.45 0-2.21 1.79-4 4-4s4 1.79 4 4c0 1.48-.81 2.75-2 3.45l1 1.74c1.79-1.04 3-2.97 3-5.19zM12 3C6.48 3 2 7.48 2 13c0 3.7 2.01 6.92 4.99 8.65l1-1.73C5.61 18.53 4 15.96 4 13c0-4.42 3.58-8 8-8s8 3.58 8 8c0 2.96-1.61 5.53-4 6.92l1 1.73c2.99-1.73 5-4.95 5-8.65 0-5.52-4.48-10-10-10z" />
|
||||
</g>
|
||||
<g id="attach-file">
|
||||
<path d="M16.5 6v11.5c0 2.21-1.79 4-4 4s-4-1.79-4-4V5c0-1.38 1.12-2.5 2.5-2.5s2.5 1.12 2.5 2.5v10.5c0 .55-.45 1-1 1s-1-.45-1-1V6H10v9.5c0 1.38 1.12 2.5 2.5 2.5s2.5-1.12 2.5-2.5V5c0-2.21-1.79-4-4-4S7 2.79 7 5v12.5c0 3.04 2.46 5.5 5.5 5.5s5.5-2.46 5.5-5.5V6h-1.5z" />
|
||||
</g>
|
||||
<g id="desktop-mac">
|
||||
<path d="M21 2H3c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h7l-2 3v1h8v-1l-2-3h7c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm0 12H3V4h18v10z" />
|
||||
</g>
|
||||
<g id="desktop-windows">
|
||||
<path d="M21 2H3c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h7v2H8v2h8v-2h-2v-2h7c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm0 14H3V4h18v12z" />
|
||||
</g>
|
||||
<g id="smartphone">
|
||||
<path d="M17 1.01L7 1c-1.1 0-2 .9-2 2v18c0 1.1.9 2 2 2h10c1.1 0 2-.9 2-2V3c0-1.1-.9-1.99-2-1.99zM17 19H7V5h10v14z" />
|
||||
</g>
|
||||
<g id="phone-iphone">
|
||||
<path d="M15.5 1h-8C6.12 1 5 2.12 5 3.5v17C5 21.88 6.12 23 7.5 23h8c1.38 0 2.5-1.12 2.5-2.5v-17C18 2.12 16.88 1 15.5 1zm-4 21c-.83 0-1.5-.67-1.5-1.5s.67-1.5 1.5-1.5 1.5.67 1.5 1.5-.67 1.5-1.5 1.5zm4.5-4H7V4h9v14z" />
|
||||
</g>
|
||||
<g id="tablet-mac">
|
||||
<path d="M18.5 0h-14C3.12 0 2 1.12 2 2.5v19C2 22.88 3.12 24 4.5 24h14c1.38 0 2.5-1.12 2.5-2.5v-19C21 1.12 19.88 0 18.5 0zm-7 23c-.83 0-1.5-.67-1.5-1.5s.67-1.5 1.5-1.5 1.5.67 1.5 1.5-.67 1.5-1.5 1.5zm7.5-4H4V3h15v16z" />
|
||||
</g>
|
||||
</defs>
|
||||
</svg>
|
||||
</iron-iconset-svg>
|
|
@ -1,14 +1,12 @@
|
|||
/*
|
||||
Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
|
||||
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
||||
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
||||
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
||||
Code distributed by Google as part of the polymer project is also
|
||||
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
||||
*/
|
||||
html,
|
||||
body {
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
body {
|
||||
background: #fafafa;
|
||||
font-family: 'Roboto', 'Helvetica Neue', Helvetica, Arial, sans-serif;
|
||||
color: #333;
|
||||
background: #fafafa;
|
||||
font-family: 'Roboto', 'Helvetica Neue', Helvetica, Arial, sans-serif;
|
||||
color: #333;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
}
|
||||
|
|
|
@ -1,23 +0,0 @@
|
|||
<link rel="import" href="../bower_components/polymer/polymer.html">
|
||||
<link rel="import" href="../bower_components/paper-styles/typography.html">
|
||||
|
||||
<!-- shared styles for all elements and index.html -->
|
||||
<dom-module id="shared-styles">
|
||||
<template>
|
||||
<style>
|
||||
.page-title {
|
||||
@apply(--paper-font-display2);
|
||||
}
|
||||
|
||||
paper-menu a > *, paper-menu paper-item > *, paper-menu paper-icon-item > * {
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
@media (max-width: 600px) {
|
||||
.page-title {
|
||||
font-size: 24px!important;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
</template>
|
||||
</dom-module>
|
Loading…
Add table
Add a link
Reference in a new issue