Skip to content

Commit

Permalink
feat(issue-templates): add theme submission template and enable blank…
Browse files Browse the repository at this point in the history
… issues

This commit introduces a new issue template for submitting themes to the library, allowing users to provide essential information such as name, description, image URL, and styles. Additionally, it enables blank issues to facilitate user feedback or requests that may not fit existing templates. The previous feature request and bug report templates have been removed to streamline the process.

These changes aim to enhance user engagement and simplify the theme submission workflow.
  • Loading branch information
amnweb committed Aug 29, 2024
1 parent 1ca9e4e commit 8192f14
Show file tree
Hide file tree
Showing 26 changed files with 493 additions and 2,895 deletions.
1 change: 1 addition & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
blank_issues_enabled: true
62 changes: 62 additions & 0 deletions .github/ISSUE_TEMPLATE/create-theme.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
name: Sumbit a theme
description: Submit a theme to be added to the theme library.
title: "[create-theme]: "
labels: ["new-theme"]
body:
- type: input
id: name
attributes:
label: Name
description: The name of the theme. With a maximum of 25 characters (only letters, numbers and spacesa allowed).
placeholder: Theme Name
validations:
required: true
- type: input
id: description
attributes:
label: Description
description: A brief description of the theme. With a maximum of 100 characters.
placeholder: Theme Description
validations:
required: true
- type: input
id: homepage
attributes:
label: Homepage
description: The URL of the theme's homepage or repository.
placeholder: https://github.com/...
- type: input
id: image
attributes:
label: Image
description: "A URL to an image representing the theme. It can be a temporary image, it will be cloned to the theme library. Note: The image must be a PNG file. E.g. an imgur link. This image should contain a preview of the bar only."
placeholder: https://...
validations:
required: true
- type: textarea
id: styles
attributes:
label: Theme Styles
render: css
description: The CSS styles for the theme.
validations:
required: true
- type: textarea
id: config
attributes:
label: Theme Config
render: yaml
description: The config file for the theme.
validations:
required: true
- type: textarea
id: readme
attributes:
render: markdown
label: Readme
description: The markdown README file for the theme. You can create a nice readme with a preview of the theme.
validations:
required: true
- type: markdown
attributes:
value: "Please review the information before submitting your theme."
20 changes: 0 additions & 20 deletions .github/ISSUE_TEMPLATE/✨feature-request.md

This file was deleted.

20 changes: 0 additions & 20 deletions .github/ISSUE_TEMPLATE/❤send-your-theme.md

This file was deleted.

38 changes: 0 additions & 38 deletions .github/ISSUE_TEMPLATE/🐞bug-report.md

This file was deleted.

63 changes: 0 additions & 63 deletions .github/generate-readme.py

This file was deleted.

95 changes: 0 additions & 95 deletions .github/generate-theme.py

This file was deleted.

36 changes: 36 additions & 0 deletions .github/scripts/generate-readme.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
import os
import json

THEMES_DATA_FILE = './themes.json'

def load_themes_data():
with open(THEMES_DATA_FILE, 'r') as f:
return json.load(f)

def generate_readme(themes_data):
with open('README.md', 'w') as readme:
readme.write('<div id="toc" align="center"><a href="https://github.com/amnweb/yasb"><img src="https://raw.githubusercontent.com/amnweb/yasb/main/src/assets/images/app_icon.png" width="64"></a><ul style="list-style:none"><summary><h2>Theme repository for YASB</h2></summary></ul></div>\n\n')
readme.write('## Submitting a Theme\n\n')
readme.write('To submit a theme, please follow these steps:\n')
readme.write('1. Open an issue in [this template](https://github.com/amnweb/yasb-themes/issues/new?assignees=&labels=new-theme&projects=&template=create-theme.yml&title=%5Bcreate-theme%5D%3A+) with the title `[create-theme]: <theme-name>`\n')
readme.write('2. Fill out the template with the necessary information\n')
readme.write('3. Submit the issue\n')
readme.write('4. Let us take care of the rest!\n')
readme.write('## Updating a Theme\n\n')
readme.write('To update a theme, please follow these steps:\n')
readme.write('1. Create a new pull request with the updated theme.\n')
readme.write('2. Make sure to include the theme name in the title.\n')
readme.write('3. Submit the pull request.\n')
readme.write('4. Let us take care of the rest!.\n')
readme.write('> This applied to any other actions you want to take with the themes in this repository, such as deleting a theme.\n\n')
readme.write('## Latest Themes\n')
for theme_id, theme_data in themes_data.items():
name = theme_data['name']
image = theme_data['image']
readme.write(f'## [{name}](themes/{theme_id})\n\n')
readme.write(f'<a title="{name} YASB Theme" href="themes/{theme_id}"><img src="{image}" width="830px"></a>\n\n')
readme.write('\n')

if __name__ == "__main__":
themes_data = load_themes_data()
generate_readme(themes_data)
Loading

0 comments on commit 8192f14

Please sign in to comment.