diff --git a/src/main/java/com/commafeed/frontend/pages/BasePage.html b/src/main/java/com/commafeed/frontend/pages/BasePage.html
index 2ce83f54..32766075 100644
--- a/src/main/java/com/commafeed/frontend/pages/BasePage.html
+++ b/src/main/java/com/commafeed/frontend/pages/BasePage.html
@@ -3,6 +3,7 @@
CommaFeed
+
diff --git a/src/main/resources/i18n/en.properties b/src/main/resources/i18n/en.properties
index e309d35f..3fe82b70 100644
--- a/src/main/resources/i18n/en.properties
+++ b/src/main/resources/i18n/en.properties
@@ -5,6 +5,7 @@ global.required=Required
global.download=Download
global.link=Link
global.bookmark=Bookmark
+global.close=Close
tree.subscribe=Subscribe
tree.import=Import
diff --git a/src/main/resources/log4j.properties b/src/main/resources/log4j.properties
index 2148c096..51576f36 100644
--- a/src/main/resources/log4j.properties
+++ b/src/main/resources/log4j.properties
@@ -1,5 +1,6 @@
log4j.logger.com.commafeed=INFO, CONSOLE
-#log4j.logger.org=WARN, CONSOLE
+log4j.logger.org=WARN, CONSOLE
+log4j.logger.ro=WARN, CONSOLE
log4j.appender.CONSOLE=org.apache.log4j.ConsoleAppender
log4j.appender.CONSOLE.layout=org.apache.log4j.PatternLayout
diff --git a/src/main/webapp/WEB-INF/wro.properties b/src/main/webapp/WEB-INF/wro.properties
index 0745b4a0..68e03452 100644
--- a/src/main/webapp/WEB-INF/wro.properties
+++ b/src/main/webapp/WEB-INF/wro.properties
@@ -10,7 +10,7 @@ jmxEnabled=false
managerFactoryClassName=com.commafeed.frontend.resources.WroManagerFactory
#List of preProcessors
-preProcessors=timestamp,cssUrlRewriting,sassImport,semicolonAppender,googleClosureSimple,sassOnlyProcessor,cssMin
+preProcessors=timestamp,cssUrlRewriting,sassImport,semicolonAppender,googleClosureSimple,sassOnlyProcessor,yuiCssMin
#List of postProcessors
postProcessors=
diff --git a/src/main/webapp/js/controllers.js b/src/main/webapp/js/controllers.js
index 9e770262..163f5bbc 100644
--- a/src/main/webapp/js/controllers.js
+++ b/src/main/webapp/js/controllers.js
@@ -28,8 +28,8 @@ module.run(['$rootScope', function($rootScope) {
});
}]);
-module.controller('SubscribeCtrl', ['$scope', 'FeedService', 'CategoryService',
-function($scope, FeedService, CategoryService) {
+module.controller('SubscribeCtrl', ['$scope', 'FeedService', 'CategoryService', 'MobileService',
+function($scope, FeedService, CategoryService, MobileService) {
$scope.opts = {
backdropFade : true,
@@ -41,6 +41,7 @@ function($scope, FeedService, CategoryService) {
$scope.sub = {};
$scope.CategoryService = CategoryService;
+ $scope.MobileService = MobileService;
$scope.open = function() {
$scope.sub = {
@@ -436,9 +437,9 @@ module.controller('CategoryDetailsCtrl', ['$scope', '$state', '$stateParams', 'F
}]);
module.controller('ToolbarCtrl', ['$scope', '$http', '$state', '$stateParams',
- '$route', '$location', 'SettingsService', 'EntryService', 'ProfileService', 'AnalyticsService', 'ServerService', 'FeedService',
+ '$route', '$location', 'SettingsService', 'EntryService', 'ProfileService', 'AnalyticsService', 'ServerService', 'FeedService', 'MobileService',
function($scope, $http, $state, $stateParams, $route, $location,
- SettingsService, EntryService, ProfileService, AnalyticsService, ServerService, FeedService) {
+ SettingsService, EntryService, ProfileService, AnalyticsService, ServerService, FeedService, MobileService) {
function totalActiveAjaxRequests() {
return ($http.pendingRequests.length + $.active);
@@ -447,6 +448,7 @@ function($scope, $http, $state, $stateParams, $route, $location,
$scope.session = ProfileService.get();
$scope.ServerService = ServerService.get();
$scope.settingsService = SettingsService;
+ $scope.MobileService = MobileService;
$scope.loading = true;
$scope.$watch(totalActiveAjaxRequests, function() {
diff --git a/src/main/webapp/js/directives.js b/src/main/webapp/js/directives.js
index 5ceb53d7..20fef789 100644
--- a/src/main/webapp/js/directives.js
+++ b/src/main/webapp/js/directives.js
@@ -231,8 +231,9 @@ module.directive('category', [ function() {
'FeedService',
'CategoryService',
'SettingsService',
+ 'MobileService',
function($scope, $state, $dialog, FeedService, CategoryService,
- SettingsService) {
+ SettingsService, MobileService) {
$scope.settingsService = SettingsService;
$scope.getClass = function(level) {
@@ -265,6 +266,7 @@ module.directive('category', [ function() {
};
$scope.feedClicked = function(id) {
+ MobileService.toggleLeftMenu();
if ($scope.selectedType == 'feed'
&& id == $scope.selectedId) {
$scope.$emit('emitReload');
@@ -277,6 +279,7 @@ module.directive('category', [ function() {
};
$scope.categoryClicked = function(id) {
+ MobileService.toggleLeftMenu();
if ($scope.selectedType == 'category'
&& id == $scope.selectedId) {
$scope.$emit('emitReload');
diff --git a/src/main/webapp/js/services.js b/src/main/webapp/js/services.js
index bc738687..b8acbda7 100644
--- a/src/main/webapp/js/services.js
+++ b/src/main/webapp/js/services.js
@@ -12,6 +12,17 @@ module.service('AnalyticsService', [ '$state', function($state) {
};
} ]);
+module.service('MobileService', [ '$state', function($state) {
+ this.toggleLeftMenu = function() {
+ $('body').toggleClass('left-menu-active');
+ }
+ this.toggleRightMenu = function() {
+ $('body').toggleClass('right-menu-active');
+ }
+ var width = (window.innerWidth > 0) ? window.innerWidth : screen.width;
+ this.mobile = width < 979;
+}]);
+
module.factory('ProfileService', ['$resource', function($resource) {
var res = $resource('rest/user/profile/');
diff --git a/src/main/webapp/sass/app.scss b/src/main/webapp/sass/app.scss
index c0bf1e38..85dacaf9 100644
--- a/src/main/webapp/sass/app.scss
+++ b/src/main/webapp/sass/app.scss
@@ -1,4 +1,3 @@
-
@import "generic/misc";
@@ -6,4 +5,6 @@
@import "components/toolbar";
@import "components/entry-list";
@import "components/subscription-list";
-@import "components/help";
\ No newline at end of file
+@import "components/help";
+
+@import "mobile/mobile";
\ No newline at end of file
diff --git a/src/main/webapp/sass/components/_entry-list.scss b/src/main/webapp/sass/components/_entry-list.scss
index 6e2bdad3..22f329a3 100644
--- a/src/main/webapp/sass/components/_entry-list.scss
+++ b/src/main/webapp/sass/components/_entry-list.scss
@@ -12,10 +12,6 @@
margin: 0;
}
-.entry-header, .entry-body-content {
- padding-left: 25px;
-}
-
#feed-accordion .entry {
border-bottom: 1px solid #CCCCCC;
}
diff --git a/src/main/webapp/sass/components/_subscription-list.scss b/src/main/webapp/sass/components/_subscription-list.scss
index ef37d6dc..df149f6e 100644
--- a/src/main/webapp/sass/components/_subscription-list.scss
+++ b/src/main/webapp/sass/components/_subscription-list.scss
@@ -1,4 +1,3 @@
-
/* tree*/
.sidebar-nav-fixed {
margin-top: 10px;
@@ -100,4 +99,4 @@
.css-treeview .indent5 {
padding-left: 110px;
-}
+}
\ No newline at end of file
diff --git a/src/main/webapp/sass/mobile/_mobile.scss b/src/main/webapp/sass/mobile/_mobile.scss
new file mode 100644
index 00000000..e42c2a2b
--- /dev/null
+++ b/src/main/webapp/sass/mobile/_mobile.scss
@@ -0,0 +1,45 @@
+@media ( max-width : 979px) {
+ body {
+ padding-left: 5px;
+ padding-right: 5px;
+ }
+ .container-fluid {
+ padding-left: 0;
+ padding-right: 0;
+ }
+ .left-menu {
+ display: none !important;
+ }
+ .toolbar .hidden-desktop.btn-group {
+ display: inline-block !important;
+ }
+ .main-content {
+ display: block !important;
+ float: none !important;
+ width: 100% !important;
+ margin-left: 0 !important;
+ }
+ #feed-accordion .entry-heading .shrink {
+ margin-left: 0;
+ }
+ #feed-accordion .entry-heading .entry-name {
+ margin-right: 0;
+ }
+ body.left-menu-active .left-menu {
+ display: block !important;
+ width: 100%;
+ }
+ body.left-menu-active .sidebar-nav-fixed {
+ width: 100%;
+ }
+ body.left-menu-active .main-content {
+ display: none !important;
+ }
+ body.right-menu-active .toolbar .actions {
+ margin-top: 5px;
+ margin-left: 0;
+ }
+ body.right-menu-active .toolbar .actions .visible-desktop {
+ display: inherit !important;
+ }
+}
\ No newline at end of file
diff --git a/src/main/webapp/templates/_subscribe.html b/src/main/webapp/templates/_subscribe.html
index 62c83886..4238c586 100644
--- a/src/main/webapp/templates/_subscribe.html
+++ b/src/main/webapp/templates/_subscribe.html
@@ -1,4 +1,5 @@
+
+
+
+
+ ${global.close}
+
+
+