X-Git-Url: https://git.auder.net/doc/screen_ranking.png?a=blobdiff_plain;f=client%2Fsrc%2Fviews%2FNews.vue;h=664b5957bbff1e8cf22429bf5f9d63de724479f8;hb=a06fc4ba49b535ba45d70ee7401c5d2e26faefa2;hp=325d491ee196ddcd86834c4aac30d2144805b119;hpb=bd76b45611cbb58dcf774745a4d690277a82aacd;p=vchess.git
diff --git a/client/src/views/News.vue b/client/src/views/News.vue
index 325d491e..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,24 +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-right: 5px
+ padding: 0 5px 0 var(--universal-margin)
+
.margintop
margin-top: 25px
-.news
border-top: 1px solid grey
- & > div
- display: inline-block
@media screen and (max-width: 767px)
.margintop
margin-top: 10px
+
+