Skip to content

Commit

Permalink
Merge pull request devicons#1 from konpa/master
Browse files Browse the repository at this point in the history
aa
  • Loading branch information
amacado authored Jun 17, 2020
2 parents d35334f + 9811fe2 commit 3d74439
Show file tree
Hide file tree
Showing 5 changed files with 117 additions and 49 deletions.
77 changes: 49 additions & 28 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,30 +1,51 @@
# Contributing to Devicon

First of all, thanks for taking the time to contribute!

These are not rules, just guidelines that you can follow in order to keep the repository as clean as possible. But if you don't have time to follow all of it, no worries, just create a pull request and I'll make the modifications myself if needed.

And if you think there is a better way to organize this repo, please do not hesitate to share your point of view.

## Submitting icon(s)

Each icon comes in different "versions":
- original
- original-wordmark
- plain
- plain-wordmark
- line
- line-wordmark

This is not mandatory, an icon can only have 1 or 2 versions available. Just keep in mind that the minimum is 1 and the maximum 6 (for now).

The plain and line versions (with or without wordmark) are designed to be available in the final icon font. So they need to stay as simple as possible (one color and ensure that the paths are united before to export to svg). You can use a service like [compressor](https://compressor.io/) or [SVG Editor](https://petercollingridge.appspot.com/svg-editor) in order to optimize the svg file.
<h1>Contributing to Devicon</h1>
<p>
First of all, thanks for taking the time to contribute! This project can only grow and live by your countless contributions. To keep this project maintable we developed some guidelines for contributions.
</p>
<h2>Submitting icon</h2>
<ul>
<li>Create a separated pull request for each icon (no matter how many variations)</li>
<li>Include the name of the icon in the pull request f.e. "new icon: html5 (original, plain, line)"</li>
<li>At least the plain or line version of the icon is required (since those are required for the icon font)</li>
<li>Modify <a href="https://github.com/konpa/devicon/blob/master/devicon.json">devicon.json</a> to include the icon (or variations)</li>
<li>Modify <a href="https://github.com/konpa/devicon/blob/master/devicon-colors.css">devicon-colors.css</a> to include the colored version of the icon</li>
<li>optional: Add a image of the new icon(s) to the description of the pull request</li>
<li>optional: Reference the issues regarding the new icon</li>
</ul>
<h3>Icon formats and naming conventions</h3>
<p>Each icon comes in different variations:</p>
<ul>
<li>original</li>
<li>original-wordmark</li>
<li>plain</li>
<li>plain-wordmark</li>
<li>line</li>
<li>line-wordmark</li>
</ul>
<p>
This is not mandatory, an icon can only have one or two variations available. Just keep in mind that the minimum is 1 and the maximum 6 (for now).
</p>
<p>
The plain and line variations (with or without wordmark) are designed to be available in the final icon font. So they need to stay as simple as possible (one color and ensure that the paths are united before to export to svg). You can use a service like <a href="https://compressor.io/">compressor</a> or <a href="https://petercollingridge.appspot.com/svg-editor">SVG Editor</a> in order to optimize the svg file.
</p>
<p>
The original versions are only available in svg format, so they do not need to be as simple and they can contain numerous colors.
</p>
<p>
Some icons are really simple (like the apple one), so the original version can be used for the icon font. In this case, I'll add an alias so they can be found with the "original" or "plain" naming convention.

##### Organizational guidelines:
- Each icon has his own folder located in the "icons" folder.
- Each icon folder contains one .eps file and as many .svg files as versions available.
- The .eps file contains all available versions of an icon. Each version is contained in a 128px by 128px artboard.
- Each .svg file contains one version of an icon in a "0 0 128 128" viewbox
- The naming convention for the svg file is the following: (icon name)-(original/plain/line)-(wordmark)
</p>
<h3>Organizational guidelines</h3>
<ul>
<li>Each icon has his own folder located in the "icons" folder</li>
<li>Each icon folder contains one .eps file and as many .svg files as versions available</li>
<li>The .eps file contains all available versions of an icon. Each version is contained in a 128px by 128px artboard</li>
<li>Each .svg file contains one version of an icon in a "0 0 128 128" viewbox</li>
<li>The naming convention for the svg file is the following: (icon name)-(original/plain/line)-(wordmark)</li>
</ul>
<h2>Requesting a icon</h2>
<p>When you want to request a new icon please feel free to create a issue following some simple guidelines:</p>
<ul>
<li>Search for other issues already requesting the icon</li>
<li>Create an issue naming it "Icon request: <i>name-of-the-icon</i>"; please create separated issues for each icon</li>
<li>optional: Include links where the icon can be found</li>
</ul>
27 changes: 25 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@ Devicon it's 78 icons and 200+ versions. And it's growing!
See all available icons on the [new website](https://konpa.github.io/devicon/).

## Icon requests

**Please leave a comment [here](https://github.com/konpa/devicon/issues/11) in order to request an icon.**
When you want to request a icon please feel feel to create a issue. See our [contribution guidelines](https://github.com/konpa/devicon/blob/master/CONTRIBUTING.md) for more information.

## How to use

Expand Down Expand Up @@ -92,3 +91,27 @@ Please have a look at the [CONTRIBUTING.md](https://github.com/konpa/devicon/blo
Under [MIT Licence](https://github.com/konpa/devicon/blob/master/LICENSE)

<sub>All product names, logos, and brands are property of their respective owners. All company, product and service names used in this website are for identification purposes only. Use of these names, logos, and brands does not imply endorsement.</sub>

## Go build yourself
### Prerequisites
Install gulp (and gulp plugins)
```bash
npm install
```
### Build the font and export stylesheet
Open [icomoon app](https://icomoon.io/app/#/select) and import [icomoon.json](icomoon.json). Choose _yes_ when beeing asked
if you like to restore the settings stored in the configuration file.

The next step is to click on **Generate font** and download the resulting archive. Extract it
contents and you will find a [fonts](./fonts) directory next to a `style.css`. Replace the content of the `fonts` folder,
merge the `style.css` with [devicon.css](./devicon.css) and follow the next step to build the final stylesheet.

**Note** the merge is required, because some icons are defined as alias, this should be replaced
with a more elegant solution to support automated build processing.

### Build and minify stylesheet
Run the following commands to build the resulting file `devicon.min.css`
```bash
gulp concat-css
gulp minify-css
```
56 changes: 40 additions & 16 deletions devicon.json
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,22 @@
"font": ["plain", "plain-wordmark"]
}
},
{
"name": "clojure",
"tags": ["language"],
"versions": {
"svg": ["original", "line", "plain"],
"font": []
}
},
{
"name": "clojurescript",
"tags": ["language"],
"versions": {
"svg": ["original", "plain"],
"font": []
}
},
{
"name": "codeigniter",
"tags": ["php", "framework"],
Expand Down Expand Up @@ -472,18 +488,18 @@
}
},
{
"name": "java",
"tags": ["programming", "language"],
"name": "jasmine",
"tags": ["testing"],
"versions": {
"svg": ["original", "original-wordmark", "plain", "plain-wordmark"],
"svg": ["plain", "plain-wordmark"],
"font": ["plain", "plain-wordmark"]
}
},
{
"name": "jasmine",
"tags": ["testing"],
"name": "java",
"tags": ["programming", "language"],
"versions": {
"svg": ["plain", "plain-wordmark"],
"svg": ["original", "original-wordmark", "plain", "plain-wordmark"],
"font": ["plain", "plain-wordmark"]
}
},
Expand Down Expand Up @@ -664,32 +680,32 @@
}
},
{
"name": "protractor",
"tags": ["framework", "javascript"],
"name": "postgresql",
"tags": ["database"],
"versions": {
"svg": ["plain", "plain-wordmark"],
"svg": ["original", "original-wordmark", "plain", "plain-wordmark"],
"font": ["plain", "plain-wordmark"]
}
},
{
"name": "postgresql",
"tags": ["database"],
"name": "protractor",
"tags": ["framework", "javascript"],
"versions": {
"svg": ["original", "original-wordmark", "plain", "plain-wordmark"],
"svg": ["plain", "plain-wordmark"],
"font": ["plain", "plain-wordmark"]
}
},
{
"name": "python",
"tags": ["programming", "language"],
"name": "pycharm",
"tags": ["editor"],
"versions": {
"svg": ["original", "original-wordmark", "plain", "plain-wordmark"],
"font": ["plain", "plain-wordmark"]
}
},
{
"name": "pycharm",
"tags": ["editor"],
"name": "python",
"tags": ["programming", "language"],
"versions": {
"svg": ["original", "original-wordmark", "plain", "plain-wordmark"],
"font": ["plain", "plain-wordmark"]
Expand Down Expand Up @@ -951,6 +967,14 @@
"font": ["plain", "plain-wordmark"]
}
},
{
"name": "yunohost",
"tags": ["os"],
"versions": {
"svg": ["original"],
"font": []
}
},
{
"name": "zend",
"tags": ["php", "framework"],
Expand Down
4 changes: 2 additions & 2 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@ var concatCss = require('gulp-concat-css');
var plumber = require('gulp-plumber');

gulp.task('concat-css', function () {
gulp.src(['./devicon.css', './devicon-colors.css'])
return gulp.src(['./devicon.css', './devicon-colors.css'])
.pipe(plumber())
.pipe(concatCss('./devicon.min.css'))
.pipe(gulp.dest('./'));
});

gulp.task('minify-css', function() {
gulp.src('./devicon.min.css')
return gulp.src('./devicon.min.css')
.pipe(plumber())
.pipe(minifyCSS())
.pipe(gulp.dest('./'))
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
},
"homepage": "http://konpa.github.io/devicon/",
"devDependencies": {
"gulp": "^3.8.10",
"gulp": "^4.0.0",
"gulp-concat-css": "^2.0.0",
"gulp-minify-css": "^0.4.3",
"gulp-plumber": "^0.6.6"
Expand Down

0 comments on commit 3d74439

Please sign in to comment.