From a6f0b35d04039096ef260bac295a8047a40acef1 Mon Sep 17 00:00:00 2001 From: tix Date: Sun, 25 Dec 2016 02:53:44 +0800 Subject: [PATCH] + mod files --- public/css/{style.css => mod.css} | 5 +++++ public/js/mod.js | 18 ++++++++++++++++++ 2 files changed, 23 insertions(+) rename public/css/{style.css => mod.css} (79%) create mode 100644 public/js/mod.js diff --git a/public/css/style.css b/public/css/mod.css similarity index 79% rename from public/css/style.css rename to public/css/mod.css index 5c8cd2d..8b56086 100644 --- a/public/css/style.css +++ b/public/css/mod.css @@ -16,4 +16,9 @@ body { .row-grid { padding-bottom:15px; margin-bottom:15px; +} + +.text-cont { + line-height:38px; + text-indent:2em; } \ No newline at end of file diff --git a/public/js/mod.js b/public/js/mod.js new file mode 100644 index 0000000..a8594d9 --- /dev/null +++ b/public/js/mod.js @@ -0,0 +1,18 @@ +$('.navbar-nav li a').each(function () { + if ($($(this))[0].href == String(window.location)) { + $(this).parent().addClass('active'); + } + else if (window.location.pathname == '/') { + $('.navbar-nav li').first().addClass('active'); + } + else { + $('.navbar-nav li').first().removeClass('active'); + } + +}); + + +// $(document).on('click', '.navbar-nav li', function () { +// $(".nav-list li").removeClass("active"); +// $(this).addClass("active"); +// });