Du kannst nicht mehr als 25 Themen auswählen Themen müssen entweder mit einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.

382 Zeilen
19 KiB

  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8" />
  5. <title>Zocial Demo | CSS3 Button Set</title>
  6. <link rel="stylesheet" href="css/zocial.css" />
  7. <style>
  8. html {
  9. background: #f0f0eb;
  10. }
  11. h1, h2, p, li, label, input {
  12. font-family: "Helvetica Neue", sans-serif;
  13. }
  14. p, li, label, code {
  15. font-size: 16px;
  16. }
  17. input[type="text"] {
  18. font-size: 14px;
  19. padding: 0.2rem 0.4rem;
  20. }
  21. code {
  22. background: #e0e0e5;
  23. padding: 0.1rem 0.2rem;
  24. border-radius: 0.25rem;
  25. color: #555;
  26. }
  27. body {
  28. background: #FFF;
  29. box-shadow: 0 1px 1px rgba(0,0,0,0.5);
  30. border-radius: 0 0 3px 3px;
  31. margin: 0 auto 2em;
  32. padding: 2em 1em;
  33. width: 600px;
  34. }
  35. body .zocial {
  36. margin: 8px 4px;
  37. font-size: 13px;
  38. }
  39. h2 {
  40. font-size: 17px;
  41. font-weight: normal;
  42. padding: 1em 0 0.75em;
  43. border-bottom: 1px solid #eee;
  44. }
  45. #demo {
  46. text-align: center;
  47. }
  48. #demo form div {
  49. padding: 0.25rem 0;
  50. }
  51. </style>
  52. </head>
  53. <body>
  54. <h1>Zocial Buttons</h1>
  55. <p><a href="https://github.com/smcllns/css-social-buttons">Github</a></p>
  56. <h2>Idea</h2>
  57. <p>Create beautiful social buttons using CSS, rendering popular social icons as a font, and with minimal extra markup.<p>
  58. <h2>Benefits</h2>
  59. <ul>
  60. <li>No raster images (jpeg, png) so buttons always look sharp at any size and screen resolution.</li>
  61. <li>Easily customize the size and call to action of the buttons.</li>
  62. <li>Easily localize button text to other languages.</li>
  63. </ul>
  64. <h2>Usage</h2>
  65. <ol>
  66. <li>Required: Add a class of <code>zocial</code> and a class for the brand of button, e.g. <code>facebook</code></li>
  67. <li>Optional: Add a class of <code>icon</code> to display as icon instead of button</li>
  68. <li>Optional: Change font size of the element to resize button</li>
  69. </ol>
  70. <p>Example:</p>
  71. <code>
  72. &lt;a class="zocial facebook"&gt;Sign in with Facebook&lt;/a&gt;
  73. </code>
  74. <h2>Demo</h2>
  75. <div id="demo">
  76. <button class="zocial facebook" id="showcase-button">Sign in with Facebook</button>
  77. <form onsubmit="return false;">
  78. <div>
  79. <label for="font-size-range">Button Size: <span id="font-size-display">16px</span></label>
  80. <input type="range" id="font-size-range" value="16" min="9" step="1" max="32" />
  81. </div>
  82. <div>
  83. <label for="label-input">Button Text:</label>
  84. <input type="text" id="label-input" placeholder="Sign in with Facebook" />
  85. </div>
  86. <div>
  87. <input class="toggle-type" type="radio" name="demo" id="select-button" value="button" checked="checked" />
  88. <label for="select-button">Display as button</label>
  89. </div>
  90. <div>
  91. <input class="toggle-type" type="radio" name="demo" id="select-icon" value="icon" />
  92. <label for="select-icon">Display as icon</label>
  93. </div>
  94. </form>
  95. </div>
  96. <div id="samples">
  97. <h2>Some Popular Buttons</h2>
  98. <a href="#" class="zocial facebook">Sign in with Facebook</a>
  99. <a href="#" class="zocial googleplus">Sign in with Google+</a>
  100. <a href="#" class="zocial twitter">Sign in with Twitter</a>
  101. <a href="#" class="zocial linkedin">Sign in with LinkedIn</a>
  102. <a href="#" class="zocial dropbox">Sync with Dropbox</a>
  103. <a href="#" class="zocial evernote">Clip to Evernote</a>
  104. <a href="#" class="zocial forrst">Follow me on Forrst</a>
  105. <a href="#" class="zocial dribbble">Sign in with Dribbble</a>
  106. <a href="#" class="zocial cloudapp">Sign in to CloudApp</a>
  107. <a href="#" class="zocial github">Fork me on Github</a>
  108. <a href="#" class="zocial gitlab">Fork me on GitLab</a>
  109. <a href="#" class="zocial spotify">Play on Spotify</a>
  110. <a href="#" class="zocial instapaper">Read It Later</a>
  111. <a href="#" class="zocial soundcloud">Follow me on Soundcloud</a>
  112. <a href="#" class="zocial tumblr">Follow me on Tumblr</a>
  113. <a href="#" class="zocial smashing">Read on Smashing Magazine</a>
  114. <a href="#" class="zocial itunes">Available on iTunes</a>
  115. <a href="#" class="zocial appstore">Available on the App Store</a>
  116. <a href="#" class="zocial macstore">Available on the Mac App Store</a>
  117. <a href="#" class="zocial android">Available on Android Market</a>
  118. <a href="#" class="zocial pinterest">Follow me on Pinterest</a>
  119. <a href="#" class="zocial quora">Follow me on Quora</a>
  120. <a href="#" class="zocial lanyrd">Attend on Lanyrd</a>
  121. <a href="#" class="zocial twitch">Sign in with Twitch</a>
  122. <a href="#" class="zocial houzz">Sign in with Houzz</a>
  123. <a href="#" class="zocial slack">Sign in with Slack</a>
  124. <a href="#" class="zocial pandora">Sign in with Pandora</a>
  125. <a href="#" class="zocial paypal">Pay with Paypal</a>
  126. <a href="#" class="zocial amazon">Sign in with Amazon</a>
  127. <a href="#" class="zocial skype">Call me on Skype</a>
  128. <a href="#" class="zocial lastfm">Sign in with Last.fm</a>
  129. <a href="#" class="zocial yelp">Write a review on Yelp</a>
  130. <a href="#" class="zocial foursquare">Check in with foursquare</a>
  131. <a href="#" class="zocial klout">Influence with Klout</a>
  132. <a href="#" class="zocial wikipedia">View on Wikipedia</a>
  133. <a href="#" class="zocial disqus">Sign in with Disqus</a>
  134. <a href="#" class="zocial intensedebate">Sign in with IntenseDebate</a>
  135. <a href="#" class="zocial google">Sign in with Google</a>
  136. <a href="#" class="zocial gmail">Sign in with Gmail</a>
  137. <a href="#" class="zocial vimeo">Upload to Vimeo</a>
  138. <a href="#" class="zocial scribd">Read more on Scribd</a>
  139. <a href="#" class="zocial youtube">Subscribe on YouTube</a>
  140. <a href="#" class="zocial wordpress">Sign in with WordPress</a>
  141. <a href="#" class="zocial songkick">Sign in with Songkick</a>
  142. <a href="#" class="zocial posterous">Sign in with Posterous</a>
  143. <a href="#" class="zocial eventbrite">Sign in with Eventbrite</a>
  144. <a href="#" class="zocial flattr">Tip with Flattr</a>
  145. <a href="#" class="zocial plancast">Follow me on Plancast</a>
  146. <a href="#" class="zocial yahoo">Submit resume for CEO</a>
  147. <a href="#" class="zocial ie">Download Internet Explorer 5</a>
  148. <a href="#" class="zocial meetup">Report bugs with Meetup.com</a>
  149. <a href="#" class="zocial openid">Learn how-to-use OpenID</a>
  150. <a href="#" class="zocial html5">Register now for HTML6</a>
  151. <a href="#" class="zocial aol">Chat with your parents</a>
  152. <a href="#" class="zocial guest">Sign in as guest</a>
  153. <a href="#" class="zocial creativecommons">View Creative Commons Licence</a>
  154. <a href="#" class="zocial rss">Subscribe to RSS</a>
  155. <a href="#" class="zocial chrome">Add to Chrome</a>
  156. <a href="#" class="zocial eventasaurus">Sign up for Eventasaurus</a>
  157. <a href="#" class="zocial weibo">Join me on Weibo</a>
  158. <a href="#" class="zocial plurk">Sign in with Plurk</a>
  159. <a href="#" class="zocial grooveshark">Play on Grooveshark</a>
  160. <a href="#" class="zocial blogger">Post on Blogger</a>
  161. <a href="#" class="zocial viadeo">Sign in with Viadeo</a>
  162. <a href="#" class="zocial podcast">Subscribe to this Podcast</a>
  163. <a href="#" class="zocial fivehundredpx">View Portfolio on 500px</a>
  164. <a href="#" class="zocial bitcoin">Bitcoin accepted here</a>
  165. <a href="#" class="zocial ninetyninedesigns">View Portfolio on 99Designs</a>
  166. <a href="#" class="zocial pinboard">Bookmark with Pinboard</a>
  167. <a href="#" class="zocial stumbleupon">Stumble!</a>
  168. <a href="#" class="zocial myspace">Find me on Myspace</a>
  169. <a href="#" class="zocial windows">Sign in with Windows Live</a>
  170. <a href="#" class="zocial eventful">Find Events with Eventful</a>
  171. <a href="#" class="zocial xing">Sign in with Xing</a>
  172. <a href="#" class="zocial flickr">Upload to Flickr</a>
  173. <a href="#" class="zocial delicious">Sign in with Del.icio.us</a>
  174. <a href="#" class="zocial googleplay">Download from Google Play</a>
  175. <a href="#" class="zocial opentable">Reserve with OpenTable</a>
  176. <a href="#" class="zocial digg">Digg this</a>
  177. <a href="#" class="zocial reddit">Share on Reddit</a>
  178. <a href="#" class="zocial angellist">Fund us on AngelList</a>
  179. <a href="#" class="zocial instagram">Sign in with Instagram</a>
  180. <a href="#" class="zocial steam">Sign in with Steam</a>
  181. <a href="#" class="zocial vk">Sign in with VKontakte</a>
  182. <a href="#" class="zocial appnet">Sign in with App.net</a>
  183. <a href="#" class="zocial drupal">Built with Drupal</a>
  184. <a href="#" class="zocial statusnet">Share with Status.net/Indenti.ca</a>
  185. <a href="#" class="zocial pocket">Save for later</a>
  186. <a href="#" class="zocial acrobat">Download Adobe Acrobat</a>
  187. <a href="#" class="zocial bitbucket">Fork from Bitbucket</a>
  188. <a href="#" class="zocial buffer">Buffer</a>
  189. <a href="#" class="zocial lego">Make me out of Lego</a>
  190. <a href="#" class="zocial logmein">Log in</a>
  191. <a href="#" class="zocial ycombinator">Hacker News</a>
  192. <a href="#" class="zocial stackoverflow">Sign in with Stackoverflow</a>
  193. <a href="#" class="zocial lkdto">Lkd.to</a>
  194. <a href="#" class="zocial persona">Sign in with Persona</a>
  195. <a href="#" class="zocial messenger">Start chat on Messenger</a>
  196. <a href="#" class="zocial stripe">Sign in with Stripe</a>
  197. <a href="#" class="zocial dwolla">Sign in with Dwolla</a>
  198. <a href="#" class="zocial joinme">Sign in with join.me</a>
  199. <a href="#" class="zocial betaseries">Voir mon profil BetaSeries</a>
  200. <a href="#" class="zocial deviantart">Follow me on DeviantArt</a>
  201. <a href="#" class="zocial www">https://www.w3.org</a>
  202. <a href="#" class="zocial askfm">Follow me on ASKfm</a>
  203. <a href="#" class="zocial discordapp">Call me on Discord</a>
  204. <a href="#" class="zocial call">Call a phone</a>
  205. <a href="#" class="zocial email">Send a message</a>
  206. <a href="#" class="zocial cal">Add to calendar</a>
  207. <a href="#" class="zocial cart">Add to cart</a>
  208. <a href="#" class="zocial print">Print this page</a>
  209. <a href="#" class="zocial primary" title="A primary button for general purposes to keep consistency with Zocial">Primary action</a>
  210. <a href="#" class="zocial secondary" title="A secondary button for general purposes to keep consistency with Zocial">Secondary action</a>
  211. <a href="#" class="zocial salesforce">Sign in with Salesforce</a>
  212. <h2 id="icons">Icon versions</h2>
  213. <a href="#" class="zocial icon facebook">Sign in with Facebook</a>
  214. <a href="#" class="zocial icon googleplus">Sign in with Google+</a>
  215. <a href="#" class="zocial icon twitter">Sign in with Twitter</a>
  216. <a href="#" class="zocial icon google">Sign in with Google</a>
  217. <a href="#" class="zocial icon linkedin">Sign in with LinkedIn</a>
  218. <a href="#" class="zocial icon paypal">Pay with Paypal</a>
  219. <a href="#" class="zocial icon amazon">Sign in with Amazon</a>
  220. <a href="#" class="zocial icon dropbox">Sync with Dropbox</a>
  221. <a href="#" class="zocial icon evernote">Clip to Evernote</a>
  222. <a href="#" class="zocial icon skype">Call me on Skype</a>
  223. <a href="#" class="zocial icon guest">Sign in as guest</a>
  224. <a href="#" class="zocial icon spotify">Play on Spotify</a>
  225. <a href="#" class="zocial icon lastfm">Sign in with Last.fm</a>
  226. <a href="#" class="zocial icon songkick">Sign in with Songkick</a>
  227. <a href="#" class="zocial icon forrst">Follow me on Forrst</a>
  228. <a href="#" class="zocial icon dribbble">Sign in with Dribbble</a>
  229. <a href="#" class="zocial icon cloudapp">Sign in to CloudApp</a>
  230. <a href="#" class="zocial icon github">Fork me on Github</a>
  231. <a href="#" class="zocial icon gitlab">Fork me on GitLab</a>
  232. <a href="#" class="zocial pinterest icon">Follow me on Pinterest</a>
  233. <a href="#" class="zocial quora icon">Follow me on Quora</a>
  234. <a href="#" class="zocial pinboard icon">Bookmark with Pinboard</a>
  235. <a href="#" class="zocial lanyrd icon">Attend on Lanyrd</a>
  236. <a href="#" class="zocial icon itunes">Download on iTunes</a>
  237. <a href="#" class="zocial icon android">Download on Android</a>
  238. <a href="#" class="zocial icon disqus">Sign in with Disqus</a>
  239. <a href="#" class="zocial icon yahoo">Sign in with Yahoo</a>
  240. <a href="#" class="zocial icon vimeo">Upload to Vimeo</a>
  241. <a href="#" class="zocial icon chrome">Add to Chrome</a>
  242. <a href="#" class="zocial icon ie">Get a new browser</a>
  243. <a href="#" class="zocial icon html5">Made from HTML5</a>
  244. <a href="#" class="zocial icon instapaper">Read It Later</a>
  245. <a href="#" class="zocial icon scribd">Read more on Scribd</a>
  246. <a href="#" class="zocial icon wikipedia">View on Wikipedia</a>
  247. <a href="#" class="zocial icon flattr">Tip with Flattr</a>
  248. <a href="#" class="zocial icon tumblr">Follow me on Tumblr</a>
  249. <a href="#" class="zocial icon posterous">Subscribe to my Posterous</a>
  250. <a href="#" class="zocial icon gowalla">Check in with Gowalla</a>
  251. <a href="#" class="zocial icon foursquare">Check in with foursquare</a>
  252. <a href="#" class="zocial icon yelp">Write a review on Yelp</a>
  253. <a href="#" class="zocial icon soundcloud">Follow me on Soundcloud</a>
  254. <a href="#" class="zocial icon smashing">Read on Smashing Magazine</a>
  255. <a href="#" class="zocial icon wordpress">Sign in with WordPress</a>
  256. <a href="#" class="zocial icon intensedebate">Sign in with IntenseDebate</a>
  257. <a href="#" class="zocial icon openid">Sign in with OpenID</a>
  258. <a href="#" class="zocial icon gmail">Sign in with Gmail</a>
  259. <a href="#" class="zocial icon eventbrite">Sign in with Eventbrite</a>
  260. <a href="#" class="zocial icon eventasaurus">Sign in with Eventasaurus</a>
  261. <a href="#" class="zocial icon meetup">Sign in with Meetup.com</a>
  262. <a href="#" class="zocial icon aol">Sign in with AIM</a>
  263. <a href="#" class="zocial icon plancast">Follow me on Plancast</a>
  264. <a href="#" class="zocial icon youtube">Subscribe on YouTube</a>
  265. <a href="#" class="zocial icon appstore">Available on the Mac App Store</a>
  266. <a href="#" class="zocial icon creativecommons">View Creative Commons Licence</a>
  267. <a href="#" class="zocial icon rss">Subscribe to RSS</a>
  268. <a href="#" class="zocial weibo icon">Follow me on Weibo</a>
  269. <a href="#" class="zocial plurk icon">Follow me on Plurk</a>
  270. <a href="#" class="zocial grooveshark icon">Follow me on Grooveshark</a>
  271. <a href="#" class="zocial blogger icon">Post on Blogger</a>
  272. <a href="#" class="zocial viadeo icon">Sign in with Viadeo</a>
  273. <a href="#" class="zocial podcast icon">Subscribe to this Podcast</a>
  274. <a href="#" class="zocial fivehundredpx icon">View Portfolio on 500px</a>
  275. <a href="#" class="zocial bitcoin icon">Bitcoin accepted here</a>
  276. <a href="#" class="zocial ninetyninedesigns icon">View Portfolio on 99Designs</a>
  277. <a href="#" class="zocial stumbleupon icon">Stumble!</a>
  278. <a href="#" class="zocial itunes icon">Download on iTunes</a>
  279. <a href="#" class="zocial myspace icon">Find me on Myspace</a>
  280. <a href="#" class="zocial windows icon">Sign in with Windows Live</a>
  281. <a href="#" class="zocial eventful icon">Find Events with Eventful</a>
  282. <a href="#" class="zocial klout icon">Influence with Klout</a>
  283. <a href="#" class="zocial xing icon">Sign in with Xing</a>
  284. <a href="#" class="zocial flickr icon">Upload to Flickr</a>
  285. <a href="#" class="zocial delicious icon">Sign in with Del.icio.us</a>
  286. <a href="#" class="zocial googleplay icon">Download from Google Play</a>
  287. <a href="#" class="zocial opentable icon">Reserve with OpenTable</a>
  288. <a href="#" class="zocial digg icon">Digg this</a>
  289. <a href="#" class="zocial reddit icon">Share on Reddit</a>
  290. <a href="#" class="zocial angellist icon">Fund us on AngelList</a>
  291. <a href="#" class="zocial instagram icon">Sign in with Instagram</a>
  292. <a href="#" class="zocial steam icon">Sign in with Steam</a>
  293. <a href="#" class="zocial vk icon">Sign in with VKontakte</a>
  294. <a href="#" class="zocial appnet icon">Sign in with App.net</a>
  295. <a href="#" class="zocial stripe icon">Sign in with Stripe</a>
  296. <a href="#" class="zocial dwolla icon">Sign in with Dwolla</a>
  297. <a href="#" class="zocial drupal icon">Built with Drupal</a>
  298. <a href="#" class="zocial statusnet icon">Share with Status.net/Indenti.ca</a>
  299. <a href="#" class="zocial pocket icon">Save for later</a>
  300. <a href="#" class="zocial acrobat icon">Download Adobe Acrobat</a>
  301. <a href="#" class="zocial bitbucket icon">Fork from Bitbucket</a>
  302. <a href="#" class="zocial buffer icon">Buffer</a>
  303. <a href="#" class="zocial lego icon">Make me out of Lego</a>
  304. <a href="#" class="zocial logmein icon">Log in</a>
  305. <a href="#" class="zocial ycombinator icon">Hacker News</a>
  306. <a href="#" class="zocial stackoverflow icon">Sign in with Stackoverflow</a>
  307. <a href="#" class="zocial lkdto icon">Lkd.to</a>
  308. <a href="#" class="zocial persona icon">Sign in with Persona</a>
  309. <a href="#" class="zocial joinme icon">Sign in with join.me</a>
  310. <a href="#" class="zocial twitch icon">Sign in with Twitch</a>
  311. <a href="#" class="zocial houzz icon">Sign in with Houzz</a>
  312. <a href="#" class="zocial slack icon">Sign in with Slack</a>
  313. <a href="#" class="zocial pandora icon">Sign in with Pandora</a>
  314. <a href="#" class="zocial betaseries icon">Voir mon profil BetaSeries</a>
  315. <a href="#" class="zocial deviantart icon">Follow me on DeviantArt</a>
  316. <a href="#" class="zocial www icon">https://www.w3.org/</a>
  317. <a href="#" class="zocial askfm icon">Follow me on ASKfm</a>
  318. <a href="#" class="zocial discordapp icon">Call me on Discord</a>
  319. <a href="#" class="zocial call icon">Call a phone</a>
  320. <a href="#" class="zocial email icon">Send a message</a>
  321. <a href="#" class="zocial cal icon">Add to calendar</a>
  322. <a href="#" class="zocial print icon">Print this page</a>
  323. <a href="#" class="zocial cart icon">Add to cart</a>
  324. <a href="#" class="zocial icon salesforce">Sign in with Salesforce</a>
  325. </div>
  326. <p>Under MIT License. <a href="https://github.com/smcllns/css-social-buttons">Zocial on Github.</a></p>
  327. <script type="text/javascript">
  328. // interactive demo button
  329. var sizeInput = document.getElementById('font-size-range');
  330. var sizeDisplay = document.getElementById('font-size-display');
  331. var labelInput = document.getElementById('label-input');
  332. var toggleRadios = document.querySelectorAll('[class="toggle-type"]');
  333. var showcaseButton = document.getElementById('showcase-button');
  334. var defaultLabel = "Sign in with Facebook";
  335. labelInput.addEventListener('keyup', function(e) {
  336. var currentLabel = this.value;
  337. var newLabel = currentLabel.length > 0 ? currentLabel : defaultLabel;
  338. showcaseButton.textContent = newLabel;
  339. })
  340. sizeInput.addEventListener('change', function(e) {
  341. var currentSize = this.value;
  342. var newSize = currentSize +"px"
  343. sizeDisplay.textContent = newSize;
  344. showcaseButton.style.fontSize = newSize;
  345. })
  346. for (var i=0; i<toggleRadios.length; i++) {
  347. toggleRadios[i].addEventListener('change', function() {
  348. showcaseButton.classList.toggle('icon');
  349. })
  350. }
  351. // interactive button list
  352. var buttons = document.getElementById('samples').querySelectorAll('.zocial');
  353. for (var i = 0; i < buttons.length; i++) {
  354. buttons[i].addEventListener('click', function(e) {
  355. e.preventDefault();
  356. this.classList.toggle('icon');
  357. })
  358. }
  359. </script>
  360. </body>
  361. </html>