From 7cf0cdb67e3b13929f04f66f4f62ca6f09dd6692 Mon Sep 17 00:00:00 2001 From: Vjacheslav Trushkin Date: Sat, 14 Sep 2013 22:39:06 +0300 Subject: [PATCH 01/60] [ticket/11552] Viewport meta for mobile devices PHPBB3-11552 --- phpBB/styles/prosilver/template/overall_header.html | 1 + phpBB/styles/prosilver/template/simple_header.html | 1 + 2 files changed, 2 insertions(+) diff --git a/phpBB/styles/prosilver/template/overall_header.html b/phpBB/styles/prosilver/template/overall_header.html index f2f47332d7..5f38b332ce 100644 --- a/phpBB/styles/prosilver/template/overall_header.html +++ b/phpBB/styles/prosilver/template/overall_header.html @@ -2,6 +2,7 @@ + {META} diff --git a/phpBB/styles/prosilver/template/simple_header.html b/phpBB/styles/prosilver/template/simple_header.html index c5dfbc2f8f..b7b6bdd05e 100644 --- a/phpBB/styles/prosilver/template/simple_header.html +++ b/phpBB/styles/prosilver/template/simple_header.html @@ -2,6 +2,7 @@ + {META} From 5c3669eccb5024a972910476cf3308231486a165 Mon Sep 17 00:00:00 2001 From: Vjacheslav Trushkin Date: Sat, 14 Sep 2013 22:43:05 +0300 Subject: [PATCH 02/60] [ticket/11552] Add link to responsive.css Add link to responsive.css and blank responsive.css PHPBB3-11552 --- phpBB/styles/prosilver/template/overall_header.html | 1 + phpBB/styles/prosilver/template/simple_header.html | 1 + phpBB/styles/prosilver/theme/responsive.css | 2 ++ 3 files changed, 4 insertions(+) create mode 100644 phpBB/styles/prosilver/theme/responsive.css diff --git a/phpBB/styles/prosilver/template/overall_header.html b/phpBB/styles/prosilver/template/overall_header.html index 5f38b332ce..1b48298307 100644 --- a/phpBB/styles/prosilver/template/overall_header.html +++ b/phpBB/styles/prosilver/template/overall_header.html @@ -29,6 +29,7 @@ + diff --git a/phpBB/styles/prosilver/template/simple_header.html b/phpBB/styles/prosilver/template/simple_header.html index b7b6bdd05e..309e1687b8 100644 --- a/phpBB/styles/prosilver/template/simple_header.html +++ b/phpBB/styles/prosilver/template/simple_header.html @@ -12,6 +12,7 @@ + diff --git a/phpBB/styles/prosilver/theme/responsive.css b/phpBB/styles/prosilver/theme/responsive.css new file mode 100644 index 0000000000..f4342479b2 --- /dev/null +++ b/phpBB/styles/prosilver/theme/responsive.css @@ -0,0 +1,2 @@ +/* Responsive Design +---------------------------------------- */ From befffe7472e86978289e182e6ec433679537dcbd Mon Sep 17 00:00:00 2001 From: Vjacheslav Trushkin Date: Sat, 14 Sep 2013 22:51:34 +0300 Subject: [PATCH 03/60] [ticket/11552] Basic rules for wrappers and header Basic rules for content wrapper, common block wrappers and header PHPBB3-11552 --- phpBB/styles/prosilver/theme/responsive.css | 47 +++++++++++++++++++++ 1 file changed, 47 insertions(+) diff --git a/phpBB/styles/prosilver/theme/responsive.css b/phpBB/styles/prosilver/theme/responsive.css index f4342479b2..f2b2209091 100644 --- a/phpBB/styles/prosilver/theme/responsive.css +++ b/phpBB/styles/prosilver/theme/responsive.css @@ -1,2 +1,49 @@ /* Responsive Design ---------------------------------------- */ + +/* Content wrapper */ +html { + height: auto; +} + +body { + padding: 0 5px; +} + +#wrap { + min-width: 320px; + padding: 0; +} + +/* Common block wrappers */ +.headerbar, .navbar, .forabg, .forumbg, .post, .panel { + border-radius: 0; + margin-left: -5px; + margin-right: -5px; +} + +/* Logo block */ +#site-description { + float: none; + width: auto; + text-align: center; +} + +#logo { + /* change display value to inline-block to show logo */ + display: none; + float: none; + padding: 10px; +} + +#site-description h1, #site-description p { + text-align: inherit; + float: none; + margin: 5px; + line-height: 1.2em; +} + +#site-description p, #search-box { + display: none; +} + From a189c38853ede323a0dc7ef170c788a7f687326c Mon Sep 17 00:00:00 2001 From: Vjacheslav Trushkin Date: Sat, 14 Sep 2013 22:56:40 +0300 Subject: [PATCH 04/60] [ticket/11552] Add .nojs or .hasjs to body Add .nojs to body element, swap it to .hasjs when JavaScript is enabled PHPBB3-11552 --- phpBB/styles/prosilver/template/forum_fn.js | 3 +++ phpBB/styles/prosilver/template/overall_header.html | 2 +- phpBB/styles/prosilver/template/simple_header.html | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/phpBB/styles/prosilver/template/forum_fn.js b/phpBB/styles/prosilver/template/forum_fn.js index 800fadd972..c36b4f5f01 100644 --- a/phpBB/styles/prosilver/template/forum_fn.js +++ b/phpBB/styles/prosilver/template/forum_fn.js @@ -414,6 +414,9 @@ function insert_single_user(formId, user) */ (function($) { $(document).ready(function() { + // Swap .nojs and .hasjs + $('#phpbb.nojs').toggleClass('nojs hasjs'); + // Focus forms $('form[data-focus]:first').each(function() { $('#' + this.getAttribute('data-focus')).focus(); diff --git a/phpBB/styles/prosilver/template/overall_header.html b/phpBB/styles/prosilver/template/overall_header.html index 1b48298307..ce1317ab11 100644 --- a/phpBB/styles/prosilver/template/overall_header.html +++ b/phpBB/styles/prosilver/template/overall_header.html @@ -49,7 +49,7 @@ {$STYLESHEETS} - +
diff --git a/phpBB/styles/prosilver/template/simple_header.html b/phpBB/styles/prosilver/template/simple_header.html index 309e1687b8..e922893588 100644 --- a/phpBB/styles/prosilver/template/simple_header.html +++ b/phpBB/styles/prosilver/template/simple_header.html @@ -26,7 +26,7 @@ - +
From 744a91dc7b7e020bf6eb8bb439756fd075c35dc9 Mon Sep 17 00:00:00 2001 From: Vjacheslav Trushkin Date: Thu, 17 Oct 2013 21:07:41 +0300 Subject: [PATCH 05/60] [ticket/11552] Responsive breadcrumbs PHPBB3-11552 --- phpBB/styles/prosilver/template/forum_fn.js | 51 +++++++++++++++++++ .../prosilver/template/overall_header.html | 2 +- phpBB/styles/prosilver/theme/common.css | 17 ++++++- phpBB/styles/prosilver/theme/responsive.css | 1 - 4 files changed, 68 insertions(+), 3 deletions(-) diff --git a/phpBB/styles/prosilver/template/forum_fn.js b/phpBB/styles/prosilver/template/forum_fn.js index c36b4f5f01..cfb95d9cba 100644 --- a/phpBB/styles/prosilver/template/forum_fn.js +++ b/phpBB/styles/prosilver/template/forum_fn.js @@ -441,5 +441,56 @@ function insert_single_user(formId, user) // Fix .linkslist.bulletin lists $('ul.linklist.bulletin li:first-child, ul.linklist.bulletin li.rightside:last-child').addClass('no-bulletin'); } + + // Responsive breadcrumbs + $('.breadcrumbs').each(function() { + var $this = $(this), + $body = $('body'), + links = $this.find('a'), + length = links.length, + classes = ['wrapped-wide', 'wrapped-medium', 'wrapped-small'], + classesLength = classes.length, + maxHeight = 0, + lastWidth = false, + wrapped = false; + + // Test height by setting nowrap + $this.css('white-space', 'nowrap'); + maxHeight = $this.height() + 1; + $this.css('white-space', ''); + + // Funciton that checks breadcrumbs + function check() { + var height = $this.height(), + width = $body.width(), + link, i, j; + + if (height <= maxHeight) { + if (!wrapped || lastWidth === false || lastWidth >= width) { + lastWidth = width; + return; + } + } + lastWidth = width; + + if (wrapped) { + $this.find('a.wrapped').removeClass('wrapped ' + classes.join(' ')); + wrapped = false; + if ($this.height() <= maxHeight) return; + } + + wrapped = true; + for (i = 0; i < classesLength; i ++) { + for (j = length; j >= 0; j --) { + links.eq(j).addClass('wrapped ' + classes[i]); + if ($this.height() <= maxHeight) return; + } + } + } + + // Run function and set event + check(); + $(window).resize(check); + }); }); })(jQuery); diff --git a/phpBB/styles/prosilver/template/overall_header.html b/phpBB/styles/prosilver/template/overall_header.html index ce1317ab11..7bf60ce67c 100644 --- a/phpBB/styles/prosilver/template/overall_header.html +++ b/phpBB/styles/prosilver/template/overall_header.html @@ -84,7 +84,7 @@