Skip to content

Commit

Permalink
made the site look a lot better on ‘small’ responsive mode (phones an…
Browse files Browse the repository at this point in the history
…d such).
  • Loading branch information
rzwitserloot committed May 29, 2017
1 parent 4053b32 commit a5d5ac8
Show file tree
Hide file tree
Showing 6 changed files with 70 additions and 44 deletions.
32 changes: 17 additions & 15 deletions website/extra/htaccess
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
RewriteRule ^/features/all$ /features/index.html [L]
RewriteRule ^/features/experimental/all$ /features/experimental/index.html [L]
RewriteRule ^/features/.*\.html$ - [L]
RewriteRule ^/features/(.*)$ /features/$1.html [L]
RewriteRule ^/features$ /features/index.html [L]
RewriteRule ^/features/experimental$ /features/experimental/index.html [L]
RewriteRule ^/changelog$ /changelog.html [L]
RewriteRule ^/?$ /main.html [L]
RewriteRule ^/index(.html)?$ /main.html [L]
RewriteRule ^/credits$ /credits.html [L]
RewriteRule ^/download$ /download.html [L]
RewriteRule ^/all(-v|V)ersions(.html)?$ /all-versions.html [L]
RewriteRule ^/setup/.*\.html$ - [L]
RewriteRule ^/setup/(.*) /setup/$1.html [L]

RewriteEngine On
RewriteRule ^features/all$ /features/index.html [L,END]
RewriteRule ^features/index(\.html)?$ /features/index.html [L,END]
RewriteRule ^features/experimental/all$ /features/experimental/index.html [L,END]
RewriteRule ^features/experimental/index(\.html)?$ /features/experimental/index.html [L,END]
RewriteRule ^features/.*\.html$ - [L,END]
RewriteRule ^features/(.*)$ /features/$1.html [L,END]
RewriteRule ^features$ /features/index.html [L,END]
RewriteRule ^features/experimental$ /features/experimental/index.html [L,END]
RewriteRule ^changelog$ /changelog.html [L,END]
RewriteRule ^$ /main.html [L,END]
RewriteRule ^index(\.html)?$ /main.html [L,END]
RewriteRule ^credits$ /credits.html [L,END]
RewriteRule ^download$ /download.html [L,END]
RewriteRule ^all-versions$ /all-versions.html [L,END]
RewriteRule ^setup/.*\.html$ - [L,END]
RewriteRule ^setup/(.*) /setup/$1.html [L,END]
36 changes: 30 additions & 6 deletions website/resources/css/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ html {

body {
margin-bottom: 60px;
overflow-y: scroll;
}

ul.dropdown-menu .header {
Expand All @@ -24,12 +25,6 @@ div.snippet code {
z-index: 2000;
}

@media (max-width: 768px) {
.fork-me {
display: none;
}
}

.video {
padding-top: 4%;
}
Expand Down Expand Up @@ -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;
}
}

18 changes: 12 additions & 6 deletions website/resources/js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
Expand All @@ -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,
Expand All @@ -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);
})($);
22 changes: 8 additions & 14 deletions website/templates/_scaffold.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,6 @@ <h4><a href="${href}"><code>${title}</code></a></h4>
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<meta name="google-site-verification" content="uCgX3Or3kDRGpbJ6JCsQc3Ub4JsnR5-p0itfsKAYZ_U" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<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','https://www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-9884254-1', 'auto');
ga('send', 'pageview');
</script>
<link href="/favicon.ico" rel="icon" type="image/x-icon" />

<title>Project Lombok</title>
Expand Down Expand Up @@ -49,12 +41,14 @@ <h4><a href="${href}"><code>${title}</code></a></h4>
</#if>
</#list>
</head><body>
<a href="https://github.com/rzwitserloot/lombok" class="fork-me">
<img
alt="Fork me on GitHub"
src="//s3.amazonaws.com/github/ribbons/forkme_right_red_aa0000.png" />
</a>

<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','https://www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-9884254-1', 'auto');
ga('send', 'pageview');
</script>
<div class="navbar navbar-default navbar-fixed-top">
<div class="container">
<div class="navbar-header">
Expand Down
2 changes: 1 addition & 1 deletion website/templates/all-versions.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<h1 class="text-center">
<div class="row">
<icon class="fa fa-download"></icon>
<a class="currentVersion">
<a class="currentVersion" href="downloads/lombok.jar">
${version} [Current Version]
</a>
</div>
Expand Down
4 changes: 2 additions & 2 deletions website/templates/main.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@
<h1>Lombok Demo</h1>
</div>
<div class="video text-center">
<video width="800" height="480" poster="img/poster.png" controls="controls" preload="none">
<video width="800" height="480" poster="/img/poster.png" controls="controls" preload="none">
<source src="/videos/lombok.ogv" type="video/ogg" />
<source src="/videos/lombok.mp4" type="video/mp4" />
<source src="/videos/lombok-iPhone.m4v" type="video/mp4" />
<object id="player" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="800" height="500">
<param name="movie" value="/videos/player.swf?image=poster.png&amp;file=lombok.mp4" />
<param name="movie" value="/videos/player.swf?image=/img/poster.png&amp;file=/videos/lombok.mp4" />
<param name="allowfullscreen" value="true" />
<!--[if !IE]>-->
<object width="800" height="500" type="application/x-shockwave-flash"
Expand Down

0 comments on commit a5d5ac8

Please sign in to comment.