Search initial commit

This commit is contained in:
Karol Orzeł 2015-01-20 15:34:37 +01:00
parent 714086a312
commit ec748ef316
6 changed files with 191 additions and 95 deletions

View File

@ -1,5 +1,5 @@
@import url(//fonts.googleapis.com/css?family=Montserrat:400|Raleway:300,400,600|Inconsolata|Pacifico);
#header .logo h3, #header .logo ul.social-icons, #header #navbar ul.navigation, #header #navbar .panel-activation {
#header .logo h3, #header .logo ul.social-icons, #header .search-box, #header #navbar ul.navigation, #header #navbar .panel-activation {
position: relative;
top: 50%;
-webkit-transform: translateY(-50%);
@ -96,6 +96,47 @@ b, strong, label, th {
height: 50%; }
#header .fa {
color: #000; }
#header .search-box {
display: block;
float: right;
text-align: right; }
#header .search-box i {
color: #FFFFFF;
position: absolute;
top: 0.5rem;
right: 0.6rem;
z-index: -1;
cursor: pointer; }
#header .search-box input::-webkit-search-decoration,
#header .search-box input::-webkit-search-cancel-button {
display: none; }
#header .search-box input[type=search] {
outline: none;
cursor: pointer;
-webkit-appearance: textfield;
-webkit-box-sizing: content-box;
font-family: inherit;
font-size: 100%;
border: 0 none;
box-shadow: none;
color: transparent;
background: transparent;
width: 4rem;
height: 1.3rem;
margin-bottom: 0;
font-size: 0.9rem;
-webkit-transition: all 0.5s;
-moz-transition: all 0.5s;
transition: all 0.5s; }
#header .search-box input[type=search]:focus {
width: 10rem;
background-color: rgba(255, 255, 255, 0.3);
cursor: auto;
color: #FFFFFF; }
#header .search-box input:-moz-placeholder {
color: transparent; }
#header .search-box input::-webkit-input-placeholder {
color: transparent; }
#header #navbar {
font-size: 1.1rem; }
#header #navbar ul {

File diff suppressed because one or more lines are too long

View File

@ -1,18 +1,18 @@
// Header styling
#header {
@extend .padding-horiz;
position: absolute;
z-index: 10;
width: 100%;
height: $header-height;
background-color: rgba(255,255,255,0.90);
box-shadow: 0 0.05rem 1rem rgba(0,0,0, 0.15);
@extend .padding-horiz;
position: absolute;
z-index: 10;
width: 100%;
height: $header-height;
background-color: rgba(255,255,255,0.90);
box-shadow: 0 0.05rem 1rem rgba(0,0,0, 0.15);
// set heights for vertical centering
> .grid, .logo, #navbar, .social-navigation {
height: 50%;
}
// set heights for vertical centering
> .grid, .logo, #navbar, .social-navigation {
height: 50%;
}
.fa {
color: $black;
}
@ -28,99 +28,149 @@
}
}
#navbar {
font-size: $core-font-size + 0.1rem;
ul {
.search-box {
@extend %vertical-align;
display: block;
float: right;
text-align: right;
i {
color: $header-text;
position: absolute;
top: 0.5rem;
right: 0.6rem;
z-index: -1;
cursor: pointer;
}
input::-webkit-search-decoration,
input::-webkit-search-cancel-button {
display: none;
}
input[type=search] {
outline: none;
cursor: pointer;
-webkit-appearance: textfield;
-webkit-box-sizing: content-box;
font-family: inherit;
font-size: 100%;
border: 0 none;
box-shadow: none;
color: transparent;
background: transparent;
width: 4rem;
height: 1.3rem;
margin-bottom: 0;
font-size: $core-font-size - 0.1rem;
@include transition(all .5s);
margin: 0;
padding: 0;
list-style: none;
&:focus {
width: 10rem;
background-color: transparentize($header-text, 0.7);
cursor: auto;
color: $header-text;
}
}
&.navigation {
@extend %vertical-align;
display: inline-block;
float: left;
li {
float: left;
position: relative;
input:-moz-placeholder {
color: transparent;
}
input::-webkit-input-placeholder {
color: transparent;
}
}
#navbar {
font-size: $core-font-size + 0.1rem;
ul {
margin: 0;
padding: 0;
list-style: none;
&.navigation {
@extend %vertical-align;
display: inline-block;
float: left;
li {
float: left;
position: relative;
text-transform: uppercase;
a {
font-family: $font-family-header;
display: inline-block;
padding: 0.3rem 0.8rem;
a {
font-family: $font-family-header;
display: inline-block;
padding: 0.3rem 0.8rem;
&.active, &:hover {
color: $core-accent;
}
}
&.active, &:hover {
color: $core-accent;
}
}
&:first-child a {
padding-left: 0;
}
// Dropdown Menu Styles
ul {
display: none;
padding: 0;
box-shadow: 0 0.05rem 1rem rgba(0,0,0, 0.15) !important;
}
// Dropdown Menu Styles
ul {
display: none;
padding: 0;
box-shadow: 0 0.05rem 1rem rgba(0,0,0, 0.15) !important;
}
ul ul {
left: 100%;
top: 0;
}
ul ul {
left: 100%;
top: 0;
}
&:hover {
& > ul {
display: block;
position: absolute;
background: rgba($white, 0.9);
width: 10rem;
}
&:hover {
& > ul {
display: block;
position: absolute;
background: rgba($white, 0.9);
width: 10rem;
}
li {
float: none;
margin: 0;
padding: 0;
li {
float: none;
margin: 0;
padding: 0;
a {
padding: 0.5rem 0.8rem;
display: block;
a {
padding: 0.5rem 0.8rem;
display: block;
&:before, &:after {
display: none;
}
}
&:before, &:after {
display: none;
}
}
&.active {
& > a {
background: $core-accent;
color: $white;
}
}
}
}
}
@include breakpoint(desktop-only) {
display: none;
}
}
}
&.active {
& > a {
background: $core-accent;
color: $white;
}
}
}
}
}
@include breakpoint(desktop-only) {
display: none;
}
}
}
.panel-activation {
@extend %vertical-align;
padding: 1rem;
display: none;
font-size: 1.8rem;
cursor: pointer;
float: right;
@include breakpoint(desktop-only) {
display: inline-block;
}
}
.panel-activation {
@extend %vertical-align;
padding: 1rem;
display: none;
font-size: 1.8rem;
cursor: pointer;
float: right;
@include breakpoint(desktop-only) {
display: inline-block;
}
}
}
}
}
@ -138,7 +188,7 @@
}
}
.listing-row:last-child {
margin-bottom: 2rem;
margin-bottom: 2rem;
}
#body {
@ -149,7 +199,7 @@
}
#breadcrumbs {
margin-top: 1rem;
margin-top: 1rem;
}
#header {
@ -163,7 +213,7 @@
color: $header-text;
}
a:before, a:after {
background-color: rgba($header-text,0.7) !important;
background-color: rgba($header-text,0.7) !important;
}
#navbar ul.navigation {

View File

@ -2,7 +2,6 @@
.modular {
.footer {
font-size: $core-font-size - 0.1rem;
background: #333;
width: 100%;
@extend .padding-horiz;

View File

@ -30,15 +30,17 @@
{% if show_onpage_menu %}
<ul class="navigation">
{% for module in page.collection() %}
{% set current_module = (module.active or module.activeChild) ? 'active' : '' %}
<li class="{{ current_module }}"><a href="#{{ _self.pageLinkName(module.menu) }}">{{ module.menu }}</a></li>
{% endfor %}
</ul>
</ul>
{% else %}
{{ parent() }}
{% endif %}
{% include 'partials/search.html.twig' %}
{% endblock %}
{% block content %}

View File

@ -0,0 +1,4 @@
<form class="search-box">
<input type="search">
<i class="fa fa-search"></i>
</form>