feat: write a contributing guide to help users to add their own icon alone
							
								
								
									
										22
									
								
								CONTRIBUTING.md
									
									
									
									
									
										Normal file
									
								
							
							
						
						@ -0,0 +1,22 @@
 | 
			
		||||
# How adding a new set icon
 | 
			
		||||
 | 
			
		||||
## Prerequisites
 | 
			
		||||
 | 
			
		||||
You need to have a icomoon account: https://icomoon.io/app/
 | 
			
		||||
For future steps, i recommande to import actual set of keyrune's icons in icomoon.
 | 
			
		||||
 | 
			
		||||

 | 
			
		||||
 | 
			
		||||
A model asking for "The glyphs in your SVG font were loaded.
 | 
			
		||||
Use this font's metrics and metadata when exporting fonts?" will appear, click on "Yes".
 | 
			
		||||
 | 
			
		||||

 | 
			
		||||
 | 
			
		||||
🎉 Success, you have now all the keyrune's icons in your icomoon project. That will be useful for the next steps when we need to generate the font.
 | 
			
		||||
 | 
			
		||||
## Summary
 | 
			
		||||
 | 
			
		||||
1. [Update fonts and svg with the new icon](./contributing/UpdateFonts.md)
 | 
			
		||||
2. [Update codebase to handle the new icon](./contributing/UpdateCodebase.md)
 | 
			
		||||
3. [Generate associated css](./contributing/GenerateCss.md)
 | 
			
		||||
4. [Update the documentation](./contributing/UpdateDocumentation.md)
 | 
			
		||||
							
								
								
									
										22
									
								
								contributing/GenerateCss.md
									
									
									
									
									
										Normal file
									
								
							
							
						
						@ -0,0 +1,22 @@
 | 
			
		||||
# Generate CSS
 | 
			
		||||
 | 
			
		||||
> exemple with the set icon of the set "Fondation" (FDN)
 | 
			
		||||
 | 
			
		||||
## Steps
 | 
			
		||||
 | 
			
		||||
Generate the CSS file with the following command:
 | 
			
		||||
 | 
			
		||||
```bash
 | 
			
		||||
npm run lessmin & sassmin
 | 
			
		||||
```
 | 
			
		||||
or for debug purpose you can run 
 | 
			
		||||
 | 
			
		||||
```bash
 | 
			
		||||
npm run less & sass
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
2 files will be generated in the `css` folder: `keyrune.css` and `keyrune.min.css`.
 | 
			
		||||
 | 
			
		||||

 | 
			
		||||
 | 
			
		||||
Yaay 🎉 you have generate the CSS file! Now you can use the new icon in the website. Follow the [Usage inside README.md](../README.md#usage)
 | 
			
		||||
							
								
								
									
										27
									
								
								contributing/UpdateCodebase.md
									
									
									
									
									
										Normal file
									
								
							
							
						
						@ -0,0 +1,27 @@
 | 
			
		||||
# Update Codebase
 | 
			
		||||
 | 
			
		||||
> exemple with the set icon of the set "Fondation" (FDN)
 | 
			
		||||
 | 
			
		||||
## Prerequisites
 | 
			
		||||
 | 
			
		||||
You need to have `lessc` and `sass` installed on your computer.
 | 
			
		||||
 | 
			
		||||
## Steps
 | 
			
		||||
 | 
			
		||||
1. Open the `sass/_variables.scss` file in the repository.
 | 
			
		||||
2. Add the new set icon in the `@keyrune-icons` list. (You can see that i add the short code `fdn` and the unicode character `1f31f`)
 | 
			
		||||
    ```diff
 | 
			
		||||
    + ("Foundations", "fdn", "\1f31f"),
 | 
			
		||||
    ```
 | 
			
		||||
 | 
			
		||||
3. Open the `less/icons.less` file in the repository.
 | 
			
		||||
4. Add the new set icon in the `@keyrune-icons` list. (You can see that i add the short code `fdn` and the unicode character `1f31f`)
 | 
			
		||||
    ```diff
 | 
			
		||||
    + .@{ss-prefix}-fdn:before { content: "\1f31f"; } // Foundation
 | 
			
		||||
    ```
 | 
			
		||||
 | 
			
		||||
Yaay 🎉 you have update the codebase now everything is ready only one steps to use the new icon
 | 
			
		||||
 | 
			
		||||
---
 | 
			
		||||
**Go to the next step: [Generate CSS](./GenerateCss.md)**
 | 
			
		||||
---
 | 
			
		||||
							
								
								
									
										1
									
								
								contributing/UpdateDocumentation.md
									
									
									
									
									
										Normal file
									
								
							
							
						
						@ -0,0 +1 @@
 | 
			
		||||
# Update existing documentation
 | 
			
		||||
							
								
								
									
										54
									
								
								contributing/UpdateFonts.md
									
									
									
									
									
										Normal file
									
								
							
							
						
						@ -0,0 +1,54 @@
 | 
			
		||||
# Update Fonts
 | 
			
		||||
 | 
			
		||||
> exemple with the set icon of the set "Fondation" (FDN)
 | 
			
		||||
 | 
			
		||||
## Steps
 | 
			
		||||
 | 
			
		||||
1. Search for the icon you want to add (from scryfall.com: https://svgs.scryfall.io/sets/fdn.svg) and download it (inspect DOM and copy/paste in a blank file). Save it in a temporary folder in your desktop.
 | 
			
		||||
 | 
			
		||||
2. On icomoon, click on the "Import Icons" button. Select the previously downloaded icon. It will be added in a "Untilited Set".
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
3. Now you need to select all the icons you want to add in the font + the new one. On top right of each section you can find a menu with "Select all" and "Deselect all".
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
4. On the bottom of the page, you can check that you have the right number of icons selected. (Actual number + 1, the new one)
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
5. You can now click on the "Generate Font" button. You will be redirect to a page whith all setting for each icon.
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
6. Find your new icon and click on the "smiley" button to search for a unicode character and select it.
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    🚧 Be sure to select a character that is not already used in the font.🚧
 | 
			
		||||
 | 
			
		||||
    You can check how your icon will be displayed in the font by clicking on the "Get code </>" button.
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
> If you have info about how to determine wich character is free, please add it in this doc here. 🙏
 | 
			
		||||
> What I do is when i have selected my unicode character, i search in all the codebase if it's already used. If not, i use it.
 | 
			
		||||
 | 
			
		||||
7. You can now donwload the font by clicking on the "Download" button. You get a zip file with all the files needed.
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
8. Unzip the file and copy the `fonts` folder in the keyrune `fonts` folder. Normally you will have the `keyrune.eot`, `keyrune.svg`, `keyrune.ttf`, `keyrune.woff` files.
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
Yaay 🎉 you have update the keyrune font! And have your new icon available.
 | 
			
		||||
 | 
			
		||||
---
 | 
			
		||||
**Go to the next step: [Update codebase to handle the new icon](./UpdateCodebase.md)**
 | 
			
		||||
---
 | 
			
		||||
 | 
			
		||||
## Extra steps
 | 
			
		||||
 | 
			
		||||
One files is missing inside the generated fonts, it's the `keyrune.woff2`. To get it you need to convert the `keyrune.woff` with online tools like [Cloudconvert](https://cloudconvert.com/woff-to-woff2)
 | 
			
		||||
							
								
								
									
										
											BIN
										
									
								
								contributing/images/check-number.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| 
		 After Width: | Height: | Size: 32 KiB  | 
							
								
								
									
										
											BIN
										
									
								
								contributing/images/download-font.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| 
		 After Width: | Height: | Size: 20 KiB  | 
							
								
								
									
										
											BIN
										
									
								
								contributing/images/fonts-folder.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| 
		 After Width: | Height: | Size: 60 KiB  | 
							
								
								
									
										
											BIN
										
									
								
								contributing/images/generate-css.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| 
		 After Width: | Height: | Size: 21 KiB  | 
							
								
								
									
										
											BIN
										
									
								
								contributing/images/generate-font.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| 
		 After Width: | Height: | Size: 20 KiB  | 
							
								
								
									
										
											BIN
										
									
								
								contributing/images/icon-settings.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| 
		 After Width: | Height: | Size: 32 KiB  | 
							
								
								
									
										
											BIN
										
									
								
								contributing/images/import-icon-btn.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| 
		 After Width: | Height: | Size: 9.8 KiB  | 
							
								
								
									
										
											BIN
										
									
								
								contributing/images/import-icon-modal.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| 
		 After Width: | Height: | Size: 41 KiB  | 
							
								
								
									
										
											BIN
										
									
								
								contributing/images/import-icon.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| 
		 After Width: | Height: | Size: 18 KiB  | 
							
								
								
									
										
											BIN
										
									
								
								contributing/images/preview-icon.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| 
		 After Width: | Height: | Size: 83 KiB  | 
							
								
								
									
										
											BIN
										
									
								
								contributing/images/select-all.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| 
		 After Width: | Height: | Size: 348 KiB  | 
							
								
								
									
										1419
									
								
								css/keyrune.css
									
									
									
									
									
								
							
							
						
						| 
		 Before Width: | Height: | Size: 928 KiB After Width: | Height: | Size: 930 KiB  | 
@ -178,6 +178,7 @@
 | 
			
		||||
.@{ss-prefix}-otj:before { content: "\e9cc"; } // Outlaws of Thunder Junction
 | 
			
		||||
.@{ss-prefix}-blb:before { content: "\e9cd"; } // Bloomburrow
 | 
			
		||||
.@{ss-prefix}-dsk:before { content: "\1f305"; } // Duskmourn: House of Horror
 | 
			
		||||
.@{ss-prefix}-fdn:before { content: "\1f31f"; } // Foundation
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * Command Zone */
 | 
			
		||||
 | 
			
		||||
@ -246,7 +246,7 @@ $keyrune_sets: (
 | 
			
		||||
    ("Outlaws of Thunder Junction", "otj", "\e9cc"),
 | 
			
		||||
    ("Bloomburrow", "blb", "\e9cd"),
 | 
			
		||||
    ("Duskmourn: House of Horror", "dsk", "\1f305"),
 | 
			
		||||
    //
 | 
			
		||||
    ("Foundations", "fdn", "\1f31f")
 | 
			
		||||
    // Command zone
 | 
			
		||||
    ("Vanguard", "van", "\e655"),
 | 
			
		||||
    ("Planechase 2009", "hop", "\e656"),
 | 
			
		||||
 | 
			
		||||