Skip to content

Instantly share code, notes, and snippets.

@ihercowitz
Created December 24, 2015 20:08
Show Gist options
  • Save ihercowitz/25faadc5d139351f34ec to your computer and use it in GitHub Desktop.
Save ihercowitz/25faadc5d139351f34ec to your computer and use it in GitHub Desktop.
Feliz natal like a Developer
(ns merrychristmas.core
(:require [reagent.core :as reagent :refer [atom]]))
(defn greetings []
(letfn [(crazy-letters [size] (clojure.string/join " " (take size (repeatedly #(rand-nth (range -20 10))))))]
[:svg#merry {:width "1000px"
:height "900px"}
[:text {:x "600px"
:y "260px"
:font-family "sans-serif"
:font-size "48px"
:text-anchor "middle"
:stroke "#00000"
:stroke-width "2px"
:fill "#FF0000"}
(for [t ["FELIZ" "NATAL" "MEUS AMIGOS"]]
[:tspan {:key (random-uuid)
:dy (crazy-letters (count t))} (str t " ")])]
[:path {:d "M 967.00000,288.00000 L 1003.0000,288.00000 C 1003.0000,182.66667 986.00000,106.00000 952.00000,58.000000 C 918.00000,10.000000 875.00000,-14.000000 823.00000,-14.000000 C 781.00000,-14.000000 740.66667,1.6666667 702.00000,33.000000 C 663.33333,64.333333 628.66667,149.33333 598.00000,288.00000 L 512.00000,676.00000 L 214.00000,0.00000000 L 25.000000,0.00000000 L 453.00000,922.00000 C 430.33333,1041.3333 403.00000,1129.6667 371.00000,1187.0000 C 339.00000,1244.3333 299.33333,1273.0000 252.00000,1273.0000 C 214.00000,1273.0000 181.00000,1258.6667 153.00000,1230.0000 C 125.00000,1201.3333 109.00000,1156.3333 105.00000,1095.0000 L 69.000000,1095.0000 C 71.000000,1193.0000 90.666667,1271.3333 128.00000,1330.0000 C 165.33333,1388.6667 212.00000,1418.3333 268.00000,1419.0000 C 304.00000,1419.0000 338.00000,1404.3333 370.00000,1375.0000 C 402.00000,1345.6667 430.00000,1295.0000 454.00000,1223.0000 C 478.00000,1151.0000 515.00000,1002.3333 565.00000,777.00000 L 636.00000,460.00000 C 664.66667,328.66667 694.66667,241.00000 726.00000,197.00000 C 757.33333,153.00000 795.33333,130.66667 840.00000,130.00000 C 914.66667,130.00000 957.00000,182.66667 967.00000,288.00000 z"
:stroke "333333"
:stroke-width "5"
:fill "#000066"
:transform "matrix(0.237384,0.000000,0.000000,-0.237384,65.48462,354.2623)"}]
[:text {:x "650px"
:y "350px"
:font-family "sans-serif"
:font-size "48px"
:text-anchor "middle"} "We wish you a H4ck Xm4s!"]
[:text {:x "525px"
:y "450px"
:font-family "sans-serif"
:font-size "48px"
:text-anchor "middle"} "Greetings from AS TEAM - 1337 T34M"]]))
(reagent/render-component [greetings]
(. js/document (getElementById "app")))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment