From aa91469f2d23dc8973c30b4aec60008f6bb1b4dd Mon Sep 17 00:00:00 2001 From: Lizbeth Rika Date: Tue, 18 Nov 2014 16:44:29 +0000 Subject: [PATCH] Add the changelog pages. --- web/changelog.php | 4 ++++ web/css/botania.css | 15 +++++++++++- web/js/botania.js | 5 ++-- web/module/changelog.php | 50 ++++++++++++++++++++++++++++++++++++++++ 4 files changed, 70 insertions(+), 4 deletions(-) create mode 100644 web/changelog.php create mode 100644 web/module/changelog.php diff --git a/web/changelog.php b/web/changelog.php new file mode 100644 index 000000000..b22ecf2dc --- /dev/null +++ b/web/changelog.php @@ -0,0 +1,4 @@ + \ No newline at end of file diff --git a/web/css/botania.css b/web/css/botania.css index b444064f0..3fac35f60 100644 --- a/web/css/botania.css +++ b/web/css/botania.css @@ -1,3 +1,9 @@ +hr { + height: 1px; + background-color: #ccc; + +} + .navbar { background-image: none; background-color: #33691E; @@ -60,7 +66,6 @@ } .btn-group-first { - margin-bottom: -12px; margin-top: 7px; height: 46px; } @@ -175,3 +180,11 @@ iframe { height: 150px; z-index: -1; } + +.changelog-header { + font-size: 32px; +} + +#changelog-container { + margin-bottom: 60px; +} \ No newline at end of file diff --git a/web/js/botania.js b/web/js/botania.js index 5dcdaac34..1f84a7abf 100644 --- a/web/js/botania.js +++ b/web/js/botania.js @@ -23,15 +23,14 @@ $('.hide-div').click(function() { } else { div.show(300); $(this).text('(hide)'); - } - + } }); $(".hashlink").click(function() { var hash = $(this).text(); if(hash == 'Back to top' || hash == '(back to top)') - $('html, body').animate({ scrollTop: 0 }, 500); + $('html, body').delay(hash == 'Back to top' ? 400 : 0).animate({ scrollTop: 0 }, 500); else $('html, body').animate({ scrollTop: $("#" + hash + "-fake").offset().top - 100 }, 1000); }); diff --git a/web/module/changelog.php b/web/module/changelog.php new file mode 100644 index 000000000..3d3b2f6ce --- /dev/null +++ b/web/module/changelog.php @@ -0,0 +1,50 @@ +
Botania Changelog
+ +
+

$version

"; + $first = false; + $href_version = trim(str_lreplace(' ', '-', $line)); + } else { + $change = substr($line, 1); + $changelog .= "
  • $change
  • "; + } + } + + echo('
    '); + + add_buttons(); + echo($changelog); + + function add_buttons() { + global $changelog, $href_version; + $changelog .= "
    Download
    "; + } + + function str_lreplace($search, $replace, $subject) { + $pos = strrpos($subject, $search); + + if($pos != false) + $subject = substr_replace($subject, $replace, $pos, strlen($search)); + + return $subject; + } + ?> +
    \ No newline at end of file