added presets

fixes #14
pull/23/head
Szekeres Bálint 7 years ago
parent 11260d7ea5
commit 85c1b9e756

@ -111,6 +111,10 @@ main .options .card .form-subgroup .form-subgroup {
padding-left: 0.4rem; padding-left: 0.4rem;
} }
main .options .card .form-subgroup .form-check + .form-subgroup {
margin-left: 5.5px;
}
main .options .card .form-control[type="text"]:placeholder-shown, main .options .card .form-control[type="text"]:placeholder-shown,
main .options .card .form-control[type="email"]:placeholder-shown { main .options .card .form-control[type="email"]:placeholder-shown {
background-color: #f8f8f8; background-color: #f8f8f8;
@ -238,6 +242,19 @@ main .buttons .btn-reset img {
height: 0.9rem; height: 0.9rem;
} }
main .presets {
text-align: center;
margin-bottom: 0.5rem;
}
main .presets .btn img {
height: 1.1rem;
vertical-align: text-bottom;
}
main .presets .btn.btn-outline-dark:hover {
background-color: #666;
}
/* /*

@ -0,0 +1 @@
<svg aria-labelledby="simpleicons-angular-icon" role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><title id="simpleicons-angular-icon">Angular icon</title><path d="M9.93 12.645h4.134L11.996 7.74"/><path d="M11.996.009L.686 3.988l1.725 14.76 9.585 5.243 9.588-5.238L23.308 3.99 11.996.01zm7.058 18.297h-2.636l-1.42-3.501H8.995l-1.42 3.501H4.937l7.06-15.648 7.057 15.648z"/></svg>

After

Width:  |  Height:  |  Size: 395 B

@ -0,0 +1 @@
<svg aria-labelledby="simpleicons-codeigniter-icon" role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><title id="simpleicons-codeigniter-icon">CodeIgniter icon</title><path d="M8.49 24c-1.54-.68-2.586-2.146-2.723-3.824.09-1.727 1.002-3.305 2.45-4.246-.238.58-.18 1.24.15 1.77.376.525 1.022.777 1.655.646.902-.254 1.43-1.19 1.176-2.092-.09-.316-.27-.602-.516-.818-1.02-.83-1.532-2.133-1.35-3.436.175-.69.557-1.314 1.096-1.785-.405 1.08.737 2.146 1.504 2.67 1.36.816 2.67 1.713 3.924 2.686 1.37 1.08 2.117 2.77 2 4.5-.308 1.84-1.61 3.36-3.385 3.93 3.55-.79 7.21-3.61 7.28-7.61-.07-3.2-1.98-6.072-4.9-7.38h-.13c.065.157.096.326.09.496.01-.11.01-.22 0-.33.016.13.016.26 0 .39-.222.91-1.14 1.47-2.052 1.248-.364-.09-.69-.295-.924-.59-1.17-1.5 0-3.207.196-4.857.12-2.11-.844-4.127-2.554-5.36.856 1.427-.284 3.3-1.113 4.366-.83 1.066-2.03 1.86-3.008 2.79-1.054.98-2.02 2.058-2.887 3.21-1.874 2.29-2.61 5.31-2 8.205.836 2.79 3.155 4.886 6.015 5.43H8.5z"/></svg>

After

Width:  |  Height:  |  Size: 970 B

@ -0,0 +1 @@
<svg aria-labelledby="simpleicons-laravel-icon" role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><title id="simpleicons-laravel-icon">Laravel icon</title><path d="M6.462 13.274l13.7-3.282c-.758-1.077-4.205-5.963-4.537-6.427-.375-.524.008-.769.617-.87.608-.104 5.85-.984 6.298-1.049.377-.055.69-.177 1.212.307C23.272.811 22.139.008 20.819.008H3.197C1.644.008.353 1.117.074 2.59l6.388 10.684z"/><path d="M22.737 2.882c-.206.044-4.765.869-5.045.907-.28.037-.188.194-.074.355l4.011 5.502L24 9.063V3.932c-.33-.42-.569-.729-.626-.811-.255-.344-.432-.287-.637-.239M24 15.129c-1.165-1.598-2.436-3.336-2.557-3.508-.166-.24-.255-.285-.648-.159L7.439 14.939s4.1 7.104 4.414 7.554c.315.456.508.418.753.314.181-.08 7.796-2.654 11.393-3.872v-3.803l.001-.003zm0-2.35v-2.008l-1.25.334L24 12.779m-8.199 11.213h5.019c1.675 0 3.047-1.294 3.171-2.936-2.563.927-5.883 2.114-8.191 2.936M5.547 15.43L0 16.875v3.936c.017 1.757 1.441 3.182 3.195 3.182h7.194c-.941-1.537-3.503-6.153-4.833-8.563m-1.12-2.069L.017 5.729v9.098l4.328-1.033c.353-.082.269-.128.095-.432"/><path d="M22.645 10.959L24 10.591v.63l-.929.311-.426-.573z"/></svg>

After

Width:  |  Height:  |  Size: 1.1 KiB

@ -0,0 +1 @@
<svg aria-labelledby="simpleicons-php-icon" role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><title id="simpleicons-php-icon">PHP icon</title><path d="M7.01 10.207h-.944l-.515 2.648h.838c.556 0 .97-.105 1.242-.314.272-.21.455-.559.55-1.049.092-.47.05-.802-.124-.995-.175-.193-.523-.29-1.047-.29z"/><path d="M12 5.688C5.373 5.688 0 8.514 0 12s5.373 6.313 12 6.313S24 15.486 24 12c0-3.486-5.373-6.312-12-6.312zm-3.26 7.451c-.261.25-.575.438-.917.551-.336.108-.765.164-1.285.164H5.357l-.327 1.681H3.652l1.23-6.326h2.65c.797 0 1.378.209 1.744.628.366.418.476 1.002.33 1.752a2.836 2.836 0 0 1-.305.847c-.143.255-.33.49-.561.703zm4.024.715l.543-2.799c.063-.318.039-.536-.068-.651-.107-.116-.336-.174-.687-.174H11.46l-.704 3.625H9.388l1.23-6.327h1.367l-.327 1.682h1.218c.767 0 1.295.134 1.586.401s.378.7.263 1.299l-.572 2.944h-1.389zm7.597-2.265a2.782 2.782 0 0 1-.305.847c-.143.255-.33.49-.561.703a2.44 2.44 0 0 1-.917.551c-.336.108-.765.164-1.286.164h-1.18l-.327 1.682h-1.378l1.23-6.326h2.649c.797 0 1.378.209 1.744.628.366.417.477 1.001.331 1.751z"/><path d="M17.766 10.207h-.943l-.516 2.648h.838c.557 0 .971-.105 1.242-.314.272-.21.455-.559.551-1.049.092-.47.049-.802-.125-.995s-.524-.29-1.047-.29z"/></svg>

After

Width:  |  Height:  |  Size: 1.2 KiB

@ -0,0 +1 @@
<svg aria-labelledby="simpleicons-react-icon" role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><title id="simpleicons-react-icon">React icon</title><circle cx="12" cy="12" r="2.139"/><path d="M6.008 16.255l-.472-.12C2.018 15.246 0 13.737 0 11.996s2.018-3.25 5.536-4.139l.472-.119.133.468a23.53 23.53 0 0 0 1.363 3.578l.101.213-.101.213a23.307 23.307 0 0 0-1.363 3.578l-.133.467zM5.317 8.95c-2.674.751-4.315 1.9-4.315 3.046 0 1.145 1.641 2.294 4.315 3.046a24.95 24.95 0 0 1 1.182-3.046A24.752 24.752 0 0 1 5.317 8.95zM17.992 16.255l-.133-.469a23.357 23.357 0 0 0-1.364-3.577l-.101-.213.101-.213a23.42 23.42 0 0 0 1.364-3.578l.133-.468.473.119c3.517.889 5.535 2.398 5.535 4.14s-2.018 3.25-5.535 4.139l-.473.12zm-.491-4.259c.48 1.039.877 2.06 1.182 3.046 2.675-.752 4.315-1.901 4.315-3.046 0-1.146-1.641-2.294-4.315-3.046a24.788 24.788 0 0 1-1.182 3.046z"/><path d="M5.31 8.945l-.133-.467C4.188 4.992 4.488 2.494 6 1.622c1.483-.856 3.864.155 6.359 2.716l.34.349-.34.349a23.552 23.552 0 0 0-2.422 2.967l-.135.193-.235.02a23.657 23.657 0 0 0-3.785.61l-.472.119zm1.896-6.63c-.268 0-.505.058-.705.173-.994.573-1.17 2.565-.485 5.253a25.122 25.122 0 0 1 3.233-.501 24.847 24.847 0 0 1 2.052-2.544c-1.56-1.519-3.037-2.381-4.095-2.381zM16.795 22.677c-.001 0-.001 0 0 0-1.425 0-3.255-1.073-5.154-3.023l-.34-.349.34-.349a23.53 23.53 0 0 0 2.421-2.968l.135-.193.234-.02a23.63 23.63 0 0 0 3.787-.609l.472-.119.134.468c.987 3.484.688 5.983-.824 6.854a2.38 2.38 0 0 1-1.205.308zm-4.096-3.381c1.56 1.519 3.037 2.381 4.095 2.381h.001c.267 0 .505-.058.704-.173.994-.573 1.171-2.566.485-5.254a25.02 25.02 0 0 1-3.234.501 24.674 24.674 0 0 1-2.051 2.545z"/><path d="M18.69 8.945l-.472-.119a23.479 23.479 0 0 0-3.787-.61l-.234-.02-.135-.193a23.414 23.414 0 0 0-2.421-2.967l-.34-.349.34-.349C14.135 1.778 16.515.767 18 1.622c1.512.872 1.812 3.37.824 6.855l-.134.468zM14.75 7.24c1.142.104 2.227.273 3.234.501.686-2.688.509-4.68-.485-5.253-.988-.571-2.845.304-4.8 2.208A24.849 24.849 0 0 1 14.75 7.24zM7.206 22.677A2.38 2.38 0 0 1 6 22.369c-1.512-.871-1.812-3.369-.823-6.854l.132-.468.472.119c1.155.291 2.429.496 3.785.609l.235.02.134.193a23.596 23.596 0 0 0 2.422 2.968l.34.349-.34.349c-1.898 1.95-3.728 3.023-5.151 3.023zm-1.19-6.427c-.686 2.688-.509 4.681.485 5.254.987.563 2.843-.305 4.8-2.208a24.998 24.998 0 0 1-2.052-2.545 24.976 24.976 0 0 1-3.233-.501z"/><path d="M12 16.878c-.823 0-1.669-.036-2.516-.106l-.235-.02-.135-.193a30.388 30.388 0 0 1-1.35-2.122 30.354 30.354 0 0 1-1.166-2.228l-.1-.213.1-.213a30.3 30.3 0 0 1 1.166-2.228c.414-.716.869-1.43 1.35-2.122l.135-.193.235-.02a29.785 29.785 0 0 1 5.033 0l.234.02.134.193a30.006 30.006 0 0 1 2.517 4.35l.101.213-.101.213a29.6 29.6 0 0 1-2.517 4.35l-.134.193-.234.02c-.847.07-1.694.106-2.517.106zm-2.197-1.084c1.48.111 2.914.111 4.395 0a29.006 29.006 0 0 0 2.196-3.798 28.585 28.585 0 0 0-2.197-3.798 29.031 29.031 0 0 0-4.394 0 28.477 28.477 0 0 0-2.197 3.798 29.114 29.114 0 0 0 2.197 3.798z"/></svg>

After

Width:  |  Height:  |  Size: 2.9 KiB

@ -0,0 +1 @@
<svg aria-labelledby="simpleicons-symfony-icon" role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><title id="simpleicons-symfony-icon">Symfony icon</title><path d="M24 12c0 6.628-5.372 12-12 12S0 18.628 0 12 5.372 0 12 0s12 5.372 12 12zm-6.753-7.561c-1.22.042-2.283.715-3.075 1.644-.878 1.02-1.461 2.229-1.881 3.461-.753-.614-1.332-1.414-2.539-1.761-.966-.297-2.015-.105-2.813.514-.41.319-.71.757-.861 1.254-.36 1.176.381 2.225.719 2.6l.737.79c.15.154.519.56.339 1.138-.193.631-.951 1.037-1.732.799-.348-.106-.848-.366-.734-.73.045-.15.152-.263.21-.391.052-.11.077-.194.095-.242.141-.465-.053-1.07-.551-1.223-.465-.143-.939-.03-1.125.566-.209.68.117 1.913 1.86 2.449 2.04.628 3.765-.484 4.009-1.932.153-.907-.255-1.582-1.006-2.447l-.612-.677c-.371-.37-.497-1.002-.114-1.485.324-.409.785-.584 1.539-.379 1.103.3 1.594 1.063 2.412 1.68-.338 1.11-.56 2.223-.759 3.222l-.123.746c-.585 3.07-1.033 4.757-2.194 5.726-.234.166-.57.416-1.073.434-.266.005-.352-.176-.355-.257-.006-.184.15-.271.255-.353.154-.083.39-.224.372-.674-.016-.532-.456-.994-1.094-.973-.477.017-1.203.465-1.176 1.286.028.85.819 1.485 2.012 1.444.638-.021 2.062-.281 3.464-1.949 1.633-1.911 2.09-4.101 2.434-5.706l.383-2.116c.213.024.441.042.69.048 2.032.044 3.049-1.01 3.064-1.776.01-.464-.304-.921-.744-.91-.386.009-.718.278-.806.654-.094.428.646.813.068 1.189-.41.266-1.146.452-2.184.3l.188-1.042c.386-1.976.859-4.407 2.661-4.467.132-.007.612.006.623.323.003.105-.022.134-.147.375-.115.155-.174.345-.168.537.017.504.4.836.957.816.743-.023.955-.748.945-1.119-.032-.874-.952-1.424-2.17-1.386z"/></svg>

After

Width:  |  Height:  |  Size: 1.5 KiB

@ -0,0 +1 @@
<svg aria-labelledby="simpleicons-vuejs-icon" role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><title id="simpleicons-vuejs-icon">Vue.js icon</title><path d="M19.197 1.608l.003-.006h-4.425L12 6.4v.002l-2.772-4.8H4.803v.005H0l12 20.786L24 1.608"/></svg>

After

Width:  |  Height:  |  Size: 270 B

@ -0,0 +1 @@
<svg aria-labelledby="simpleicons-wordpress-icon" role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><title id="simpleicons-wordpress-icon">WordPress icon</title><path d="M21.469 6.825c.84 1.537 1.318 3.3 1.318 5.175 0 3.979-2.156 7.456-5.363 9.325l3.295-9.527c.615-1.54.82-2.771.82-3.864 0-.405-.026-.78-.07-1.11m-7.981.105c.647-.03 1.232-.105 1.232-.105.582-.075.514-.93-.067-.899 0 0-1.755.135-2.88.135-1.064 0-2.85-.15-2.85-.15-.585-.03-.661.855-.075.885 0 0 .54.061 1.125.09l1.68 4.605-2.37 7.08L5.354 6.9c.649-.03 1.234-.1 1.234-.1.585-.075.516-.93-.065-.896 0 0-1.746.138-2.874.138-.2 0-.438-.008-.69-.015C4.911 3.15 8.235 1.215 12 1.215c2.809 0 5.365 1.072 7.286 2.833-.046-.003-.091-.009-.141-.009-1.06 0-1.812.923-1.812 1.914 0 .89.513 1.643 1.06 2.531.411.72.89 1.643.89 2.977 0 .915-.354 1.994-.821 3.479l-1.075 3.585-3.9-11.61.001.014zM12 22.784c-1.059 0-2.081-.153-3.048-.437l3.237-9.406 3.315 9.087c.024.053.05.101.078.149-1.12.393-2.325.609-3.582.609M1.211 12c0-1.564.336-3.05.935-4.39L7.29 21.709C3.694 19.96 1.212 16.271 1.211 12M12 0C5.385 0 0 5.385 0 12s5.385 12 12 12 12-5.385 12-12S18.615 0 12 0"/></svg>

After

Width:  |  Height:  |  Size: 1.1 KiB

@ -274,6 +274,32 @@
}); });
}; };
$scope.setPreset = function(preset) {
$scope.data.php = data.php;
$scope.data.wordpress = data.wordpress;
$scope.data.index = data.index;
$scope.data.fallback_html = data.fallback_html;
switch(preset) {
case 'frontend':
$scope.data.php = 'off';
$scope.data.index = 'index.html';
$scope.data.fallback_html = true;
break;
case 'spa':
$scope.data.index = 'index.html';
$scope.data.fallback_html = true;
break;
case 'wordpress':
$scope.data.wordpress = true;
break;
}
gtag('event', preset, {
event_category: 'preset',
});
};
/////////////////////////// ///////////////////////////

@ -26,6 +26,12 @@
</header> </header>
<main> <main>
<div class="container-fluid"> <div class="container-fluid">
<div class="presets">
<button type="button" class="btn btn-sm btn-outline-dark" ng-click="setPreset('frontend')" tooltips tooltip-template="• disabled PHP<br>• index.html fallback routing" tooltip-side="bottom">Frontend <img src="assets/img/angular.svg" alt="Angular"> <img src="assets/img/react.svg" alt="React"> <img src="assets/img/vuejs.svg" alt="Vue.js"></button>
<button type="button" class="btn btn-sm btn-outline-dark" ng-click="setPreset('backend')" tooltips tooltip-template="• enabled PHP<br>• index.php fallback routing" tooltip-side="bottom">Backend <img src="assets/img/php.svg" alt="PHP"> <img src="assets/img/laravel.svg" alt="Laravel"> <img src="assets/img/symfony.svg" alt="Symfony"> <img src="assets/img/codeigniter.svg" alt="CodeIgniter"></button>
<button type="button" class="btn btn-sm btn-outline-dark" ng-click="setPreset('spa')" tooltips tooltip-template="• enabled PHP<br>• index.html fallback routing<br>• index.php API routing" tooltip-side="bottom">Single-page application</button>
<button type="button" class="btn btn-sm btn-outline-dark" ng-click="setPreset('wordpress')" tooltips tooltip-template="• enabled PHP<br>• index.php fallback routing<br>• WordPress security rules" tooltip-side="bottom">WordPress <img src="assets/img/wordpress.svg" alt="WordPress"></button>
</div>
<div class="row"> <div class="row">
<div class="col-md-3 col-lg-2 options"> <div class="col-md-3 col-lg-2 options">
<div class="adsbygoogle-container d-block d-md-none"> <div class="adsbygoogle-container d-block d-md-none">

Loading…
Cancel
Save