diff --git a/src/sass/all.scss b/src/sass/all.scss index 6f15034..f0b7dc5 100755 --- a/src/sass/all.scss +++ b/src/sass/all.scss @@ -19,9 +19,6 @@ @import "utilities/responsive"; @import "utilities/others"; -// Views (TODO: refactor to BEM) -@import "views/contacts"; - // Blocks // (BEM-like Naming, see http://cssguidelin.es/#bem-like-naming) @@ -46,3 +43,4 @@ @import "blocks/views/read"; @import "blocks/views/write"; @import "blocks/views/account"; +@import "blocks/views/contacts"; diff --git a/src/sass/blocks/basics/_buttons.scss b/src/sass/blocks/basics/_buttons.scss index 2e9c105..05d2811 100755 --- a/src/sass/blocks/basics/_buttons.scss +++ b/src/sass/blocks/basics/_buttons.scss @@ -307,7 +307,7 @@ border: 0; padding: 0; margin: 0; - font-size: $font-size-base; + font-size: $font-size-small; opacity: 0.5; outline: 0; diff --git a/src/sass/blocks/basics/_form.scss b/src/sass/blocks/basics/_form.scss index 515a36c..d055a8e 100644 --- a/src/sass/blocks/basics/_form.scss +++ b/src/sass/blocks/basics/_form.scss @@ -74,6 +74,25 @@ } } +.form-input-with-button { + display: flex; + flex-direction: row; + + & > .input-text { + flex-grow: 1; + margin-right: 10px; + height: 40px; + } + & > .btn { + flex-shrink: 0; + height: 40px; + + @include respond-to(md) { + min-width: 8em; + } + } +} + // Form elements diff --git a/src/sass/blocks/views/_contacts.scss b/src/sass/blocks/views/_contacts.scss new file mode 100644 index 0000000..b0d752b --- /dev/null +++ b/src/sass/blocks/views/_contacts.scss @@ -0,0 +1,44 @@ +.contacts { + list-style: none; + padding: 0; + margin: 0; + + &__delete { + float: right; + margin: 0 0 0.5em 0.5em; + } + &__title { + font-size: $font-size-big; + color: $color-main; + margin: 0; + cursor: pointer; + } + &__short-description { + margin: 0; + font-style: italic; + font-size: $font-size-small; + } + &__long-description { + display: none; + margin: 0.5em 0 0; + & > dt { + font-weight: bold; + } + } + &__contact { + & + .contacts__contact { + margin-top: 10px; + padding-top: 10px; + border-top: 1px solid $color-border-light; + } + + &--open { + .contacts__short-description { + display: none; + } + .contacts__long-description { + display: block; + } + } + } +} \ No newline at end of file diff --git a/src/sass/utilities/_others.scss b/src/sass/utilities/_others.scss index 04b08c4..42d90bc 100644 --- a/src/sass/utilities/_others.scss +++ b/src/sass/utilities/_others.scss @@ -2,6 +2,27 @@ cursor: wait !important; } +// Visibility + +.u-hide-visually { + visibility: hidden; + position: absolute; + width: 0; + height: 0; +} + +// Text alignment + .u-text-center { text-align: center; +} + +// Whitespacing + +.u-gap-top { + margin-top: 30px; +} + +.u-gap-bottom { + margin-bottom: 30px; } \ No newline at end of file diff --git a/src/sass/views/_contacts.scss b/src/sass/views/_contacts.scss deleted file mode 100644 index 923cb47..0000000 --- a/src/sass/views/_contacts.scss +++ /dev/null @@ -1,76 +0,0 @@ -.view-contacts { - - .key-controls { - display: flex; - flex-direction: row; - margin: 30px; - - .key-controls-search { - flex-grow: 1; - input[type=text] { - line-height: 28px; - width: 100%; - } - } - .key-controls-import { - display: block; - width: 8em; - flex-shrink: 0; - margin-left: 0.5em; - input[type=file] { - visibility: hidden; - width: 0; - height: 0; - position: absolute; - } - .btn { - width: 100%; - } - - @include respond-to(md) { - width: 10em; - } - } - } - - .key-list { - position: relative; - margin: 20px; - - .key-list-scroll { - max-height: 400px; - overflow-y: scroll; - } - - table { - th, td { - padding: 5px 10px; - } - - .hover { - cursor: pointer; - } - - button.remove { - font-size: 0.75em; - border: none; - background: none; - outline: none; - padding: 0; - vertical-align: middle; - - svg { - height: 0.8em; - width: 0.8em; - fill: $color-grey-input; - } - } - } - - // pull tooltip upwards to keep popup inside lightbox - .tooltip { - margin-top: -20px; - } - } - -} \ No newline at end of file diff --git a/src/tpl/contacts.html b/src/tpl/contacts.html index 49463b2..a3bb346 100644 --- a/src/tpl/contacts.html +++ b/src/tpl/contacts.html @@ -5,47 +5,42 @@ -
+ There are no contacts, yet. +
+ +Key ID | -Created | -Size | -||
---|---|---|---|---|
{{key._id.slice(8)}} | -{{key.userId}} | -{{key.created | date:'mediumDate'}} | -{{key.bitSize}} bit | -- |
+ {{key._id.slice(8)}} +
+