Skip to content

Commit

Permalink
First commit av versjon 0.0.1 av FFE-Header.
Browse files Browse the repository at this point in the history
  • Loading branch information
gbrownlee committed Nov 16, 2015
0 parents commit a7b7f72
Show file tree
Hide file tree
Showing 8 changed files with 275 additions and 0 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#CHANGELOG

##Versjon 0.0.1

Første versjon av ffe-header.
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#Felles Frontend Header

##Intro

Felles header-komponent for SpareBank 1.

## Bruk

<code>@import ../node_modules/header-wrapper</code> i en less-fil i ditt prosjekt.

Merk at ffe-core er en avhengighet for ffe-header (se peerDependencies i package.json).

Se readme for ffe-core for øvrig informasjon.
5 changes: 5 additions & 0 deletions examples/examples.less
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
@import "../node_modules/ffe-core/less/ffe";
@import "../less/header-wrapper";

@base-url: "../";
@icon-url: "@{base-url}/icons";
38 changes: 38 additions & 0 deletions examples/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
<!DOCTYPE html>
<html>
<head lang="en">
<meta charset="UTF-8">
<title>Eksempelside for Felles Header</title>

<link href="examples.css" rel="stylesheet" type="text/css">
</head>
<body>

<header id="header" class="header-wrapper">
<div class="main-header">
<div class="mobile-header-elements">
<a href="/#">
<img height="30px" class="logo" src="../images/logo.svg" alt="SpareBank 1 Logo">
</a>
<img height="30px" data-action="user-menu-trigger" class="icon-user" src="../images/person.svg"
alt="User menu">
</div>
<div class="desktop-header-elements">
<div class="header-element">
<a href="/#">
<img height="40px" class="logo" src="../images/logo.svg" alt="SpareBank 1 Logo">
</a>
</div>
<div class="header-element" id="mainHeading"><h1 class="heading">Forsikringsoversikt</h1></div>
<div class="header-element">
<span class="profile-type"></span>

<a class="profile-name" href="#kunde">Foo Bar</a>
<button class="secondary-button" data-action="logout">Logg ut</button>
</div>
</div>
</div>
</header>

</body>
</html>
26 changes: 26 additions & 0 deletions images/logo.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 14 additions & 0 deletions images/person.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
150 changes: 150 additions & 0 deletions less/header-wrapper.less
Original file line number Diff line number Diff line change
@@ -0,0 +1,150 @@
.header-wrapper {
margin-bottom: 30px;
transition: top 0.2s ease-in-out 0.6s;
width: 100%;
background: @white;
text-align: center;

> .main-header {
width: 100%;
margin: 0 auto;
display: table;
border-bottom: 1px solid @grey-light;

> .mobile-header-elements {
padding: 10px 20px;
text-align: center;

> img {
height: 30px;
}
> .icon-burger {
float: left;
cursor: pointer;
}
> .icon-user {
float: right;
cursor: pointer;
}
}
> .desktop-header-elements {
display: none;
max-width: @app-width;
min-width: 320px;
margin: auto;
}

> .branding-block {
height: 50px;
padding: 15px 0;
margin-top: 10px;
}

> .branding-block > .logo {
height: 20px;
}
}
}




@media screen and (min-width: @breakpoint-md) {
.header-wrapper {
margin-bottom: 110px;

> .main-header {
border-bottom: 2px solid @grey-light;

> .mobile-header-elements {
display: none;
}
> .desktop-header-elements {
display: table;
width: 100%;
padding: 30px 20px;
transition: padding 0.2s ease-in-out;


> .header-element {
display: table-cell;
width: 33%;
vertical-align: middle;

&:first-child{
text-align: left;
}
&:last-child{
text-align: right;
}

a > .logo {
height: 40px;
margin: 0;
transition: all .2s ease-in-out;
}

> .heading {
font-size: 22px;
font-family: "MuseoSans-500",arial,sans-serif;
line-height: 30px;
transition: font-size .2s ease-in-out;
margin: 0;
}

> .profile-type {
font-size: 16px;
font-family: "MuseoSans-500",arial,sans-serif;
margin-right: 8px;
}

> .profile-name {
font-size: 16px;
margin-right: 8px;
display: inline-block;

&:after {
content:'\203A';
font-size: 32px;
vertical-align: sub;
margin: 7px;

}
}
}
}

> .branding-block {
height: 60px;
padding: 17px 0;
}

> .branding-block > .logo {
height: 25px;
}
}

&.thin {
box-shadow: 0 0px 10px rgba(0,0,0,0.2);
border-bottom: none;

> .main-header > .desktop-header-elements {
padding: 5px 20px;
> .header-element {
a > .logo {
height: 26px;
margin-top: 5px;
}
> .heading {
font-size: 18px;
}
}

> .header-element:last-child > * {
display: none;
}
}
}
}
}

0 comments on commit a7b7f72

Please sign in to comment.