From 34fd387438f5f3d06b0a1c26d5c7ca5c1f5bd270 Mon Sep 17 00:00:00 2001 From: marijus Date: Mon, 10 Mar 2014 17:17:49 +0100 Subject: this commit is an attempt to make conv items better scalable on smaller screens. also save some horizontal space. --- include/bbcode.php | 14 +++++++------- view/css/bootstrap-red.css | 4 ++++ view/css/conversation.css | 33 +++++++++------------------------ view/css/default.css | 11 +++++++++-- view/theme/redbasic/css/style.css | 5 +++++ view/theme/redbasic/js/redbasic.js | 8 ++++---- view/theme/redbasic/php/style.php | 2 +- view/tpl/conv_item.tpl | 9 +++++---- view/tpl/jot.tpl | 2 +- 9 files changed, 45 insertions(+), 43 deletions(-) diff --git a/include/bbcode.php b/include/bbcode.php index 8bbf7ae01..cd0bf527e 100644 --- a/include/bbcode.php +++ b/include/bbcode.php @@ -46,7 +46,7 @@ function tryzrlvideo($match) { } if($zrl) $link = zid($link); - return ''; + return ''; } @@ -620,24 +620,24 @@ function bbcode($Text,$preserve_nl = false, $tryoembed = true) { // [img=widthxheight]pathtoimage[/img] if (strpos($Text,'[/img]') !== false) { - $Text = preg_replace("/\[img\=([0-9]*)x([0-9]*)\](.*?)\[\/img\]/ism", '' . t('Image/photo') . '', $Text); + $Text = preg_replace("/\[img\=([0-9]*)x([0-9]*)\](.*?)\[\/img\]/ism", '' . t('Image/photo') . '', $Text); } if (strpos($Text,'[/zmg]') !== false) { - $Text = preg_replace("/\[zmg\=([0-9]*)x([0-9]*)\](.*?)\[\/zmg\]/ism", '' . t('Image/photo') . '', $Text); + $Text = preg_replace("/\[zmg\=([0-9]*)x([0-9]*)\](.*?)\[\/zmg\]/ism", '' . t('Image/photo') . '', $Text); } // [img=widthxheight float={left, right}]pathtoimage[/img] if (strpos($Text,'[/img]') !== false) { - $Text = preg_replace("/\[img\=([0-9]*)x([0-9]*) float=left\](.*?)\[\/img\]/ism", '' . t('Image/photo') . '', $Text); + $Text = preg_replace("/\[img\=([0-9]*)x([0-9]*) float=left\](.*?)\[\/img\]/ism", '' . t('Image/photo') . '', $Text); } if (strpos($Text,'[/img]') !== false) { - $Text = preg_replace("/\[img\=([0-9]*)x([0-9]*) float=right\](.*?)\[\/img\]/ism", '' . t('Image/photo') . '', $Text); + $Text = preg_replace("/\[img\=([0-9]*)x([0-9]*) float=right\](.*?)\[\/img\]/ism", '' . t('Image/photo') . '', $Text); } if (strpos($Text,'[/zmg]') !== false) { - $Text = preg_replace("/\[zmg\=([0-9]*)x([0-9]*) float=left\](.*?)\[\/zmg\]/ism", '' . t('Image/photo') . '', $Text); + $Text = preg_replace("/\[zmg\=([0-9]*)x([0-9]*) float=left\](.*?)\[\/zmg\]/ism", '' . t('Image/photo') . '', $Text); } if (strpos($Text,'[/zmg]') !== false) { - $Text = preg_replace("/\[zmg\=([0-9]*)x([0-9]*) float=right\](.*?)\[\/zmg\]/ism", '' . t('Image/photo') . '', $Text); + $Text = preg_replace("/\[zmg\=([0-9]*)x([0-9]*) float=right\](.*?)\[\/zmg\]/ism", '' . t('Image/photo') . '', $Text); } // style (sanitized) diff --git a/view/css/bootstrap-red.css b/view/css/bootstrap-red.css index 00e2f30b7..aff35bf85 100644 --- a/view/css/bootstrap-red.css +++ b/view/css/bootstrap-red.css @@ -120,3 +120,7 @@ nav .navbar-collapse .navbar-right { height: 32px; margin-right: 5px; } + +code { + white-space: normal; +} diff --git a/view/css/conversation.css b/view/css/conversation.css index 3de9a1ec9..484941926 100644 --- a/view/css/conversation.css +++ b/view/css/conversation.css @@ -11,7 +11,7 @@ margin: 0px; padding: 8px; height: 1.8em; - width: 530px; + width: 70%; margin-bottom: 5px; } @@ -138,14 +138,9 @@ .wall-item-info { display: block; float: left; - width:110px; margin-right:10px; } -.comment .wall-item-info { - width: 70px; -} - .wallwall .wwto { left: 50px; margin: 0; @@ -166,7 +161,6 @@ margin-top: 0px; margin-left: 10px; margin-bottom: 10px; - width: 100px; } .wall-item-photo-menu-button { @@ -203,15 +197,15 @@ .wall-item-arrowphoto-wrapper { position: absolute; z-index: 99; + left: 75px; } .wall-item-wrapper { margin-left:10px; } - .wall-item-arrowphoto-wrapper { - left: 75px; + } .wall-item-lock { @@ -233,14 +227,8 @@ } .wall-item-location { - overflow: hidden; - /* add ellipsis on text overflow */ - /* this work on safari, opera, ie, chrome. */ - /* firefox users have to wait support or we */ - /* can use a jquery plugin http://bit.ly/zJskg */ text-overflow: ellipsis; - -o-text-overflow: ellipsis; - width: 100%; + max-width: 30%; } .wall-item-author { @@ -258,7 +246,7 @@ } .wall-item-content img { - max-width: 95% !important; + max-width: 95%; } .wall-item-title { @@ -354,10 +342,7 @@ } .comment-edit-photo { - margin-top: 10px; - margin-left: 10px; - margin-bottom: 10px; - width: 100px; + margin: 10px; float: left; } @@ -386,15 +371,15 @@ } .comment-edit-text-empty { - height: 1.0em; - width: 270px; + height: 1.2em; + width: 30%; overflow: auto; margin-bottom: 10px; } .comment-edit-text-full { height: 150px; - width: 80%; + width: 50%; overflow: auto; } diff --git a/view/css/default.css b/view/css/default.css index a98374960..271e15620 100644 --- a/view/css/default.css +++ b/view/css/default.css @@ -6,11 +6,17 @@ header #banner { margin-right: auto; } +main { + display: table; + width: 100%; + height: 100%; +} + aside#region_1 { min-width: 210px; display: table-cell; vertical-align: top; - padding: 65px 10px 10px 10px; + padding: 65px 7px 7px 7px; } aside input[type='text'] { @@ -19,7 +25,8 @@ aside input[type='text'] { section { width: 100%; + min-width: 298px; display: table-cell; vertical-align: top; - padding: 65px 15px 200px 10px; + padding: 65px 15px 200px 7px; } diff --git a/view/theme/redbasic/css/style.css b/view/theme/redbasic/css/style.css index 67aa6a3c1..7cdc55644 100644 --- a/view/theme/redbasic/css/style.css +++ b/view/theme/redbasic/css/style.css @@ -7,6 +7,10 @@ /* generals */ +html { + height: 100%; +} + body { font-family: arial,freesans,sans-serif; font-size: $body_font_size; @@ -16,6 +20,7 @@ body { background-size: cover; color: $font_colour; margin: 0px; + height: 100%; } .jslider { font-family: arial,freesans,sans-serif; diff --git a/view/theme/redbasic/js/redbasic.js b/view/theme/redbasic/js/redbasic.js index 7e957a4f4..4bc94287d 100644 --- a/view/theme/redbasic/js/redbasic.js +++ b/view/theme/redbasic/js/redbasic.js @@ -9,10 +9,10 @@ function cmtBbOpen(comment, id) { } function cmtBbClose(comment, id) { -// if($(comment).hasClass('comment-edit-text-empty')) { -// $(".comment-edit-bb-" + id).hide(); -// return true; -// } + if($(comment).hasClass('comment-edit-text-empty')) { + $(".comment-edit-bb-" + id).hide(); + return true; + } return false; } diff --git a/view/theme/redbasic/php/style.php b/view/theme/redbasic/php/style.php index 8fb4de381..c3153a025 100644 --- a/view/theme/redbasic/php/style.php +++ b/view/theme/redbasic/php/style.php @@ -119,7 +119,7 @@ if(! $a->install) { if (! $converse_width) $converse_width="1024px"; if(! $top_photo) - $top_photo = '64px'; + $top_photo = '48px'; $pmenu_top = intval($top_photo) - 16 . 'px'; $wwtop = intval($top_photo) - 15 . 'px'; $comment_indent = intval($top_photo) + 10 . 'px'; diff --git a/view/tpl/conv_item.tpl b/view/tpl/conv_item.tpl index 869692bfa..1e7fcbab5 100755 --- a/view/tpl/conv_item.tpl +++ b/view/tpl/conv_item.tpl @@ -9,18 +9,20 @@
+ {{* comment out for now. let's see if somebody is missing it. if yes we need a better visual concept. {{if $item.owner_url}}
- {{$item.owner_name}} + {{$item.owner_name}}
{{$item.wall}}
{{/if}} + *}}
- {{$item.name}} + {{$item.name}} menu
    @@ -33,13 +35,12 @@
    {{if $item.lock}} {{else}}
    {{/if}} -
    {{$item.location}}
{{$item.name}}{{if $item.owner_url}} {{$item.via}} {{$item.owner_name}}{{/if}}
-
{{if $item.verified}} {{/if}}{{$item.localtime}}{{if $item.editedtime}} {{$item.editedtime}}{{/if}}{{if $item.expiretime}} {{$item.expiretime}}{{/if}}{{if $item.app}}{{$item.str_app}}{{/if}}
+
{{if $item.verified}} {{/if}}{{if $item.location}}{{$item.location}}, {{/if}}{{$item.localtime}}{{if $item.editedtime}} {{$item.editedtime}}{{/if}}{{if $item.expiretime}} {{$item.expiretime}}{{/if}}{{if $item.app}}{{$item.str_app}}{{/if}}
{{$item.title}}
diff --git a/view/tpl/jot.tpl b/view/tpl/jot.tpl index e1e1e3080..4cc9c0d10 100755 --- a/view/tpl/jot.tpl +++ b/view/tpl/jot.tpl @@ -23,7 +23,7 @@
{{/if}}
- +
-- cgit v1.2.3 From 3f20debf5e30782832a601a5ac297906942bc05f Mon Sep 17 00:00:00 2001 From: marijus Date: Mon, 10 Mar 2014 17:47:53 +0100 Subject: fixes locations with a link --- view/tpl/conv_item.tpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/view/tpl/conv_item.tpl b/view/tpl/conv_item.tpl index 1e7fcbab5..395904c80 100755 --- a/view/tpl/conv_item.tpl +++ b/view/tpl/conv_item.tpl @@ -40,7 +40,7 @@
{{$item.name}}{{if $item.owner_url}} {{$item.via}} {{$item.owner_name}}{{/if}}
-
{{if $item.verified}} {{/if}}{{if $item.location}}{{$item.location}}, {{/if}}{{$item.localtime}}{{if $item.editedtime}} {{$item.editedtime}}{{/if}}{{if $item.expiretime}} {{$item.expiretime}}{{/if}}{{if $item.app}}{{$item.str_app}}{{/if}}
+
{{if $item.verified}} {{/if}}{{if $item.location}}{{$item.location}}, {{/if}}{{$item.localtime}}{{if $item.editedtime}} {{$item.editedtime}}{{/if}}{{if $item.expiretime}} {{$item.expiretime}}{{/if}}{{if $item.app}}{{$item.str_app}}{{/if}}
{{$item.title}}
-- cgit v1.2.3 From 313240488ae7de9deb54dfb0e20d83cdf715b557 Mon Sep 17 00:00:00 2001 From: marijus Date: Mon, 10 Mar 2014 18:08:44 +0100 Subject: fix lock position --- view/css/conversation.css | 3 ++- view/tpl/conv_item.tpl | 8 ++------ 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/view/css/conversation.css b/view/css/conversation.css index 484941926..42da46cc7 100644 --- a/view/css/conversation.css +++ b/view/css/conversation.css @@ -208,6 +208,7 @@ } +/* .wall-item-lock { position: absolute; left: 105px; @@ -221,7 +222,7 @@ .wall-item-lock { } - +*/ .lockview { cursor: pointer; } diff --git a/view/tpl/conv_item.tpl b/view/tpl/conv_item.tpl index 395904c80..8d59951e7 100755 --- a/view/tpl/conv_item.tpl +++ b/view/tpl/conv_item.tpl @@ -32,14 +32,10 @@
-
- {{if $item.lock}} - {{else}}
{{/if}} -
+
- {{$item.name}}{{if $item.owner_url}} {{$item.via}} {{$item.owner_name}}{{/if}}
- + {{if $item.lock}} {{/if}}{{$item.name}}{{if $item.owner_url}} {{$item.via}} {{$item.owner_name}}{{/if}}
{{if $item.verified}} {{/if}}{{if $item.location}}{{$item.location}}, {{/if}}{{$item.localtime}}{{if $item.editedtime}} {{$item.editedtime}}{{/if}}{{if $item.expiretime}} {{$item.expiretime}}{{/if}}{{if $item.app}}{{$item.str_app}}{{/if}}
-- cgit v1.2.3 From f78c4f485c9f773fe51ce3e8a26c6232d5f7f5f8 Mon Sep 17 00:00:00 2001 From: marijus Date: Mon, 10 Mar 2014 19:25:38 +0100 Subject: 10px is probably to close --- view/css/conversation.css | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/view/css/conversation.css b/view/css/conversation.css index 42da46cc7..0100f58b5 100644 --- a/view/css/conversation.css +++ b/view/css/conversation.css @@ -138,7 +138,7 @@ .wall-item-info { display: block; float: left; - margin-right:10px; + margin-right: 20px; } .wallwall .wwto { @@ -343,7 +343,7 @@ } .comment-edit-photo { - margin: 10px; + margin: 10px 20px 10px 10px; float: left; } -- cgit v1.2.3