diff --git a/web/changelog.php b/web/changelog.php index 9cfe40736..09b66b9c9 100644 --- a/web/changelog.php +++ b/web/changelog.php @@ -1 +1 @@ - Changelog - Botania | vazkii.us
Botania Changelog
'; $changelog .= "

$version

"; $first = false; } else { $change = substr($line, 1); $changelog .= "
  • $change
  • "; } } echo('
    '); $changelog .= '
    '; echo($changelog); ?>
    \ No newline at end of file + Changelog - Botania | vazkii.us
    Botania Changelog
    '; $changelog .= "

    $version

    "; $first = false; } else { $change = substr($line, 1); $changelog .= "
  • $change
  • "; } } echo('
    '); $changelog .= '
    '; echo($changelog); ?>
    \ No newline at end of file diff --git a/web/dl.php b/web/dl.php index 1e5642e9e..bb111a8b6 100644 --- a/web/dl.php +++ b/web/dl.php @@ -34,4 +34,5 @@ file_put_contents($file, '0'); return get_dls($mod); } + ?> \ No newline at end of file diff --git a/web/downloads.php b/web/downloads.php index 49c2e21fd..73b7d63ae 100644 --- a/web/downloads.php +++ b/web/downloads.php @@ -7,29 +7,8 @@ - - + +
    2) { @@ -66,32 +47,31 @@ $cl_button_type = ''; } - $downloads_str .= "$file Changelog Minecraft $mc_version $dls $dls_txt"; + if($last_version != $mc_version && !$first) + $downloads_str .= "
    Minecraft $mc_version
    "; + + $downloads_str .= " $file Changelog Minecraft $mc_version $dls $dls_txt"; if($first) { - $downloads_str .= '


    Old Versions

    '; + $downloads_str .= '


    Old Versions
    '; $first = false; - } else $downloads_str .= '
    '; + } else { + $downloads_str .= '
    '; + $last_version = $mc_version; + } } $total_dl_str = number_format($total_dls); - print("

    Botania has been downloaded a total of $total_dl_str times.

    "); + print("
    Botania has been downloaded a total of $total_dl_str times.
    Botania is under a Creative Commons BY-NC-SA License, more info (for modpacks and other purposes) can be found in the footer.

    Latest Download
    "); print($downloads_str); ?>
    - - + + + \ No newline at end of file diff --git a/web/incl/footer.js b/web/incl/footer.js new file mode 100644 index 000000000..7a0b5ba80 --- /dev/null +++ b/web/incl/footer.js @@ -0,0 +1,50 @@ +var animating = false; + +$(function() { + var remove = $.cookie('show-footer'); + if(remove === 'true') { + $('#footer').css( { bottom: '-50px' } ); + $('.hide-footer-btn').css( { bottom: '0px', left : '-=30px' } ); + $('.hide-footer-btn').find('.glyphicon').removeClass('glyphicon-remove').addClass('glyphicon-plus'); + $('#footer-tooltip').text('Show Footer'); + } + + var hash = document.location.hash.substring(1); + $('html, body').animate({ scrollTop: $("#" + hash + "-fake").offset().top - 100 }, 1000); +}); + +$('.hide-footer-btn').click(function() { + if(animating) + return; + + animating = true; + var remove = $(this).find('.glyphicon').hasClass('glyphicon-remove'); + $('#footer').animate( { bottom: remove ? '-50px' : '0px' } ); + + $(this).animate( { bottom: remove ? '0px' : '15px', left: remove ? '-=30px' : '+=30px' }, function() { + $('#footer-tooltip').text(remove ? 'Show Footer' : 'Hide Footer'); + $.cookie('show-footer', remove, { expires: 30 }); + + var glyph = $(this).find('.glyphicon'); + glyph.fadeOut('fast', function() { + glyph.removeClass(remove ? 'glyphicon-remove' : 'glyphicon-plus').addClass(remove ? 'glyphicon-plus' : 'glyphicon-remove').fadeIn('fast'); + animating = false; + }); + }); +}); + +$('.hide-footer-btn').mouseenter(function(e) { + $('#footer-tooltip').fadeIn('fast'); +}); + +$('.hide-footer-btn').mouseleave(function(e) { + $('#footer-tooltip').fadeOut(); +}) + +$(".hashlink").click(function() { + var hash = $(this).text(); + + if(hash == 'Back to top') + $('html, body').animate({ scrollTop: 0 }, 500); + else $('html, body').animate({ scrollTop: $("#" + hash + "-fake").offset().top - 100 }, 1000); +}); \ No newline at end of file diff --git a/web/incl/footer.php b/web/incl/footer.php new file mode 100644 index 000000000..26967186b --- /dev/null +++ b/web/incl/footer.php @@ -0,0 +1,16 @@ + + + + + \ No newline at end of file diff --git a/web/incl/header.php b/web/incl/header.php new file mode 100644 index 000000000..a7c2243b6 --- /dev/null +++ b/web/incl/header.php @@ -0,0 +1,22 @@ + \ No newline at end of file diff --git a/web/index.php b/web/index.php index 0d4558f3f..1a8ba21b0 100644 --- a/web/index.php +++ b/web/index.php @@ -7,28 +7,7 @@ - +
    @@ -121,17 +100,10 @@
    - - + + + \ No newline at end of file diff --git a/web/jquery_cookie.min.js b/web/jquery_cookie.min.js new file mode 100644 index 000000000..fb46f1561 --- /dev/null +++ b/web/jquery_cookie.min.js @@ -0,0 +1 @@ +(function(e){if(typeof define==="function"&&define.amd){define(["jquery"],e)}else{e(jQuery)}})(function(e){function n(e){return u.raw?e:encodeURIComponent(e)}function r(e){return u.raw?e:decodeURIComponent(e)}function i(e){return n(u.json?JSON.stringify(e):String(e))}function s(e){if(e.indexOf('"')===0){e=e.slice(1,-1).replace(/\\"/g,'"').replace(/\\\\/g,"\\")}try{e=decodeURIComponent(e.replace(t," "));return u.json?JSON.parse(e):e}catch(n){}}function o(t,n){var r=u.raw?t:s(t);return e.isFunction(n)?n(r):r}var t=/\+/g;var u=e.cookie=function(t,s,a){if(s!==undefined&&!e.isFunction(s)){a=e.extend({},u.defaults,a);if(typeof a.expires==="number"){var f=a.expires,l=a.expires=new Date;l.setTime(+l+f*864e5)}return document.cookie=[n(t),"=",i(s),a.expires?"; expires="+a.expires.toUTCString():"",a.path?"; path="+a.path:"",a.domain?"; domain="+a.domain:"",a.secure?"; secure":""].join("")}var c=t?undefined:{};var h=document.cookie?document.cookie.split("; "):[];for(var p=0,d=h.length;p .active > a:focus { background-color: #04410e; box-shadow: 0px -2px 8px #04410e; + text-shadow: 1px 1px rgba(0, 0, 0, 0.3); +} + +.header-btn:hover { + background-color: #05510e; + box-shadow: 0px -2px 8px #05510e; + text-shadow: 1px 1px rgba(0, 0, 0, 0.3); } .content { @@ -95,6 +106,11 @@ iframe { box-shadow: -1px 0px 20px 2px #000000; } +.total-dls { + text-shadow: 1px 1px rgba(0, 0, 0, 0.3); + font-size: 26px; +} + .dl { width: 220px; } @@ -118,10 +134,30 @@ iframe { box-shadow: 0px 0px 25px #19ac46 inset, 0px 0px 25px #19ac46; } -#footer > a { +.footer > a { text-decoration:none; } +.hide-footer-btn { + position: fixed; + bottom: 15px; + left: calc(75% + 2px); + color: #04410e; +} + +.hide-footer-btn > a { + text-decoration:none; + color: #04410e; +} + +.hide-footer-btn > a:hover { + color: #08810e; +} + +#footer-tooltip { + display: none; +} + .padded { margin-left: 20px; margin-right: 20px; diff --git a/web/scroll.js b/web/scroll.js index 972e58e51..aacea3dc9 100644 --- a/web/scroll.js +++ b/web/scroll.js @@ -1,8 +1,3 @@ -$(function() { - var hash = document.location.hash.substring(1); - $('html, body').animate({ scrollTop: $("#" + hash + "-fake").offset().top - 100 }, 1000); -}); - $(".hashlink").click(function() { var hash = $(this).text();