tabulation fixes
parent
dd68346e29
commit
fe9c15fc1f
|
@ -9,5 +9,3 @@ end_of_line = lf
|
|||
insert_final_newline = true
|
||||
trim_trailing_whitespace = true
|
||||
|
||||
[*.conf.html]
|
||||
insert_final_newline = false
|
||||
|
|
|
@ -102,6 +102,14 @@ main .file .code pre code {
|
|||
overflow-x: visible;
|
||||
}
|
||||
|
||||
main .file .code pre code span.include {
|
||||
white-space: pre-line;
|
||||
}
|
||||
|
||||
main .file .code pre code span.include ng-include {
|
||||
white-space: pre;
|
||||
}
|
||||
|
||||
main .file .code pre code ng-include {
|
||||
display: inline-block;
|
||||
}
|
||||
|
|
|
@ -127,6 +127,19 @@
|
|||
// INIT //
|
||||
//////////
|
||||
$scope.setDataFromHash();
|
||||
})
|
||||
.directive('ngIncludeTabs', function () {
|
||||
return {
|
||||
require: 'ngInclude',
|
||||
restrict: 'A',
|
||||
link: {
|
||||
pre: function preLink(scope, iElement, iAttrs, controller) {
|
||||
var tabs = parseInt(iAttrs.ngIncludeTabs || 0);
|
||||
controller.template = controller.template.replace(/^(.*)$/mg, '\t'.repeat(tabs) + '$1').replace(/\s*$/, '');
|
||||
console.log(controller);
|
||||
},
|
||||
},
|
||||
};
|
||||
});
|
||||
|
||||
})();
|
||||
|
|
|
@ -4,6 +4,6 @@ index {{ data.index_html ? 'index.html ' : '' }}index.php;
|
|||
# handle .php
|
||||
location ~ \.php$ {<span ng-if="data.file_structure === 'separated'">
|
||||
include _php_fastcgi.conf;
|
||||
</span><span ng-if="data.file_structure === 'unified'">
|
||||
<ng-include src="'templates/_php_fastcgi.conf.html'" onload="refreshHighlighting()"></ng-include></span>
|
||||
</span><span class="include" ng-if="data.file_structure === 'unified'">
|
||||
<ng-include ng-include-tabs="{{ data.file_structure === 'unified' ? 3 : 1 }}" src="'templates/_php_fastcgi.conf.html'" onload="refreshHighlighting()"></ng-include></span>
|
||||
}
|
|
@ -20,14 +20,14 @@ server {
|
|||
include _wordpress.conf;</span><span ng-if="data.php !== 'off'">
|
||||
include _php.conf;</span>
|
||||
include _letsencrypt.conf;
|
||||
include _ssl.conf;</span><span ng-if="data.file_structure === 'unified'">
|
||||
<ng-include src="'templates/_general.conf.html'" onload="refreshHighlighting()"></ng-include><span ng-if="data.php !== 'off' && data.wordpress">
|
||||
include _ssl.conf;</span><span class="include" ng-if="data.file_structure === 'unified'">
|
||||
<ng-include ng-include-tabs="2" src="'templates/_general.conf.html'" onload="refreshHighlighting()"></ng-include><span ng-if="data.php !== 'off' && data.wordpress">
|
||||
|
||||
<ng-include src="'templates/_wordpress.conf.html'" onload="refreshHighlighting()"></ng-include></span><span ng-if="data.php !== 'off'">
|
||||
<ng-include ng-include-tabs="2" src="'templates/_wordpress.conf.html'" onload="refreshHighlighting()"></ng-include></span><span ng-if="data.php !== 'off'">
|
||||
|
||||
<ng-include src="'templates/_php.conf.html'" onload="refreshHighlighting()"></ng-include></span>
|
||||
<ng-include ng-include-tabs="2" src="'templates/_php.conf.html'" onload="refreshHighlighting()"></ng-include></span>
|
||||
|
||||
<ng-include src="'templates/_letsencrypt.conf.html'" onload="refreshHighlighting()"></ng-include>
|
||||
<ng-include ng-include-tabs="2" src="'templates/_letsencrypt.conf.html'" onload="refreshHighlighting()"></ng-include></span><span ng-if="data.file_structure === 'unified'">
|
||||
|
||||
include _ssl.conf;</span>
|
||||
}<span ng-if="data.cdn">
|
||||
|
@ -89,8 +89,8 @@ server {
|
|||
|
||||
server_name {{ data.domain }} *.{{ data.domain }};
|
||||
<span ng-if="data.file_structure === 'separated'">
|
||||
include _letsencrypt.conf;</span><span ng-if="data.file_structure === 'unified'">
|
||||
<ng-include src="'templates/_letsencrypt.conf.html'" onload="refreshHighlighting()"></ng-include></span>
|
||||
include _letsencrypt.conf;</span><span class="include" ng-if="data.file_structure === 'unified'">
|
||||
<ng-include ng-include-tabs="2" src="'templates/_letsencrypt.conf.html'" onload="refreshHighlighting()"></ng-include></span>
|
||||
|
||||
return 301 https://{{ !data.non_www ? 'www.' : '' }}{{ data.domain }}$request_uri;
|
||||
}</span><span ng-if="!data.https">server {
|
||||
|
@ -108,12 +108,12 @@ server {
|
|||
<span ng-if="data.file_structure === 'separated'">
|
||||
include _general.conf;<span ng-if="data.php !== 'off' && data.wordpress">
|
||||
include _wordpress.conf;</span><span ng-if="data.php !== 'off'">
|
||||
include _php.conf;</span></span><span ng-if="data.file_structure === 'unified'">
|
||||
<ng-include src="'templates/_general.conf.html'" onload="refreshHighlighting()"></ng-include><span ng-if="data.php !== 'off' && data.wordpress">
|
||||
include _php.conf;</span></span><span class="include" ng-if="data.file_structure === 'unified'">
|
||||
<ng-include ng-include-tabs="2" src="'templates/_general.conf.html'" onload="refreshHighlighting()"></ng-include>
|
||||
|
||||
<ng-include src="'templates/_wordpress.conf.html'" onload="refreshHighlighting()"></ng-include></span><span ng-if="data.php !== 'off'">
|
||||
<ng-include ng-if="data.php !== 'off' && data.wordpress" ng-include-tabs="2" src="'templates/_wordpress.conf.html'" onload="refreshHighlighting()"></ng-include>
|
||||
|
||||
<ng-include src="'templates/_php.conf.html'" onload="refreshHighlighting()"></ng-include></span></span>
|
||||
<ng-include ng-if="data.php !== 'off'" ng-include-tabs="2" src="'templates/_php.conf.html'" onload="refreshHighlighting()"></ng-include></span>
|
||||
}<span ng-if="data.cdn">
|
||||
|
||||
# CDN
|
||||
|
|
|
@ -37,5 +37,5 @@ http {
|
|||
include /etc/nginx/conf.d/*.conf;<span ng-if="data.file_structure === 'separated'">
|
||||
include /etc/nginx/sites-enabled/*;</span><span ng-if="data.file_structure === 'unified'">
|
||||
|
||||
<ng-include src="'templates/example.com.conf.html'" onload="refreshHighlighting()"></ng-include></span>
|
||||
<ng-include ng-include-tabs="1" src="'templates/example.com.conf.html'" sonload="refreshHighlighting()"></ng-include></span>
|
||||
}
|
Loading…
Reference in New Issue