X-Git-Url: https://git.auder.net/assets/css/current/git-logo.png?a=blobdiff_plain;f=client%2Fsrc%2Fviews%2FNews.vue;h=664b5957bbff1e8cf22429bf5f9d63de724479f8;hb=b1fea144e72b3bce1a2d2c630618805eb45424b4;hp=e23a6e24ffc1530e3d4cae811b5943895fb1622a;hpb=604b951e4dc4647da9b251c5fff4ecb4c7b1b298;p=vchess.git
diff --git a/client/src/views/News.vue b/client/src/views/News.vue
index e23a6e24..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,59 +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 in sortedNewsList")
- h4 {{ formatDatetime(n.added) }}
- p(v-html="parseHtml(n.content)")
- div(v-if="devs.includes(st.user.id)")
+ .news(
+ v-for="n,idx in newsList"
+ :id="'n' + n.id"
+ :class="{margintop:idx>0}"
+ )
+ span.ndt {{ formatDatetime(n.added) }}
+ .dev-buttons(v-if="devTeam")
button(@click="editNews(n)") {{ st.tr["Edit"] }}
button(@click="deleteNews(n)") {{ st.tr["Delete"] }}
- 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"] }}
@@ -156,11 +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
+@media screen and (max-width: 767px)
+ .margintop
+ margin-top: 10px
+
+
+