Skip to content

stemar/smi

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Create a social media icon bar without iframes or spying analytics.

The goal is for anyone to use this code to create a custom social media icon bar without the iframes used by social media widgets.

The SVG icon images are produced from Dan Leech's Simple Icons project.

The Font Awesome icons are from Dave Gandy's Font Awesome.

Why use it?

Usage using Simple Icons

Insert require_once '{where smi is located}/smi/smi.php'; at the top of your PHP page.

Insert <link rel="stylesheet" href="smi/si/smi.css"> in the <head> section of your HTML code.

Use the smi/si/smi.json template to create your own data set of links and functionality.

Then embed PHP smi() calls in your page.

smi()'s optional arguments can be in native PHP array or JSON string format.

Usage using Font Awesome icons

Insert require_once '{where smi is located}/smi/smi.php'; at the top of your PHP page.

Insert <link rel="stylesheet" href="smi/si/smi.css"> in the <head> section of your HTML code.

Use the smi/fa/smi.json template to create your own data set of links and functionality.

Then embed PHP smi() calls in your page.

smi()'s optional arguments can be in native PHP array or JSON string format.

Examples using Simple Icons

<?= smi("si", ["space"=>"3px"]) ?>

<?= smi("si", '{"px": "24", "space": "1rem"}') ?>

<?= smi("si", ["px"=>"32", "icons"=>["Facebook","Google+","Pinterest"], "space"=>"4px"]) ?>

<?= smi("si", '{"all": true, "px": "64"}') ?>

Examples using Font Awesome icons

<?= smi("fa", ["space"=>"3px"]) ?>

<?= smi("fa", ["px"=>"24", "space"=>"3px"]) ?>

<?= smi("fa", ["px"=>"32", "space"=>"3px"]) ?>

<?= smi("fa", ["px"=>"64", "icons"=>["fa-facebook-square","fa-twitter-square","fa-at-square"], "space"=>"3px"]) ?>

Official page and examples

Releases

No releases published

Packages

No packages published

Languages

  • PHP 70.5%
  • CSS 29.5%