Skip to content
This repository has been archived by the owner on May 14, 2020. It is now read-only.

Commit

Permalink
adds light demo
Browse files Browse the repository at this point in the history
  • Loading branch information
AKST committed Jun 24, 2015
1 parent c9e3508 commit f01a92b
Show file tree
Hide file tree
Showing 24 changed files with 579 additions and 47 deletions.
3 changes: 3 additions & 0 deletions .bowerrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"directory": "resources/public/vendor"
}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/resources/public/vendor
/resources/public/css
/resources/public/js/compiled/**
.sass-cache
Expand Down
18 changes: 18 additions & 0 deletions bower.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"name": "svg-thing",
"version": "0.0.0",
"authors": [
"Angus Thomsen <[email protected]>"
],
"license": "MIT",
"ignore": [
"**/.*",
"node_modules",
"bower_components",
"test",
"tests"
],
"dependencies": {
"glyph-iconset": "[email protected]:frexy/glyph-iconset.git"
}
}
5 changes: 3 additions & 2 deletions project.clj
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
[prismatic/dommy "1.1.0"]
[secretary "1.2.3"]
[reagent "0.5.0"]
[reagent-utils "0.1.5"]

[org.clojure/clojurescript "0.0-3211"]
[org.clojure/core.async "0.1.346.0-17112a-alpha"]]
Expand All @@ -22,12 +23,12 @@
:source-paths ["src"]

:clean-targets ^{:protect false} ["resources/public/js/compiled" "target"]

:cljsbuild {
:builds [{:id "dev"
:source-paths ["src"]

:figwheel { :on-jsload "svg-thing.core/main" }
:figwheel { :on-jsload "svg-thing.core/mount-app" }

:compiler {:main svg-thing.core
:asset-path "js/compiled/out"
Expand Down
1 change: 1 addition & 0 deletions resources/public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
<title>SVG Demo</title>
<link href="css/main.css" rel="stylesheet" type="text/css">
<link href='http://fonts.googleapis.com/css?family=Lato:100,300,400,700,900,100italic,300italic,400italic,700italic,900italic' rel='stylesheet' type='text/css'>
<script src="vendor/glyph-iconset/polyfill.js"></script>
</head>
<body>
<div id="app"></div>
Expand Down
46 changes: 29 additions & 17 deletions resources/public/svg/colour-pallet.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
53 changes: 53 additions & 0 deletions resources/public/svg/filters.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 11 additions & 0 deletions resources/public/svg/masks/dots.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 12 additions & 0 deletions resources/public/svg/masks/lines.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
16 changes: 8 additions & 8 deletions resources/public/svg/tempature.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 14 additions & 0 deletions resources/sass/_animations.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
@include keyframes(fadeInBlur) {
0% {
@include filter(blur(5px));
}
75% {
@include filter(blur(1px));
}
87% {
@include filter(blur(1.5px));
}
100% {
@include filter(blur(0));
}
}
17 changes: 11 additions & 6 deletions resources/sass/_common.scss
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@
.background-wrapper {
//-webkit-filter: url('/svg/filters.svg#blur3');
}
.background {
transition: ease-in-out $animation-time background;
right: 0;
left: 0;
bottom: 0;
top: 0;
height: 100vh;
width: 100vw;
right: -10vw;
left: -10vw;
bottom: -10vh;
top: -10vh;
height: 120vh;
width: 120vw;
position: fixed;
z-index: -1;
background-color: black;
-webkit-mask: url('/svg/masks/dots.svg');
}
19 changes: 19 additions & 0 deletions resources/sass/_functions.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
@function power ($x, $n) {
$ret: 1;

@if $n >= 0 {
@for $i from 1 through $n {
$ret: $ret * $x;
}
} @else {
@for $i from $n to 0 {
$ret: $ret / $x;
}
}

@return $ret;
}

@function strip-units($number) {
@return $number / ($number * 0 + 1);
}
46 changes: 46 additions & 0 deletions resources/sass/_light.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
.light-page {
$width: 600px;
$height: 600px;
@include center($width, $height);

$title-size: $height / 12;

.light-title {
font-family: $font-family;
font-size: $title-size;
text-align: center;
line-height: 1;
margin: 0;
}

$svg-margin: $title-size / 3;
$svg-dim: $height - ($title-size + $svg-margin);

.light-svg-outer {
margin-top: $svg-margin;
margin-left: $svg-margin;
margin-right: $svg-margin;
height: $svg-dim;
}

.light-svg {
margin: 0 auto;
display: block;
height: $svg-dim;
width: $svg-dim;
}

.light-svg circle {
mix-blend-mode: multiply;
transition: ease-in-out $animation-time all;
}

#N-circle { fill: $color-orange; }
#NE-circle { fill: $color-yellow; }
#E-circle { fill: $color-green; }
#SE-circle { fill: $color-aqua; }
#S-circle { fill: $color-blue; }
#SW-circle { fill: $color-violet; }
#W-circle { fill: $color-pink; }
#NW-circle { fill: $color-red; }
}
Loading

0 comments on commit f01a92b

Please sign in to comment.