Remove layout button & expose layout method (#126)
* Remove toggle layout button * Expose toggle layout methodpull/127/head
parent
c9f81d72e1
commit
5e1e7bd279
|
@ -1,7 +1,4 @@
|
||||||
<header>
|
<header>
|
||||||
<div ng-if="toggleLayoutVisible()" class="layout-toggle" ng-cloak>
|
|
||||||
<button class="btn btn-sm btn-secondary" ng-click="toggleLayout()">Layout: {{ layout }}</button>
|
|
||||||
</div>
|
|
||||||
<div ng-if="layout === 'do'" ng-cloak>
|
<div ng-if="layout === 'do'" ng-cloak>
|
||||||
<div class="hero container">
|
<div class="hero container">
|
||||||
<h1>NGINX Config</h1>
|
<h1>NGINX Config</h1>
|
||||||
|
|
|
@ -832,11 +832,7 @@
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
$scope.toggleLayoutVisible = function() {
|
$window.toggleLayout = function() {
|
||||||
return $window.location.hostname !== 'nginxconfig.io';
|
|
||||||
};
|
|
||||||
|
|
||||||
$scope.toggleLayout = function() {
|
|
||||||
if ($scope.layout === 'default') {
|
if ($scope.layout === 'default') {
|
||||||
$scope.layout = 'do';
|
$scope.layout = 'do';
|
||||||
$scope.tabs_site.unshift({
|
$scope.tabs_site.unshift({
|
||||||
|
@ -847,6 +843,7 @@
|
||||||
$scope.layout = 'default';
|
$scope.layout = 'default';
|
||||||
$scope.tabs_site.shift();
|
$scope.tabs_site.shift();
|
||||||
}
|
}
|
||||||
|
doMasonry();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -1348,7 +1345,7 @@
|
||||||
initMasonry();
|
initMasonry();
|
||||||
|
|
||||||
if ($window.LAYOUT && $window.LAYOUT !== $scope.layout) {
|
if ($window.LAYOUT && $window.LAYOUT !== $scope.layout) {
|
||||||
$scope.toggleLayout();
|
$window.toggleLayout();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,7 +7,6 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
header {
|
header {
|
||||||
position: relative;
|
|
||||||
background-color: #000;
|
background-color: #000;
|
||||||
padding: 0.5rem 0;
|
padding: 0.5rem 0;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
@ -15,18 +14,6 @@ header {
|
||||||
color: #fff;
|
color: #fff;
|
||||||
font-size: 2.2rem;
|
font-size: 2.2rem;
|
||||||
|
|
||||||
.layout-toggle {
|
|
||||||
position: absolute;
|
|
||||||
right: 10px;
|
|
||||||
top: 0;
|
|
||||||
z-index: 100;
|
|
||||||
opacity: 0.75;
|
|
||||||
|
|
||||||
.btn {
|
|
||||||
outline: none;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.container {
|
.container {
|
||||||
position: relative;
|
position: relative;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue