Skip to content

Commit

Permalink
Add LinkedIn icon
Browse files Browse the repository at this point in the history
  • Loading branch information
adamschwartz committed Jan 16, 2015
1 parent a15565d commit 85d5e7c
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 5 deletions.
8 changes: 8 additions & 0 deletions example.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@
enabled: true,
username: "adamfschwartz"
},
linkedin: {
enabled: true,
username: "adamschwartz"
},
github: {
enabled: true,
username: "adamschwartz"
Expand All @@ -30,6 +34,10 @@
enabled: true,
username: "adamfschwartz"
},
linkedin: {
enabled: true,
username: "adamschwartz"
},
github: {
enabled: true,
username: "adamschwartz"
Expand Down
9 changes: 8 additions & 1 deletion social-icons.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,14 @@ SVG =
</svg>
"""

linkedin: (color, size) -> """
<svg style="display: inline-block; width: #{ size }; height: #{ size }" xmlns="http://www.w3.org/2000/svg" class="linkedin-icon" viewBox="-.8325 -.8325 68.65 68.65" role="img">
<path fill="#{ if color is 'auto' then '#4875b4' else color }" d="M49.837,48.137V36.425c0-6.275-3.35-9.195-7.816-9.195 c-3.604,0-5.219,1.983-6.119,3.374V27.71h-6.79c0.09,1.917,0,20.427,0,20.427h6.79V36.729c0-0.609,0.044-1.219,0.224-1.655 c0.49-1.22,1.607-2.483,3.482-2.483c2.458,0,3.44,1.873,3.44,4.618v10.929H49.837z M21.959,24.922c2.367,0,3.842-1.57,3.842-3.531 c-0.044-2.003-1.475-3.528-3.797-3.528s-3.841,1.524-3.841,3.528c0,1.961,1.474,3.531,3.753,3.531H21.959z M33,64 C16.432,64,3,50.568,3,34C3,17.431,16.432,4,33,4s30,13.431,30,30C63,50.568,49.568,64,33,64z M25.354,48.137V27.71h-6.789v20.427 H25.354z" role="presentation" />
</svg>
"""

github: (color, size) -> """
<svg style="display: inline-block; width: #{ size }; height: #{ size }" xmlns="http://www.w3.org/2000/svg" class="twitter-icon" viewBox="-75 -75 1350 1350" role="img">
<svg style="display: inline-block; width: #{ size }; height: #{ size }" xmlns="http://www.w3.org/2000/svg" class="github-icon" viewBox="-75 -75 1350 1350" role="img">
<g fill-rule="evenodd">
<g fill="#{ if color is 'auto' then '#000' else color }">
<path d="M600,0 C268.62914,0 0,268.62914 0,600 C0,931.37086 268.62914,1200 600,1200 C931.37086,1200 1200,931.37086 1200,600 C1200,268.62914 931.37086,0 600,0 L600,0 Z M374.561944,261.764017 C361.106565,300.873442 356.441817,343.321346 368.478542,380.394343 C353.936313,396.532094 342.644932,415.07078 334.565705,436.052824 C313.030481,504.116053 318.290435,591.063822 365.436638,643.671916 C381.998735,661.828696 404.468613,676.755941 432.744573,688.457575 C461.020331,700.157768 497.361849,707.62189 541.796255,710.850196 C511.973257,724.786041 490.949983,733.301014 483.613829,764.114175 C450.347775,786.342971 409.895494,781.038694 380.580929,756.865633 C357.414573,739.950824 346.919716,709.888416 321.233354,698.747818 C319.61796,697.134287 314.571933,695.930824 306.089266,695.123547 C297.606192,694.316057 290.938365,696.722789 286.090943,702.37208 C283.667246,704.792897 283.846181,707.379182 286.673522,710.20321 C306.119088,726.018293 324.834421,742.780038 335.795271,762.884406 C346.298195,784.672711 357.168331,800.625306 368.478542,810.711978 C399.853569,831.913136 441.931787,842.943351 478.76001,829.480532 C474.465353,855.396779 486.051417,895.867475 477.530241,919.051858 C474.298214,925.507623 469.674882,931.166448 463.615506,936.008276 C458.215134,941.27628 441.472033,947.866914 444.847155,955.941749 C446.462559,959.573036 452.108748,961.800939 461.80337,962.60796 C483.144337,962.063024 504.389006,953.434973 516.944104,936.590643 C521.388086,930.538522 523.61028,922.651891 523.61028,912.968253 L523.61028,813.753882 C523.61028,802.456492 526.011418,794.39052 530.85883,789.548701 C535.706243,784.707085 540.994579,781.454549 546.650303,779.841028 L546.650303,910.573742 C546.650303,921.871122 545.628674,931.562846 543.608399,939.632521 C541.588336,947.702275 539.787591,953.361101 538.171993,956.58901 C534.463432,962.808986 527.373307,968.548885 527.234551,975.939939 C527.234551,978.360827 528.678874,979.743358 531.50602,980.146736 C552.730392,979.225991 577.356182,966.775258 585.999556,949.275583 C592.86704,934.750337 596.290011,919.464399 596.290011,903.325199 L596.290011,774.986997 L622.954297,774.986997 L622.954297,903.325199 C622.954297,919.464399 626.62062,934.750337 633.891739,949.275583 C641.162849,963.801129 653.298169,973.134937 670.26391,977.169602 C679.150211,979.59049 685.153247,980.550203 688.385274,980.146736 C691.6173,979.743358 693.060387,978.360827 692.656744,975.939939 C690.710605,968.607912 686.655979,962.333946 682.366288,956.58901 C676.710768,949.326171 673.88819,933.975781 673.88819,910.573742 L673.88819,779.841028 C679.543702,781.454549 685.011186,784.707085 690.262233,789.548701 C695.513076,794.39052 698.093141,802.456492 698.093141,813.753882 L698.093141,912.968253 C698.093141,922.651891 700.315344,930.538522 704.759325,936.590643 C718.264409,953.765186 738.616458,962.477978 759.900051,962.60796 C769.594681,961.800939 775.241083,959.573036 776.856266,955.941749 C778.471873,952.310462 777.271105,949.301959 773.232004,946.881019 C769.193115,944.460122 764.147088,940.850069 758.087915,936.008276 C752.028548,931.166448 747.405215,925.507623 744.173198,919.051858 C740.546435,877.424487 744.080673,832.801814 741.131285,790.713858 C735.309049,744.78333 717.630473,729.672811 682.366288,712.079965 C724.377209,708.851659 758.917778,701.144396 785.981775,689.039941 C866.885084,649.730868 889.256587,588.961953 889.597262,507.502795 C888.321306,455.07696 873.187795,409.343597 838.663175,374.310544 C843.510588,355.750739 844.954717,336.432115 842.934636,316.257552 C840.914582,296.08298 836.647663,277.903014 830.184864,261.764017 C800.296204,263.377547 775.246067,269.394244 755.04602,279.88539 C734.848252,290.376306 720.311811,299.286836 711.425298,306.549676 C639.837833,290.297406 563.20246,290.199438 494.551483,308.94439 C459.422538,280.213438 415.886521,264.20719 374.561944,261.764017 L374.561944,261.764017 Z" role="presentation"></path>
Expand All @@ -46,6 +52,7 @@ window.SocialIcons =
htmlString = ''

for type, icon of options.icons when icon.enabled isnt false
icon.username = "in/#{ icon.username }" if type is 'linkedin'
htmlString += """
<a href="http://#{ type }.com/#{ icon.username or '' }" target="_blank" style="display: inline">#{
SVG[type](options.color, options.size)
Expand Down
13 changes: 10 additions & 3 deletions social-icons.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 85d5e7c

Please sign in to comment.