Skip to content

Commit

Permalink
update for bs5
Browse files Browse the repository at this point in the history
  • Loading branch information
barisusakli committed Sep 19, 2022
1 parent b436bfa commit 8385f2b
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 44 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
},
"readmeFilename": "README.md",
"nbbpm": {
"compatibility": "^1.18.7 || ^2.0.0"
"compatibility": "^3.0.0"
},
"scripts": {
"lint": "eslint ."
Expand Down
4 changes: 2 additions & 2 deletions plugin.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@
{ "hook": "static:api.routes", "method": "staticApiRoutes" },
{ "hook": "filter:topicEvents.init", "method": "registerTopicEvents" }
],
"less": [
"static/style.less"
"scss": [
"static/style.scss"
],
"scripts": [
"static/lib/main.js"
Expand Down
28 changes: 14 additions & 14 deletions static/style.less → static/style.scss
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
.answered {
border: 1px solid @brand-success;
color: @brand-success;
border: 1px solid $success;
color: $success;
}

.unanswered {
border: 1px solid @brand-warning;
color: @brand-warning;
border: 1px solid $warning;
color: $warning;
}

.unanswered, .answered {
Expand All @@ -23,20 +23,20 @@

html .topic {
.answered {
color: @brand-success;
color: $success;
}

.unanswered {
color: @brand-warning;
color: $warning;
}
}

.posts [component="post"][data-index="-1"].isSolved {
&:before {
content: attr(data-label);
background: @brand-success;
background: $success;
border-radius: 0 4px 4px 0;
color: @label-color;
color: $form-label-color;
text-transform: uppercase;
font-size: 10px;
padding: 4px 8px;
Expand All @@ -45,18 +45,18 @@ html .topic {
top: -1.25rem;
}

border-left: 8px solid @brand-success;
border-right: 1px solid @brand-success;
border-top: 1px solid @brand-success;
border-bottom: 1px solid @brand-success;
border-left: 8px solid $success;
border-right: 1px solid $success;
border-top: 1px solid $success;
border-bottom: 1px solid $success;

padding-top: 40px; // to make room for label (in :before pseudo-element)

.necro-post {
display: none;
}

@media (max-width: @screen-xs-max) {
@include media-breakpoint-down(sm) {
margin-left: -15px;
}

Expand All @@ -65,7 +65,7 @@ html .topic {
}

.bookmarked:before {
color: @brand-success;
color: $success;
content: "\f00c";
}
}
Expand Down
14 changes: 6 additions & 8 deletions static/templates/admin/plugins/question-and-answer-items.tpl
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
<ul data-cid="{cid}">
<!-- BEGIN categories -->
<li data-cid="{categories.cid}" data-parent-cid="{categories.parentCid}" data-name="{categories.name}" <!-- IF categories.disabled -->class="disabled"<!-- ENDIF categories.disabled -->>
<div class="checkbox">
<label>
<input type="checkbox" data-cid="{categories.cid}" id="{categories.cid}" name="defaultCid_{categories.cid}" title="{categories.name}" <!-- IF categories.disabled -->disabled<!-- ENDIF categories.disabled -->>
{categories.name}
</label>
{{{ each categories }}}
<li data-cid="{categories.cid}" data-parent-cid="{categories.parentCid}" data-name="{categories.name}" {{{ if categories.disabled }}}class="disabled"{{{ end }}}>
<div class="form-check">
<label class="form-check-label">{categories.name}</label>
<input class="form-check-input" type="checkbox" data-cid="{categories.cid}" id="{categories.cid}" name="defaultCid_{categories.cid}" title="{categories.name}" {{{ if categories.disabled }}}disabled{{{ end }}}>
</div>
</li>
<!-- END categories -->
{{{ end }}}
</ul>
31 changes: 12 additions & 19 deletions static/templates/admin/plugins/question-and-answer.tpl
Original file line number Diff line number Diff line change
@@ -1,29 +1,22 @@
<form role="form" class="question-and-answer-settings">
<div class="row">
<div class="col-sm-2 col-xs-12
settings-header">[[qanda:admin.form.general_settings]]</div>
<div class="col-sm-10 col-xs-12">
<div class="col-sm-2 col-12 settings-header">[[qanda:admin.form.general_settings]]</div>
<div class="col-sm-10 col-12">

<div class="checkbox">
<label>
<input type="checkbox" name="toggleLock">
[[qanda:admin.form.label.toggle_lock]]
</label>
<div class="form-check">
<label class="form-check-label">[[qanda:admin.form.label.toggle_lock]]</label>
<input class="form-check-input" type="checkbox" name="toggleLock">
</div>

<div class="checkbox">
<label>
<input type="checkbox" name="onlyAdmins">
[[qanda:admin.form.label.only_allow_admins]]
</label>
<div class="form-check">
<label class="form-check-label">[[qanda:admin.form.label.only_allow_admins]]</label>
<input class="form-check-input" type="checkbox" name="onlyAdmins">
</div>

<div class="checkbox">
<label>
<input type="checkbox" name="forceQuestions">
[[qanda:admin.form.label.only_allow_all]]
</label>
<p class="help-block">
<div class="form-check">
<label class="form-check-label">[[qanda:admin.form.label.only_allow_all]]</label>
<input class="form-check-input" type="checkbox" name="forceQuestions">
<p class="form-text">
[[qanda:admin.form.tips]]
</p>
</div>
Expand Down

0 comments on commit 8385f2b

Please sign in to comment.