diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md new file mode 100644 index 00000000..3121d921 --- /dev/null +++ b/.github/CONTRIBUTING.md @@ -0,0 +1,30 @@ +# Contributing to theme.park + +- If you want to discuss changes, you can also bring it up in our Discord server +- PR's are done against the develop branch. + +## New theme option + +- The current variables in use can be found in any of the CSS files in `/css/theme-options/` and `/css/community-theme-options/` + +- New community contributed theme options will be placed in the `Community Themes` category on our docs page. + +- Community themes are not officially supported but as long as they follow the same variable structure as the other theme options it should look fine on all applications. + +- When contributing a new option, you must have example screeenshots of the theme being used. Preferrably at least 10 with the same image size. See examples on our [docs page](https://docs.theme-park.dev/community-themes/). + +### Specials + +Remember to also to change the variables in the the `Specials` section even if you dont use the application the variable refers to. + +- `--arr-queue-color` Please refrain from using an orange/yellowish color on the variable as its confusing from a UX standpoint as the "arrs" use that color range when something is wrong in the queue. + +## New application theme + +- When creating a new theme for an application please test multiple theme options to make sure it looks good on all options not just your favorite. + +- The PR must contain a screenshot of all the different theme options. Optionally you can also include screenshots with the community theme options. + +## Bug fixes + +- When submitting bugfixes please show a before and after screenshot of the fix, and a description of what the fix does. diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml new file mode 100644 index 00000000..69860a66 --- /dev/null +++ b/.github/FUNDING.yml @@ -0,0 +1,3 @@ +# These are supported funding model platforms + +github: GilbN diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md new file mode 100644 index 00000000..0108e93a --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -0,0 +1,49 @@ +--- +name: Bug report +about: Create a report to help us improve +title: '' +labels: 'bug' +assignees: '' + +--- + +**Describe the bug** +A clear and concise description of what the bug is. + +**Theme Install Method** (Don't skip) +- Docker run / Compose Config +- Webserver subfilter Config +- Stylus Config + +**Application Info** (Don't skip) +- Version +- Branch +- Container + +**To Reproduce** +Steps to reproduce the behavior: +1. Go to '...' +2. Click on '....' +3. Scroll down to '....' +4. See error + +**Expected behavior** +A clear and concise description of what you expected to happen. + +**Screenshots** +If applicable, add screenshots to help explain your problem. + + +**Desktop (If applicable) (please complete the following information):** + - OS: [e.g. iOS] + - Browser [e.g. chrome, safari] + - Version [e.g. 22] + +**Smartphone (If applicable) (please complete the following information):** + - Device: [e.g. iPhone6] + - OS: [e.g. iOS8.1] + - Browser [e.g. stock browser, safari] + - Version [e.g. 22] + +**Additional context** +Add any other context about the problem here. diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md new file mode 100644 index 00000000..879155f1 --- /dev/null +++ b/.github/pull_request_template.md @@ -0,0 +1,35 @@ + + +[themeparkurl]: https://theme-park.dev +[![theme-park.dev](https://raw.githubusercontent.com/GilbN/theme.park/master/banners/tp_banner.png)][themeparkurl] + + + + + + + + + +------------------------------ + + - [ ] I have read the [contributing](https://github.com/GilbN/theme.park/blob/master/.github/CONTRIBUTING.md) guideline and understand that I have made the correct modifications + +------------------------------ + + + +## Description: + + + +## Benefits of this PR and context: + + +## How Has This Been Tested? + + + + +## Source / References: + \ No newline at end of file diff --git a/.github/release.yml b/.github/release.yml new file mode 100644 index 00000000..c39ff273 --- /dev/null +++ b/.github/release.yml @@ -0,0 +1,25 @@ +# release.yml + +changelog: + exclude: + labels: + - ignore-for-release + authors: + - github-actions + categories: + - title: Breaking Changes 🛠 + labels: + - Semver-Major + - breaking-change + - title: Exciting New Features 🎉 + labels: + - Semver-Minor + - enhancement + - added + - title: Fixes + labels: + - fix + - fixed + - title: Other Changes + labels: + - "*" \ No newline at end of file diff --git a/.github/workflows/auto-build.yml b/.github/workflows/auto-build.yml new file mode 100644 index 00000000..fef13e45 --- /dev/null +++ b/.github/workflows/auto-build.yml @@ -0,0 +1,71 @@ +name: autobuildallthemods +on: + push: + branches: + - master + paths: + - 'docker-mods/**' +jobs: + push_to_ghcr_io: + runs-on: ubuntu-latest + steps: + - name: checkout + uses: actions/checkout@v2 + with: + fetch-depth: 0 + - name: get changed files + id: getfile + run: | + echo "::set-output name=files::$(git diff-tree --no-commit-id --name-only -r ${{ github.sha }} docker-mods/| xargs)" + - name: Login to GitHub Container Registry + uses: docker/login-action@v1 + with: + registry: ghcr.io + username: ${{ github.repository_owner }} + password: ${{ secrets.GH_PAT }} + - name: find correct directory then build&push + run: | + for i in ${{ steps.getfile.outputs.files }} + do + directory="$( echo $i | cut -d'/' -f2 -s )" + if [ -z "$directory" ]; then + continue # Skip root dir + elif [ "$i" == *.md ]; then + continue # Skip markdown files + elif [ "$i" == *.yml ]; then + continue # Skip YAML files + fi + docker build docker-mods/$directory --tag ghcr.io/gilbn/theme.park:$directory + docker push ghcr.io/gilbn/theme.park:$directory + done + push_to_dockerhub: + runs-on: ubuntu-latest + steps: + - name: checkout + uses: actions/checkout@v2 + with: + fetch-depth: 0 + - name: get changed files + id: getfile + run: | + echo "::set-output name=files::$(git diff-tree --no-commit-id --name-only -r ${{ github.sha }} docker-mods/| xargs)" + - name: Login to Docker Hub + uses: docker/login-action@v1 + with: + username: ${{ secrets.DH_USER }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + - name: find correct directory then build&push + run: | + for i in ${{ steps.getfile.outputs.files }} + do + directory="$( echo $i | cut -d'/' -f2 -s )" + if [ -z "$directory" ]; then + continue # Skip root dir + elif [ "$i" == *.md ]; then + continue # Skip markdown files + elif [ "$i" == *.yml ]; then + continue # Skip YAML files + fi + docker build docker-mods/$directory --tag gilbn/theme.park:$directory + docker push gilbn/theme.park:$directory + done \ No newline at end of file diff --git a/.github/workflows/docker-build.yml b/.github/workflows/docker-build.yml new file mode 100644 index 00000000..b745d7ba --- /dev/null +++ b/.github/workflows/docker-build.yml @@ -0,0 +1,65 @@ +name: docker build +on: + release: + types: + - published +jobs: + push_to_ghcr_io: + runs-on: ubuntu-latest + steps: + - name: checkout + uses: actions/checkout@v2 + with: + fetch-depth: 0 + ref: ${{ github.event.release.target_commitish }} + - name: Get the version + id: get_version + run: echo ::set-output name=VERSION::${{ github.event.release.tag_name }} + - name: Set current date as env variable + id: date_time + run: echo ::set-output name=NOW::$(date +'%Y-%m-%dT%H:%M:%S') + - name: Login to GitHub Container Registry + uses: docker/login-action@v1 + with: + registry: ghcr.io + username: ${{ github.repository_owner }} + password: ${{ secrets.GH_PAT }} + - name: build&push live + if: ${{ github.event.release.target_commitish == 'live' }} + run: | + docker build docker/ --build-arg TP_RELEASE=${{ steps.get_version.outputs.VERSION }} --build-arg BUILD_DATE=${{ steps.date_time.outputs.NOW }} --tag ghcr.io/gilbn/theme.park --tag ghcr.io/gilbn/theme.park:${{ steps.get_version.outputs.VERSION }} + docker push ghcr.io/gilbn/theme.park + - name: build&push dev + if: ${{ github.event.release.target_commitish == 'live_develop' }} + run: | + docker build docker/ --build-arg TP_RELEASE=${{ steps.get_version.outputs.VERSION }} --build-arg BUILD_DATE=${{ steps.date_time.outputs.NOW }} --tag ghcr.io/gilbn/theme.park:develop --tag ghcr.io/gilbn/theme.park:${{ steps.get_version.outputs.VERSION }} + docker push --all-tags ghcr.io/gilbn/theme.park + push_to_dockerhub: + runs-on: ubuntu-latest + steps: + - name: checkout + uses: actions/checkout@v2 + with: + fetch-depth: 0 + - name: Get the version + id: get_version + run: echo ::set-output name=VERSION::${{ github.event.release.tag_name }} + - name: Set current date as env variable + id: date_time + run: echo ::set-output name=NOW::$(date +'%Y-%m-%dT%H:%M:%S') + - name: Login to Docker Hub + uses: docker/login-action@v1 + with: + username: ${{ secrets.DH_USER }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + - name: build&push dh live + if: ${{ github.event.release.target_commitish == 'live' }} + run: | + docker build docker/ --build-arg TP_RELEASE=${{ steps.get_version.outputs.VERSION }} --build-arg BUILD_DATE=${{ steps.date_time.outputs.NOW }} --tag ghcr.io/gilbn/theme.park --tag ghcr.io/gilbn/theme.park:${{ steps.get_version.outputs.VERSION }} + docker push ghcr.io/gilbn/theme.park + - name: build&push dh dev + if: ${{ github.event.release.target_commitish == 'live_develop' }} + run: | + docker build docker/ --build-arg TP_RELEASE=${{ steps.get_version.outputs.VERSION }} --build-arg BUILD_DATE=${{ steps.date_time.outputs.NOW }} --tag gilbn/theme.park:develop --tag gilbn/theme.park:${{ steps.get_version.outputs.VERSION }} + docker push --all-tags gilbn/theme.park + diff --git a/.github/workflows/minify-and-deploy.yml b/.github/workflows/minify-and-deploy.yml new file mode 100644 index 00000000..dd06a613 --- /dev/null +++ b/.github/workflows/minify-and-deploy.yml @@ -0,0 +1,69 @@ +name: Minify CSS and deploy to live branch +on: + push: + branches: + - master + - develop + paths-ignore: + - 'docker-mods/**' + - '.github/**' + - '.vscode/**' +jobs: + deploy: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + with: + fetch-depth: 0 + - name: Wrong domain check + run: | + echo "$(git diff-tree --no-commit-id --name-only -r ${{ github.sha }})" + if git grep -q -E ${{ secrets.DOMAIN }} -- *.css; then + echo "Game over man!" + exit 1 + fi + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v2 + - name: Run themes.py + run: | + python themes.py + - name: Minify CSS + if: ${{ github.ref == 'refs/heads/master' }} + run: | + sudo npm install -g minify@7.2.2 + sudo apt-get update + sudo apt-get -y install moreutils + + minify_file(){ + directory=$1 + basename=$(basename $directory); + extension="${basename##*.}" + output="${directory%/*}/" + filename="${basename%.*}" + output_path="${output}${filename}.${extension}" + minify ${directory} | sponge ${output_path} + echo "Minified ${directory} > ${output_path}" + } + + find ./css -type f -iname *base.css | while read fname + do + if [[ "$fname" != *"min."* ]]; then + minify_file $fname + fi + done + - name: Deploy + uses: peaceiris/actions-gh-pages@v3 + if: ${{ github.ref == 'refs/heads/master' }} + with: + publish_dir: ./ + publish_branch: live + github_token: ${{ secrets.GITHUB_TOKEN }} + exclude_assets: '' + - name: Deploy Develop + uses: peaceiris/actions-gh-pages@v3 + if: ${{ github.ref == 'refs/heads/develop' }} + with: + publish_dir: ./ + publish_branch: live_develop + github_token: ${{ secrets.GITHUB_TOKEN }} + exclude_assets: '' diff --git a/css/addons/bazarr/bazarr-4k-logo/bazarr-4k-logo.css b/css/addons/bazarr/bazarr-4k-logo/bazarr-4k-logo.css index 5cb5d8ce..59114dbc 100644 --- a/css/addons/bazarr/bazarr-4k-logo/bazarr-4k-logo.css +++ b/css/addons/bazarr/bazarr-4k-logo/bazarr-4k-logo.css @@ -1,4 +1,4 @@ -/* Desktop */ +/* Desktop */ @media (min-width: 752px) { .header-icon.px-3.m-0.d-none.d-md-block img { display: none !important; diff --git a/themes.json b/themes.json index 0f5f8d5c..a754a693 100644 --- a/themes.json +++ b/themes.json @@ -1,7 +1,7 @@ { "addons": { "bazarr": { - "bazarr-4k-logo": "https://develop.theme-park.dev/css/addons/bazarr/bazarr-4k-logo/bazarr-4k-logo.css?sha=5cb5d8ce69cd7c73988505d93910c9e9ea27532a", + "bazarr-4k-logo": "https://develop.theme-park.dev/css/addons/bazarr/bazarr-4k-logo/bazarr-4k-logo.css?sha=59114dbc54c5cced5c71d718115bd24b29e6bfc7", "bazarr-darker": "https://develop.theme-park.dev/css/addons/bazarr/bazarr-darker/bazarr-darker.css?sha=29ece53bbee1995e502f54eda3bfb166448918bd" }, "lidarr": { @@ -181,7 +181,7 @@ }, "bazarr": { "addons": { - "bazarr-4k-logo": "https://develop.theme-park.dev/css/addons/bazarr/bazarr-4k-logo/bazarr-4k-logo.css?sha=5cb5d8ce69cd7c73988505d93910c9e9ea27532a", + "bazarr-4k-logo": "https://develop.theme-park.dev/css/addons/bazarr/bazarr-4k-logo/bazarr-4k-logo.css?sha=59114dbc54c5cced5c71d718115bd24b29e6bfc7", "bazarr-darker": "https://develop.theme-park.dev/css/addons/bazarr/bazarr-darker/bazarr-darker.css?sha=29ece53bbee1995e502f54eda3bfb166448918bd" }, "base_css": "https://develop.theme-park.dev/css/base/bazarr/bazarr-base.css?sha=43d7ec0b6a346b35e3396cafce23e54110658a06"