1
0
mirror of https://github.com/simple-icons/simple-icons.git synced 2024-11-26 01:00:27 +02:00
Commit Graph

498 Commits

Author SHA1 Message Date
Álvaro Mondéjar
8b2dd76360
Minify icon HEX colors in website (#4333)
Only affects `background-color` style property, not to color HEX strings displayed under icon names.
2020-12-14 11:05:49 +01:00
Álvaro Mondéjar
25213c0cb0
Fix errors in website search and remove uneeded statements (#4309)
* Fix error in search and clean website statements

* Remove 'active' class from 'sort-color' sorter

* Add 'order-by-color' class to body

* Remove newlines
2020-12-11 21:56:09 +01:00
Álvaro Mondéjar
fa7b6bbba1
Remove 'index.html' empty lines to reduce built file size. (#3824)
* Remove most of 'index.html' newlines to reduce built file size.

* Add more whitespace control statements.
2020-11-12 14:06:25 +01:00
Peter Noble
c8a1c993ea
Fix alphabetical sorting on website (#3300) 2020-07-09 13:42:35 +03:00
Peter Noble
f01afa9686
Normalise accented characters in website search (#3180)
* Normalise accented characters in website search

* Move icon name normalisation to Liquid
2020-06-23 18:21:10 +03:00
Eric Cornelissen
7240661db9
Update filename logic for website (#2654)
* Implement #2625 for Jekyll
2020-02-21 14:53:36 +00:00
Eric Cornelissen
6d8e403ca5
Add icon count to website & README (#2639) 2020-02-20 16:13:19 +00:00
Eric Cornelissen
4d1b1db1bd Improve Formula for Display Colours (#2375)
* Update luminance formula

Following #2315 this updates the formula for computing the luminance
of a brand colour and selecting the appropriate colour class.

--

Co-Authored-By: Peter Noble <PeterShaggyNoble@users.noreply.github.com>

* Update luminance threshold from 210 to 160
2020-01-22 23:34:49 +01:00
Eric Cornelissen
6515420391 Add packagist link to website header (#1702) 2019-10-10 12:52:03 +02:00
Eric Cornelissen
ea62a9c20c
Handle accented brand names in Jekyll (#1463)
* Handle accented brand names in Jekyll
2019-06-09 15:12:38 +01:00
Eric Cornelissen
579d439e60
Lint file formatting (primarily whitespace) (#1349)
* Add editorconfig-checker and .editorconfig

* Fix wslint errors
2019-04-17 12:59:44 +03:00
Eric Cornelissen
db442fb0c1 Improve search performance (#1170)
* Improve performance of search on website

By reducing the number of times a search query loops over all icons or
all icons that match the search query (from 3 to 1 and 2 to 0
respectively) the search on simpleicons.org should now be noticeably
faster (if it was slow before). Especially in conjunction with #1169.

This was achieved by utilizing CSS (which operates faster then plain
JavaScript) to do most of the heavy lifting. A class on <body> now
dictates the order of the icons rather then a JavaScript for-loop (found
in the removed function `orderIcons`).

It was also achieved by more cleverly utilizing the fuzzy search logic
and recognizing that the CSS `order` property also works if number are
not consecutive. Less relevant numbers will have a higher value assigned
by fuzzy search, which is what the `order`-value of the icon will
become, removing the need for sorting and an additional loop.

Some resources that helped me:
- https://css-tricks.com/css-attr-function-got-nothin-custom-properties/
- https://developer.mozilla.org/en-US/docs/Web/CSS/Using_CSS_variables
    Specifically the "Values in JavaScript" section

* * *

One unrelated change in stylesheet.css where 2 separate rulesets for
.grid-item__link have been merged.

* Simplify script with regard to button states

* Reduce complexity of `previousQuery` variables
2019-02-03 22:31:22 +01:00
Eric Cornelissen
4b882220ef Remove aria-labelledby and ids from SVGs (#1062)
* Remove `id` and `aria-labelledby` from all SVGs

* Update SVGLint configuration

* Remove `aria-labelledby` from documentation

* Remove `aria-labelledby` from website

because why not
2018-11-06 17:10:17 +01:00
Eric Cornelissen
781560abba Update no search results message (#1036)
* Restore "No matching icons found." message

* Update message when no icons are found

with a message that links to a new issue
2018-10-29 18:21:34 +01:00
Eric Cornelissen
856d37bdb8 Fix inconcistent search results due to search term normalization (#983)
Closes #981
2018-09-23 22:19:32 +02:00
Aaron Benjamin
038c558fab Add Apple Pay, AT&T, T-Mobile, Sprint, Verizon, Boost, Framer (#973)
* add new icons

- add icon for AT&T
- add icon for T-mobile
- add icon for Sprint
- add icon for Cricket
- add icon for Verizon
- add icon for Boost
- add icon for Framer
- add icon for Sketch
- Update _data/simple-icons.json with new icon data

* remove `<g>` from svg files

- remove `<g>` from svg files to address svglint error

* add apple pay

- Add apple pay
- Update simple-icons.json

* make changes per review

Changes were made based on review 9/9/18.

* fixed AT&T naming
2018-09-11 08:42:29 +02:00
Eric Cornelissen
b339df0b61 Update filemapping, ampersand (#977)
* Replace ampersand to avoid problems with filenames

Together with some examples as test

* Revert filename changes for testing purposes
2018-09-10 17:53:59 +02:00
Eric Cornelissen
0747029205 Website/sort and search (#949)
* Disable sort buttons when there is a search query

* Restore sorting order when search query is removed

* Update comment

* Add button to sort by relevance (non-functional)

As discussed in #949. Relatedly also removed the functionality that 
disabled the "sort by color" and "sort alphabetically" buttons (and 
related styling).

* Update sorting behaviour

Refactored to sorting algorithms into a single function and updated 
relevant code. The "sort by relenvance" button is now functional, and is 
automatically actived when the user starts searching, but not when 
updating their search query.

* Restore sorting ordre when search query is removed

* Only sort when needed

* Refactor activing a sorting button/selecting a soring order

* Renaming variables and functions

* Add colors to "order by relevance" button on hover
2018-09-01 11:20:04 +02:00
Danial
3a4fcb01a5
Page search find .NET Google+ etc
closes #902
Allow search to find `.NET`, `Google+` etc.
2018-07-27 12:08:13 +12:00
birjolaxew
276f7d05c6
Remove potentional extra dashes from title->filename mapping
Removes dashes at start/end of filename that would appear as result of
mapping
This is *very* hacky, but such is Jekyll
2018-07-21 13:30:15 +02:00
birjolaxew
d5585894df
Limit destructive filename mapping
Changes our title -> filename mapping to be less destructive
There is still some information lost (namely "!" and "`")
Closes #882
2018-07-20 22:23:11 +02:00
Johan Fagerberg
859329187a
Update ad link
Carbon Ads have changed their link structure.
2018-05-22 22:32:23 +02:00
Eric Cornelissen
c639949524 Extract CSS and JavaScript from HTML
Put all of the CSS and most of the JavaScript into their own file. The
JavaScript that is left in HTML depends on some Liquid logic present in
the HTML.
2018-01-03 18:41:32 +01:00
Eric Cornelissen
23e3aab6ca Change "Sort on colors" to "Sort by color" 2017-12-23 10:44:29 +01:00
Eric Cornelissen
31dbee22bf Update hover animation for sort buttons
The sort button for colors now shows a range of reds when hovered,
whereas the sort button for alphabetic sorting just highlights the
letters when hovered.
2017-12-22 23:20:01 +01:00
Eric Cornelissen
5cb1ffdef0 Remove "temp-" ID prefixes 2017-12-22 22:53:02 +01:00
Eric Cornelissen
75bd74ff6c Add buttons to sort either on color or alphabet
As suggested by @rosslh, add buttons to choose how you want to sort the
icons.
2017-12-21 22:54:11 +01:00
Eric Cornelissen
98cf145270 Order icons alphabetically 2017-12-21 22:32:01 +01:00
Eric Cornelissen
cce1196176 Implement suggestions by @birjolaxew
Remove unnecessary styling on grid item title and changed grid row
height to min-content.
2017-12-01 12:45:07 +01:00
Eric Cornelissen
712c84bbc3 Fix grid item overflow due to text
Fixed the bug reported in #682 where grid items could overflow due to
long titles.

Solved the problem by allowing for wrapping in grid item titles, and
centering the contents of grid-items using flexbox. Also slightly
increased the size of grid-items.
2017-11-30 16:19:01 +01:00
Eric Cornelissen
9ed48875bf Fix search activation when no query is present
Closes #661, as pointed out by @birjolaxew the return value by
getUrlParameter() will not be null but an empty string (which is a falsy
value) if no query is present, checking for truthiness should work
correctly.
2017-11-02 21:03:55 +01:00
Johan Fagerberg
04d9c945cc
Merge pull request #659 from ericcornelissen/fuzzy-search
Add fuzzy search
2017-11-02 00:36:11 +01:00
Eric Cornelissen
bc97a6e0ec Use custom URL parser for query parameter
As pointed out by @birjolaxew, URLSearchParams isn't supported by IE.
Hence, adding a custom URL parser to get the query parameter.
2017-11-01 22:55:05 +01:00
Eric Cornelissen
077b8bb794 Implement fuzzy search
Updated the search method from a simple partially-equals method to a
fuzzy search (also Approximate string matching) implementation.

My implementation is based on an implementation by @ wouter2203:
https://github.com/wouter2203/fuzzy-search
2017-11-01 22:05:24 +01:00
Eric Cornelissen
b395b7837a Add support for search query in URL
As discussed in #648, implemented JavaScript based support for a search
query in the URL. This feature does two things:
1. If you go to `www.simpleicons.org/?q=adobe`, the page will load with
a search query for the string `'adobe'`.
2. If you start searching on `www.simpleicons.org`, the url will be
updated with each keystroke to `www.simpleicons.org/?q=hellowor`.

Since `window.history.replaceState` is being used, this changing of the
URL does not mess with the browser history. I.e. if the user came from
www.google.com, started searching and press the back button they will
return to www.google.com immediately.
2017-11-01 21:17:23 +01:00
Johan Fagerberg
5dd166d2d2 Merge pull request #649 from ericcornelissen/usability-noscript
Small usability improvement for users with JavaScript disabled (low priority)
2017-10-22 20:49:26 +02:00
Mudlabs_Monster
74c92db20a Fixed footer content slice issue #651 by adding 'align-items: center' to .footer 2017-10-22 15:42:16 +11:00
Eric Cornelissen
47d5f64f08 Small usability improvement for users with JavaScript disabled 2017-10-17 21:15:07 +02:00
Eric Cornelissen
b51f8b889b Add link for the NPM package to index.html 2017-09-20 10:24:28 +02:00
Eric Cornelissen
6991beae11 Push footer to bottom of the page
Now the <footer> is pushed to the bottom of the page
when the icons don't fill up the screen.
2017-09-17 17:58:41 +02:00
Johan Fagerberg
f95397b785 Update links in index.html
Updates links in index.html to refer to simple-icons/simple-icons instead of danleech/simple-icons
2017-09-11 21:25:34 +02:00
Johan Fagerberg
0a4de96f27 Update Google Analytics
With the inactivity of @danleech, this changes the GA tracking to one controlled by me (interested contributors can be added to GA upon request)
2017-09-11 21:23:20 +02:00
Eric Cornelissen
25a4350882 Change dark color to dark gray instead of black 2017-08-03 13:15:39 +02:00
Eric Cornelissen
553aa4b8fb Use BEM naming and inherit colors 2017-08-03 13:13:31 +02:00
Eric Cornelissen
8e3028c5fc Tweak Luminance thresold for darkened icon 2017-08-02 15:50:38 +02:00
Eric Cornelissen
1376b5f255 Contrast ratio proof of concept
Initial implementation of making icons/text dark on a light background, as
suggested in issue #480. This implementation is based on the suggestion by
@pushrax, using the formula provided on
http://chilliant.blogspot.nl/2012/08/srgb-approximations-for-hlsl.html

Note that this implementation is not yet as desired, as it still darkens
some icons we might not want darkened and the dark color is currently full
black.

I also used this link in the process of making this:
http://springmeier.org/www/contrastcalculator/index.php
2017-08-02 15:46:03 +02:00
birjolaxew
48632664bc
Change size/alignment of empty message 2017-07-10 13:02:23 +02:00
birjolaxew
388f1f9741
Normalize search terms 2017-07-10 12:56:28 +02:00
nietonfir
f06e07ec98 Notify the user when nothing is found 2017-07-10 00:06:04 +02:00
nietonfir
69ae7706aa Apply trim() on the search input 2017-07-09 23:04:04 +02:00