Permalink
Browse files

Initial commit

  • Loading branch information...
Arvid Andersson
Arvid Andersson committed Oct 17, 2011
0 parents commit 8b9ef7b3e71bacf99bff1b3b864e7412b07ba952
Showing with 562 additions and 0 deletions.
  1. +4 −0 .gitignore
  2. +3 −0 Gemfile
  3. +18 −0 Gemfile.lock
  4. +83 −0 Rakefile
  5. +4 −0 config.yaml.sample
  6. BIN public/ZeroClipboard.swf
  7. +180 −0 public/emoji.css
  8. BIN public/favicon.ico
  9. BIN public/graphics/emojis/+1.png
  10. BIN public/graphics/emojis/-1.png
  11. BIN public/graphics/emojis/airplane.png
  12. BIN public/graphics/emojis/apple.png
  13. BIN public/graphics/emojis/art.png
  14. BIN public/graphics/emojis/bear.png
  15. BIN public/graphics/emojis/beer.png
  16. BIN public/graphics/emojis/bike.png
  17. BIN public/graphics/emojis/bomb.png
  18. BIN public/graphics/emojis/book.png
  19. BIN public/graphics/emojis/broken_heart.png
  20. BIN public/graphics/emojis/bulb.png
  21. BIN public/graphics/emojis/bus.png
  22. BIN public/graphics/emojis/cake.png
  23. BIN public/graphics/emojis/calling.png
  24. BIN public/graphics/emojis/cat.png
  25. BIN public/graphics/emojis/clap.png
  26. BIN public/graphics/emojis/computer.png
  27. BIN public/graphics/emojis/cool.png
  28. BIN public/graphics/emojis/cop.png
  29. BIN public/graphics/emojis/couple.png
  30. BIN public/graphics/emojis/dog.png
  31. BIN public/graphics/emojis/dolphin.png
  32. BIN public/graphics/emojis/email.png
  33. BIN public/graphics/emojis/feet.png
  34. BIN public/graphics/emojis/fire.png
  35. BIN public/graphics/emojis/fish.png
  36. BIN public/graphics/emojis/fist.png
  37. BIN public/graphics/emojis/gift.png
  38. BIN public/graphics/emojis/hammer.png
  39. BIN public/graphics/emojis/heart.png
  40. BIN public/graphics/emojis/horse.png
  41. BIN public/graphics/emojis/iphone.png
  42. BIN public/graphics/emojis/key.png
  43. BIN public/graphics/emojis/kiss.png
  44. BIN public/graphics/emojis/koala.png
  45. BIN public/graphics/emojis/leaves.png
  46. BIN public/graphics/emojis/lips.png
  47. BIN public/graphics/emojis/lipstick.png
  48. BIN public/graphics/emojis/lock.png
  49. BIN public/graphics/emojis/mag.png
  50. BIN public/graphics/emojis/mega.png
  51. BIN public/graphics/emojis/memo.png
  52. BIN public/graphics/emojis/moneybag.png
  53. BIN public/graphics/emojis/nail_care.png
  54. BIN public/graphics/emojis/new.png
  55. BIN public/graphics/emojis/octocat.png
  56. BIN public/graphics/emojis/ok.png
  57. BIN public/graphics/emojis/pencil.png
  58. BIN public/graphics/emojis/princess.png
  59. BIN public/graphics/emojis/punch.png
  60. BIN public/graphics/emojis/rainbow.png
  61. BIN public/graphics/emojis/rose.png
  62. BIN public/graphics/emojis/runner.png
  63. BIN public/graphics/emojis/scissors.png
  64. BIN public/graphics/emojis/ski.png
  65. BIN public/graphics/emojis/smoking.png
  66. BIN public/graphics/emojis/sparkles.png
  67. BIN public/graphics/emojis/star.png
  68. BIN public/graphics/emojis/sunflower.png
  69. BIN public/graphics/emojis/sunny.png
  70. BIN public/graphics/emojis/taxi.png
  71. BIN public/graphics/emojis/thumbsdown.png
  72. BIN public/graphics/emojis/thumbsup.png
  73. BIN public/graphics/emojis/tm.png
  74. BIN public/graphics/emojis/tophat.png
  75. BIN public/graphics/emojis/train.png
  76. BIN public/graphics/emojis/v.png
  77. BIN public/graphics/emojis/vs.png
  78. BIN public/graphics/emojis/warning.png
  79. BIN public/graphics/emojis/wheelchair.png
  80. BIN public/graphics/emojis/zap.png
  81. BIN public/graphics/emojis/zzz.png
  82. BIN public/graphics/stucco.png
  83. +233 −0 public/index.html
  84. +37 −0 public/libs.min.js
@@ -0,0 +1,4 @@
+.DS_Store
+config.yaml
+passenger*
+*-tmp
@@ -0,0 +1,3 @@
+source :rubygems
+gem 'wand'
+gem 's3'
@@ -0,0 +1,18 @@
+GEM
+ remote: http://rubygems.org/
+ specs:
+ mime-types (1.16)
+ proxies (0.2.1)
+ s3 (0.3.8)
+ proxies (~> 0.2.0)
+ safe_shell (1.0.1)
+ wand (0.4)
+ mime-types
+ safe_shell (~> 1.0.0)
+
+PLATFORMS
+ ruby
+
+DEPENDENCIES
+ s3
+ wand
@@ -0,0 +1,83 @@
+#!/usr/bin/env rake
+require 'rubygems'
+require 'bundler'
+Bundler.require
+
+require 'digest/sha1'
+
+task :deploy do
+ Site.new('public').deploy
+end
+
+class Site
+ attr_accessor :path
+ attr_accessor :tmp_files
+
+ def initialize(path)
+ @path = path
+ @tmp_files = []
+ end
+
+ def deploy
+ puts " ** Deploying to #{bucket.name}"
+ files.each do |file|
+ if !File.directory?(file)
+ remote_file_name = base_path(file)
+ puts " Uploading #{remote_file_name}"
+ S3::Object.send(:new, bucket, {
+ key: remote_file_name,
+ etag: Digest::SHA256.file(file).hexdigest,
+ cache_control: 'max-age=86400, public',
+ mime_type: mime_type_for_file(file),
+ }).tap do |_object|
+ if is_css_file?(file)
+ _object.content = open(minify_css_file(file))
+ else
+ _object.content = open(file)
+ end
+ _object.save
+ end
+ end
+ end
+ end
+
+private
+
+ def mime_type_for_file(file)
+ Wand.wave(file)
+ end
+
+ def files
+ @files ||= Dir.glob("#{path}/**/*")
+ end
+
+ def base_path(file)
+ file.gsub("#{path}/", "")
+ end
+
+ def is_css_file?(file)
+ file.end_with?('.css')
+ end
+
+ def minify_css_file(file)
+ "#{file}-tmp".tap do |tmp_file_name|
+ `yuicompressor -o #{tmp_file_name} #{file}`
+ @tmp_files << tmp_file_name
+ end
+ end
+
+ def config
+ @config ||= YAML.load_file('config.yaml')
+ end
+
+ def bucket
+ @bucket ||= s3.buckets.find(config['s3']['bucket'])
+ end
+
+ def s3
+ @s3 ||= S3::Service.new(
+ access_key_id: config['s3']['access_key_id'],
+ secret_access_key: config['s3']['secret_access_key']
+ )
+ end
+end
@@ -0,0 +1,4 @@
+s3:
+ access_key_id:
+ secret_access_key:
+ bucket: www.emoji-cheat-sheet.com
Binary file not shown.
@@ -0,0 +1,180 @@
+body {
+ background: #fff url('graphics/stucco.png');
+ font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
+ font-size: 16px;
+ color: #333;
+ margin: 0;
+ padding: 0;
+ line-height: 1.4em;}
+h1 {
+ width: 80%;
+ padding-top: 14px;
+ margin-bottom: 16px;
+ font-size: 48px;
+ line-height: 1em;
+ font-weight: normal;
+ font-family: 'Yanone Kaffeesatz', sans-serif;}
+h2 { margin-top:1.2em; }
+a { color: #333;}
+a:hover, a.hover { color: #999; }
+#content, #footer {
+ padding: 0 20px 0 20px;
+ margin: 0 auto;
+ max-width: 1024px;}
+ .share {
+ -webkit-border-bottom-right-radius: 8px;
+ -webkit-border-bottom-left-radius: 8px;
+ -moz-border-radius-bottomright: 8px;
+ -moz-border-radius-bottomleft: 8px;
+ border-bottom-right-radius: 8px;
+ border-bottom-left-radius: 8px;
+ border-left: 2px dotted #ddd;
+ border-right: 2px dotted #ddd;
+ border-bottom: 2px dotted #ddd;
+ background: rgba(200,200,200,.2);
+ padding-top: 4px;
+ text-align: right;
+ position: absolute;
+ top: 0px;
+ padding: 4px 8px;
+ right: 20px;
+ width: 160px;
+ height: 28px;}
+ #twitter, #gplus, #fb {
+ float: right;
+ margin-bottom: 4px;
+ height: 32px; }
+ #twitter, #gplus {margin-right: 5px; }
+ p.intro {
+ max-width: 800px;
+ margin-top: 0;
+ color: #666;}
+ ul {
+ padding:0;
+ margin: 0;}
+ li {
+ list-style: none;
+ float: left;
+ width: 160px;
+ height: 30px; }
+ .emoji-button {
+ font-size: 14px;
+ float: left;
+ font-family: "Courier", monospace;
+ padding: 4px;}
+ .emoji-button.hover { margin-left: -4px; }
+ .emoji-button.active { margin-left: 0;}
+ .emoji-button img { vertical-align: middle; }
+div#footer {
+ background-color:rgba(200,200,200,0.15);
+ border-top: 3px dotted #ddd;
+ margin-top: 2em;
+ padding: 1em;
+ font-size: 14px;
+ color: #666;}
+ #footer p {line-height: 1em; }
+
+.clearfix:after {
+ zoom: 1;
+ content: ".";
+ display: block;
+ height: 0;
+ clear: both;
+ visibility: hidden; }
+
+@media screen and (max-width: 580px) {
+ .share {
+ background: none;
+ padding: 0;
+ margin: 1em 0;
+ position: static;
+ border: none; }
+}
+/* jnotify */
+
+.jnotify-container {
+ position: fixed;
+ top: 40px;
+ right: 20px;
+ width: 160px;
+ z-index: 100000;
+
+ /* set maximum number of notes to show */
+ max-height: 270px;
+ overflow-x: hidden;
+ overflow-y: auto;
+}
+
+.jnotify-container .jnotify-notification {
+ position: relative;
+ margin-bottom: 5px;
+}
+
+.jnotify-container .jnotify-notification .jnotify-background {
+ position: absolute;
+ top: 2px;
+ left: 0;
+ width: 100%;
+ height: 100%;
+ background-color: #4c4c4c;
+ filter: alpha(opacity=40);
+ -moz-opacity: 7.90;
+ opacity: 0.40;
+ z-index: 1;
+
+ /* round the corners */
+ -moz-border-radius: 10px;
+ -webkit-border-radius: 10px;
+ border-radius: 10px;
+}
+
+.jnotify-container .jnotify-notification a.jnotify-close,
+.jnotify-container .jnotify-notification a.jnotify-close:link,
+.jnotify-container .jnotify-notification a.jnotify-close:visited,
+.jnotify-container .jnotify-notification a.jnotify-close:focus,
+.jnotify-container .jnotify-notification a.jnotify-close:hover {
+ position: absolute;
+ top: 2px;
+ right: 5px;
+ padding: 0 5px;
+ font: 14px Arial,Helvetica,sans-serif;
+ line-height: 1em;
+ color: #fff;
+ text-decoration: none;
+ z-index: 3;
+ cursor: pointer;
+}
+
+.jnotify-container .jnotify-notification .jnotify-message {
+ position: relative;
+ z-index: 2;
+ padding: 10px;
+ text-align: left;
+ color: #fff;
+ font: 14px Arial,Helvetica,sans-serif;
+ line-height: 1.2em;
+}
+
+.jnotify-container .jnotify-notification .jnotify-message * {
+ font-size: 1em;
+}
+
+/* notification type == "error" */
+.jnotify-container .jnotify-notification-error .jnotify-background {
+ background-color: #d79eac;
+}
+
+.jnotify-container .jnotify-notification-error .jnotify-close,
+.jnotify-container .jnotify-notification-error .jnotify-message {
+ color: #a72947 !important;
+}
+
+/* notification type == "warning" */
+.jnotify-container .jnotify-notification-warning .jnotify-background {
+ background-color: #fff7d1;
+}
+
+.jnotify-container .jnotify-notification-warning .jnotify-close,
+.jnotify-container .jnotify-notification-warning .jnotify-message {
+ color: #c2a928 !important;
+}
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Oops, something went wrong.

0 comments on commit 8b9ef7b

Please sign in to comment.