Commit 5c14a1ce by Tom Giannattasio

added admin controls to main post and comments

parent 9b9bb22c
$comment_margin_left: 30px; /*** Variables ***/
$discussion_title_size: 1.6em;
$comment_title_size: 1.0em;
$post_font_size: 0.9em;
$comment_info_size: 0.75em;
$comment_font_size: 0.8em;
$discussion_input_width: 100%;
$tag_background_color: #e7ecdd; $comment-margin-left: 30px;
$tag_border_color: #babdb3; $discussion-title-size: 1.6em;
$tag_text_color: #5b614f; $comment-title-size: 1.0em;
$post-font-size: 0.9em;
$comment-info-size: 0.75em;
$comment-font-size: 0.8em;
$discussion-input-width: 100%;
$tag-background-color: #e7ecdd;
$tag-border-color: #babdb3;
$tag-text-color: #5b614f;
/*** Mixins ***/
@mixin discussion-font { @mixin discussion-font {
font-family: inherit; font-family: inherit;
} }
...@@ -31,6 +35,10 @@ $tag_text_color: #5b614f; ...@@ -31,6 +35,10 @@ $tag_text_color: #5b614f;
} }
} }
/*** Discussions ***/
.discussion { .discussion {
p { p {
margin-bottom: 1em !important; margin-bottom: 1em !important;
...@@ -40,9 +48,9 @@ $tag_text_color: #5b614f; ...@@ -40,9 +48,9 @@ $tag_text_color: #5b614f;
margin-top: 0; margin-top: 0;
} }
#open_close_accordion {
display: none;
} /*** Sidebar ***/
.sidebar-module { .sidebar-module {
@include clearfix; @include clearfix;
...@@ -116,20 +124,21 @@ $tag_text_color: #5b614f; ...@@ -116,20 +124,21 @@ $tag_text_color: #5b614f;
text-align: right; text-align: right;
color: #9a9a9a; color: #9a9a9a;
} }
} }
.discussion-non-content { .discussion-non-content {
margin-left: flex-gutter(); margin-left: flex-gutter();
} }
//TITLE
/*** Post ***/
.discussion-title { .discussion-title {
@include discussion-font; @include discussion-font;
@include discussion-clickable; @include discussion-clickable;
display: inline-block; display: inline-block;
font-size: $discussion_title_size; font-size: $discussion-title-size;
font-weight: bold; font-weight: bold;
margin-bottom: flex-gutter(6); margin-bottom: flex-gutter(6);
} }
...@@ -138,12 +147,247 @@ $tag_text_color: #5b614f; ...@@ -138,12 +147,247 @@ $tag_text_color: #5b614f;
.discussion-watch-discussion, .discussion-unwatch-discussion { .discussion-watch-discussion, .discussion-unwatch-discussion {
@include discussion-font; @include discussion-font;
display: none; display: none;
font-size: $comment_info_size; font-size: $comment-info-size;
margin-left: 5px; margin-left: 5px;
} }
} }
//SORTING .discussion-right-wrapper {
min-height: 40px;
margin: 24px 0 24px 68px;
}
.admin-actions {
float: right;
margin: 0.4em 1em 0 2em;
padding: 0;
li {
margin-bottom: 6px !important;
}
a {
display: block;
height: 25px;
padding-left: 25px;
border-radius: 50%;
background: url(../images/admin-actions-sprite.png) no-repeat;
font-size: .8em;
line-height: 25px;
color: #b8b8b8;
@include transition(color, .1s);
&:hover {
text-decoration: none;
}
&.admin-endorse {
background-position: 0 0;
&:hover {
color: #63b141;
background-position: 0 -75px;
}
}
&.admin-edit {
background-position: 0 -25px;
&:hover {
color: #009fe2;
background-position: 0 -100px;
}
}
&.admin-delete {
background-position: 0 -50px;
&:hover {
color: #d45050;
background-position: 0 -125px;
}
}
}
}
.comments {
.admin-actions {
margin-top: 0;
li {
margin-bottom: 2px !important;
}
a {
width: 20px;
height: 20px;
padding-left: 0;
overflow: hidden;
text-indent: -9999px;
&.admin-endorse {
background-position: 0 -150px;
&:hover {
background-position: 0 -225px;
}
}
&.admin-edit {
background-position: 0 -175px;
&:hover {
background-position: 0 -250px;
}
}
&.admin-delete {
background-position: 0 -200px;
&:hover {
background-position: 0 -275px;
}
}
}
}
}
/*** thread ***/
.thread {
//display: none;
.thread-title {
@include discussion-font;
@include discussion-clickable;
display: block;
margin-bottom: 1em;
font-size: $comment-title-size;
font-weight: bold;
line-height: 1.4em;
}
.thread-body, .content-body {
@include discussion-font;
font-size: $post-font-size;
margin-bottom: 4px;
margin-top: 3px;
p {
@include discussion-font;
}
}
.thread-tags {
display: inline-block;
}
.info {
@include discussion-font;
color: gray;
font-size: $comment-info-size;
font-style: italic;
margin-top: 1em;
a:hover {
text-decoration: none;
color: #1C71DD;
}
.comment-time {
display: inline;
float: right;
margin-right: 1em;
}
.comment-count {
display: inline;
margin-right: 20px;
}
.discussion-actions {
display: inline;
margin: 0;
padding: 0;
li {
display: inline;
margin-right: 20px;
}
}
.discussion-link {
@include discussion-font;
color: #1d9dd9;
display: inline;
&.discussion-unfollow-thread {
color: #dea03e;
}
}
}
.discussion-content {
border-top: lightgray 1px solid;
overflow: hidden;
// padding: 1.5% 0;
.discussion-reply-new {
@include discussion-font;
margin-left: 68px;
.reply-body {
@include discussion-font;
display: block;
font-size: $post-font-size;
margin-top: 10px;
width: 95%;
}
}
}
.comment > .comments {
margin-left: 68px;
}
//COMMENT STYLES
.comments {
overflow: hidden;
.discussion-votes {
margin-top: 8px;
}
.discussion-right-wrapper {
margin: 10px 0 10px 68px;
}
.comment {
.comment-body, .content-body {
@include discussion-font;
color: black;
display: block;
font-size: $comment-font-size;
margin-top: 3px;
}
&.endorsed {
> .discussion-content {
background-color: #fcfcea;
}
}
}
}
}
/*** Sorting ***/
.discussion-sort { .discussion-sort {
float: right; float: right;
font-size: 0.8em; font-size: 0.8em;
...@@ -174,7 +418,10 @@ $tag_text_color: #5b614f; ...@@ -174,7 +418,10 @@ $tag_text_color: #5b614f;
} }
} }
//SEARCH
/*** Search ***/
.search-wrapper-inline { .search-wrapper-inline {
display: inline-block; display: inline-block;
margin-bottom: 6%; margin-bottom: 6%;
...@@ -223,25 +470,21 @@ $tag_text_color: #5b614f; ...@@ -223,25 +470,21 @@ $tag_text_color: #5b614f;
.discussion-search-within-board { .discussion-search-within-board {
font: inherit; font: inherit;
font-size: $post_font_size; font-size: $post-font-size;
font-style: normal; font-style: normal;
} }
//BASIC BUTTON STYLES
/*** buttons ***/
.control-button { .control-button {
@include button; @include button;
@include discussion-font; @include discussion-font;
background-color: #959595; background-color: #959595;
background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #959595),color-stop(100%, #7B7B7B)); @include background-image(linear-gradient(top, #959595, #7B7B7B));
background-image: -webkit-linear-gradient(top, #959595,#7B7B7B);
background-image: -moz-linear-gradient(top, #959595,#7B7B7B);
background-image: -ms-linear-gradient(top, #959595,#7B7B7B);
background-image: -o-linear-gradient(top, #959595,#7B7B7B);
background-image: linear-gradient(top, #959595,#7B7B7B);
border: 1px solid #6F6F6F; border: 1px solid #6F6F6F;
-webkit-box-shadow: inset 0 1px 0 #A2A2A2,0 0 3px #CCC; @include box-shadow(inset 0 1px 0 #A2A2A2, 0 0 3px #CCC);
-moz-box-shadow: inset 0 1px 0 #a2a2a2,0 0 3px #ccc;
box-shadow: inset 0 1px 0 #A2A2A2,0 0 3px #CCC;
color: white; color: white;
display: inline-block; display: inline-block;
font-size: inherit; font-size: inherit;
...@@ -254,25 +497,20 @@ $tag_text_color: #5b614f; ...@@ -254,25 +497,20 @@ $tag_text_color: #5b614f;
&:hover { &:hover {
background-color: #A2A2A2; background-color: #A2A2A2;
background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #A2A2A2),color-stop(100%, #7B7B7B)); @include background-image(linear-gradient(top, #A2A2A2, #7B7B7B));
background-image: -webkit-linear-gradient(top, #A2A2A2,#7B7B7B);
background-image: -moz-linear-gradient(top, #A2A2A2,#7B7B7B);
background-image: -ms-linear-gradient(top, #A2A2A2,#7B7B7B);
background-image: -o-linear-gradient(top, #A2A2A2,#7B7B7B);
background-image: linear-gradient(top, #A2A2A2,#7B7B7B);
border: 1px solid #555; border: 1px solid #555;
-webkit-box-shadow: inset 0 1px 0 #BBB,0 0 3px #CCC; @include box-shadow(inset 0 1px 0 #BBB, 0 0 3px #CCC);
-moz-box-shadow: inset 0 1px 0 #bbb,0 0 3px #ccc;
box-shadow: inset 0 1px 0 #BBB,0 0 3px #CCC;
} }
} }
//FOLLOW BUTTON
.follow-wrapper { .follow-wrapper {
display: inline; display: inline;
} }
//VOTES
/*** votes ***/
.discussion-votes { .discussion-votes {
float: left; float: left;
width: 60px; width: 60px;
...@@ -326,7 +564,7 @@ $tag_text_color: #5b614f; ...@@ -326,7 +564,7 @@ $tag_text_color: #5b614f;
.discussion-vote-count { .discussion-vote-count {
@include discussion-font; @include discussion-font;
font-size: $post_font_size; font-size: $post-font-size;
} }
.discussion-votes-point { .discussion-votes-point {
...@@ -335,20 +573,17 @@ $tag_text_color: #5b614f; ...@@ -335,20 +573,17 @@ $tag_text_color: #5b614f;
color: #9a9a9a; color: #9a9a9a;
} }
} }
//CREATE NEW AND EDIT POSTS /*** new post ***/
.discussion-right-wrapper {
min-height: 40px;
// width: flex-grid(11);
margin: 24px 0 24px 68px;
}
.new-post-form, .discussion-thread-edit { .new-post-form, .discussion-thread-edit {
.title-input, .body-input { .title-input, .body-input {
display: block !important; display: block !important;
font: inherit; font: inherit;
font-style: normal; font-style: normal;
width: $discussion_input_width !important; width: $discussion-input-width !important;
} }
.discussion-errors { .discussion-errors {
...@@ -414,10 +649,6 @@ $tag_text_color: #5b614f; ...@@ -414,10 +649,6 @@ $tag_text_color: #5b614f;
margin-top: 1%; margin-top: 1%;
} }
.reply-post-control {
// margin-left: 73%;
}
.edit-post-control { .edit-post-control {
margin-left: 79%; margin-left: 79%;
margin-top: 1%; margin-top: 1%;
...@@ -455,11 +686,11 @@ $tag_text_color: #5b614f; ...@@ -455,11 +686,11 @@ $tag_text_color: #5b614f;
} }
.thread-tag { .thread-tag {
background: $tag_background_color; background: $tag-background-color;
border: 1px solid $tag_border_color; border: 1px solid $tag-border-color;
-moz-border-radius: 2px; -moz-border-radius: 2px;
-webkit-border-radius: 2px; -webkit-border-radius: 2px;
color: $tag_text_color; color: $tag-text-color;
float: left; float: left;
font-size: 13px; font-size: 13px;
margin: 5px 7px 5px 0; margin: 5px 7px 5px 0;
...@@ -473,135 +704,12 @@ $tag_text_color: #5b614f; ...@@ -473,135 +704,12 @@ $tag_text_color: #5b614f;
} }
} }
//THREAD STYLES
.thread {
//display: none;
.thread-title {
@include discussion-font;
@include discussion-clickable;
display: block;
margin-bottom: 1em;
font-size: $comment_title_size;
font-weight: bold;
line-height: 1.4em;
}
.thread-body, .content-body {
@include discussion-font;
font-size: $post_font_size;
margin-bottom: 4px;
margin-top: 3px;
p {
@include discussion-font;
}
}
.thread-tags {
display: inline-block;
}
.info {
@include discussion-font;
color: gray;
font-size: $comment_info_size;
font-style: italic;
margin-top: 1em;
a:hover {
text-decoration: none;
color: #1C71DD;
}
.comment-time {
display: inline;
float: right;
}
.comment-count {
display: inline;
margin-right: 20px;
}
.discussion-actions {
display: inline;
margin: 0;
padding: 0;
li {
display: inline;
margin-right: 20px;
}
}
.discussion-link {
@include discussion-font;
color: #1d9dd9;
display: inline;
&.discussion-unfollow-thread {
color: #dea03e;
}
}
}
.discussion-content { /*** pagination ***/
border-top: lightgray 1px solid;
overflow: hidden;
// padding: 1.5% 0;
.discussion-reply-new {
@include discussion-font;
margin-left: 68px;
.reply-body {
@include discussion-font;
display: block;
font-size: $post_font_size;
margin-top: 10px;
width: 95%;
}
}
}
.comment > .comments {
margin-left: 68px;
}
//COMMENT STYLES
.comments {
overflow: hidden;
.discussion-votes {
margin-top: 8px;
}
.discussion-right-wrapper {
margin: 10px 0 10px 68px;
}
.comment {
.comment-body, .content-body {
@include discussion-font;
color: black;
display: block;
font-size: $comment_font_size;
margin-top: 3px;
}
&.endorsed {
> .discussion-content {
background-color: #fcfcea;
}
}
}
}
}
//PAGES
.discussion-paginator { .discussion-paginator {
font-size: $post_font_size; font-size: $post-font-size;
margin-bottom: 10px; margin-bottom: 10px;
margin-top: 20px; margin-top: 20px;
text-align: center; text-align: center;
...@@ -650,16 +758,16 @@ $tag_text_color: #5b614f; ...@@ -650,16 +758,16 @@ $tag_text_color: #5b614f;
} }
} }
//EDITOR STYLES
.wmd-panel
{ /*** base editor styles ***/
.wmd-panel {
width: 100%; width: 100%;
min-width: 500px; min-width: 500px;
} }
.wmd-button-bar .wmd-button-bar {
{
width: 100%; width: 100%;
background-color: Silver; background-color: Silver;
} }
...@@ -719,8 +827,7 @@ $tag_text_color: #5b614f; ...@@ -719,8 +827,7 @@ $tag_text_color: #5b614f;
@include transition(all, .2s, easeOut); @include transition(all, .2s, easeOut);
} }
.wmd-spacer .wmd-spacer {
{
width: 1px; width: 1px;
height: 20px; height: 20px;
margin-left: 14px; margin-left: 14px;
...@@ -751,26 +858,22 @@ $tag_text_color: #5b614f; ...@@ -751,26 +858,22 @@ $tag_text_color: #5b614f;
display: inline-block; display: inline-block;
} }
.wmd-spacer1 .wmd-spacer1 {
{
left: 50px; left: 50px;
} }
.wmd-spacer2 .wmd-spacer2 {
{
left: 175px; left: 175px;
} }
.wmd-spacer3
{ .wmd-spacer3 {
left: 300px; left: 300px;
} }
.wmd-prompt-background .wmd-prompt-background {
{
background-color: Black; background-color: Black;
} }
.wmd-prompt-dialog .wmd-prompt-dialog {
{
border: 1px solid #999999; border: 1px solid #999999;
background-color: #F5F5F5; background-color: #F5F5F5;
} }
...@@ -786,7 +889,7 @@ $tag_text_color: #5b614f; ...@@ -786,7 +889,7 @@ $tag_text_color: #5b614f;
color: black; color: black;
} }
.wmd-prompt-dialog > form > input[type="button"]{ .wmd-prompt-dialog > form > input[type="button"] {
border: 1px solid #888888; border: 1px solid #888888;
font-family: trebuchet MS, helvetica, sans-serif; font-family: trebuchet MS, helvetica, sans-serif;
font-size: 0.8em; font-size: 0.8em;
......
...@@ -39,7 +39,12 @@ ...@@ -39,7 +39,12 @@
${render_vote(content)} ${render_vote(content)}
<div class="discussion-right-wrapper clearfix"> <div class="discussion-right-wrapper clearfix">
<ul class="admin-actions">
<li><a href="#" class="admin-endorse">Endorse</a></li>
<li><a href="#" class="admin-edit">Edit</a></li>
<li><a href="#" class="admin-delete">Delete</a></li>
</ul>
${render_title(content, type, **kwargs)} ${render_title(content, type, **kwargs)}
<div class="discussion-content-view"> <div class="discussion-content-view">
<div class="content-body ${type}-body" id="content-body-${content['id']}">${content['body'] | h}</div> <div class="content-body ${type}-body" id="content-body-${content['id']}">${content['body'] | h}</div>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment