aboutsummaryrefslogtreecommitdiff
path: root/website/resources
diff options
context:
space:
mode:
authorReinier Zwitserloot <reinier@zwitserloot.com>2017-05-29 22:34:56 +0200
committerReinier Zwitserloot <reinier@zwitserloot.com>2017-05-29 22:34:56 +0200
commita5d5ac8c13179368528702f88072458f701b4063 (patch)
tree8e96884f00b8d76468fdeba36dee5a9e9c39d31f /website/resources
parent4053b325fa03cadd3c64996742d81bdb6b44d6aa (diff)
downloadlombok-a5d5ac8c13179368528702f88072458f701b4063.tar.gz
lombok-a5d5ac8c13179368528702f88072458f701b4063.tar.bz2
lombok-a5d5ac8c13179368528702f88072458f701b4063.zip
made the site look a lot better on ‘small’ responsive mode (phones and such).
Diffstat (limited to 'website/resources')
-rw-r--r--website/resources/css/custom.css36
-rw-r--r--website/resources/js/main.js18
2 files changed, 42 insertions, 12 deletions
diff --git a/website/resources/css/custom.css b/website/resources/css/custom.css
index d3022e28..6a1c564d 100644
--- a/website/resources/css/custom.css
+++ b/website/resources/css/custom.css
@@ -5,6 +5,7 @@ html {
body {
margin-bottom: 60px;
+ overflow-y: scroll;
}
ul.dropdown-menu .header {
@@ -24,12 +25,6 @@ div.snippet code {
z-index: 2000;
}
-@media (max-width: 768px) {
- .fork-me {
- display: none;
- }
-}
-
.video {
padding-top: 4%;
}
@@ -150,3 +145,32 @@ a {
.changelog li {
text-align: left;
}
+
+@media (max-width: 768px) {
+ .fork-me {
+ display: none;
+ }
+
+ h1 {
+ font-size: 20px;
+ }
+
+ h2 {
+ font-size: 18px;
+ }
+
+ h3 {
+ font-size: 16px;
+ }
+
+ .main-section {
+ padding-left: 30px;
+ padding-right: 30px;
+ }
+
+ video {
+ width: 100%;
+ height: auto;
+ }
+}
+
diff --git a/website/resources/js/main.js b/website/resources/js/main.js
index 146dd554..ebeeab9d 100644
--- a/website/resources/js/main.js
+++ b/website/resources/js/main.js
@@ -2,13 +2,13 @@
(function($) {
swfobject.registerObject("player", "9.0.98", "videos/expressInstall.swf");
-
+
function toKey(href) {
var lnk = "__savedContent_" + href.replace(/\//g, '_');
if (lnk.substring(lnk.length - 5) === ".html") lnk = lnk.substring(0, lnk.length - 5);
return lnk;
}
-
+
function captureLinkClick() {
var self = $(this);
if (self.data("clc")) return;
@@ -25,13 +25,17 @@
History.pushState({urlPath: href}, self.text(), href);
});
}
-
+
+ function collapseMenu() {
+ if ($(".navbar-collapse").is(".in")) $(".navbar-toggle").click()
+ }
+
function ajaxFeaturePages() {
if (!History.enabled) return;
History.replaceState({urlPath: window.location.pathname}, $("title").text(), History.getState().urlpath);
-
+
$("a").each(captureLinkClick);
-
+
$(window).on("statechange", function() {
var hs = History.getState();
var u = hs.data.urlPath;
@@ -44,6 +48,7 @@
var a = $("#main-section");
sc.show().attr("id", "main-section").attr("class", "container-fluid main-section");
a.replaceWith(sc);
+ collapseMenu();
} else {
$.ajax({
url: u,
@@ -54,12 +59,13 @@
var end = response.indexOf(y);
var newH = $(response.substr(start, end - start));
$("#main-section").replaceWith(newH);
+ collapseMenu();
$("a").each(captureLinkClick);
}
});
}
});
}
-
+
$(ajaxFeaturePages);
})($);