diff --git a/public/less/admin/general/dashboard.less b/public/less/admin/general/dashboard.less index c9cbd0f2bb..eb527a5192 100644 --- a/public/less/admin/general/dashboard.less +++ b/public/less/admin/general/dashboard.less @@ -19,6 +19,11 @@ top: -10px; left: 0px; } + + &.compact { + padding-left: 0px; + padding-top: 60px; + } } .graph-legend { diff --git a/public/src/forum/admin/general/dashboard.js b/public/src/forum/admin/general/dashboard.js index 28adeaacc5..67b8afc175 100644 --- a/public/src/forum/admin/general/dashboard.js +++ b/public/src/forum/admin/general/dashboard.js @@ -276,6 +276,18 @@ define('forum/admin/general/dashboard', ['semver'], function(semver) { setInterval(updateTrafficGraph, 15000); updateTrafficGraph(); + + $(window).on('resize', function() { + $('.pie-chart.push-down').each(function() { + var $this = $(this); + + if ($this.width() < 320) { + $this.addClass('compact'); + } else { + $this.removeClass('compact'); + } + }); + }); } function updateTrafficGraph() { diff --git a/src/views/admin/general/dashboard.tpl b/src/views/admin/general/dashboard.tpl index df785df4c4..4d5cf5434e 100644 --- a/src/views/admin/general/dashboard.tpl +++ b/src/views/admin/general/dashboard.tpl @@ -60,7 +60,7 @@