first round of styling for preview

This commit is contained in:
Bruno Windels
2020-12-03 17:11:46 +01:00
parent 822431ac14
commit db2c2b0b25
10 changed files with 267 additions and 87 deletions
+48
View File
@@ -0,0 +1,48 @@
.ClientListView .list {
padding: 16px 0;
}
.ClientView {
border: 1px solid #E6E6E6;
border-radius: 8px;
margin: 16px 0;
padding: 16px;
}
.ClientView .header {
display: flex;
}
.ClientView .description {
flex: 1;
}
.ClientView h3 {
margin-top: 0;
}
.ClientView .icon {
border-radius: 8px;
background-repeat: no-repeat;
background-size: cover;
width: 60px;
height: 60px;
}
.ClientView .icon.element-io {
background-image: url('../images/client-icons/element.svg');
}
.ClientView .icon.weechat {
background-image: url('../images/client-icons/weechat.svg');
}
.ClientView .actions a.badge {
display: inline-block;
height: 40px;
margin: 8px 16px 8px 0;
}
.ClientView .actions img {
height: 100%;
}
+5
View File
@@ -0,0 +1,5 @@
.CreateLinkView h2 {
padding: 0 40px;
word-break: break-all;
text-align: center;
}
+7 -63
View File
@@ -14,6 +14,11 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
@import url('spinner.css');
@import url('client.css');
@import url('preview.css');
@import url('create.css');
:root {
--app-background: #f4f4f4;
--background: #ffffff;
@@ -24,6 +29,8 @@ limitations under the License.
--error: #d6001c;
--link: #0098d4;
--borders: #f4f4f4;
--lightgrey: #E6E6E6;
--spinner-stroke-size: 2px;
}
html {
@@ -70,14 +77,6 @@ textarea {
padding: 2rem;
}
.PreviewView .preview {
text-align: center;
}
.PreviewView .avatar {
border-radius: 100%;
}
.hidden {
display: none !important;
}
@@ -134,45 +133,6 @@ button.text:hover {
cursor: pointer;
}
.ClientListView .list {
padding: 16px 0;
}
.ClientView {
border: 1px solid #E6E6E6;
border-radius: 8px;
margin: 16px 0;
padding: 16px;
}
.ClientView .header {
display: flex;
}
.ClientView .description {
flex: 1;
}
.ClientView h3 {
margin-top: 0;
}
.ClientView .icon {
border-radius: 8px;
background-repeat: no-repeat;
background-size: cover;
width: 60px;
height: 60px;
}
.ClientView .icon.element-io {
background-image: url('../images/client-icons/element.svg');
}
.ClientView .icon.weechat {
background-image: url('../images/client-icons/weechat.svg');
}
.primary, .secondary {
text-decoration: none;
font-weight: bold;
@@ -213,19 +173,3 @@ input[type='text'].large {
width: 100%;
box-sizing: border-box;
}
.ClientView .actions a.badge {
display: inline-block;
height: 40px;
margin: 8px 16px 8px 0;
}
.ClientView .actions img {
height: 100%;
}
.CreateLinkView h2 {
padding: 0 40px;
word-break: break-all;
text-align: center;
}
+117
View File
@@ -0,0 +1,117 @@
.PreviewView {
text-align: center;
margin-bottom: 32px;
}
.PreviewView h1 {
font-size: 24px;
line-height: 32px;
margin-bottom: 8px;
}
.PreviewView .avatarContainer {
display: flex;
justify-content: center;
margin: 0;
}
.PreviewView .avatar {
border-radius: 100%;
width: 64px;
height: 64px;
}
.PreviewView .spinner {
width: 32px;
height: 32px;
}
.PreviewView .avatar.loading {
border: 1px solid #eee;
display: flex;
align-items: center;
justify-content: center;
}
.PreviewView .identifier {
color: var(--grey);
font-size: 12px;
margin: 8px 0;
}
.PreviewView .identifier.placeholder {
height: 1em;
margin: 16px 30%;
}
.PreviewView .memberCount {
display: flex;
justify-content: center;
margin: 8px 0;
}
.PreviewView .memberCount p:not(.placeholder) {
background-image: url(../images/member-icon.svg);
background-repeat: no-repeat;
background-position: 2px center;
padding: 0 4px 0 24px;
}
.PreviewView .memberCount.loading {
margin: 16px 0;
}
.PreviewView .memberCount p {
background-color: var(--lightgrey);
padding: 0 4px;
border-radius: 8px;
font-size: 12px;
margin: 0;
}
.PreviewView .memberCount p.placeholder {
height: 1.5em;
width: 80px;
}
.PreviewView .topic {
font-size: 12px;
color: var(--grey);
margin: 32px;
}
.PreviewView .topic.loading {
display: block;
}
.PreviewView .topic.loading .placeholder {
height: 0.8em;
display: block;
margin: 12px 0;
}
.PreviewView .topic.loading .placeholder:nth-child(2) {
margin-left: 5%;
margin-right: 5%;
}
.placeholder {
border-radius: 1em;
--flash-bg: #ddd;
--flash-fg: #eee;
background: linear-gradient(120deg,
var(--flash-bg),
var(--flash-bg) 10%,
var(--flash-fg) calc(10% + 25px),
var(--flash-bg) calc(10% + 50px)
);
animation: flash 2s ease-in-out infinite;
background-size: 200%;
}
@keyframes flash {
0% { background-position-x: 0; }
50% { background-position-x: -80%; }
51% { background-position-x: 40%; }
100% { background-position-x: 0%; }
}
+27
View File
@@ -0,0 +1,27 @@
@keyframes rotate {
0% { transform: rotate(0deg); }
100% { transform: rotate(360deg); }
}
.spinner {
width: 40px;
height: 40px;
border-radius: 100%;
border: var(--spinner-stroke-size) solid var(--app-background);
box-sizing: border-box;
}
.spinner::before {
content: "";
display: block;
width: inherit;
height: inherit;
border-radius: 100%;
border-width: var(--spinner-stroke-size);
border-style: solid;
border-color: transparent;
border-top-color: var(--grey);
animation: rotate 0.8s linear infinite;
box-sizing: border-box;
margin: calc(-1 * var(--spinner-stroke-size));
}