diff --git a/public_html/media/css/auth.css b/public_html/media/css/auth.css index 4a895172..03059c56 100644 --- a/public_html/media/css/auth.css +++ b/public_html/media/css/auth.css @@ -1,10 +1,10 @@ form.auth { margin: 0 auto; - width: 400px; + max-width: 400px; } form.auth label.left { - width: 144px; + width: 35%; } form.auth p { diff --git a/public_html/media/css/comment-list.css b/public_html/media/css/comment-list.css index c03a478b..9eaee645 100644 --- a/public_html/media/css/comment-list.css +++ b/public_html/media/css/comment-list.css @@ -15,3 +15,14 @@ border-bottom: 1px solid #eee; margin-bottom: 1em; } + +.small-screen .comment-group .post-wrapper { + float: none; + text-align: center; +} +.small-screen .comment-group .post { + margin: 0 auto 1em auto; +} +.small-screen .comment-group .comments { + margin-left: 0; +} diff --git a/public_html/media/css/core.css b/public_html/media/css/core.css index 1db5c025..5d95a197 100644 --- a/public_html/media/css/core.css +++ b/public_html/media/css/core.css @@ -27,6 +27,7 @@ body { } #top-nav { + width: 100%; background: #eee; color: black; } @@ -109,12 +110,12 @@ body { } #top-nav li.safety a:hover { opacity: .7; } #top-nav li.safety a.inactive { opacity: 1; } -#top-nav li.safety .safety-safe .enabled { background: linear-gradient(to bottom, #CFE6C2 0%, #80C670 100%); } -#top-nav li.safety .safety-safe .disabled { background: linear-gradient(to bottom, #a0a0a0 0%, #808080 100%); } -#top-nav li.safety .safety-sketchy .enabled { background: linear-gradient(to bottom, #F0F4C8 0%, #EBE57A 100%); } -#top-nav li.safety .safety-sketchy .disabled { background: linear-gradient(to bottom, #a0a0a0 0%, #808080 100%); } -#top-nav li.safety .safety-unsafe .enabled { background: linear-gradient(to bottom, #FBC6B6 0%, #F37865 100%); } -#top-nav li.safety .safety-unsafe .disabled { background: linear-gradient(to bottom, #a0a0a0 0%, #808080 100%); } +#top-nav li.safety .safety-safe .enabled { background: #cfe6c2; background: linear-gradient(to bottom, #CFE6C2 0%, #80C670 100%); } +#top-nav li.safety .safety-safe .disabled { background: #a0a0a0; background: linear-gradient(to bottom, #a0a0a0 0%, #808080 100%); } +#top-nav li.safety .safety-sketchy .enabled { background: #f0f4c8; background: linear-gradient(to bottom, #F0F4C8 0%, #EBE57A 100%); } +#top-nav li.safety .safety-sketchy .disabled { background: #a0a0a0; background: linear-gradient(to bottom, #a0a0a0 0%, #808080 100%); } +#top-nav li.safety .safety-unsafe .enabled { background: #fbc6b6; background: linear-gradient(to bottom, #FBC6B6 0%, #F37865 100%); } +#top-nav li.safety .safety-unsafe .disabled { background: #a0a0a0; background: linear-gradient(to bottom, #a0a0a0 0%, #808080 100%); } @@ -138,13 +139,6 @@ footer span:not(:last-child):after { width: 256px; margin-right: 2em; } -#sidebar .sidebar-unit { - margin: 0 0 1.5em 0; - padding: 0.75em; - border: 1px solid #eee; - padding-left: 0; - border-left: 0; -} #sidebar h1 { margin-top: 0; } @@ -162,15 +156,33 @@ footer span:not(:last-child):after { #inner-content { overflow: hidden; + padding-bottom: 2em; } -.footer-unit { +.small-screen #sidebar { + float: none; + width: 100%; + padding: 0 0 1em 0; +} +.small-screen #inner-content { + float: none; + width: auto; +} + +.bottom-unit { padding: 0.5em 1em; border: 1px solid #eee; border-bottom: 0; padding-bottom: 0; margin: 1em 0 2em 0; } +.left-unit { + margin: 0 0 1.5em 0; + padding: 0.75em; + border: 1px solid #eee; + padding-left: 0; + border-left: 0; +} @@ -259,8 +271,10 @@ form.aligned input[type=checkbox] { } .input-wrapper ul.tagit, .input-wrapper input, +.input-wrapper textarea, .input-wrapper select { width: 80%; + max-width: 80%; } label { @@ -275,6 +289,7 @@ button { } ul.tagit, select, +textarea, input:not([type=radio]):not([type=checkbox]):not([type=file]) { border: 1px solid #ccc; border-radius: 3px; diff --git a/public_html/media/css/index-index.css b/public_html/media/css/index-index.css index 5b633970..56e60622 100644 --- a/public_html/media/css/index-index.css +++ b/public_html/media/css/index-index.css @@ -23,60 +23,48 @@ padding: 5px; } -#featured-post { +#inner-content { float: right; width: 70%; position: relative; } -#featured-post .header .tags:before { +#inner-content .header .tags:before { margin: 0 0.5em; content: '\2013'; } -#featured-post .header ul { +#inner-content .header ul { list-style-type: none; display: inline; margin: 0; padding: 0; } -#featured-post .header li { +#inner-content .header li { display: inline; } -#featured-post .header li:not(:last-child) a:after { +#inner-content .header li:not(:last-child) a:after { content: ', '; } -#featured-post .body { +#inner-content .body { background: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAYAAAAGCAYAAADgzO9IAAAAJElEQVQImWNgYGBgePfu3X8YZoABFA6SIqwS+HXgtANZF7IEAJnGPJE70lLLAAAAAElFTkSuQmCC'); margin: 1em 0; text-align: center; } -#featured-post .body img { +#inner-content .body img { max-width: 100%; margin: 0 auto; display: block; } -#featured-post .body a { +#inner-content .body a { display: block; } -#featured-post .header .favs-comments { +#inner-content .header .favs-comments { margin-left: 0.5em; float: right; } -#featured-post .footer { +#inner-content .footer { text-align: right; } - -@media (max-width: 600px) { - #sidebar { - float: none; - width: 100%; - padding: 0 0 1em 0; - } - #featured-post { - float: none; - width: 100%; - } -} diff --git a/public_html/media/css/post-small.css b/public_html/media/css/post-small.css index 6b24ee4a..f14d497b 100644 --- a/public_html/media/css/post-small.css +++ b/public_html/media/css/post-small.css @@ -3,6 +3,7 @@ box-shadow: 0.25em 0.25em #eee; padding: 0; position: relative; + display: inline-block; } .post-type-flash { border-color: #dd5; diff --git a/public_html/media/css/post-view.css b/public_html/media/css/post-view.css index 78d3786c..4a871c6f 100644 --- a/public_html/media/css/post-view.css +++ b/public_html/media/css/post-view.css @@ -9,9 +9,16 @@ embed { max-width: 100%; } +.post-type-image img { + background: url('../img/bk-image.png') lemonchiffon; +} +.post-type-flash embed { + background: url('../img/bk-swf.png') lemonchiffon; +} + #sidebar .tags ul { list-style-type: none; - margin: 0 0 0 1em; + margin: 0; padding: 0; } #sidebar .tags li .count { @@ -109,3 +116,8 @@ ul.tagit { padding: 0.5em; display: none; } + +form.add-comment textarea { + width: 50em; + height: 8em; +} diff --git a/public_html/media/css/user-list.css b/public_html/media/css/user-list.css index 25158075..90ee904f 100644 --- a/public_html/media/css/user-list.css +++ b/public_html/media/css/user-list.css @@ -12,10 +12,16 @@ .user { line-height: 1.5em; margin-bottom: 1em; - width: 25em; + margin-right: 1em; display: inline-block; } +.user .details { + display: inline-block; + max-width: 25em; + white-space: pre; +} + nav.sort-styles ul { list-style-type: none; margin: 0 0 1em 0; diff --git a/public_html/media/css/user-view.css b/public_html/media/css/user-view.css index cfd07eac..d0b786fb 100644 --- a/public_html/media/css/user-view.css +++ b/public_html/media/css/user-view.css @@ -41,7 +41,7 @@ } form.edit label.left { - width: 10em; + width: 9em; } form.edit .alert { @@ -51,4 +51,5 @@ form.edit .alert { form.edit select, form.edit input { width: 16em; + max-width: 90%; } diff --git a/public_html/media/img/bk-image.png b/public_html/media/img/bk-image.png new file mode 100644 index 00000000..ec308ec2 Binary files /dev/null and b/public_html/media/img/bk-image.png differ diff --git a/public_html/media/img/bk-swf.png b/public_html/media/img/bk-swf.png new file mode 100644 index 00000000..caad55ef Binary files /dev/null and b/public_html/media/img/bk-swf.png differ diff --git a/public_html/media/js/core.js b/public_html/media/js/core.js index 2cf0a3c7..a7e4734d 100644 --- a/public_html/media/js/core.js +++ b/public_html/media/js/core.js @@ -101,4 +101,24 @@ $(function() form.append(input); }); }); + + $(window).resize(); +}); + +$(window).resize(function() +{ + //modify DOM on small viewports + $('#inner-content .unit').addClass('bottom-unit'); + if ($('body').width() < 600) + { + $('body').addClass('small-screen'); + $('#sidebar').insertAfter($('#inner-content')); + $('#sidebar .unit').removeClass('left-unit').addClass('bottom-unit'); + } + else + { + $('body').removeClass('small-screen'); + $('#inner-content').insertAfter($('#sidebar')); + $('#sidebar .unit').removeClass('bottom-unit').addClass('left-unit'); + } }); diff --git a/src/Controllers/PostController.php b/src/Controllers/PostController.php index b6e4efe3..0bd51dd2 100644 --- a/src/Controllers/PostController.php +++ b/src/Controllers/PostController.php @@ -516,7 +516,7 @@ class PostController $this->context->stylesheets []= 'post-view.css'; $this->context->stylesheets []= 'comment-small.css'; $this->context->scripts []= 'post-view.js'; - $this->context->subTitle = 'showing @' . $post->id . ' - ' . join(', ', array_map(function($x) { return $x['name']; }, $post->sharedTag)); + $this->context->subTitle = 'showing @' . $post->id . ' – ' . join(', ', array_map(function($x) { return $x['name']; }, $post->sharedTag)); $this->context->favorite = $favorite; $this->context->transport->post = $post; $this->context->transport->prevPostId = $prevPost ? $prevPost['id'] : null; diff --git a/src/Views/index-index.phtml b/src/Views/index-index.phtml index 9cc2b1b4..ad8918e5 100644 --- a/src/Views/index-index.phtml +++ b/src/Views/index-index.phtml @@ -12,7 +12,7 @@ context->featuredPost)): ?> -
+
Featured image diff --git a/src/Views/layout-normal.phtml b/src/Views/layout-normal.phtml index 5809dcca..904fb225 100644 --- a/src/Views/layout-normal.phtml +++ b/src/Views/layout-normal.phtml @@ -13,6 +13,7 @@ context->scripts) as $name): ?> + diff --git a/src/Views/post-upload.phtml b/src/Views/post-upload.phtml index 5fc7a363..2a54b4a0 100644 --- a/src/Views/post-upload.phtml +++ b/src/Views/post-upload.phtml @@ -3,7 +3,7 @@