styles for vault

This commit is contained in:
Kyle Spearrin 2018-01-22 13:27:57 -05:00
parent b6143508aa
commit 22e19a6403
4 changed files with 555 additions and 47 deletions

View File

@ -21,6 +21,7 @@
"extract-text-webpack-plugin": "^3.0.1", "extract-text-webpack-plugin": "^3.0.1",
"file-loader": "^1.1.5", "file-loader": "^1.1.5",
"font-awesome": "4.7.0", "font-awesome": "4.7.0",
"google-fonts-webpack-plugin": "^0.4.4",
"html-loader": "^0.5.1", "html-loader": "^0.5.1",
"html-webpack-plugin": "^2.30.1", "html-webpack-plugin": "^2.30.1",
"node-sass": "^4.7.2", "node-sass": "^4.7.2",

View File

@ -1,50 +1,86 @@
<div id="vault"> <div id="vault">
<!--
<div id="nav"> <div id="nav">
<ul class="top"> <ul class="top">
<li><a href="#">V</a></li> <li><a href="#"><i class="fa fa-lg fa-lock"></i></a></li>
<li><a href="#">G</a></li> <li><a href="#"><i class="fa fa-lg fa-undo-alt fa-flip-horizontal"></i></a></li>
<li><a href="#">S</a></li> <li><a href="#"><i class="fa fa-lg fa-cog"></i></a></li>
</ul> </ul>
<ul class="bottom"> <ul class="bottom">
<li><a href="#">L</a></li> <li><a href="#"><i class="fa fa-lg fa-user"></i></a></li>
<li><a href="#">U</a></li>
</ul> </ul>
</div> </div>
-->
<div id="categories"> <div id="categories">
<div class="header">
Filters
</div>
<div class="content"> <div class="content">
<div>Something</div><div>Something</div><div>Something</div> <ul>
<li><a href="#"><i class="fa fa-fw fa-spinner"></i> All Items</a></li>
<li><a href="#"><i class="fa fa-fw fa-star"></i> Favorites</a></li>
</ul>
<h2><i class="fa fa-tags"></i> Types</h2>
<ul>
<li><a href="#"><i class="fa fa-fw fa-globe"></i> Login</a></li>
<li><a href="#"><i class="fa fa-fw fa-credit-card"></i> Card</a></li>
<li><a href="#"><i class="fa fa-fw fa-id-card-o"></i> Identity</a></li>
<li><a href="#"><i class="fa fa-fw fa-sticky-note-o"></i> Secure Note</a></li>
</ul>
<h2><i class="fa fa-folder"></i> Folders</h2>
<ul>
<li><a href="#"><i class="fa fa-fw fa-caret-right"></i> Folder 1</a></li>
<li><a href="#"><i class="fa fa-fw fa-caret-right"></i> Folder 2</a></li>
</ul>
<h2><i class="fa fa-cubes"></i> Collections</h2>
<ul>
<li><a href="#"><i class="fa fa-fw fa-caret-right"></i> Collection 1</a></li>
<li><a href="#"><i class="fa fa-fw fa-caret-right"></i> Collection 2</a></li>
</ul>
</div> </div>
</div> </div>
<div id="items"> <div id="items">
<div class="header"> <div class="header header-search">
Search Bar <div class="search">
<input type="search" placeholder="Search vault" id="search" />
<i class="fa fa-search"></i>
</div>
<div class="right">
<a href="" title="Add Item"><i class="fa fa-plus fa-lg"></i></a>
</div>
</div> </div>
<div class="content"> <div class="content">
<div>Something Something Something Something Something Something</div> <div class="list">
<div>Something</div><div>Something</div><div>Something</div> <div class="list-section" style="padding-top: 0; padding-bottom: 0;">
<div>Something</div><div>Something</div><div>Something</div><div>Something</div> <a href="#"
<div>Something</div><div>Something</div><div>Something</div><div>Something</div> class="list-section-item condensed" title="View Item">
<div>Something</div><div>Something</div><div>Something</div><div>Something</div> <span class="text">
<div>Something</div><div>Something</div><div>Something</div><div>Something</div> Item 1
<div>Something</div><div>Something</div><div>Something</div><div>Something</div> <i class="fa fa-share-alt text-muted"></i>
<div>Something</div><div>Something</div><div>Something</div><div>Something</div> <i class="fa fa-paperclip text-muted"></i>
<div>Something</div><div>Something</div><div>Something</div><div>Something</div> </span>
<div>Something</div><div>Something</div><div>Something</div><div>Something</div> <span class="detail">Sub</span>
<div>Something</div><div>Something</div><div>Something</div><div>Something</div> </a>
<div>Something</div><div>Something</div><div>Something</div><div>Something</div> <a href="#"
<div>Something</div><div>Something</div><div>Something</div><div>Something</div> class="list-section-item condensed" title="View Item">
<span class="text">
Item 1
<i class="fa fa-share-alt text-muted"></i>
<i class="fa fa-paperclip text-muted"></i>
</span>
<span class="detail">Sub</span>
</a>
<a href="#"
class="list-section-item condensed" title="View Item">
<span class="text">
Item 1
<i class="fa fa-share-alt text-muted"></i>
<i class="fa fa-paperclip text-muted"></i>
</span>
<span class="detail">Sub</span>
</a>
</div>
</div> </div>
<div class="footer">
Add
</div> </div>
</div> </div>
<div id="details"> <div id="details">
<div class="header">
View Item
</div>
<div class="content"> <div class="content">
<div>Something Something Something Something Something Something</div> <div>Something Something Something Something Something Something</div>
<div>Something</div><div>Something</div><div>Something</div><div>Something</div> <div>Something</div><div>Something</div><div>Something</div><div>Something</div>

View File

@ -1,14 +1,42 @@
* { $fa-font-path: "~font-awesome/fonts";
@import "~font-awesome/scss/font-awesome.scss";
$font-family-sans-serif: 'Open Sans','Helvetica Neue',Helvetica,Arial,sans-serif;
$font-size-base: 14px;
$font-size-large: 18px;
$font-size-small: 12px;
$text-color: #000000;
$background-color: #efeff4;
$border-color: #f0f0f0;
$border-color-dark: #ddd;
$list-item-hover: #fbfbfb;
$list-icon-color: #c7c7cd;
$gray: #555;
$gray-light: #777;
$text-muted: $gray-light;
$brand-primary: #3c8dbc;
$brand-danger: #dd4b39;
$brand-success: #00a65a;
$brand-info: #555555;
$brand-warning: #f39c12;
$brand-primary-accent: #286090;
$background-color: white;
$background-color-alt: #f9fafc;
* {
box-sizing: border-box; box-sizing: border-box;
} }
*::-webkit-scrollbar { div::-webkit-scrollbar {
width: 10px; width: 10px;
height: 10px; height: 10px;
background-color: #aaa; background-color: #aaa;
} }
*::-webkit-scrollbar-thumb { div::-webkit-scrollbar-thumb {
background: #888; background: #888;
} }
@ -16,11 +44,22 @@ html, body {
margin: 0; margin: 0;
padding: 0; padding: 0;
height: 100%; height: 100%;
background-color: gray; background-color: $background-color;
overflow: hidden; overflow: hidden;
font-family: Arial; font-family: $font-family-sans-serif;
font-size: 14px; font-size: $font-size-base;
color: #000; color: $text-color;
}
h1, h2, h3, h4, h5, h6 {
font-family: $font-family-sans-serif;
margin: 0;
padding: 0;
}
a {
color: $brand-primary;
text-decoration: none;
} }
#vault { #vault {
@ -59,26 +98,46 @@ html, body {
} }
#categories { #categories {
background-color: #222d32; background-color: $background-color-alt;
width: 15%; width: 15%;
min-width: 175px; min-width: 175px;
max-width: 250px; max-width: 250px;
color: white; border-right: 1px solid $border-color-dark;
padding: 10px 15px;
.header { h2 {
background-color: #367fa9; font-size: $font-size-base;
font-weight: bold;
margin-bottom: 5px;
}
ul {
margin: 0 0 20px 0;
padding: 0;
li {
margin: 0;
padding: 0;
a {
display: block;
padding: 5px 0;
color: $text-color;
}
}
} }
} }
#items { #items {
background-color: #ecf0f5; background-color: $background-color;
width: 25%; width: 25%;
min-width: 200px; min-width: 200px;
max-width: 350px; max-width: 350px;
border-right: 1px solid $border-color-dark;
} }
#details { #details {
background-color: #f9fafc; background-color: $background-color;
flex: 1; flex: 1;
min-width: 400px; min-width: 400px;
} }
@ -89,10 +148,123 @@ html, body {
} }
.header { .header {
height: 50px; min-height: 44px;
background-color: #3c8dbc; max-height: 44px;
color: #fff; background-color: $brand-primary;
color: white;
text-align: center;
overflow: hidden;
flex: 0 0 auto; flex: 0 0 auto;
a, button {
color: white !important;
text-decoration: none;
background: none;
&:hover, &:focus {
background-color: rgba(255, 255, 255, 0.1);
}
&:hover {
text-decoration: none;
}
&:focus {
text-decoration: underline;
}
}
.title {
font-weight: bold;
display: block;
padding: 12px 0;
text-align: center;
}
.left {
display: block;
position: absolute;
left: 0;
text-align: left;
a, button {
padding: 12px 10px;
display: block;
float: left;
}
.fa-spinner {
padding: 15px;
display: block;
float: left;
}
}
.right {
display: block;
right: 0;
position: absolute;
z-index: 99999;
a, button {
padding: 12px 10px;
display: block;
float: right;
}
.fa-spinner {
padding: 15px;
display: block;
float: right;
}
}
&.header-search {
.left, .right, .search {
display: table-cell;
position: relative;
}
.search {
padding: 0 7px;
width: 100%;
text-align: left;
position: relative;
.fa-search {
position: absolute;
top: 15px;
left: 15px;
color: lighten($brand-primary, 30%);
}
input {
width: 100%;
margin: 0;
float: none;
background: darken($brand-primary, 8%);
border: none;
color: white;
padding: 5px 10px 5px 30px;
border-radius: 5px;
&:focus {
border-radius: 5px;
outline: none;
background: darken($brand-primary, 10%);
}
&::-webkit-input-placeholder {
color: lighten($brand-primary, 35%);
}
}
}
a {
white-space: nowrap;
float: none;
}
}
} }
.content { .content {
@ -103,7 +275,282 @@ html, body {
.footer { .footer {
height: 50px; height: 50px;
background-color: #fff; background-color: $background-color-alt;
flex: 0 0 auto; flex: 0 0 auto;
border-top: 1px solid $border-color-dark;
}
}
.list {
.list-grouped {
.list-grouped-header {
background-color: transparent;
padding: 10px 10px;
color: $gray-light;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
small {
float: right;
}
}
}
.list-section {
padding-bottom: 10px;
&:first-child {
padding-top: 10px;
}
.list-section-header {
background-color: transparent;
padding: 5px 10px;
color: $gray-light;
text-transform: uppercase;
font-size: ($font-size-base - 1);
label {
font-weight: normal;
}
span {
float: right;
}
}
.list-section-items {
border-top: 1px solid $border-color-dark;
border-bottom: 1px solid $border-color-dark;
}
.list-section-footer {
padding: 5px 10px;
font-size: $font-size-small;
color: $gray-light;
}
}
.list-grouped-item, .list-section-item {
display: block;
padding: 10px 10px;
background-color: white;
text-decoration: none;
color: $text-color;
position: relative;
z-index: 1;
&:not(.pre) {
&:after {
content: "";
display: table;
clear: both;
}
}
&.pre {
white-space: pre;
overflow-x: auto;
}
&.text-primary {
color: $brand-primary !important;
}
&.text-danger {
color: $brand-danger !important;
}
&:not(.wrap) {
.text, .detail {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
}
&:before {
content: "";
position: absolute;
right: 0;
bottom: 0;
height: 1px;
width: calc(100% - 10px);
border-bottom: 1px solid $border-color;
}
&:last-child {
&:before {
border: none;
height: 0;
}
}
&:hover, &:focus, &.active {
background-color: $list-item-hover;
}
&:not(:hover):focus {
border-left: 5px solid $brand-primary;
padding-left: 5px;
}
.leading-icon {
font-size: 35px;
float: left;
display: inline-block;
margin: 0 8px 5px 0;
}
.text {
display: block;
color: $text-color;
}
.detail {
font-size: $font-size-small;
color: $gray-light;
display: block;
}
.item-label {
font-size: $font-size-small;
color: $gray-light;
display: block;
width: 100%;
font-weight: normal;
margin-bottom: 5px;
}
&.list-section-item-table {
display: table;
width: 100%;
}
.action-button {
padding: 8px 10px 8px 5px;
display: table-cell;
width: 20px;
vertical-align: middle;
&.text-danger {
color: $brand-danger !important;
}
}
.action-button-content {
display: table-cell;
vertical-align: middle;
}
.field-type {
margin: 5px 0 0 27px;
width: calc(100% - 27px);
}
.icon {
display: flex;
justify-content: center;
align-items: center;
float: left;
height: 36px;
width: 34px;
margin-left: -5px;
color: $text-muted;
img {
border-radius: 3px;
max-height: 20px;
max-width: 20px;
}
&.single-line {
height: initial;
display: block;
text-align: center;
}
}
.action-buttons {
float: right;
.btn-list {
float: left;
cursor: pointer;
padding: 10px 8px;
background: none;
border: none;
color: $brand-primary;
&:hover, &:focus {
color: darken($brand-primary, 10%);
}
&.disabled {
color: $list-icon-color;
&:hover {
color: $list-icon-color;
}
}
&:last-child {
padding-right: 2px !important;
}
}
}
.fa-chevron-right, .right-icon {
float: right;
margin-top: 4px;
color: $list-icon-color;
}
.item-sub-label {
float: right;
display: block;
margin-right: 15px;
color: $gray-light;
}
small.item-sub-label {
margin-top: 2px;
}
&.condensed {
padding: 3px 10px;
.action-buttons {
.btn-list {
padding: 8px 5px;
}
}
&:not(:hover):focus {
padding-left: 5px;
}
}
&.wrap {
overflow-wrap: break-word;
}
&.flex {
display: flex;
}
.flex-grow {
flex-grow: 1;
}
}
}
.list-no-selection {
.list-grouped-item:not(.list-allow-selection), .list-section-item:not(.list-allow-selection) {
&:hover {
background-color: white;
}
} }
} }

View File

@ -3,6 +3,7 @@ const webpack = require('webpack');
const CleanWebpackPlugin = require('clean-webpack-plugin'); const CleanWebpackPlugin = require('clean-webpack-plugin');
const HtmlWebpackPlugin = require('html-webpack-plugin'); const HtmlWebpackPlugin = require('html-webpack-plugin');
const CopyWebpackPlugin = require('copy-webpack-plugin'); const CopyWebpackPlugin = require('copy-webpack-plugin');
const GoogleFontsPlugin = require("google-fonts-webpack-plugin");
const isVendorModule = (module) => { const isVendorModule = (module) => {
if (!module.context) { if (!module.context) {
@ -40,12 +41,35 @@ module.exports = {
test: /\.(html)$/, test: /\.(html)$/,
loader: 'html-loader' loader: 'html-loader'
}, },
{
test: /.(ttf|otf|eot|svg|woff(2)?)(\?[a-z0-9]+)?$/,
use: [{
loader: 'file-loader',
options: {
name: '[name].[ext]',
outputPath: 'fonts/'
}
}]
}
] ]
}, },
plugins: [ plugins: [
new CleanWebpackPlugin([ new CleanWebpackPlugin([
path.resolve(__dirname, 'build/*') path.resolve(__dirname, 'build/*')
]), ]),
new GoogleFontsPlugin({
fonts: [
{
family: 'Open Sans',
variants: ['300', '300italic', '400', '400italic', '600', '600italic',
'700', '700italic', '800', '800italic'],
subsets: ['cyrillic', 'cyrillic-ext', 'greek', 'greek-ext', 'latin', 'latin-ext']
}
],
formats: ['woff2'],
path: 'fonts/',
filename: 'css/fonts.css'
}),
new webpack.optimize.CommonsChunkPlugin({ new webpack.optimize.CommonsChunkPlugin({
name: 'app/vendor', name: 'app/vendor',
chunks: ['app/main'], chunks: ['app/main'],