Browse Source

add homepage && add style and js root && add css autoprefixer to yarn #3

tags/Beta-1
Laszlo Lang 2 years ago
parent
commit
734bbaa631
9 changed files with 187 additions and 8 deletions
  1. +7
    -0
      assets/css/app.scss
  2. +3
    -3
      config/routes.yaml
  3. +4
    -1
      package.json
  4. +9
    -0
      postcss.config.js
  5. +21
    -0
      src/Controller/DefaultController.php
  6. +4
    -0
      templates/base.html.twig
  7. +15
    -0
      templates/default/index.html.twig
  8. +9
    -1
      webpack.config.js
  9. +115
    -3
      yarn.lock

+ 7
- 0
assets/css/app.scss View File

@@ -0,0 +1,7 @@
@-ms-viewport{
width: device-width;
}

* {
box-sizing: border-box;
}

+ 3
- 3
config/routes.yaml View File

@@ -1,3 +1,3 @@
#index:
# path: /
# controller: App\Controller\DefaultController::index
index:
path: /
controller: App\Controller\DefaultController::index

+ 4
- 1
package.json View File

@@ -1,7 +1,9 @@
{
"devDependencies": {
"@symfony/webpack-encore": "^0.19.0",
"autoprefixer": "^9.1.1",
"node-sass": "^4.9.3",
"postcss-loader": "^3.0.0",
"sass-loader": "^7.1.0",
"webpack-notifier": "^1.6.0"
},
@@ -15,5 +17,6 @@
},
"dependencies": {
"@fortawesome/fontawesome-free": "^5.2.0"
}
},
"browserslist": [ "last 7 versions", "ios >= 7" ]
}

+ 9
- 0
postcss.config.js View File

@@ -0,0 +1,9 @@
module.exports = {
plugins: {
// include whatever plugins you want
// but make sure you install these via yarn or npm!

// add browserslist config to package.json (see below)
autoprefixer: {}
}
};

+ 21
- 0
src/Controller/DefaultController.php View File

@@ -0,0 +1,21 @@
<?php

namespace App\Controller;

use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;

/**
* Class DefaultController
*
* @package App\Controller
* @author system7 <https://www.laszlolang.com>
*/
class DefaultController extends AbstractController
{
public function index()
{
return $this->render('default/index.html.twig', [
'controller_name' => 'DefaultController',
]);
}
}

+ 4
- 0
templates/base.html.twig View File

@@ -2,6 +2,10 @@
<html>
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="author" content="https://www.laszlolang.com"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<meta name="description" content="It is our choices that define us."/>
<title>{% block title %}Welcome!{% endblock %}</title>
{% block stylesheets %}{% endblock %}
</head>


+ 15
- 0
templates/default/index.html.twig View File

@@ -0,0 +1,15 @@
{% extends 'base.html.twig' %}

{% block title %}SplendidBear Websites{% endblock %}

{% block body %}

{% endblock %}

{% block stylesheets %}
<link rel="stylesheet" media="screen" href="{{ asset('build/style.css') }}">
{% endblock %}

{% block javascripts %}
<script type="text/javascript" language="JavaScript" src="{{ asset('build/app.js') }}"></script>
{% endblock %}

+ 9
- 1
webpack.config.js View File

@@ -26,7 +26,7 @@ Encore
* and one CSS file (e.g. app.css) if you JavaScript imports CSS.
*/
.addEntry('app', './assets/js/app.js')
.addStyleEntry('appStyle', './assets/css/app.scss')
.addStyleEntry('style', './assets/css/app.scss')

/*
* FEATURE CONFIG
@@ -46,6 +46,14 @@ Encore
// enables Sass/SCSS support
.enableSassLoader()

// enable autoprefixer
.enablePostCssLoader((options) => {
options.config = {
path: 'config/postcss.config.js'
};
})
.enablePostCssLoader()

// uncomment if you use TypeScript
//.enableTypeScriptLoader()
;


+ 115
- 3
yarn.lock View File

@@ -92,6 +92,10 @@ adjust-sourcemap-loader@^1.1.0:
object-path "^0.9.2"
regex-parser "^2.2.9"

ajv-errors@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/ajv-errors/-/ajv-errors-1.0.0.tgz#ecf021fa108fd17dfb5e6b383f2dd233e31ffc59"

ajv-keywords@^3.1.0:
version "3.2.0"
resolved "https://registry.yarnpkg.com/ajv-keywords/-/ajv-keywords-3.2.0.tgz#e86b819c602cf8821ad637413698f1dec021847a"
@@ -296,6 +300,17 @@ autoprefixer@^6.3.1:
postcss "^5.2.16"
postcss-value-parser "^3.2.3"

autoprefixer@^9.1.1:
version "9.1.1"
resolved "https://registry.yarnpkg.com/autoprefixer/-/autoprefixer-9.1.1.tgz#e4ffa96c71270b8a1967d1542abc5f8453920a77"
dependencies:
browserslist "^4.0.2"
caniuse-lite "^1.0.30000876"
normalize-range "^0.1.2"
num2fraction "^1.2.2"
postcss "^7.0.2"
postcss-value-parser "^3.2.3"

aws-sign2@~0.7.0:
version "0.7.0"
resolved "https://registry.yarnpkg.com/aws-sign2/-/aws-sign2-0.7.0.tgz#b46e890934a9591f2d2f6f86d7e6a9f1b3fe76a8"
@@ -953,6 +968,14 @@ browserslist@^3.2.6:
caniuse-lite "^1.0.30000844"
electron-to-chromium "^1.3.47"

browserslist@^4.0.2:
version "4.0.2"
resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.0.2.tgz#294388f5844bb3ab15ef7394ca17f49bf7a4e6f1"
dependencies:
caniuse-lite "^1.0.30000876"
electron-to-chromium "^1.3.57"
node-releases "^1.0.0-alpha.11"

buffer-indexof@^1.0.0:
version "1.1.1"
resolved "https://registry.yarnpkg.com/buffer-indexof/-/buffer-indexof-1.1.1.tgz#52fabcc6a606d1a00302802648ef68f639da268c"
@@ -1031,7 +1054,7 @@ caniuse-db@^1.0.30000529, caniuse-db@^1.0.30000634, caniuse-db@^1.0.30000639:
version "1.0.30000877"
resolved "https://registry.yarnpkg.com/caniuse-db/-/caniuse-db-1.0.30000877.tgz#29ea435fdbe8a671cc5b027a75e28a816c17c340"

caniuse-lite@^1.0.30000844:
caniuse-lite@^1.0.30000844, caniuse-lite@^1.0.30000876:
version "1.0.30000877"
resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30000877.tgz#f189673b86ecc06436520e3e391de6a13ca923b4"

@@ -1295,6 +1318,15 @@ core-util-is@1.0.2, core-util-is@~1.0.0:
version "1.0.2"
resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7"

cosmiconfig@^4.0.0:
version "4.0.0"
resolved "https://registry.yarnpkg.com/cosmiconfig/-/cosmiconfig-4.0.0.tgz#760391549580bbd2df1e562bc177b13c290972dc"
dependencies:
is-directory "^0.3.1"
js-yaml "^3.9.0"
parse-json "^4.0.0"
require-from-string "^2.0.1"

create-ecdh@^4.0.0:
version "4.0.3"
resolved "https://registry.yarnpkg.com/create-ecdh/-/create-ecdh-4.0.3.tgz#c9111b6f33045c4697f144787f9254cdc77c45ff"
@@ -1664,7 +1696,7 @@ ee-first@1.1.1:
version "1.1.1"
resolved "https://registry.yarnpkg.com/ee-first/-/ee-first-1.1.1.tgz#590c61156b0ae2f4f0255732a158b266bc56b21d"

electron-to-chromium@^1.2.7, electron-to-chromium@^1.3.47:
electron-to-chromium@^1.2.7, electron-to-chromium@^1.3.47, electron-to-chromium@^1.3.57:
version "1.3.58"
resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.58.tgz#8267a4000014e93986d9d18c65a8b4022ca75188"

@@ -1707,7 +1739,7 @@ errno@^0.1.3:
dependencies:
prr "~1.0.1"

error-ex@^1.2.0:
error-ex@^1.2.0, error-ex@^1.3.1:
version "1.3.2"
resolved "https://registry.yarnpkg.com/error-ex/-/error-ex-1.3.2.tgz#b4ac40648107fdcdcfae242f428bea8a14d4f1bf"
dependencies:
@@ -1811,6 +1843,10 @@ esprima@^2.6.0:
version "2.7.3"
resolved "https://registry.yarnpkg.com/esprima/-/esprima-2.7.3.tgz#96e3b70d5779f6ad49cd032673d1c312767ba581"

esprima@^4.0.0:
version "4.0.1"
resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.1.tgz#13b04cdb3e6c5d19df91ab6987a8695619b0aa71"

esrecurse@^4.1.0:
version "4.2.1"
resolved "https://registry.yarnpkg.com/esrecurse/-/esrecurse-4.2.1.tgz#007a3b9fdbc2b3bb87e4879ea19c92fdbd3942cf"
@@ -2503,6 +2539,18 @@ ignore-walk@^3.0.1:
dependencies:
minimatch "^3.0.4"

import-cwd@^2.0.0:
version "2.1.0"
resolved "https://registry.yarnpkg.com/import-cwd/-/import-cwd-2.1.0.tgz#aa6cf36e722761285cb371ec6519f53e2435b0a9"
dependencies:
import-from "^2.1.0"

import-from@^2.1.0:
version "2.1.0"
resolved "https://registry.yarnpkg.com/import-from/-/import-from-2.1.0.tgz#335db7f2a7affd53aaa471d4b8021dee36b7f3b1"
dependencies:
resolve-from "^3.0.0"

import-local@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/import-local/-/import-local-1.0.0.tgz#5e4ffdc03f4fe6c009c6729beb29631c2f8227bc"
@@ -2647,6 +2695,10 @@ is-descriptor@^1.0.0, is-descriptor@^1.0.2:
is-data-descriptor "^1.0.0"
kind-of "^6.0.2"

is-directory@^0.3.1:
version "0.3.1"
resolved "https://registry.yarnpkg.com/is-directory/-/is-directory-0.3.1.tgz#61339b6f2475fc772fd9c9d83f5c8575dc154ae1"

is-dotfile@^1.0.0:
version "1.0.3"
resolved "https://registry.yarnpkg.com/is-dotfile/-/is-dotfile-1.0.3.tgz#a6a2f32ffd2dfb04f5ca25ecd0f6b83cf798a1e1"
@@ -2833,6 +2885,13 @@ js-tokens@^3.0.2:
version "3.0.2"
resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-3.0.2.tgz#9866df395102130e38f7f996bceb65443209c25b"

js-yaml@^3.9.0:
version "3.12.0"
resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.12.0.tgz#eaed656ec8344f10f527c6bfa1b6e2244de167d1"
dependencies:
argparse "^1.0.7"
esprima "^4.0.0"

js-yaml@~3.7.0:
version "3.7.0"
resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.7.0.tgz#5c967ddd837a9bfdca5f2de84253abe8a1c03b80"
@@ -2856,6 +2915,10 @@ json-loader@^0.5.4:
version "0.5.7"
resolved "https://registry.yarnpkg.com/json-loader/-/json-loader-0.5.7.tgz#dca14a70235ff82f0ac9a3abeb60d337a365185d"

json-parse-better-errors@^1.0.1:
version "1.0.2"
resolved "https://registry.yarnpkg.com/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz#bb867cfb3450e69107c131d1c514bab3dc8bcaa9"

json-schema-traverse@^0.3.0:
version "0.3.1"
resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-0.3.1.tgz#349a6d44c53a51de89b40805c5d5e59b417d3340"
@@ -3424,6 +3487,12 @@ node-pre-gyp@^0.10.0:
semver "^5.3.0"
tar "^4"

node-releases@^1.0.0-alpha.11:
version "1.0.0-alpha.11"
resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-1.0.0-alpha.11.tgz#73c810acc2e5b741a17ddfbb39dfca9ab9359d8a"
dependencies:
semver "^5.3.0"

node-sass@^4.9.3:
version "4.9.3"
resolved "https://registry.yarnpkg.com/node-sass/-/node-sass-4.9.3.tgz#f407cf3d66f78308bb1e346b24fa428703196224"
@@ -3694,6 +3763,13 @@ parse-json@^2.2.0:
dependencies:
error-ex "^1.2.0"

parse-json@^4.0.0:
version "4.0.0"
resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-4.0.0.tgz#be35f5425be1f7f6c747184f98a788cb99477ee0"
dependencies:
error-ex "^1.3.1"
json-parse-better-errors "^1.0.1"

parseurl@~1.3.2:
version "1.3.2"
resolved "https://registry.yarnpkg.com/parseurl/-/parseurl-1.3.2.tgz#fc289d4ed8993119460c156253262cdc8de65bf3"
@@ -3866,6 +3942,22 @@ postcss-filter-plugins@^2.0.0:
dependencies:
postcss "^5.0.4"

postcss-load-config@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/postcss-load-config/-/postcss-load-config-2.0.0.tgz#f1312ddbf5912cd747177083c5ef7a19d62ee484"
dependencies:
cosmiconfig "^4.0.0"
import-cwd "^2.0.0"

postcss-loader@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/postcss-loader/-/postcss-loader-3.0.0.tgz#6b97943e47c72d845fa9e03f273773d4e8dd6c2d"
dependencies:
loader-utils "^1.1.0"
postcss "^7.0.0"
postcss-load-config "^2.0.0"
schema-utils "^1.0.0"

postcss-merge-idents@^2.1.5:
version "2.1.7"
resolved "https://registry.yarnpkg.com/postcss-merge-idents/-/postcss-merge-idents-2.1.7.tgz#4c5530313c08e1d5b3bbf3d2bbc747e278eea270"
@@ -4051,6 +4143,14 @@ postcss@^6.0.1:
source-map "^0.6.1"
supports-color "^5.4.0"

postcss@^7.0.0, postcss@^7.0.2:
version "7.0.2"
resolved "https://registry.yarnpkg.com/postcss/-/postcss-7.0.2.tgz#7b5a109de356804e27f95a960bef0e4d5bc9bb18"
dependencies:
chalk "^2.4.1"
source-map "^0.6.1"
supports-color "^5.4.0"

prepend-http@^1.0.0:
version "1.0.4"
resolved "https://registry.yarnpkg.com/prepend-http/-/prepend-http-1.0.4.tgz#d4f4562b0ce3696e41ac52d0e002e57a635dc6dc"
@@ -4415,6 +4515,10 @@ require-directory@^2.1.1:
version "2.1.1"
resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42"

require-from-string@^2.0.1:
version "2.0.2"
resolved "https://registry.yarnpkg.com/require-from-string/-/require-from-string-2.0.2.tgz#89a7fdd938261267318eafe14f9c32e598c36909"

require-main-filename@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/require-main-filename/-/require-main-filename-1.0.1.tgz#97f717b69d48784f5f526a6c5aa8ffdda055a4d1"
@@ -4533,6 +4637,14 @@ schema-utils@^0.3.0:
dependencies:
ajv "^5.0.0"

schema-utils@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/schema-utils/-/schema-utils-1.0.0.tgz#0b79a93204d7b600d4b2850d1f66c2a34951c770"
dependencies:
ajv "^6.1.0"
ajv-errors "^1.0.0"
ajv-keywords "^3.1.0"

scss-tokenizer@^0.2.3:
version "0.2.3"
resolved "https://registry.yarnpkg.com/scss-tokenizer/-/scss-tokenizer-0.2.3.tgz#8eb06db9a9723333824d3f5530641149847ce5d1"


Loading…
Cancel
Save