Skip to content

Commit

Permalink
Merge pull request #32 from contao-themes-net/2.x
Browse files Browse the repository at this point in the history
2.x
  • Loading branch information
MDevster committed Oct 29, 2022
2 parents 97c4c04 + 62329f9 commit e490fc4
Show file tree
Hide file tree
Showing 264 changed files with 2,665 additions and 5,785 deletions.
11 changes: 7 additions & 4 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,12 @@ trim_trailing_whitespace = true
indent_style = space
indent_size = 4

[*.{html5,js,css.scss}]
indent_style = space
indent_size = 2

[*.{html5,svg,min.css,min.js}]
insert_final_newline = false

[/contao/**.{css,js,php}]
indent_style = tab

[/contao/**.{html5,twig}]
indent_style = space
indent_size = 2
23 changes: 23 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: bug
assignees: ''

---

## Bug description
<!-- A clear and concise description of what the bug is. -->

## Steps to reproduce
<!-- Where did you encounter the bug/What code caused the bug to appear? -->

## Expected behavior
<!-- A clear and concise description of what you expected to happen. -->

## Screenshots
<!-- If applicable, add screenshots to help explain your problem. -->

## Environment
<!-- Provide some information about your OS, PHP version, Contao Version, Browser or mobile device (if applicable). -->
12 changes: 12 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: feature
assignees: ''

---

## Description
<!-- A clear and concise description of what you want to happen. -->
<!-- Provide sample code, useful information, possible solutions and examples whenever possible. -->
103 changes: 103 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
name: CI

on:
pull_request: ~
push: ~

jobs:
ecs:
name: ECS
runs-on: ubuntu-latest
steps:
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: 8.1 # Run with the lowest supported to avoid incompatible fixes
extensions: dom, fileinfo, filter, gd, hash, intl, json, mbstring, mysqli, pcre, pdo_mysql, zlib
coverage: none
env:
COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Checkout
uses: actions/checkout@v3

- name: Install the dependencies
run: |
composer install --no-interaction --no-progress
composer bin ecs install --no-interaction --no-progress
- name: Run ECS
run: vendor/bin/ecs check src tests --config ecs.php --no-progress-bar --ansi

phpstan:
name: PHPStan
runs-on: ubuntu-latest
steps:
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: 8.1
extensions: dom, fileinfo, filter, gd, hash, intl, json, mbstring, mysqli, pcre, pdo_mysql, zlib
coverage: none
env:
COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Checkout
uses: actions/checkout@v3

- name: Install the dependencies
run: |
composer install --no-interaction --no-progress
composer bin phpstan install --no-interaction --no-progress
- name: Run PHPStan
run: vendor/bin/phpstan analyse --no-progress

tests:
name: PHP ${{ matrix.php }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
php: [ 8.1 ]
steps:
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: dom, fileinfo, filter, gd, hash, intl, json, mbstring, mysqli, pcre, pdo_mysql, zlib
coverage: none
env:
COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Checkout
uses: actions/checkout@v3

- name: Install the dependencies
run: composer install --no-interaction --no-progress

- name: Run the unit tests
run: vendor/bin/phpunit --colors=always

nightly:
name: PHP 8.2
runs-on: ubuntu-latest
continue-on-error: true
steps:
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: 8.2
extensions: dom, fileinfo, filter, gd, hash, intl, json, mbstring, mysqli, pcre, pdo_mysql, zlib
coverage: none
env:
COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Checkout
uses: actions/checkout@v3

- name: Install the dependencies
run: composer install --ignore-platform-req=php --no-interaction --no-progress

- name: Run the unit tests
run: vendor/bin/phpunit --colors=always
7 changes: 4 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
# Composer
.idea
/composer.lock
/vendor/

# PhpUnit
/phpunit.xml
# PhpStorm
.idea
/phpunit.xml.bak
/.phpunit.result.cache
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,12 @@ Types of changes
Security in case of vulnerabilities.
)

## [2.0.0](https://github.com/contao-themes-net/zero-one-theme-bundle/tree/2.0.0) – 2022-10-28

- [Added] Add migrations for demo data import (Setup without further steps, install and run migrations -> Done!)
- [Changed] Increase Contao version to 5 and increase PHP version to 8.1
- [Removed] Cleanup older Contao SQL files

## [1.10.0](https://github.com/contao-themes-net/zero-one-theme-bundle/tree/1.10.0) – 2022-10-07

- [Added] now you can use `$GLOBALS['CUSTOM_STYLES']` in templates to add scss files from files/zeroOne/scss
Expand Down
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,3 +107,10 @@ You can support [contao-themes.net](https://contao-themes.net) by buying a domai
* Sonnenaufgang an der Elbe in Meißen / think-big.png: [Mario Gast](http://dream-picture-moments.de/)

Alle Demo-Inhalte dieses Themes, insbesondere Texte, Fotografien und Grafiken, sind urheberrechtlich geschützt. Das Urheberrecht liegt bei der pdir Gmbh bzw. den jeweiligen Urhebern der Werke. Bitte fragen Sie uns, falls Sie die Demo-Inhalte dieses Themes verwenden möchten. Ohne schriftliche Genehmigung seitens der Urheber dürfen diese in keiner Form verwendet, vervielfältigt oder verbreitet werden.

# DEV
### run before commit

vendor/bin/ecs check src tests
vendor/bin/phpstan analyse
vendor/bin/phpunit --colors=always
42 changes: 24 additions & 18 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "contao-themes-net/zero-one-theme-bundle",
"type": "contao-bundle",
"description": "0.1 Theme Bundle for Contao 4",
"description": "0.1 Theme Bundle for Contao 5",
"license": "proprietary",
"authors": [
{
Expand All @@ -25,24 +25,26 @@
"source" : "https://github.com/contao-themes-net/zero-one-theme-bundle"
},
"require": {
"php": "^7.0 || ^8.0",
"contao/core-bundle": "^4.4",
"terminal42/contao-folderpage": "^2.0 || ^3.0",
"pdir/contao-theme-helper-bundle": "^1.0",
"contao-themes-net/theme-components-bundle": "^1.2"
"php": "^8.1",
"contao/core-bundle": "^5.0",
"contao-themes-net/theme-components-bundle": "^1.4",
"pdir/contao-theme-helper-bundle": "^1.4",
"symfony/twig-bundle": "^5.4 || ^6.0",
"terminal42/contao-folderpage": "^3.0"
},
"conflict": {
"contao/core": "*",
"contao/manager-plugin": "<2.0 || >=3.0"
},
"require-dev": {
"bamarni/composer-bin-plugin": "^1.5",
"contao/manager-plugin": "^2.0",
"doctrine/doctrine-cache-bundle": "^1.3",
"friendsofphp/php-cs-fixer": "^2.12",
"php-http/guzzle6-adapter": "^1.1",
"php-http/message-factory": "^1.0.2",
"phpunit/phpunit": "^5.7.26",
"symfony/phpunit-bridge": "^4.1.12"
"contao/easy-coding-standard": "^3.0",
"phpunit/phpunit": "^7.1 || ^8.4 || ^9.5",
"symfony/phpunit-bridge": "^4.4 || ^5.1",
"phpstan/phpstan": "^1.8",
"phpstan/phpstan-phpunit": "^1.1",
"phpstan/phpstan-symfony": "^1.2"
},
"extra": {
"contao-manager-plugin": "ContaoThemesNet\\ZeroOneThemeBundle\\ContaoManager\\Plugin"
Expand All @@ -52,11 +54,6 @@
"ContaoThemesNet\\ZeroOneThemeBundle\\": "src/"
}
},
"autoload-dev": {
"psr-4": {
"ContaoThemesNet\\ZeroOneThemeBundle\\Tests\\": "tests/"
}
},
"funding": [
{
"type": "patreon",
Expand All @@ -69,6 +66,15 @@
],
"suggest": {
"pdir/social-feed-bundle": "The Social Feed Extension shows a user feed from the most popular social networks. / Die Social Feed Erweiterung zeigt einen Feed aus den beliebtesten sozialen Netzwerken an.",
"pdir/animated-timeline-bundle": "Render content in a dynamic timeline. / Zeige Inhalte in einem dynamischen Zeitstrahl an."
"pdir/animated-timeline-bundle": "Render content in a dynamic timeline. / Zeige Inhalte in einem dynamischen Zeitstrahl an.",
"pdir/maklermodul-bundle": "MATE Theme includes all styles for maklermodul bundle. / MATE Theme enthält Stylesheets für das Maklermodul Bundle."
},
"config": {
"allow-plugins": {
"contao-components/installer": true,
"dealerdirect/phpcodesniffer-composer-installer": true,
"contao/manager-plugin": true,
"bamarni/composer-bin-plugin": true
}
}
}
13 changes: 13 additions & 0 deletions config/services.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
services:
_defaults:
autoconfigure: true
autowire: true

ContaoThemesNet\ZeroOneThemeBundle\:
resource: ../src/

# Migration
ContaoThemesNet\ZeroOneThemeBundle\Migration\:
resource: "../src/Migration/*"
tags:
- { name: contao.migration, priority: 99 }
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
<?php

use Contao\ArrayUtil;
use ContaoThemesNet\ZeroOneThemeBundle\Element\TabsNavElement;
use ContaoThemesNet\ZeroOneThemeBundle\Element\TabsStartElement;
use ContaoThemesNet\ZeroOneThemeBundle\Element\TabsStopElement;

// Insert the zero one theme category
array_insert($GLOBALS['TL_CTE'], 1, ['zeroOneTheme' => []]);
ArrayUtil::arrayInsert($GLOBALS['TL_CTE'], 1, ['zeroOneTheme' => []]);

/**
* Add content elements
Expand Down Expand Up @@ -62,20 +63,20 @@
$GLOBALS['ZERO_ONE_STYLES'] = [];
}

$GLOBALS['ZERO_ONE_STYLES'][] = 'variables';
$GLOBALS['ZERO_ONE_STYLES'][] = 'mixins';
$GLOBALS['ZERO_ONE_STYLES'][] = 'normalize';
$GLOBALS['ZERO_ONE_STYLES'][] = 'base';
$GLOBALS['ZERO_ONE_STYLES'][] = 'layout';
$GLOBALS['ZERO_ONE_STYLES'][] = 'utilities';
$GLOBALS['ZERO_ONE_STYLES'][] = '_variables';
$GLOBALS['ZERO_ONE_STYLES'][] = '_mixins';
$GLOBALS['ZERO_ONE_STYLES'][] = '_normalize';
$GLOBALS['ZERO_ONE_STYLES'][] = '_base';
$GLOBALS['ZERO_ONE_STYLES'][] = '_layout';
$GLOBALS['ZERO_ONE_STYLES'][] = '_utilities';

/**
* Backend Modules
*/
array_insert($GLOBALS['BE_MOD']['contaoThemesNet'], 1, [
ArrayUtil::arrayInsert($GLOBALS['BE_MOD']['contaoThemesNet'], 1, [
'zeroOneThemeSetup' => [
'callback' => 'ContaoThemesNet\\ZeroOneThemeBundle\\Module\\ZeroOneThemeSetup',
'tables' => [],
'stylesheet' => 'bundles/contaothemesnetzeroonetheme/scss/backend.css'
'stylesheet' => 'bundles/contaothemesnetzeroonetheme/scss/backend.css'
],
]);
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,20 @@
****
*/

// Die folgende Zeile nicht entfernen oder auskommentieren!
$scssPath: "../../../vendor/contao-themes-net/zero-one-theme-bundle/src/Resources/public/scss";

/*
* Entfernen Sie die Schrägstriche um die Theme-Farben zu überschreiben.
* Uncomment lines to override theme colors.
*/

/* ============================= */
/* Colour Schemes */
/* ============================= */

//@import '#{$scssPath}/colour_schemes/earth';
//@import '#{$scssPath}/colour_schemes/night';
//@import 'colour_schemes/earth';
//@import 'colour_schemes/night';

@import '#{$scssPath}/colour_schemes/dark_mode';
@import 'colour_schemes/dark_mode';

/*
* Kommentieren Sie die folgende Zeile aus, wenn die Bilder nicht dem ent-
Expand All @@ -27,7 +25,7 @@ $scssPath: "../../../vendor/contao-themes-net/zero-one-theme-bundle/src/Resource
* Uncomment the following line if the images should not be adjusted to the
* colour scheme.
*/
@import '#{$scssPath}/colour_schemes/adjust_images';
@import 'colour_schemes/adjust_images';

/* ============================= */
/* 0.1 Theme Variables */
Expand Down
4 changes: 4 additions & 0 deletions contao/files/zeroOne/scss/custom.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
/****
**** Individelle Styles und andere Elemente
****
*/
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loading

0 comments on commit e490fc4

Please sign in to comment.