From a777ddada697d8ad919fa462d2b995b14dc5b42d Mon Sep 17 00:00:00 2001 From: "Open-Steps.org" Date: Fri, 13 Feb 2015 18:11:24 +0100 Subject: [PATCH] beautified html & js --- _includes/footer.html | 51 ++++-- _includes/head.html | 72 ++++---- _includes/header.html | 90 +++++----- _layouts/default.html | 16 +- _layouts/event.html | 165 ++++++++--------- _layouts/page.html | 18 +- _layouts/post.html | 23 ++- about.html | 186 ++++++++++--------- artists.html | 72 +++----- bower.json | 48 ++--- callfortalks.html | 16 +- css/custom.css | 409 ++++++++++++++++++------------------------ feed.xml | 53 +++--- index.html | 128 ++++++------- js/custom.js | 54 +++--- 15 files changed, 648 insertions(+), 753 deletions(-) diff --git a/_includes/footer.html b/_includes/footer.html index 4e91d004..38901139 100644 --- a/_includes/footer.html +++ b/_includes/footer.html @@ -1,25 +1,38 @@ diff --git a/_includes/head.html b/_includes/head.html index ae10de87..fb52f303 100644 --- a/_includes/head.html +++ b/_includes/head.html @@ -1,47 +1,45 @@ - - - + + + - {% if page.title %}{{ page.title }}{% else %}{{ site.title }}{% endif %} - - - + {% if page.title %}{{ page.title }}{% else %}{{ site.title }}{% endif %} + + + - - - - - - + + + + + + - - - - - + + + + + - - - + + + - + // $( document ).ready(function() { + $('.artist-media').centerImage('inside'); + // }); + diff --git a/_includes/header.html b/_includes/header.html index cfdb2ffa..ea284618 100644 --- a/_includes/header.html +++ b/_includes/header.html @@ -1,66 +1,62 @@ diff --git a/_layouts/default.html b/_layouts/default.html index 3e2ba6e2..54d3e7ab 100644 --- a/_layouts/default.html +++ b/_layouts/default.html @@ -1,18 +1,18 @@ - {% include head.html %} +{% include head.html %} - + - {% include header.html %} + {% include header.html %} -
- {{ content }} -
+
+ {{ content }} +
- {% include footer.html %} + {% include footer.html %} - + diff --git a/_layouts/event.html b/_layouts/event.html index 86fede99..54257728 100644 --- a/_layouts/event.html +++ b/_layouts/event.html @@ -1,108 +1,91 @@ ---- -layout: default ---- +--- layout: default --- -
+
-
+
-
+
-
+
-

-

#{{page.number}}

-

{{page.date_text}}

- {% if page.topics %} -

    - {% assign tags = (page.topics | split:",") %} - {% for tag in tags %} -
  • {{tag}}
  • - {% endfor%} -

- {% endif %} - {% if page.location %} -

{{page.location}}

- {% endif %} -

+

+

#{{page.number}}

+

{{page.date_text}}

+ {% if page.topics %} +

+

    + {% assign tags = (page.topics | split:",") %} {% for tag in tags %} +
  • {{tag}}
  • + {% endfor%} +
+

+ {% endif %} {% if page.location %} +

{{page.location}} +

+ {% endif %} +

- Back to home + Back to home -
+
-
+
- {% capture talks_number %}{{ page.talks | size }}{% endcapture %} - {% capture col_width %}{{ 12 | divided_by:talks_number }}{% endcapture %} + {% capture talks_number %}{{ page.talks | size }}{% endcapture %} {% capture col_width %}{{ 12 | divided_by:talks_number }}{% endcapture %} {% for talk in page.talks %} - {% for talk in page.talks %} +
-
+
+ {% if {{talk.media_artist_url}} %} + + {% else %} + + {% endif %} +
-
- {% if {{talk.media_artist_url}} %} - - {% else %} - - {% endif %} -
+
+

{{talk.artist}} / {{talk.title}}

+ {% if talk.description %} +

{{talk.description}}

+ {% endif %} {% if talk.artist_bio %} +
About {{talk.artist}}
+

{{talk.artist_bio}}

+ {% endif %} {% if talk.artist_website || talk.video_artist_url || talk.video_url %} {% if talk.artist_website %} + {{talk.artist_website}} {% endif %} {% if talk.video_artist_url %} +
+ Artist's Video {% endif %} {% if talk.video_url %} +
+ Talk's Video {% endif %} {% endif %} +
-
-

{{talk.artist}} / {{talk.title}}

- {% if talk.description %} -

{{talk.description}}

- {% endif %} - {% if talk.artist_bio %} -
About {{talk.artist}}
-

{{talk.artist_bio}}

- {% endif %} - {% if talk.artist_website || talk.video_artist_url || talk.video_url %} - {% if talk.artist_website %} - {{talk.artist_website}} - {% endif %} - {% if talk.video_artist_url %} -
- Artist's Video - {% endif %} - {% if talk.video_url %} -
- Talk's Video - {% endif %} - {% endif %} -
+
-
+ {% endfor %} - {% endfor %} - -
- -
- -
- - - - - -
- -
+
+ +
+ + + + + +
+ + + + diff --git a/_layouts/page.html b/_layouts/page.html index b09131f3..58930b07 100644 --- a/_layouts/page.html +++ b/_layouts/page.html @@ -1,18 +1,12 @@ ---- -layout: default ---- +--- layout: default ---
-
+
- +
+ {{ content }} +
-
- {{ content }} -
- -
+
diff --git a/_layouts/post.html b/_layouts/post.html index 9672df69..a566217e 100644 --- a/_layouts/post.html +++ b/_layouts/post.html @@ -1,20 +1,17 @@ ---- -layout: default ---- +--- layout: default ---
-
+
-
-

{{ page.title }}

- -
+
+

{{ page.title }}

+ +
- + -
+
diff --git a/about.html b/about.html index e8b0dcd3..2a27129d 100644 --- a/about.html +++ b/about.html @@ -1,93 +1,111 @@ ---- -layout: page -title: About -permalink: /about/ ---- +--- layout: page title: About permalink: /about/ ---
-
+
-
+
-

{{page.title}}

- Back to home - -
- -
- -
-
-
{{ site.title }}
-

{{ site.description }}

- -

Doors open from 7pm - Programme starting 8pm

-
-
- -
-
-
How to find us
- -

S-Bahn: S41/S42 (Ring) Wedding - U-Bahn: U6 Wedding, U8 Gesundbrunnen - Bus: M27 Wedding

- -

Panke e.V. - Gerichtstr. 23, Hof 5 - 13347 Berlin Wedding

-
- -
-
Supported by
-
-

Thanks Panke and Troika Ranch for the valuable support

-
    -
  • -
  • -
-
-
-
- -
Team
- -

SCOPE SESSIONS are curated & realised by a team, that shares passion for visual arts, experimental crossovers of sound and video, multimedia experiences, human interactions and computer technologies.

-

We started in summer 2011 with our first session, developed in cooperation with and hosted by Atelier Überall, with a strong initiative of Ludovic Bablon.

-

Since then we invited artists to share their unique approaches to an increasing audience. Hope you like it! See you at one of our sessions.

- -
- -
- - -
- -
- - - -
- -
- -
+

{{page.title}}

+ Back to home
+
+ +
+
+
{{ site.title }}
+

{{ site.description }}

+ +

Doors open from 7pm - Programme starting 8pm

+
+
+ +
+
+
How to find us
+ +

S-Bahn: S41/S42 (Ring) Wedding U-Bahn: U6 Wedding, U8 Gesundbrunnen Bus: M27 Wedding

+ +

Panke e.V. Gerichtstr. 23, Hof 5 13347 Berlin Wedding

+
+ +
+
Supported by
+
+

Thanks Panke and Troika Ranch for the valuable support

+ +
+
+
+ +
Team
+ +

SCOPE SESSIONS are curated & realised by a team, that shares passion for visual arts, experimental crossovers of sound and video, multimedia experiences, human interactions and computer technologies.

+

We started in summer 2011 with our first session, developed in cooperation with and hosted by Atelier Überall, with a strong initiative of Ludovic Bablon.

+

Since then we invited artists to share their unique approaches to an increasing audience. Hope you like it! See you at one of our sessions.

+ +
+ +
+ + +
+ +
+ + + +
+ +
+ +
+ +
+
diff --git a/artists.html b/artists.html index 831c9c92..7d0ef48c 100644 --- a/artists.html +++ b/artists.html @@ -1,59 +1,43 @@ ---- -layout: page -title: Artists -permalink: /artists/ ---- +--- layout: page title: Artists permalink: /artists/ ---
-
+
-
-

{{page.title}}

- Back to home -
+
+

{{page.title}}

+ Back to home +
-
+
- {% capture counter %}{{ '0' }}{% endcapture %} + {% capture counter %}{{ '0' }}{% endcapture %} {% for post in site.posts %} {% for talk in post.talks %} {% if counter == '0' %} +
+ {% endif %} - {% for post in site.posts %} - {% for talk in post.talks %} +
- {% if counter == '0' %} -
- {% endif %} +
+ {% if {{talk.media_artist_url}} %} + + {% else %} + + {% endif %} +
-
- -
- {% if {{talk.media_artist_url}} %} - - {% else %} - - {% endif %} -
- -
-

{{talk.artist}}

- #{{post.number}} -
- -
- - {% capture counter %}{{ counter | plus:'1' }}{% endcapture %} - - {% if counter == '4' %} - {% capture counter %}{{ '0' }}{% endcapture %} -
- {% endif %} - - - {% endfor %} - {% endfor %} +
+

{{talk.artist}}

+ #{{post.number}} +
+ {% capture counter %}{{ counter | plus:'1' }}{% endcapture %} {% if counter == '4' %} {% capture counter %}{{ '0' }}{% endcapture %} +
+ {% endif %} {% endfor %} {% endfor %} +
+
+
diff --git a/bower.json b/bower.json index a6cb8057..6cbe6dac 100644 --- a/bower.json +++ b/bower.json @@ -1,26 +1,26 @@ { - "name": "ScopeJekyll", - "version": "0.0.0", - "authors": [ - "Open-Steps.org " - ], - "description": "Scope 2015 website built with Jekyll", - "license": "MIT", - "homepage": "http://www.scopesessions.org", - "private": true, - "ignore": [ - "**/.*", - "node_modules", - "bower_components", - "test", - "tests" - ], - "dependencies": { - "jquery": "~2.1.1", - "bootstrap": "~3.3.1", - "vegas": "~1.3.5", - "imagefill.js": "*", - "imagesloaded": "~3.1.8", - "fontawesome": "~4.3.0" - } + "name": "ScopeJekyll", + "version": "0.0.0", + "authors": [ + "Open-Steps.org " + ], + "description": "Scope 2015 website built with Jekyll", + "license": "MIT", + "homepage": "http://www.scopesessions.org", + "private": true, + "ignore": [ + "**/.*", + "node_modules", + "bower_components", + "test", + "tests" + ], + "dependencies": { + "jquery": "~2.1.1", + "bootstrap": "~3.3.1", + "vegas": "~1.3.5", + "imagefill.js": "*", + "imagesloaded": "~3.1.8", + "fontawesome": "~4.3.0" + } } diff --git a/callfortalks.html b/callfortalks.html index 0fc0cca7..9490bb6d 100644 --- a/callfortalks.html +++ b/callfortalks.html @@ -1,19 +1,15 @@ ---- -layout: page -title: Call for talks -permalink: /call-for-talks/ ---- +--- layout: page title: Call for talks permalink: /call-for-talks/ ---
-
+
-
+
- TBD - -
+ TBD
+
+
diff --git a/css/custom.css b/css/custom.css index 3c37b32d..bbdf0ec2 100644 --- a/css/custom.css +++ b/css/custom.css @@ -1,40 +1,33 @@ /*blue 2098d1 lila 9775af*/ -body{ - color:#fff; - font-family: 'Abel', sans-serif; - font-size: 16px; +body { + color: #fff; + font-family: 'Abel', sans-serif; + font-size: 16px; } - -h3{ - color:#fff; +h3 { + color: #fff; } - -a{ - color: #9775af; +a { + color: #9775af; } - -a:hover{ - text-decoration: none; - color: #9775af; - cursor: pointer; +a:hover { + text-decoration: none; + color: #9775af; + cursor: pointer; } - -.top-button{ - display:none; - float:right; +.top-button { + display: none; + float: right; } - -.navbar-header{ - padding-left: 20px; +.navbar-header { + padding-left: 20px; } - -.navbar-options{ - padding: 10px; - float:right; +.navbar-options { + padding: 10px; + float: right; } - /*.navbar-options a{ margin-left: 10px; color: #000; @@ -43,273 +36,213 @@ a:hover{ font-size: 18px; }*/ -.navbar-brand img{ - height: 30px; +.navbar-brand img { + height: 30px; } - -.navbar-header a{ - color:#000; -} - -.navbar-nav li a{ - color:#000; - border-bottom: 4px solid #f8f8f8; -} - -.navbar-nav li a:hover{ - color:#9775af; - border-bottom: 4px solid #9775af; -} - -.navigator{ - padding:20px; - background: #fff; - margin-top:40px; - border-top: 1px solid #333; - display:none; -} - -.navigator a{ +.navbar-header a { color: #000; } - -.navigator a:hover{ +.navbar-nav li a { + color: #000; + border-bottom: 4px solid #f8f8f8; +} +.navbar-nav li a:hover { + color: #9775af; + border-bottom: 4px solid #9775af; +} +.navigator { + padding: 20px; + background: #fff; + margin-top: 40px; + border-top: 1px solid #333; + display: none; +} +.navigator a { + color: #000; +} +.navigator a:hover { color: #9775af; } - -.navigator li{ +.navigator li { float: left; margin: 4px; } - -.navigator h3{ - color:#9775af; +.navigator h3 { + color: #9775af; } - -.navigator h4{ - color:#000; - padding-left:0px; +.navigator h4 { + color: #000; + padding-left: 0px; } - -.upcoming{ +.upcoming { padding: 10px; } - -.upcoming-media img{ +.upcoming-media img { height: 80px; float: left; - margin-right:10px; -} - - -.site-header{ - background:#fff; -} - -.site-footer{ - color: #fff; -} - -.content{ - margin-top: 40px; -} - -.event-date{ - text-align: right; - padding-right: 10px; -} - -.event-date a{ margin-right: 10px; } - -.event-date p{ - color: #fff; +.site-header { + background: #fff; } - -.event-date h3{ - font-size: 96px; - padding-right: 10px; +.site-footer { + color: #fff; } - -.event-date h4{ - font-size: 18px; - font-weight: normal; - padding-right: 10px; +.content { + margin-top: 40px; } - -.event-date li{ - list-style:none; - padding-right: 10px; +.event-date { + text-align: right; + padding-right: 10px; +} +.event-date a { + margin-right: 10px; +} +.event-date p { + color: #fff; +} +.event-date h3 { + font-size: 96px; + padding-right: 10px; +} +.event-date h4 { + font-size: 18px; + font-weight: normal; + padding-right: 10px; +} +.event-date li { + list-style: none; + padding-right: 10px; } - .artist-media { - width: 100%; - height: 140px; - background: #000; + width: 100%; + height: 140px; + background: #000; } - -.artist-media{ - background: #000; - text-align:center; +.artist-media { + background: #000; + text-align: center; } - -.artist-media img{ - width:100%; +.artist-media img { + width: 100%; } - -.event{ - #padding:10px; - margin-bottom: 10px; +.event { + #padding: 10px; + margin-bottom: 10px; } - -.highlight{ - background: #fff; - color: #000; - padding: 2px 10px; +.highlight { + background: #fff; + color: #000; + padding: 2px 10px; } - -.dark_bg{ - #padding: 10px; - background: rgb(0, 0, 0) transparent; - background: rgba(0, 0, 0, 0.6); - filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#66000000, endColorstr=#66000000); - -ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorstr=#66000000, endColorstr=#66000000)"; +.dark_bg { + #padding: 10px; + background: rgb(0, 0, 0) transparent; + background: rgba(0, 0, 0, 0.6); + filter: progid: DXImageTransform.Microsoft.gradient(startColorstr=#66000000, endColorstr=#66000000); + -ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorstr=#66000000, endColorstr=#66000000)"; } - -.talk{ - padding:20px 5px; +.talk { + padding: 20px 5px; } - -.talk :hover{ +.talk:hover {} .talk-detail {} .talk-detail h3 { + font-size: 24px; } - -.talk-detail{ - +.talk-detail h4 { + font-size: 20px; + background: #fff; + color: #000; + padding: 4px; } - -.talk-detail h3{ - font-size: 24px; +.talk-detail h5 { + font-size: 18px; + background: #fff; + color: #000; + padding: 4px; } - -.talk-detail h4{ - font-size: 20px; - background: #fff; - color: #000; - padding: 4px; +.talk-detail a { + margin: 0 auto; + padding: 2px; + float: center; + text-weight: bold; } - -.talk-detail h5{ - font-size: 18px; - background: #fff; - color: #000; - padding: 4px; +.event-selector { + text-align: center; } - -.talk-detail a{ - margin: 0 auto; - padding: 2px; - float: center; - text-weight: bold; +.event-selector ul { + list-style: none; } - -.event-selector{ - text-align: center; +.event-selector li { + float: left; + margin: 10px; } - -.event-selector ul{ - list-style:none; +.event-selector a { + display: block; + color: #fff; + font-size: 20px; } - -.event-selector li{ - float:left; - margin: 10px; +.gallery { + margin-bottom: 10px; } - -.event-selector a{ - display: block; - color: #fff; - font-size: 20px; +.team li { + list-style-type: none; } - -.gallery{ - margin-bottom:10px; +.team-image img { + width: 100%; } - -.team li{ - list-style-type:none; +.team-list { + text-align: left; } - -.team-image img{ - width: 100%; +.nav_bottom { + margin-bottom: 10px; } - -.team-list{ - text-align: left; +.page-title { + text-align: right; + padding-right: 20px; } - -.nav_bottom{ - margin-bottom:10px; +.page-title h3 { + margin-top: 0px; + font-size: 48px; } - -.page-title{ - text-align: right; - padding-right: 20px; +.about h5 { + font-size: 18px; + background: #fff; + color: #000; + padding: 4px; } - -.page-title h3{ - margin-top: 0px; - font-size: 48px; +.footer { + margin-top: 10px; + background: #fff; } - -.about h5{ - font-size: 18px; - background: #fff; - color: #000; - padding: 4px; +.footer li { + list-style-type: none; + float: left; + margin: 10px; } - -.footer{ - margin-top:10px; - background: #fff; +.footer h4 { + list-style-type: none; + background: #fff; + color: #000; + padding: 4px; } - -.footer li{ - list-style-type:none; - float: left; - margin: 10px; -} - -.footer h4{ - list-style-type:none; - background: #fff; - color: #000; - padding: 4px; -} - -.supporters li{ +.supporters li { list-style: none; float: left; } - -.supporters li img{ - height: 60px; - margin: 10px; +.supporters li img { + height: 60px; + margin: 10px; } - -.footer-support{ - float: right; +.footer-support { + float: right; } - .footer li { font-size: 32px; } - -.footer li a:hover{ +.footer li a:hover { color: #000; font-size: 32px; } - -.footer li img{ - height:40px; +.footer li img { + height: 40px; } diff --git a/feed.xml b/feed.xml index a6628bd8..265ffba3 100644 --- a/feed.xml +++ b/feed.xml @@ -1,30 +1,27 @@ ---- -layout: null ---- - +--- layout: null --- + - - {{ site.title | xml_escape }} - {{ site.description | xml_escape }} - {{ site.url }}{{ site.baseurl }}/ - - {{ site.time | date_to_rfc822 }} - {{ site.time | date_to_rfc822 }} - Jekyll v{{ jekyll.version }} - {% for post in site.posts limit:10 %} - - {{ post.title | xml_escape }} - {{ post.content | xml_escape }} - {{ post.date | date_to_rfc822 }} - {{ post.url | prepend: site.baseurl | prepend: site.url }} - {{ post.url | prepend: site.baseurl | prepend: site.url }} - {% for tag in post.tags %} - {{ tag | xml_escape }} - {% endfor %} - {% for cat in post.categories %} - {{ cat | xml_escape }} - {% endfor %} - - {% endfor %} - + + {{ site.title | xml_escape }} + {{ site.description | xml_escape }} + {{ site.url }}{{ site.baseurl }}/ + + {{ site.time | date_to_rfc822 }} + {{ site.time | date_to_rfc822 }} + Jekyll v{{ jekyll.version }} + {% for post in site.posts limit:10 %} + + {{ post.title | xml_escape }} + {{ post.content | xml_escape }} + {{ post.date | date_to_rfc822 }} + {{ post.url | prepend: site.baseurl | prepend: site.url }} + {{ post.url | prepend: site.baseurl | prepend: site.url }} + {% for tag in post.tags %} + {{ tag | xml_escape }} + {% endfor %} {% for cat in post.categories %} + {{ cat | xml_escape }} + {% endfor %} + + {% endfor %} + diff --git a/index.html b/index.html index b638c20e..2ec18489 100644 --- a/index.html +++ b/index.html @@ -1,82 +1,68 @@ ---- -layout: default ---- +--- layout: default ---
- {% for post in site.posts %} + {% for post in site.posts %} {% if forloop.first != true %} - {% if forloop.first != true %} + + {% assign pos = 39 | minus: post.number %} - - {% assign pos = 39 | minus: post.number %} +
-
+
-
- - -

#{{post.number}}

-

{{post.date_text}}

-
- - {% if post.topics %} -

    - {% assign tags = (post.topics | split:",") %} - {% for tag in tags %} -
  • {{tag}}
  • - {% endfor%} -

- {% endif %} - - {% if post.location %} -

{{post.location}}

- {% endif %} - -
- -
- - {% capture talks_number %}{{ post.talks | size }}{% endcapture %} - {% capture col_width %}{{ 12 | divided_by:talks_number }}{% endcapture %} - - {% for talk in post.talks %} - -
- -
- {% if {{talk.media_artist_url}} %} - - {% else %} - - {% endif %} -
- -
-

{{talk.artist}} / {{talk.title}}

-

{{talk.description}}

- {% if talk.artist_website %} - {{talk.artist_website}} - {% endif %} - {% if talk.video_artist_url %} -
- Artist's Video - {% endif %} - {% if talk.video_url %} -
- Talk's Video - {% endif %} -
- -
- - {% endfor %} - -
- -
+ +

#{{post.number}}

+

{{post.date_text}}

+
+ {% if post.topics %} +

+

    + {% assign tags = (post.topics | split:",") %} {% for tag in tags %} +
  • {{tag}}
  • + {% endfor%} +
+

+ {% endif %} {% if post.location %} +

{{post.location}} +

{% endif %} - {% endfor %} +
+ +
+ + {% capture talks_number %}{{ post.talks | size }}{% endcapture %} {% capture col_width %}{{ 12 | divided_by:talks_number }}{% endcapture %} {% for talk in post.talks %} + +
+ +
+ {% if {{talk.media_artist_url}} %} + + {% else %} + + {% endif %} +
+ +
+

{{talk.artist}} / {{talk.title}}

+

{{talk.description}}

+ {% if talk.artist_website %} + {{talk.artist_website}} {% endif %} {% if talk.video_artist_url %} +
+ Artist's Video {% endif %} {% if talk.video_url %} +
+ Talk's Video {% endif %} +
+ +
+ + {% endfor %} + +
+ +
+ + {% endif %} {% endfor %}
diff --git a/js/custom.js b/js/custom.js index 08899138..7cd2c087 100644 --- a/js/custom.js +++ b/js/custom.js @@ -2,17 +2,17 @@ var scrolling = false; var navigatorOpen = false; var topButtonVisible = true; -$(document).ready(function(){ +$(document).ready(function() { - $(function(){ + $(function() { $.scrollIt(); }); $(".navigator-toggle").click(function() { - if (navigatorOpen){ + if (navigatorOpen) { closeTopMenu(); - }else{ + } else { openTopMenu(); } navigatorOpen = !navigatorOpen; @@ -22,39 +22,39 @@ $(document).ready(function(){ closeTopMenu(); }); - function openTopMenu(){ - if (!scrolling && !navigatorOpen){ + function openTopMenu() { + if (!scrolling && !navigatorOpen) { scrolling = true; - $(".navigator").slideDown( "slow", function() { + $(".navigator").slideDown("slow", function() { scrolling = false; navigatorOpen = true; }); } } - function closeTopMenu(){ - if (!scrolling && navigatorOpen){ + function closeTopMenu() { + if (!scrolling && navigatorOpen) { scrolling = true; - $('.navigator').slideUp( "slow", function() { + $('.navigator').slideUp("slow", function() { scrolling = false; navigatorOpen = false; }); } } - function showTopButton(){ + function showTopButton() { console.log('showTopButton'); - if (!topButtonVisible){ - $('.top-button').show( "slow", function() { + if (!topButtonVisible) { + $('.top-button').show("slow", function() { topButtonVisible = true; }); } } - function hideTopButton(){ + function hideTopButton() { console.log('hideTopButton'); - if (topButtonVisible){ - $('.top-button').hide( "slow", function() { + if (topButtonVisible) { + $('.top-button').hide("slow", function() { topButtonVisible = false; }); } @@ -63,18 +63,18 @@ $(document).ready(function(){ var timeout = null; var navbarHeight = $('.navbar').height(); - $(window).scroll(function () { + $(window).scroll(function() { if (!timeout) { - timeout = setTimeout(function () { - clearTimeout(timeout); - timeout = null; - if ($(window).scrollTop() >= navbarHeight) { - closeTopMenu(); - showTopButton(); - }else{ - hideTopButton(); - } - }, 250); + timeout = setTimeout(function() { + clearTimeout(timeout); + timeout = null; + if ($(window).scrollTop() >= navbarHeight) { + closeTopMenu(); + showTopButton(); + } else { + hideTopButton(); + } + }, 250); } });