1
0
mirror of https://github.com/gilbN/theme.park.git synced 2024-10-02 21:47:12 +02:00
This commit is contained in:
GilbN 2022-03-20 20:11:14 +00:00
parent 8bc09e4b1a
commit e0be4885f7
10 changed files with 350 additions and 3 deletions

30
.github/CONTRIBUTING.md vendored Normal file
View File

@ -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.

3
.github/FUNDING.yml vendored Normal file
View File

@ -0,0 +1,3 @@
# These are supported funding model platforms
github: GilbN

49
.github/ISSUE_TEMPLATE/bug_report.md vendored Normal file
View File

@ -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.

35
.github/pull_request_template.md vendored Normal file
View File

@ -0,0 +1,35 @@
<!--- Provide a general summary of your changes in the Title above -->
[themeparkurl]: https://theme-park.dev
[![theme-park.dev](https://raw.githubusercontent.com/GilbN/theme.park/master/banners/tp_banner.png)][themeparkurl]
<!--- Before submitting a pull request please check the following -->
<!--- If this is a fix for a typo (in code, documentation, or the README) please file an issue and let us sort it out. We do not need a PR -->
<!--- Ask yourself if this modification is something the whole userbase will benefit from, if this is a specific change for corner case functionality/styling please look at making an addon instead. https://docs.theme-park.dev/themes/addons/sonarr/ -->
<!--- That if the PR is addressing an existing issue include, closes #<issue number> , in the body of the PR commit message -->
<!--- You have included links to any files / patches etc your PR may be using in the body of the PR commit message -->
------------------------------
- [ ] 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
------------------------------
<!--- We welcome all PRs though this doesnt guarantee it will be accepted. -->
## Description:
<!--- Describe your changes in detail -->
<!--- Add before and after screenshots of your changes -->
## Benefits of this PR and context:
<!--- Please explain why we should accept this PR. If this fixes an outstanding bug, please reference the issue # -->
## How Has This Been Tested?
<!--- Please describe in detail how you tested your changes. -->
<!--- Include details of your testing environment, and the tests you ran to -->
<!--- see how your change affects other areas of the code, etc. -->
## Source / References:
<!--- Please include any forum posts/github links relevant to the PR -->

25
.github/release.yml vendored Normal file
View File

@ -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:
- "*"

71
.github/workflows/auto-build.yml vendored Normal file
View File

@ -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

65
.github/workflows/docker-build.yml vendored Normal file
View File

@ -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

69
.github/workflows/minify-and-deploy.yml vendored Normal file
View File

@ -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: ''

View File

@ -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;

View File

@ -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"