Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions qa-include/plugins/qa-widget-related-qs.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,13 @@ public function output_widget($region, $place, $themeobject, $template, $request
$themeobject->output('<ul class="qa-related-q-list">');

foreach ($questions as $question) {
$selectedClass = isset($question['selchildid']) ? ' qa-a-count-selected' : '';
$qaLangAnswers = ($question['acount'] == 1) ? qa_lang_html_sub('main/1_answer', '1')
: qa_lang_html_sub('main/x_answers', $question['acount']);

$themeobject->output(
'<li class="qa-related-q-item">' .
'<span class="qa-related-q-item-stats'. $selectedClass .'" title="'.$qaLangAnswers.'">' . qa_html($question['acount']) . '</span>' .
'<a href="' . qa_q_path_html($question['postid'], $question['title']) . '">' .
qa_html($question['title']) .
'</a>' .
Expand Down
22 changes: 21 additions & 1 deletion qa-theme/Candy/qa-styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -453,7 +453,27 @@ h2 {font-size:22px; color:#c659ab; padding-top:12px; clear:both;}
.qa-related-qs {font-size:14px;}
.qa-related-qs h2 {font-size:18px;}
.qa-related-q-list {list-style-type:none; padding:0;}
.qa-related-q-item {margin:0.5em 0; word-wrap: break-word;}
.qa-related-q-item {
display: flex;
padding: 5px 0;
word-wrap: break-word;
border-bottom: 1px solid #e0e0e0;
}
.qa-related-q-item-stats {
flex-shrink: 0;
background-color: #ecf0f1;
width: 28px;
height: 18px;
vertical-align: top;
text-align: center;
margin-top: 2px;
margin-inline-end: .6rem;
border-radius: 3px;
}
.qa-related-q-item .qa-a-count-selected {
background-color: #27ae60;
color: #fff;
}
.qa-activity-count {font-size:14px;}
.qa-activity-count-item {margin:0.5em 0;}
.qa-activity-count-data {font-size:24px; font-weight:bold;}
Expand Down
22 changes: 21 additions & 1 deletion qa-theme/Classic/qa-styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -425,7 +425,27 @@ h2 {font-size:16px; padding-top:12px; clear:both;}
/* Related questions and activity count widgets */

.qa-related-q-list {list-style-type:none; padding:0;}
.qa-related-q-item {margin:0.5em 0; word-wrap: break-word;}
.qa-related-q-item {
display: flex;
padding: 5px 0;
word-wrap: break-word;
border-bottom: 1px solid #e0e0e0;
}
.qa-related-q-item-stats {
flex-shrink: 0;
background-color: #ecf0f1;
width: 28px;
height: 18px;
vertical-align: top;
text-align: center;
margin-top: 2px;
margin-inline-end: .6rem;
border-radius: 3px;
}
.qa-related-q-item .qa-a-count-selected {
background-color: #27ae60;
color: #fff;
}
.qa-activity-count {font-size:150%;}
.qa-activity-count-item {margin:0.25em 0;}
.qa-activity-count-data {font-weight:bold;}
Expand Down
14 changes: 13 additions & 1 deletion qa-theme/Snow/qa-styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -820,7 +820,7 @@ div.header-banner {
border: 1px solid #ffd196;
}

.qa-a-count-selected {
.qa-a-count-selected, .qa-related-q-item-stats.qa-a-count-selected {
background: #d9f5bb;
border: 1px solid #c1daa6;
}
Expand Down Expand Up @@ -2307,11 +2307,23 @@ a.qa-browse-cat-link:visited {
}

.qa-related-q-item {
display: flex;
margin: 0;
padding: 5px 0;
border-top: 1px solid #fafafa;
border-bottom: 1px solid #ddd;
}
.qa-related-q-item-stats {
flex-shrink: 0;
background-color: #ecf0f1;
width: 28px;
height: 21px;
vertical-align: top;
text-align: center;
margin-top: 2px;
margin-inline-end: .6rem;
border-radius: 3px;
}

.qa-related-q-item:first-child {
border-top: none;
Expand Down
24 changes: 16 additions & 8 deletions qa-theme/SnowFlat/qa-styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -960,8 +960,9 @@ blockquote p {
background-color: #e74c3c;
}

.qa-a-count-selected {
.qa-a-count-selected, .qa-related-q-item-stats.qa-a-count-selected {
background-color: #27ae60;
color: #fff;
}

@media (max-width: 799px) {
Expand Down Expand Up @@ -2956,17 +2957,24 @@ input[type="submit"], button {
list-style: none;
}

.qa-related-q-item a {
display: block;
.qa-related-q-item {
display: flex;
padding: 5px 0;
border-bottom: 1px solid #e0e0e0;
}
.qa-related-q-item:first-child a {
padding-top: 0;
.qa-related-q-item:last-child {
border-bottom: none;
}
.qa-related-q-item:last-child a {
padding-bottom: 0;
border-bottom: 0;
.qa-related-q-item-stats {
flex-shrink: 0;
background-color: #ecf0f1;
width: 30px;
height: 24px;
vertical-align: top;
text-align: center;
margin-top: 2px;
margin-inline-end: .6rem;
border-radius: 3px;
}

.qa-nav-cat {
Expand Down