diff options
Diffstat (limited to 'website/resources')
-rw-r--r-- | website/resources/css/custom.css | 43 | ||||
-rw-r--r-- | website/resources/js/main.js | 27 |
2 files changed, 69 insertions, 1 deletions
diff --git a/website/resources/css/custom.css b/website/resources/css/custom.css index ff31de04..3c8e0399 100644 --- a/website/resources/css/custom.css +++ b/website/resources/css/custom.css @@ -1,3 +1,44 @@ +#clickForVideo { + padding: 20px 30px; + background-color: #DDD; + cursor: pointer; + margin-left: auto; + margin-right: auto; + margin-bottom: 40px; +} + +.errorBox { + border: 1px dashed #F44; + font-size: 1.2em; + padding: 20px; + background-color: #EEE; + text-align: center; +} + +.noSupportersBox { + font-size: 1.2em; + padding: 20px; + background-color: #EEE; + text-align: center; +} + +.spinner { + display: block; + margin-left: auto; + margin-right: auto; + width: 16px; + height: 16px; +} + +.legalese { + font-style: italic; + font-size: 0.8em; +} + +#companyLogo { + margin-right: 8px; +} + html { position: relative; min-height: 100%; @@ -96,7 +137,7 @@ div.snippet code { } h1, h2, h3 { - padding: 40px; + padding: 12px 40px; text-align: center; } diff --git a/website/resources/js/main.js b/website/resources/js/main.js index 99ae3b19..f23ea28e 100644 --- a/website/resources/js/main.js +++ b/website/resources/js/main.js @@ -3,6 +3,31 @@ (function($) { swfobject.registerObject("player", "9.0.98", "videos/expressInstall.swf"); + function clickToTap() { + if (matchMedia && matchMedia('(hover: none)').matches) $(".clickToTap").each(function() { + var x = $(this); + if (x.text() === "Click") x.text("Tap"); + else x.text("tap"); + }); + } + + function clickForVideo() { + var cfv = $("#clickForVideo"); + var f = function() { + if (!cfv.is(":visible")) return; + cfv.hide(); + $("#demoVideo").show().get(0).play(); + }; + + cfv.css("cursor", "pointer").on("click", f).on("touchstart", function() { + $(this).data("moved", 0); + }).on("touchmove", function() { + $(this).data("moved", 1); + }).on("touchend", function() { + if ($(this).data("moved") === 0) f(); + }); + } + function toKey(href) { var lnk = "__savedContent_" + href.replace(/\//g, '_'); if (lnk.substring(lnk.length - 5) === ".html") lnk = lnk.substring(0, lnk.length - 5); @@ -72,4 +97,6 @@ } $(ajaxFeaturePages); + $(clickToTap); + $(clickForVideo); })($); |