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>
|
||||
<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 class="hero container">
|
||||
<h1>NGINX Config</h1>
|
||||
|
|
|
@ -832,11 +832,7 @@
|
|||
}
|
||||
};
|
||||
|
||||
$scope.toggleLayoutVisible = function() {
|
||||
return $window.location.hostname !== 'nginxconfig.io';
|
||||
};
|
||||
|
||||
$scope.toggleLayout = function() {
|
||||
$window.toggleLayout = function() {
|
||||
if ($scope.layout === 'default') {
|
||||
$scope.layout = 'do';
|
||||
$scope.tabs_site.unshift({
|
||||
|
@ -847,6 +843,7 @@
|
|||
$scope.layout = 'default';
|
||||
$scope.tabs_site.shift();
|
||||
}
|
||||
doMasonry();
|
||||
};
|
||||
|
||||
|
||||
|
@ -1348,7 +1345,7 @@
|
|||
initMasonry();
|
||||
|
||||
if ($window.LAYOUT && $window.LAYOUT !== $scope.layout) {
|
||||
$scope.toggleLayout();
|
||||
$window.toggleLayout();
|
||||
}
|
||||
};
|
||||
}
|
||||
|
|
|
@ -7,7 +7,6 @@
|
|||
}
|
||||
|
||||
header {
|
||||
position: relative;
|
||||
background-color: #000;
|
||||
padding: 0.5rem 0;
|
||||
text-align: center;
|
||||
|
@ -15,18 +14,6 @@ header {
|
|||
color: #fff;
|
||||
font-size: 2.2rem;
|
||||
|
||||
.layout-toggle {
|
||||
position: absolute;
|
||||
right: 10px;
|
||||
top: 0;
|
||||
z-index: 100;
|
||||
opacity: 0.75;
|
||||
|
||||
.btn {
|
||||
outline: none;
|
||||
}
|
||||
}
|
||||
|
||||
.container {
|
||||
position: relative;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue