Browse Source

Some first comments.

pull/65/head
Sebastian Stehle 9 years ago
parent
commit
94ce2b1318
  1. 3
      src/Squidex/app/features/content/pages/contents/content-item.component.html
  2. 2
      src/Squidex/app/features/content/pages/schemas/schemas-page.component.html
  3. 5
      src/Squidex/app/features/schemas/pages/schemas/schemas-page.component.html
  4. 4
      src/Squidex/app/features/settings/pages/clients/client.component.scss
  5. 2
      src/Squidex/app/features/settings/settings-area.component.html
  6. 2
      src/Squidex/app/shell/pages/internal/internal-area.component.html
  7. 123
      src/Squidex/app/theme/_bootstrap.scss
  8. 19
      src/Squidex/app/theme/_common.scss
  9. 30
      src/Squidex/app/theme/_mixins.scss

3
src/Squidex/app/features/content/pages/contents/content-item.component.html

@ -5,7 +5,8 @@
</td> </td>
<td> <td>
<span class="item-published" [class.unpublished]="!content.isPublished"></span> <span class="item-published" [class.unpublished]="!content.isPublished"></span>
<span class="item-modified">{{content.lastModified | fromNow}}</span>
<small class="item-modified">{{content.lastModified | fromNow}}</small>
</td> </td>
<td> <td>
<img class="user-picture" [attr.title]="content.lastModifiedBy | userNameRef" [attr.src]="content.lastModifiedBy | userPictureRef" /> <img class="user-picture" [attr.title]="content.lastModifiedBy | userNameRef" [attr.src]="content.lastModifiedBy | userPictureRef" />

2
src/Squidex/app/features/content/pages/schemas/schemas-page.component.html

@ -23,7 +23,7 @@
<div class="panel-main"> <div class="panel-main">
<div class="panel-content"> <div class="panel-content">
<ul class="nav nav-pills flex-column nav-dark nav-dark-bordered"> <ul class="nav flex-column nav-dark nav-dark-bordered">
<li class="nav-item" *ngFor="let schema of schemasFiltered | async"> <li class="nav-item" *ngFor="let schema of schemasFiltered | async">
<a class="nav-link" [routerLink]="schema.name" routerLinkActive="active">{{schema | displayName}} <i class="icon-angle-right"></i></a> <a class="nav-link" [routerLink]="schema.name" routerLinkActive="active">{{schema | displayName}} <i class="icon-angle-right"></i></a>
</li> </li>

5
src/Squidex/app/features/schemas/pages/schemas/schemas-page.component.html

@ -28,7 +28,7 @@
<div class="panel-main"> <div class="panel-main">
<div class="panel-content"> <div class="panel-content">
<ul class="nav nav-pills flex-column nav-dark nav-dark-bordered"> <ul class="nav flex-column nav-dark nav-dark-bordered">
<li class="nav-item" *ngFor="let schema of schemasFiltered"> <li class="nav-item" *ngFor="let schema of schemasFiltered">
<a class="nav-link" [routerLink]="[schema.name]" routerLinkActive="active"> <a class="nav-link" [routerLink]="[schema.name]" routerLinkActive="active">
<div class="row"> <div class="row">
@ -41,7 +41,8 @@
</span> </span>
</div> </div>
<div class="col col-4 schema-modified"> <div class="col col-4 schema-modified">
<span class="item-modified">{{schema.lastModified | fromNow}}</span> <small class="item-modified">{{schema.lastModified | fromNow}}</small>
<span class="item-published" [class.unpublished]="!schema.isPublished"></span> <span class="item-published" [class.unpublished]="!schema.isPublished"></span>
</div> </div>
</div> </div>

4
src/Squidex/app/features/settings/pages/clients/client.component.scss

@ -66,6 +66,10 @@ $color-editor: #eceeef;
} }
} }
.btn-cancel {
padding: .4rem;
}
.access-token { .access-token {
height: 18rem; height: 18rem;
font-size: 1rem; font-size: 1rem;

2
src/Squidex/app/features/settings/settings-area.component.html

@ -13,7 +13,7 @@
<div class="panel-main"> <div class="panel-main">
<div class="panel-content"> <div class="panel-content">
<ul class="nav nav-pills flex-column nav-dark"> <ul class="nav flex-column nav-dark">
<li class="nav-item"> <li class="nav-item">
<a class="nav-link" routerLink="clients" routerLinkActive="active"> <a class="nav-link" routerLink="clients" routerLinkActive="active">
Clients Clients

2
src/Squidex/app/shell/pages/internal/internal-area.component.html

@ -1,4 +1,4 @@
<nav class="navbar navbar-fixed-top navbar-inverse bg-primary bg-faded"> <nav class="navbar fixed-top navbar-inverse bg-primary bg-faded">
<span class="navbar-brand" routerLink="/app"> <span class="navbar-brand" routerLink="/app">
<i class="icon-logo"></i> <i class="icon-logo"></i>
</span> </span>

123
src/Squidex/app/theme/_bootstrap.scss

@ -3,6 +3,9 @@
@import './../../node_modules/bootstrap/scss/mixins/_buttons'; @import './../../node_modules/bootstrap/scss/mixins/_buttons';
//
// Override most common header sizes
//
h1 { h1 {
font-size: 1.3rem; font-size: 1.3rem;
} }
@ -15,7 +18,11 @@ h3 {
font-size: 1.05rem; font-size: 1.05rem;
} }
//
// Fix navbar.
//
.navbar { .navbar {
// Use fixed height to reduce problems with dynamic elements.
& { & {
height: $size-navbar-height; height: $size-navbar-height;
} }
@ -24,29 +31,23 @@ h3 {
line-height: 2.2rem; line-height: 2.2rem;
} }
&-fixed-top { // Ensure that dropdown is always under nav bar.
@include fixed(0, 0, auto, 0);
z-index: 10000;
}
.dropdown-menu { .dropdown-menu {
top: 2.6rem; top: 2.6rem;
} }
} }
.nav-pills {
.nav-link {
@include border-radius(0);
}
}
.navbar-nav { .navbar-nav {
.nav-link { .nav-link {
cursor: pointer; cursor: pointer;
} }
} }
//
// Restyle dropdown menu.
//
.dropdown-menu { .dropdown-menu {
// White dropdown menu without border and shadow.
& { & {
@include box-shadow(0, 3px, 16px, .2px); @include box-shadow(0, 3px, 16px, .2px);
border: 0; border: 0;
@ -54,6 +55,7 @@ h3 {
} }
a { a {
// Special style for menu item to delete something.
&.dropdown-item-delete { &.dropdown-item-delete {
& { & {
color: $color-theme-error; color: $color-theme-error;
@ -65,11 +67,11 @@ h3 {
&:active { &:active {
background: $color-theme-error-dark; background: $color-theme-error-dark;
border: 0;
} }
} }
&.dropdown-item { &.dropdown-item {
// Make the color white on active.
&:active { &:active {
color: $color-dark-foreground; color: $color-dark-foreground;
} }
@ -77,6 +79,9 @@ h3 {
} }
} }
//
// Dark vertical menu for dark panels.
//
.nav-dark { .nav-dark {
& { & {
background: $color-dark2-background; background: $color-dark2-background;
@ -94,30 +99,32 @@ h3 {
.nav-item { .nav-item {
&:last-child { &:last-child {
.nav-link { .nav-link {
// Keep border between two items, not after last item.
border: 0; border: 0;
} }
} }
} }
} }
&.nav-pills { .nav-link {
.nav-link { & {
& { color: $color-dark2-foreground;
color: $color-dark2-foreground; }
}
&:hover, &:hover,
&.active { &.active {
color: $color-dark1-focus-foreground; color: $color-dark1-focus-foreground;
} }
&.active { &.active {
background: $color-dark2-active-background; background: $color-dark2-active-background;
}
} }
} }
} }
//
// Tab control navigation.
//
.nav-field-tabs { .nav-field-tabs {
& { & {
@include absolute(auto, auto, 0, 1.25rem); @include absolute(auto, auto, 0, 1.25rem);
@ -144,34 +151,9 @@ h3 {
} }
} }
@mixin link-button($color) { //
color: $color; // Corresponding icon colors for external login buttons.
cursor: pointer; //
&:focus {
outline-color: transparent;
}
&:disabled {
@include opacity(.4);
}
&:disabled,
&.disabled {
cursor: not-allowed;
border-color: transparent;
}
&:focus,
&:active,
&:hover {
color: darken($color, 8%);
border-color: transparent;
background: transparent;
text-decoration: none;
}
}
.icon { .icon {
&-github { &-github {
color: $color-extern-github-icon; color: $color-extern-github-icon;
@ -186,7 +168,11 @@ h3 {
} }
} }
//
// Button improvements
//
.btn { .btn {
// Buttons for external logins.
&-github { &-github {
@include button-variant($color-dark-foreground, $color-extern-github, $color-extern-github); @include button-variant($color-dark-foreground, $color-extern-github, $color-extern-github);
} }
@ -199,12 +185,7 @@ h3 {
@include button-variant($color-dark-foreground, $color-extern-microsoft, $color-extern-microsoft); @include button-variant($color-dark-foreground, $color-extern-microsoft, $color-extern-microsoft);
} }
&-cancel { // Special radio button.
padding: .4rem;
font-size: 1.1rem;
font-weight: normal;
}
&-radio { &-radio {
& { & {
color: $color-border-dark; color: $color-border-dark;
@ -227,6 +208,10 @@ h3 {
line-height: 1.5rem; line-height: 1.5rem;
} }
.radio-input {
display: none;
}
&.active { &.active {
& { & {
@include box-shadow(0, 0, 10px, .5); @include box-shadow(0, 0, 10px, .5);
@ -243,31 +228,31 @@ h3 {
&:hover { &:hover {
color: $color-theme-blue; color: $color-theme-blue;
} }
.radio-input {
display: none;
}
} }
// Link buttons only exists with blue text color in bootstrap. Provide them for all colors.
&-link { &-link {
& { & {
@include link-button($color-theme-blue); @include build-link-button($color-theme-blue);
} }
&.btn-danger { &.btn-danger {
@include link-button($color-theme-error); @include build-link-button($color-theme-error);
} }
&.btn-success { &.btn-success {
@include link-button($color-theme-green); @include build-link-button($color-theme-green);
} }
&.btn-decent { &.btn-decent {
@include link-button($color-subtext); @include build-link-button($color-subtext);
} }
} }
} }
//
// Restyle modal dialogs.
//
.modal { .modal {
&-content, &-content,
&-header { &-header {
@ -319,17 +304,23 @@ h3 {
} }
} }
//
// Table Helpers
//
.table { .table {
// Use fixed width for columns.
&-fixed { &-fixed {
table-layout: fixed; table-layout: fixed;
} }
// Vertical align cells.
&-middle { &-middle {
td { td {
vertical-align: middle; vertical-align: middle;
} }
} }
// Remove all borders.
&-borderless { &-borderless {
td { td {
border: 0; border: 0;

19
src/Squidex/app/theme/_common.scss

@ -2,25 +2,32 @@
@import '_vars'; @import '_vars';
body { body {
// Default body with padding for fixed navbar and sidebar.
& { & {
background: $color-background; background: $color-background;
padding-top: $size-navbar-height; padding-top: $size-navbar-height;
padding-left: 0; padding-left: 0;
} }
// White body for login and profile page.
&.white { &.white {
background: $color-dark-foreground; background: $color-dark-foreground;
} }
} }
// User ref for history panel. Must be placed here, because element is created dynamically.
.user-ref { .user-ref {
color: $color-theme-blue-dark; color: $color-theme-blue-dark;
} }
// Marker ref for history panel. Must be placed here, because element is created dynamically.
.marker-ref { .marker-ref {
color: $color-theme-blue-dark; color: $color-theme-blue-dark;
} }
//
// Profile picture in circle
//
.user-picture { .user-picture {
& { & {
@include circle(2rem); @include circle(2rem);
@ -31,6 +38,9 @@ body {
} }
} }
//
// Green or red circle if element is published or unpublished
//
.item-published { .item-published {
& { & {
@include circle(.5rem); @include circle(.5rem);
@ -59,6 +69,9 @@ body {
} }
} }
//
// Landing page with loading spinner.
//
.landing-page { .landing-page {
& { & {
margin: 8rem auto; margin: 8rem auto;
@ -75,14 +88,12 @@ body {
} }
} }
// Hidden helper (fast *ngIf replacement)
.hidden { .hidden {
display: none; display: none;
} }
// Hidden helper (fast *ngIf replacement)
.invisible { .invisible {
visibility: hidden; visibility: hidden;
}
.item-modified {
font-size: .8rem;
} }

30
src/Squidex/app/theme/_mixins.scss

@ -10,6 +10,36 @@
} }
} }
@mixin build-link-button($color) {
& {
color: $color;
cursor: pointer;
}
&:focus {
outline-color: transparent;
}
&:disabled {
@include opacity(.4);
}
&:disabled,
&.disabled {
cursor: not-allowed;
border-color: transparent;
}
&:focus,
&:active,
&:hover {
color: darken($color, 8%);
border-color: transparent;
background: transparent;
text-decoration: none;
}
}
@mixin clearfix() { @mixin clearfix() {
&::after { &::after {
content: ''; content: '';

Loading…
Cancel
Save