X-Git-Url: https://git.auder.net/doc/current/git-logo.png?a=blobdiff_plain;f=client%2Fsrc%2Fviews%2FNews.vue;h=664b5957bbff1e8cf22429bf5f9d63de724479f8;hb=9eccb8aa675d95d3a66cd3269e2977980e41d97d;hp=8a3de76d2a0f5ed6d51d72f6f9193b12207ad144;hpb=feae89d39c446311f78a24b597b6b1ffbf5e1018;p=vchess.git
diff --git a/client/src/views/News.vue b/client/src/views/News.vue
index 8a3de76d..664b5957 100644
--- a/client/src/views/News.vue
+++ b/client/src/views/News.vue
@@ -1,8 +1,11 @@
main
input#modalNews.modal(type="checkbox")
- div#newnewsDiv(role="dialog" data-checkbox="modalNews")
- .card
+ div#newnewsDiv(
+ role="dialog"
+ data-checkbox="modalNews"
+ )
+ .card#writeNews
label.modal-close(for="modalNews")
textarea#newsContent(
v-model="curnews.content"
@@ -13,61 +16,88 @@ main
#dialog.text-center {{ st.tr[infoMsg] }}
.row
.col-sm-12.col-md-10.col-md-offset-1.col-lg-8.col-lg-offset-2
- button(
- v-if="devs.includes(st.user.id)"
+ button#writeNewsBtn(
+ v-if="devTeam"
@click="showModalNews"
)
| {{ st.tr["Write news"] }}
- .news(v-for="n,idx in sortedNewsList" :class="{margintop:idx>0}")
+ .news(
+ v-for="n,idx in newsList"
+ :id="'n' + n.id"
+ :class="{margintop:idx>0}"
+ )
span.ndt {{ formatDatetime(n.added) }}
- div(v-if="devs.includes(st.user.id)")
+ .dev-buttons(v-if="devTeam")
button(@click="editNews(n)") {{ st.tr["Edit"] }}
button(@click="deleteNews(n)") {{ st.tr["Delete"] }}
- p(v-html="parseHtml(n.content)")
- button(v-if="hasMore" @click="loadMore()")
+ button(@click="gotoPrevNext(n, 1)") {{ st.tr["Previous_n"] }}
+ button(@click="gotoPrevNext(n, -1)") {{ st.tr["Next_n"] }}
+ .news-content(v-html="parseHtml(n.content)")
+ button#loadMoreBtn(
+ v-if="hasMore"
+ @click="loadMore()"
+ )
| {{ st.tr["Load more"] }}
@@ -158,25 +199,47 @@ export default {
[type="checkbox"].modal+div .card
max-width: 767px
max-height: 100%
+
textarea#newsContent
margin: 0
width: 100%
min-height: 200px
max-height: 100%
+
#dialog
padding: 5px
color: blue
+
+#writeNews
+ padding-top: 50px
+
+button#writeNewsBtn, button#loadMoreBtn
+ margin-top: 0
+ margin-bottom: 0
+
span.ndt
color: darkblue
padding: 0 5px 0 var(--universal-margin)
+
.margintop
margin-top: 25px
border-top: 1px solid grey
-.news
- padding-top: 10px
- & > div
- display: inline-block
@media screen and (max-width: 767px)
.margintop
margin-top: 10px
+
+