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);
|
||||
},
|
||||
},
|
||||
};
|
||||
});
|
||||
|
||||
})();
|
||||
|
|
|
@ -41,4 +41,4 @@ gzip on;
|
|||
gzip_vary on;
|
||||
gzip_proxied any;
|
||||
gzip_comp_level 6;
|
||||
gzip_types {{ gzipTypes }};</span>
|
||||
gzip_types {{ gzipTypes }};</span>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
location ^~ /.well-known/acme-challenge/ {
|
||||
default_type "text/plain";
|
||||
root /var/www/_letsencrypt;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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,4 +20,4 @@ fastcgi_busy_buffers_size 256k;
|
|||
fastcgi_temp_file_write_size 256k;
|
||||
|
||||
# default fastcgi_params
|
||||
include fastcgi_params;
|
||||
include fastcgi_params;
|
||||
|
|
|
@ -21,4 +21,4 @@ ssl_stapling on;
|
|||
ssl_stapling_verify on;
|
||||
|
||||
resolver 8.8.8.8 8.8.4.4 208.67.222.222 208.67.220.220 valid=60s;
|
||||
resolver_timeout 2s;
|
||||
resolver_timeout 2s;
|
||||
|
|
|
@ -27,4 +27,4 @@ location ~* ^/(?:xmlrpc\.php|wp-config\.php|wp-config-sample\.php|wp-comments-po
|
|||
location = /wp-login.php {
|
||||
limit_req zone=login burst=2 nodelay;
|
||||
include _php_fastcgi.conf;
|
||||
}</span>
|
||||
}</span>
|
||||
|
|
|
@ -15,19 +15,19 @@ server {
|
|||
location / {
|
||||
try_files $uri $uri/ {{ data.index_html ? '/index.html' : '' }}{{ data.index_html && data.php !== 'off' && data.index_php ? ' ' : '' }}{{ data.php !== 'off' && data.index_php ? '/index.php?$query_string' : '' }};
|
||||
}</span>
|
||||
<span ng-if="data.file_structure === 'separated'">
|
||||
<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>
|
||||
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">
|
||||
|
@ -88,9 +88,9 @@ server {
|
|||
listen [::]:80;
|
||||
|
||||
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>
|
||||
<span ng-if="data.file_structure === 'separated'">
|
||||
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 {
|
||||
|
@ -105,15 +105,15 @@ server {
|
|||
location / {
|
||||
try_files $uri $uri/ {{ data.index_html ? '/index.html' : '' }}{{ data.index_html && data.php !== 'off' && data.index_php ? ' ' : '' }}{{ data.php !== 'off' && data.index_php ? '/index.php?$query_string' : '' }};
|
||||
}</span>
|
||||
<span ng-if="data.file_structure === 'separated'">
|
||||
<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
|
||||
|
@ -152,4 +152,4 @@ server {
|
|||
server_name {{ !data.non_www ? data.domain + ' ' : '' }}*.{{ data.domain }};
|
||||
|
||||
return 301 http://{{ !data.non_www ? 'www.' : '' }}{{ data.domain }}$request_uri;
|
||||
}</span>
|
||||
}</span>
|
||||
|
|
|
@ -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