-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Loading status checks…
Merge branch 'main' into e2e-test
Showing
26 changed files
with
541 additions
and
349 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
name: PHP-CS-Fixer | ||
|
||
on: | ||
push: | ||
branches: [ master, main ] | ||
pull_request: | ||
branches: [ master, main ] | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
code-style: | ||
|
||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: write # for Git to git apply | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Setup PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: '8.3' | ||
extensions: gd, intl, pdo_mysql | ||
coverage: none # disable xdebug, pcov | ||
|
||
# install dependencies from composer.json | ||
- name: Install test dependencies | ||
env: | ||
COMPOSER: composer.json | ||
run: composer install --prefer-dist --no-progress | ||
|
||
# run php-cs-fixer, fix code styles | ||
- name: Run PHP CS Fixer | ||
run: composer cs-fix | ||
|
||
# commit and push fixed files | ||
- uses: stefanzweifel/git-auto-commit-action@v4 | ||
with: | ||
commit_message: Apply php-cs-fixer changes |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
$finder = (new PhpCsFixer\Finder()) | ||
->in(__DIR__) | ||
; | ||
|
||
return (new Redaxo\PhpCsFixerConfig\Config()) | ||
->setFinder($finder) | ||
; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
html, body { | ||
height: 100%; | ||
background-color: #f7f7f7; | ||
} | ||
body { | ||
display: flex; | ||
align-items: center; | ||
} | ||
.maintenance-container { | ||
max-width: 500px; | ||
min-width: 300px; | ||
width: 50%; | ||
margin: 0 auto; | ||
color: #999; | ||
font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif; | ||
font-size: 15px; | ||
line-height: 1.5; | ||
text-align: center; | ||
} | ||
.maintenance-error a { | ||
color: #666; | ||
} | ||
.maintenance-error a:hover { | ||
color: #111; | ||
} | ||
.maintenance-error-title { | ||
margin: 0; | ||
font-size: 40px; | ||
font-weight: 700; | ||
color: #5b98d7; | ||
text-shadow: 0 4px 2px rgba(255, 255, 255, 1); | ||
line-height: 1.2em; | ||
} | ||
.maintenance-error-message { | ||
padding: 0 20px; | ||
} | ||
|
||
.maintenance-login a { | ||
color: #666; | ||
} | ||
.maintenance-login a:hover { | ||
color: #111; | ||
} | ||
.maintenance-login-title { | ||
margin: 0; | ||
font-size: 40px; | ||
font-weight: 700; | ||
color: #5b98d7; | ||
text-shadow: 0 4px 2px rgba(255, 255, 255, 1); | ||
line-height: 1.2em; | ||
} | ||
.maintenance-login-message { | ||
padding: 0 20px; | ||
} | ||
|
||
.maintenance-pw-input { | ||
margin: 1em 1em 1em 1em; | ||
padding: 1em 2em 1em 1em; | ||
background: rgba(255,255,255,1); | ||
border-radius: 30px; | ||
border: none; | ||
font-size: 1em; | ||
} | ||
|
||
.maintenance-pw-btn { | ||
margin: 1em 1em 1em 1em; | ||
padding: 1em 1em 1em 1em; | ||
background: #5b98d7; | ||
border-radius: 10px; | ||
color: #ffffff; | ||
border: none; | ||
font-size: 1em; | ||
cursor: pointer; | ||
} | ||
|
||
.maintenance-btn { | ||
display: inline-block; | ||
text-decoration: none; | ||
margin: 1em 1em 1em 1em; | ||
padding: 1em 1em 1em 1em; | ||
background: #5b98d7; | ||
border-radius: 10px; | ||
color: #ffffff; | ||
border: none; | ||
font-size: 1em; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{ | ||
"require-dev": { | ||
"redaxo/php-cs-fixer-config": "^2.0", | ||
"friendsofphp/php-cs-fixer": "^3.14" | ||
}, | ||
"replace": { | ||
"psr/log": "*", | ||
"psr/container": "*" | ||
}, | ||
"scripts": { | ||
"cs-dry": "php-cs-fixer fix -v --ansi --dry-run --config=.php-cs-fixer.dist.php", | ||
"cs-fix": "php-cs-fixer fix -v --ansi --config=.php-cs-fixer.dist.php" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<?php | ||
$announcement = rex_config::get('maintenance', 'announcement', ''); | ||
$start_date = rex_config::get('maintenance', 'announcement_start_date'); | ||
$end_date = rex_config::get('maintenance', 'announcement_end_date'); | ||
$current_date = date('Y-m-d\TH:i:s'); | ||
|
||
if ('' !== $announcement && $start_date <= $current_date && $end_date >= $current_date) { | ||
?> | ||
<div class="maintenance-announcement"> | ||
<?= $announcement ?> | ||
</div> | ||
<?php } | ||
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.