navigation menu update; other

This commit is contained in:
tmshv committed 2016-03-04 15:45:11 +03:00
1 parent f07c39c317
commit e68cfd7b2c
9 files changed
+19 -54

No files matched your search

+2 -1
View File
@@ -3,7 +3,8 @@ import template from '../../templates/components/navigation.html';
export default function (app) { export default function (app) {
app.component('navigation', { app.component('navigation', {
bindings: { bindings: {
menu: '<' menu: '<',
rightText: '@'
}, },
template: template, template: template,
controllerAs: '$' controllerAs: '$'
+2 -2
View File
@@ -4,7 +4,7 @@ const nbsp = 0xA0;
export const mobileMatchSelector = '(max-device-width: 30em)'; export const mobileMatchSelector = '(max-device-width: 30em)';
export let contacts = { export const contacts = {
telephone: '+7 (81362) 76-312', telephone: '+7 (81362) 76-312',
email: 'hudozka@gmail.com', email: 'hudozka@gmail.com',
address: ['г. Шлиссельбург', 'ул. 18 января', 'д. 3'] address: ['г. Шлиссельбург', 'ул. 18 января', 'д. 3']
@@ -12,7 +12,7 @@ export let contacts = {
.join(' ') .join(' ')
}; };
export let collectiveSortPattern = [ export const collectiveSortPattern = [
'mg-timasheva', 'mg-timasheva',
'va-sarzhin', 'va-sarzhin',
'od-gogoleva', 'od-gogoleva',
+2 -1
View File
@@ -1,4 +1,4 @@
import {footer, mobileMatchSelector} from '../config'; import {footer, mobileMatchSelector, contacts} from '../config';
export default function (app) { export default function (app) {
app.controller('AppController', ($scope, menu) => { app.controller('AppController', ($scope, menu) => {
@@ -12,6 +12,7 @@ export default function (app) {
$scope.navigation = 'main-menu'; $scope.navigation = 'main-menu';
} }
$scope.phone = contacts.telephone;
$scope.menuProvider = menu.items; $scope.menuProvider = menu.items;
$scope.footer = footer; $scope.footer = footer;
}); });
+1 -20
View File
@@ -1,15 +1,7 @@
@import "../variables"; @import "../variables";
.main-menu { .main-menu {
-webkit-overflow-scrolling: touch;
width: 100%;
z-index: 100;
overflow-x: scroll;
position: fixed;
top: 0;
white-space: nowrap; white-space: nowrap;
background-color: rgba(255, 255, 255, 0.95);
font-size: 1.1em; font-size: 1.1em;
color: $menu-inactive-item-color; color: $menu-inactive-item-color;
@@ -30,14 +22,7 @@
text-decoration: none; text-decoration: none;
color: $dark-color; color: $dark-color;
//border-bottom: 1px solid darken($light-color, 50%);
border-bottom: 1px solid lighten($dark-color, 60%); border-bottom: 1px solid lighten($dark-color, 60%);
//&:hover {
// color: $dark-color;
//
// border-bottom: 1px solid darken($lighter-color, 50%);
//}
} }
.selected { .selected {
@@ -77,11 +62,7 @@
} }
@media (max-width: $mobile-width) { @media (max-width: $mobile-width) {
header{
overflow: hidden;
}
.main-menu{ .main-menu{
background-color: white; font-size: 1em;
} }
} }
+7 -17
View File
@@ -9,7 +9,8 @@
position: fixed; position: fixed;
top: 0; top: 0;
white-space: nowrap; white-space: nowrap;
background-color: $darker-color;
background-color: rgba(255, 255, 255, 0.95);
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
@@ -17,30 +18,19 @@
} }
.navigation__right { .navigation__right {
color: $light-color; color: $dark-color;
margin-right: 3em; margin-right: 1em;
z-index:1000; z-index: 1000;
} }
@media (max-width: $mobile-width) { @media (max-width: $mobile-width) {
.navigation { .navigation {
overflow: hidden; background-color: white;
width: 100%;
z-index: 100;
position: relative;
top: 0;
display: block;
//display: flex;
//justify-content: flex-start;
//align-items: center;
} }
.navigation__right { .navigation__right {
//display: none; padding: 0 $single-margin;
//margin-right: 0;
} }
} }
+2 -2
View File
@@ -24,11 +24,11 @@
h1 { h1 {
margin-top: $single-margin; margin-top: $single-margin;
font-size: 1.5em; font-size: 2em;
} }
} }
@media (min-width: $mobile-width) { @media (max-width: $mobile-width) {
.hudozka-title { .hudozka-title {
text-align: center; text-align: center;
+1 -1
View File
@@ -2,6 +2,6 @@
<main-menu items="$.menu"></main-menu> <main-menu items="$.menu"></main-menu>
<div class="navigation__right"> <div class="navigation__right">
<span>+7 (81362) 76-312</span> <span>{{$.rightText}}</span>
</div> </div>
</div> </div>
+1 -1
View File
@@ -6,7 +6,7 @@
<div class="content content_thin"> <div class="content content_thin">
<div class="hudozka-title"> <div class="hudozka-title">
<p>МБОУДОД</p> <p>МБУДО</p>
<h1>Шлиссельбургская детская художественная&nbsp;школа</h1> <h1>Шлиссельбургская детская художественная&nbsp;школа</h1>
</div> </div>
<!--<div class="main-block">--> <!--<div class="main-block">-->
+1 -9
View File
@@ -47,16 +47,8 @@
<body> <body>
<div class="body-wrapper" ng-controller="AppController"> <div class="body-wrapper" ng-controller="AppController">
<header ng-switch="navigation"> <header ng-switch="navigation">
<main-menu items="menuProvider"></main-menu> <navigation menu="menuProvider" right-text="{{phone}}"></navigation>
</header> </header>
<!--<header ng-switch="navigation">-->
<!--<navigation menu="menuProvider"-->
<!--ng-switch-when="navigation"-->
<!--&gt;</navigation>-->
<!--&lt;!&ndash;<main-menu items="menuProvider"&ndash;&gt;-->
<!--&lt;!&ndash;ng-switch-default&ndash;&gt;-->
<!--&lt;!&ndash;&gt;</main-menu>&ndash;&gt;-->
<!--</header>-->
<div class="body-wrapper__content"> <div class="body-wrapper__content">
<ng-view class="page" autoscroll></ng-view> <ng-view class="page" autoscroll></ng-view>