Skip to content
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

Publish 7 new icons and 4 updated icons #3218

Merged
merged 32 commits into from Jun 14, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
3934363
Update dependency uglify-js to v3.9.4 (#3146)
renovate[bot] Jun 1, 2020
6fa26b0
Update Bitwarden color (#3150)
vigonotion Jun 1, 2020
4b87214
Add N26 (#3133)
vigonotion Jun 2, 2020
0436ff6
Add flutter package (#3138)
Jun 2, 2020
5ecfcf2
Add Jasmine (#3152)
mondeja Jun 2, 2020
c7bf078
Add KTM (#2985) (#2997)
irgusite Jun 2, 2020
6a42b0b
Add Metro de Madrid (#3153)
mondeja Jun 2, 2020
5d46b58
Add GeeksforGeeks icon (#3072)
phatbhoy67 Jun 3, 2020
89c101b
Add Metro de Ciudad de México (#3156)
mondeja Jun 4, 2020
416def1
Add Tunein (#3115)
NovaGL Jun 4, 2020
3ac56d1
Add Prime Video (#3025)
PeterShaggyNoble Jun 4, 2020
4af3a7b
Add Shenzhen Metro (#3158)
mondeja Jun 4, 2020
148a5d1
Add Scratch (#2872)
PeterShaggyNoble Jun 4, 2020
cb7ea5f
Add Tokyo Metro (#3157)
mondeja Jun 4, 2020
0a301e1
Update SpaceX (#3159)
PeterShaggyNoble Jun 5, 2020
6e818c0
Add VirusTotal icon (#3182)
KTibow Jun 5, 2020
7293a0e
version bump
ericcornelissen Jun 7, 2020
b234c8f
Update dependency editorconfig-checker to v3.1.0 (#3188)
renovate[bot] Jun 8, 2020
e64b7d5
Update Apache Pulsar (#3181)
mondeja Jun 9, 2020
540635c
Adds Quasar (#3144)
Berkmann18 Jun 9, 2020
0756e1d
Add a SVGO Docker image for Simpleicons formatting (#1532)
oleg-nenashev Jun 9, 2020
faaf49d
Add Canonical (#3184)
gizmecano Jun 9, 2020
be2741f
Add Prime (#3010)
PeterShaggyNoble Jun 9, 2020
5da34c7
Add linter to check svg path dimensions (#3107)
davidjb Jun 10, 2020
d90fc59
Add DHL (#3048)
finnkuhn Jun 10, 2020
3989dd1
Add Openlayers icon (#3165)
mondeja Jun 11, 2020
e6f6dbb
Update Fur Affinity icon (#2979)
KovuTheHusky Jun 11, 2020
1b78c89
Update Jupyter icon (#3170)
PeterShaggyNoble Jun 11, 2020
bbf35c8
Update Apache ECharts (#3166)
PeterShaggyNoble Jun 11, 2020
6d1dbfe
Land Rover (#3195)
NovaGL Jun 11, 2020
9788036
Add Der Spiegel (#3168)
PeterShaggyNoble Jun 11, 2020
bd742e7
version bump
ericcornelissen Jun 14, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
11 changes: 11 additions & 0 deletions .dockerignore
@@ -0,0 +1,11 @@
node_modules/

# Jekyll
_site/
.sass-cache/
.jekyll-cache/
.jekyll-metadata

# Build files
icons/*.js
/index.js
292 changes: 292 additions & 0 deletions .svglint-ignored.json

Large diffs are not rendered by default.

26 changes: 25 additions & 1 deletion .svglintrc.js
@@ -1,7 +1,11 @@
const data = require("./_data/simple-icons.json");
const { htmlFriendlyToTitle } = require("./scripts/utils.js");
const getBounds = require("svg-path-bounding-box");

const titleRegexp = /(.+) icon$/;
const iconSize = 24;
const iconFloatPrecision = 3;
const iconIgnored = require("./.svglint-ignored.json");

module.exports = {
rules: {
Expand All @@ -14,7 +18,7 @@ module.exports = {
attr: [
{ // ensure that the SVG elm has the appropriate attrs
"role": "img",
"viewBox": "0 0 24 24",
"viewBox": `0 0 ${iconSize} ${iconSize}`,
"xmlns": "http://www.w3.org/2000/svg",

"rule::selector": "svg",
Expand All @@ -32,6 +36,8 @@ module.exports = {
],
custom: [
function(reporter, $, ast) {
reporter.name = "icon-title";

const iconTitleText = $.find("title").text();
if (!titleRegexp.test(iconTitleText)) {
reporter.error("<title> should follow the format \"[ICON_NAME] icon\"");
Expand All @@ -46,6 +52,24 @@ module.exports = {
}
}
},
function(reporter, $, ast) {
reporter.name = "icon-size";

const iconPath = $.find("path").attr("d");
if (iconIgnored.hasOwnProperty(iconPath)) {
return;
}

const bounds = getBounds(iconPath);
const width = +bounds.width.toFixed(iconFloatPrecision);
const height = +bounds.height.toFixed(iconFloatPrecision);

if (width === 0 && height === 0) {
reporter.error("Path bounds were reported as 0 x 0; check if the path is valid");
} else if (width !== iconSize && height !== iconSize) {
reporter.error(`Size of <path> must be exactly ${iconSize} in one dimension; the size is currently ${width} x ${height}`);
}
},
]
}
};
34 changes: 34 additions & 0 deletions CONTRIBUTING.md
Expand Up @@ -13,6 +13,7 @@ Simple Icons welcomes contributions and corrections. Before contributing, please
* [Requesting an Icon](#requesting-an-icon)
* [Adding or Updating an Icon](#adding-or-updating-an-icon)
* [Building the Website](#building-locally)
* [Using Docker](#using-docker)

## Requesting an Icon

Expand Down Expand Up @@ -90,6 +91,12 @@ All icons in Simple Icons have been optimized with the [SVGO tool](https://githu
* Set the precision to about 3, depending on if there is a loss of quality.
* Leave the remaining settings untouched (or reset them with the button at the bottom of the settings).
* Click the download button.
* The [SVGO Command Line Tool](https://github.com/svg/svgo) in Docker
* If none of the options above work for you, it is possible to build a Docker image for compressing the images.
* Build: `docker build . -t simple-icons`
* Run: `docker run --rm -v ${PWD}/icons/file-to-optimize.svg:/image.svg simple-icons`

After optimizing the icon, double-check it against your original version to ensure no visual imperfections have crept in. Also make sure that the dimensions of the path have not been changed so that the icon no longer fits exactly within the canvas. We currently check the dimensions up to a precision of 3 decimal points.

### 4. Annotate the Icon

Expand Down Expand Up @@ -222,6 +229,33 @@ Alternatively, you can build and run the website in a readily configured online

[![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io#https://github.com/simple-icons/simple-icons)

## Using Docker

You can build a Docker image for this project from the Dockerfile by running:

```bash
# Build the Docker image for simple-icons (if you haven't yet)
$ docker build . -t simple-icons

# Start a Docker container for simple-icons and attach to it
$ docker run -it --rm --entrypoint "/bin/ash" simple-icons
```

### Jekyll Server using Docker

To use a Docker container to run the Jekyll server for the website, run:

```bash
# Start a container running `jekyll serve` in the background
$ docker run -d -p 4000:4000 --rm --volume $PWD:/srv/jekyll --name simple-icons-server jekyll/jekyll jekyll serve

# Inspect the server logs
$ docker logs simple-icons-server

# Stop the server (and delete the container)
$ docker stop simple-icons-server
```

---

# Versioning
Expand Down
11 changes: 11 additions & 0 deletions Dockerfile
@@ -0,0 +1,11 @@
FROM alpine:3.12

RUN apk add --update nodejs npm

WORKDIR /simple-icons
COPY package*.json /simple-icons/
RUN npm install

COPY . .

ENTRYPOINT ["npm", "run", "svgo", "--", "/image.svg"]
4 changes: 4 additions & 0 deletions README.md
Expand Up @@ -111,6 +111,10 @@ echo file_get_contents('path/to/package/icons/simple-icons.svg');

Icons are also available as a [Drupal module](https://www.drupal.org/project/simple_icons) created by [Phil Wolstenholme](https://www.drupal.org/u/phil-wolstenholme).

### Flutter

Icons are also available as a [Flutter package](https://pub.dev/packages/flutter_brand_icons) created by [@muj-programmer](https://github.com/muj-programmer).

### Home Assistant

Icons are also available as a [Home Assistant plugin](https://github.com/vigonotion/hass-simpleicons) created by [@vigonotion](https://github.com/vigonotion/).
Expand Down