-
Couldn't load subscription status.
- Fork 629
AO3-7002 Set up skin chooser skins in development #5354
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
weeklies
wants to merge
8
commits into
otwcode:master
Choose a base branch
from
weeklies:AO3-7002
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+228
−122
Open
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
6132946
Rewrite load_user_skins
weeklies 06a82f6
Create official work skin in load_user_skins
weeklies a6a294a
Merge branch 'otwcode:master' into AO3-7002
weeklies e52ae0f
Sync stylesheets
weeklies 70f1a92
dog
weeklies 7fa8645
Try to integrate script with masters/ directory structure
weeklies f9aaf97
Tidy names
weeklies 273787b
Fix the test
weeklies File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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,54 @@ | ||
| # Guide | ||
|
|
||
| This folder contains CSS files for user skins that are loaded into the development database using the provided rake tasks. The skins can be organized into two categories: | ||
| - **Top-Level Skins**: Located in the `top_level/` subdirectory. Skins that are added to the skin chooser and subsequently cached. | ||
| - Preview images for skins should be placed in the `previews/` subdirectory. If no preview is provided, the default preview image will be used. | ||
| - **Parent-Only Skins**: Located in the `parent_only/` subdirectory. Skins that are used as parent components for top-level skins. | ||
|
|
||
| ## Rake tasks | ||
|
|
||
| ### Load user skins | ||
| ```bash | ||
| rake skins:load_official_skins | ||
| ``` | ||
| This task will: | ||
| - Prompt you whether to replace existing skins (`y/n`). | ||
| - Load top-level skins from the main directory and adds them to the skin chooser. | ||
| - Load parent-only skins from the `parent_only/` directory. | ||
|
|
||
| ### Cache skins in skin chooser | ||
| ```bash | ||
| rake skins:cache_chooser_skins | ||
| ``` | ||
| This task caches all skins marked as `in_chooser` and the default skin. | ||
|
|
||
| ## Syntax for skin files | ||
|
|
||
| Each CSS file represents a single skin. The title of the skin should be specified at the top of the file: | ||
| ```css | ||
| /* SKIN: My Awesome Skin */ | ||
| ``` | ||
|
|
||
| ### Parent Relationships | ||
| Skins can specify parent relationships using the `/* PARENTS: */` comment. Parents can be listed by title or by ID for default site skin components: | ||
|
|
||
| ```css | ||
| /* PARENTS: Dark Mode - Midsize, Dark Mode - Screen */ | ||
| ``` | ||
| or | ||
| ```css | ||
| /* PARENTS: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31 */ | ||
| ``` | ||
|
|
||
| ### Additional Metadata | ||
| Skins can include optional metadata: | ||
| - **Description**: Add a description using the `/* DESCRIPTION: */` comment. | ||
| - **Media Queries**: Specify media queries using the `/* MEDIA: ... */` or `/* MEDIA: ... ENDMEDIA */`comment. | ||
|
|
||
| Example: | ||
| ```css | ||
| /* SKIN: Lorem Ipsum */ | ||
| /* DESCRIPTION: This skin serves an important purpose. */ | ||
| /* PARENTS: Snow */ | ||
| /* MEDIA: only screen and (max-width: 62em) ENDMEDIA */ | ||
| ``` |
This file contains hidden or 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 @@ | ||
| This directory contains the parents of the Dark Mode skin. Please refer to [`public/stylesheets/masters/top_level/dark_mode/README.md`](https://github.com/otwcode/otwarchive/tree/master/public/stylesheets/masters/top_level/dark_mode/README.md) for a full overview. |
3 changes: 3 additions & 0 deletions
3
.../masters/dark_mode/dark_mode_midsize_.css → ...ent_only/dark_mode/dark_mode_midsize_.css
This file contains hidden or 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
3 changes: 3 additions & 0 deletions
3
...ters/dark_mode/dark_mode_site_screen_.css → ...only/dark_mode/dark_mode_site_screen_.css
This file contains hidden or 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 |
|---|---|---|
| @@ -1,3 +1,6 @@ | ||
| /* SKIN: Dark Mode - Screen */ | ||
| /* MEDIA: screen */ | ||
|
|
||
| /* 01-CORE, 02-ELEMENTS: Very basics */ | ||
|
|
||
| body, | ||
|
|
||
File renamed without changes.
3 changes: 3 additions & 0 deletions
3
...sheets/masters/snow/snow_site_screen_.css → ...rs/parent_only/snow/snow_site_screen_.css
This file contains hidden or 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 |
|---|---|---|
| @@ -1,3 +1,6 @@ | ||
| /* SKIN: Snow */ | ||
| /* MEDIA: screen */ | ||
|
|
||
| body, | ||
| th, | ||
| tr:hover, | ||
|
|
||
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes.
This file contains hidden or 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,5 @@ | ||
| /* SKIN: Dark Mode */ | ||
| /* PARENTS: Dark Mode - Midsize, Dark Mode - Screen */ | ||
| /* MEDIA: screen */ | ||
|
|
||
| #unused-selector { content: none; } |
File renamed without changes.
3 changes: 3 additions & 0 deletions
3
...fault/low_vision_default_site_screen_.css → ...fault/low_vision_default_site_screen_.css
This file contains hidden or 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
File renamed without changes.
3 changes: 3 additions & 0 deletions
3
.../masters/reversi/reversi_site_screen_.css → ...op_level/reversi/reversi_site_screen_.css
This file contains hidden or 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 |
|---|---|---|
| @@ -1,3 +1,6 @@ | ||
| /* SKIN: Reversi */ | ||
| /* MEDIA: screen */ | ||
|
|
||
| #outer .region, | ||
| #footer .group, | ||
| .post fieldset fieldset, | ||
|
|
||
File renamed without changes.
4 changes: 4 additions & 0 deletions
4
...ters/snow_blue/snow_blue_site_screen_.css → ...evel/snow_blue/snow_blue_site_screen_.css
This file contains hidden or 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 was deleted.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This wasn't part of the issue, but I thought fixing the broken
File.exists?here too would be helpful.