Socialify

Folder ..

Viewing index.html
216 lines (188 loc) • 7.4 KB

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
<!DOCTYPE html>
<html lang="en">
  
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
    <title>ScrollR</title>
    <link rel="stylesheet" href="css/styles.min.css" type="text/css">
    <link rel="shortcut icon" href="favicon3860.ico?v=1" type="image/x-icon">
    <script src="js/scrollreveal.min.js"></script>
    <script>
      (function(){

        var config = {
          viewFactor : 0.15,
          duration   : 800,
          distance   : "0px",
          scale      : 0.8,
        }

        window.sr = new ScrollReveal(config)
      })()

    </script>
    <style>
      .sr .hero,
      .sr .intro,
      .sr .demo .block {
        visibility: hidden;
      }

    </style>
  </head>
  <body>
    <div class="crown">
      <svg viewbox="0 0 48 32" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" class="logo">
        <g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
          <rect fill="#FFCB36" x="3" y="0" width="6" height="18" rx="1.5"></rect>
          <rect fill="#008597" x="27" y="0" width="6" height="32" rx="1.5"></rect>
          <rect fill="#2EAD6D" x="15" y="0" width="6" height="8" rx="1.5"></rect>
          <rect fill="#E31D65" x="15" y="14" width="6" height="18" rx="1.5"></rect>
          <rect fill="#E31D65" x="39" y="0" width="6" height="18" rx="1.5"></rect>
          <rect fill="#FF7C35" x="3" y="24" width="6" height="8" rx="1.5"></rect>
          <rect fill="#5943AA" x="39" y="24" width="6" height="8" rx="1.5"></rect>
        </g>
      </svg>
      <div class="title">ScrollR</div>
      
    </div>
    <div class="hero">
      <svg width="96px" height="64px" viewbox="0 0 48 32" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" class="logo">
        <g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
          <rect fill="#FFCB36" x="3" y="0" width="6" height="18" rx="1.5"></rect>
          <rect fill="#008597" x="27" y="0" width="6" height="32" rx="1.5"></rect>
          <rect fill="#2EAD6D" x="15" y="0" width="6" height="8" rx="1.5"></rect>
          <rect fill="#E31D65" x="15" y="14" width="6" height="18" rx="1.5"></rect>
          <rect fill="#E31D65" x="39" y="0" width="6" height="18" rx="1.5"></rect>
          <rect fill="#FF7C35" x="3" y="24" width="6" height="8" rx="1.5"></rect>
          <rect fill="#5943AA" x="39" y="24" width="6" height="8" rx="1.5"></rect>
        </g>
      </svg>
      <h1 class="title"> ScrollR</h1>
      <p class="intro">Easy scroll animations.</p>
      
    </div>
    <div class="demo">
      <div class="column">
        <div class="block red seq-1"></div>
        <div class="block orange"></div>
        <div class="block purple"></div>
        <div class="block blue"></div>
      </div>
      <div class="column">
        <div class="block orange seq-1"></div>
        <div class="block purple"></div>
        <div class="block red"></div>
        <div class="block green"></div>
      </div>
      <div class="column">
        <div class="block yellow seq-1"></div>
        <div class="block blue"></div>
        <div class="block green"></div>
        <div class="block yellow"></div>
      </div>
      <div class="column">
        <div class="block green seq-1"></div>
        <div class="block yellow"></div>
        <div class="block orange"></div>
      </div>
      <div class="column">
        <div class="block blue seq-1"></div>
        <div class="block red"></div>
        <div class="block purple"></div>
        <div class="block red"></div>
      </div>
      <div class="column">
        <div class="block purple seq-1"></div>
        <div class="block yellow"></div>
        <div class="block orange"></div>
        <div class="block purple"></div>
      </div>
    </div>
    <div class="withLove"><span class="alpha">Made with</span>
      <svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="92px" height="72px" viewBox="0 0 92 72" enable-background="new 0 0 92 72" xml:space="preserve" class="heart">
        <g>
          <path fill="#010101" d="M82.32,7.888c-8.359-7.671-21.91-7.671-30.271,0l-5.676,5.21l-5.678-5.21c-8.357-7.671-21.91-7.671-30.27,0 c-9.404,8.631-9.404,22.624,0,31.255l35.947,32.991L82.32,39.144C91.724,30.512,91.724,16.52,82.32,7.888z"></path>
        </g>
      </svg><span class="omega">by <a href="https://twitter.com/LuciferCReeves">@lucifer</a></span>
    </div>

    <script>
      var stars
      var data
      var url
      var xhr = new XMLHttpRequest()

      url = "https://api.github.com/repositories/15975439"

      xhr.open( "GET.html", url, true )

      xhr.onreadystatechange = function(){
        if ( xhr.readyState == 4 ) {
          if ( xhr.status >= 200 && xhr.status < 400 ){
            data  = JSON.parse( xhr.responseText )
            stars = document.querySelectorAll(".github .stars .count")
            stars[0].innerHTML = stars[1].innerHTML = addCommasToNum( data.stargazers_count )
          } else {
            console.warn("Failed to resolve GitHub API.\n")
          }
        }
      }

      xhr.send()

    </script>
    <script>

      var hero = {
        origin   : "top",
        distance : "24px",
        duration : 1500,
        scale    : 1.05,
      }

      var intro = {
        origin   : "bottom",
        distance : "64px",
        duration : 900,
        delay    : 1500,
        scale    : 1,
      }

      var github = {
        origin   : "top",
        distance : "32px",
        duration : 600,
        delay    : 1800,
        scale    : 0,
      }

      var block = {
        reset: true,
        viewOffset: { top: 64 }
      }

      sr.reveal(".demo .block", block)
      sr.reveal(".hero", hero)
      sr.reveal(".intro", intro)
      sr.reveal(".hero .github", github)
      sr.reveal(".seq-1", block, 200)

      function addCommasToNum( num ){
        return num.toString().replace( /\B(?=(\d{3})+(?!\d))/g, "," )
      }

    </script>
    <script>
      var crown = document.querySelector(".crown")
      var demo  = document.querySelector(".demo")

      window.addEventListener( "scroll", scrollBrain, false )

      var body = document.body,
          html = document.documentElement;

      var height = Math.max( body.scrollHeight, body.offsetHeight,
                             html.clientHeight, html.scrollHeight, html.offsetHeight )

      function scrollBrain(){

        if ( window.pageYOffset >= demo.offsetTop + 64 ){
          return crown.classList.add("visible")
        }
        if ( crown.classList.contains("visible") ){
          return crown.classList.remove("visible")
        }
        if ( window.pageYOffset >= 0.85 * ( height - window.clientHeight ) ) {
          _gaq.push([ '_trackEvent', 'Behavior', 'Scroll', 'Viewed the entire page.'])
        }
      }

    </script>
    <script>
      (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
      (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
      m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
      })(window,document,'script','../www.google-analytics.com/analytics.js','ga')

      ga("create", "UA-55186174-1", "auto")
      ga("send", "pageview")
    </script>
	<!-- <script src="js/redpill.min.js"></script> -->
  </body>

<!-- Mirrored from scrollrevealjs.org/ by HTTrack Website Copier/3.x [XR&CO'2014], Mon, 31 Jul 2017 06:54:03 GMT -->
</html>