diff options
author | Morgan Bazalgette <git@howl.moe> | 2017-12-31 01:47:52 +0100 |
---|---|---|
committer | Lunny Xiao <xiaolunwen@gmail.com> | 2017-12-30 18:47:52 -0600 |
commit | 3d3faa26248e46ed00617caedab6670b89b4b504 (patch) | |
tree | 9d103452081843ed07c5441ce26f65725de7f1d1 /public/js | |
parent | 2f8c65c885ecd49e042e0d8ca8677090dc1956c6 (diff) | |
download | gitea-3d3faa26248e46ed00617caedab6670b89b4b504.tar.gz gitea-3d3faa26248e46ed00617caedab6670b89b4b504.zip |
Responsive view (#2750)
* Viewport meta tag
* responsive: dashboard
* responsive: issues page
* responsive: Explore page
* responsive: navbar, and some navbar css refactoring
* responsive: button for collapsing navbar in mobile view
* Mark the hamburger button as active when pressed
* better homepage for responsive views
* Bring back jump class in navbar
The class was necessary, because this way the
dropdown doesn't assume the contents of the
selected item.
* make repository homes responsive
* Make file view page responsive
* Make forms look good on responsive views
* make commits and commit diff view responsive
* issues and PRs
* responsive wiki
* Don't place auto-init far off the page
* Minor changes to amend broken stuff
minor improvements
- make login/sign up in navbar stackable
- make navbar in explore and sign in not stackable
Change selected class in TestPullCompare
Fix typo that happened when rebasing
fix dashboard on org view
improve profile UI
Use clearing on file diff to fix broken UI caused by floating elements
remove unresolved merge conflict, and | Sanitize
Fix repo home not loading
Diffstat (limited to 'public/js')
-rw-r--r-- | public/js/index.js | 26 |
1 files changed, 22 insertions, 4 deletions
diff --git a/public/js/index.js b/public/js/index.js index 7c4b177505..9104bf6400 100644 --- a/public/js/index.js +++ b/public/js/index.js @@ -1531,11 +1531,11 @@ $(document).ready(function () { $('.issue-checkbox').click(function() { var numChecked = $('.issue-checkbox').children('input:checked').length; if (numChecked > 0) { - $('.issue-filters').hide(); - $('.issue-actions').show(); + $('#issue-filters').hide(); + $('#issue-actions').show(); } else { - $('.issue-filters').show(); - $('.issue-actions').hide(); + $('#issue-filters').show(); + $('#issue-actions').hide(); } }); @@ -1568,6 +1568,7 @@ $(document).ready(function () { initVueApp(); initTeamSettings(); initCtrlEnterSubmit(); + initNavbarContentToggle(); // Repo clone url. if ($('#repo-clone-url').length > 0) { @@ -2076,3 +2077,20 @@ function initFilterBranchTagDropdown(selector) { $(".commit-button").click(function() { $(this).parent().find('.commit-body').toggle(); }); + +function initNavbarContentToggle() { + var content = $('#navbar'); + var toggle = $('#navbar-expand-toggle'); + var isExpanded = false; + toggle.click(function() { + isExpanded = !isExpanded; + if (isExpanded) { + content.addClass('shown'); + toggle.addClass('active'); + } + else { + content.removeClass('shown'); + toggle.removeClass('active'); + } + }); +} |