Skip to content

Commit

Permalink
feat(stark-demo): style header in the showcase
Browse files Browse the repository at this point in the history
ISSUES CLOSED: #570
  • Loading branch information
catlabs committed Aug 10, 2018
1 parent 442b8ac commit 1804ca3
Show file tree
Hide file tree
Showing 20 changed files with 407 additions and 193 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ export const translationsEn: object = {
FROM: "From",
TO: "To"
},
APP_LOGOUT: {
TITLE: "Log out"
},
LANGUAGES: {
EN: "English",
FR: "Français",
Expand All @@ -19,6 +22,7 @@ export const translationsEn: object = {
},
ICONS: {
ADD_ITEM: "Add",
APP_DATA: "App data",
EDIT_ITEM: "Edit",
DELETE_ITEM: "Delete",
APPROVE_ITEM: "Approve",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ export const translationsFr: object = {
FROM: "De",
TO: "A"
},
APP_LOGOUT: {
TITLE: "Déconnecter"
},
LANGUAGES: {
EN: "English",
FR: "Français",
Expand All @@ -19,6 +22,7 @@ export const translationsFr: object = {
},
ICONS: {
ADD_ITEM: "Ajouter",
APP_DATA: "App data",
EDIT_ITEM: "Modifier",
DELETE_ITEM: "Supprimer",
APPROVE_ITEM: "Approuver",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ export const translationsNl: object = {
FROM: "Van",
TO: "Tot"
},
APP_LOGOUT: {
TITLE: "Afmelden"
},
LANGUAGES: {
EN: "English",
FR: "Français",
Expand All @@ -19,6 +22,7 @@ export const translationsNl: object = {
},
ICONS: {
ADD_ITEM: "Toevoegen",
APP_DATA: "App data",
EDIT_ITEM: "Wijzig",
DELETE_ITEM: "Verwijder",
APPROVE_ITEM: "Goedkeuren",
Expand Down
1 change: 0 additions & 1 deletion packages/stark-ui/assets/styles/_base.scss
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,6 @@ h1 {
line-height: 40px;
font-weight: 400;
margin-bottom: 16px;
color: $secondary-dark-text-color;
}

h2 {
Expand Down
164 changes: 164 additions & 0 deletions packages/stark-ui/assets/styles/_header.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,164 @@
.stark-app-header {
height: $stark-header-size;
width: 100%;
position: fixed;
top: 0;
left: 0;
z-index: 10;
overflow: visible;
background: mat-color(map-get($base-theme, primary-palette), 900) url(/assets/images/app-header.png) top right no-repeat;
color: #fff;
.stark-app-bar {
display: flex;
justify-content: space-between;
padding-top: 6px;
position: relative;

.stark-app-bar-content-left {
display: flex;
flex-direction: column;
justify-content: flex-start;
width: 50%;
> div {
display: flex;
justify-content: flex-start;
&.stark-actions {
margin-left: -10px;
.stark-home-button {
display: none;
}
}
> * {
margin-right: 3px;
}
}
}
.stark-app-bar-content-center {
display: none;
width: 0%;
}
.stark-app-bar-content-right {
display: flex;
flex-direction: row-reverse;
width: 50%;
> div {
display: flex;
justify-content: flex-end;
margin-bottom: 5px;
&.stark-app-bar-content-right-actions-alt {
position: fixed;
right: 15px;
bottom: 15px;
}
&:last-child {
margin-bottom: 0;
}
> * {
margin-left: 3px;
}
}
}

.stark-app-bar-page-title {
top: 60px;
left: 0;
position: absolute;
max-width: 100%;
h1 {
font-size: 24px;
font-weight: 200;
margin-bottom: 0;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
}
}
}

@media #{$tablet-query} {
.stark-app-header {
height: $stark-header-size-desktop;
.stark-app-bar {
.stark-app-bar-content-left {
width: 33%;
> div {
&.stark-actions {
.stark-home-button {
display: block;
}
}
}
}
.stark-app-bar-content-center {
display: flex;
justify-content: center;
width: 34%;
}
.stark-app-bar-content-right {
flex-direction: column;
width: 33%;
> div {
&.stark-app-bar-content-right-actions-alt {
position: inherit;
}
}
}
.stark-app-bar-page-title {
bottom: auto;
max-width: 67%;
top: 75px;
h1 {
font-size: 32px;
}
}
}
}
}

@media #{$desktop-screen-query} {
.stark-app-header {
.app-data {
display: flex;
}
.app-data-alt {
display: none;
}
}
}

/* Temporary classes to simulate components that have not been implemented yet */
.app-logo {
background-color: rgba($color: #000, $alpha: 0.4);
display: flex;
justify-content: center;
align-items: center;
height: 62px;
width: 175px;
}

.app-data {
background-color: rgba($color: #000, $alpha: 0.4);
border-radius: 20px;
display: none; //To be kept
margin-right: 20px; //To be kept
justify-content: center;
align-items: center;
height: 44px;
width: 290px;
}

.dropdown-lang {
background-color: rgba($color: #000, $alpha: 0.4);
display: flex;
justify-content: center;
align-items: center;
height: 46px;
width: 45px;
}

@media #{$tablet-query} {
.dropdown-lang {
width: 100px;
}
}
170 changes: 0 additions & 170 deletions packages/stark-ui/assets/themes/_app-header-theme.scss

This file was deleted.

Loading

0 comments on commit 1804ca3

Please sign in to comment.