123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329 |
- <template>
- <section class="video-alias section">
- <div class="video-alias__wrapper section-wrapper" v-if="podcastItem">
- <div class="video-alias-body">
- <div class="video-alias-main">
- <div class="admin-button-in-news" v-if="userPermissionGroup == 3 || userPermissionGroup == 5">
- <a class="copy" :href="'/admin/publications/' + podcastItem.id" target="_blank">Редактирование новости</a>
- <a class="inject" @click="inject(podcastItem)">Инжект</a>
- </div>
- <div class="main-title">
- <h1 v-html="podcastItem.title"></h1>
- </div>
- <div class="main-description" v-html="podcastItem.description"></div>
- <div class="podcast-detail-top">
- <div class="detail-top__date">
- {{ convertDate(podcastItem.start_activity)
- }}{{
- podcastItem.show_author && podcastItem.author
- ? ", " + podcastItem.author.name
- : ""
- }}
- </div>
- <aside class="detail-top__header-side">
- <div class="detail-top__actions">
- <div class="detail-top__share">
- <div class="socials-share">
- <ul class="socials-share__list">
- <li class="socials-share__item">
- <ShareNetwork
- network="Odnoklassniki"
- :url="'https://www.amic.ru' + $route.fullPath"
- :title="podcastItem.title"
- class="socials-share__link"
- :hashtags="
- podcastItem.hash_tags.length
- ? podcastItem.hash_tags.join(' ')
- : ''
- "
- >
- <BaseIcon :name="'ok'" clear
- /></ShareNetwork>
- </li>
- <li class="socials-share__item">
- <ShareNetwork
- network="twitter"
- :url="'https://www.amic.ru' + $route.fullPath"
- :title="podcastItem.title"
- class="socials-share__link"
- :hashtags="
- podcastItem.hash_tags.length
- ? podcastItem.hash_tags.join(' ')
- : ''
- "
- >
- <BaseIcon :name="'tw'" clear
- /></ShareNetwork>
- </li>
- <li class="socials-share__item">
- <ShareNetwork
- network="vk"
- :url="'https://www.amic.ru' + $route.fullPath"
- :title="podcastItem.title"
- :description="podcastItem.description"
- class="socials-share__link"
- :hashtags="
- podcastItem.hash_tags.length
- ? podcastItem.hash_tags.join(' ')
- : ''
- "
- >
- <BaseIcon :name="'vk'" clear
- /></ShareNetwork>
- </li>
- </ul>
- </div>
- </div>
- </div>
- <a
- class="
- detail-top__action detail-top__comments-button
- button button_grey-dark
- "
- href="#comment_form"
- >
- <span class="button__text">Комментировать</span>
- </a>
- </aside>
- </div>
- <div class="main-content">
- <NewsContent :rawHtml="podcastItem.content" ref="newsContent" />
- </div>
- <div class="main-banner">
- <BannersW960H90 />
- </div>
- <div class="main-comments">
- <ArticleCommentsList
- :pull_id="podcastItem.comment_pull_id"
- @commentResponse="commentResponseData"
- :newCommentsList="commentsList"
- />
- <ArticleCommentsForm
- :pull_id="podcastItem.comment_pull_id"
- :response_user_name="comment.response_user_name"
- :response_user_id="comment.response_user_id"
- @clearCommentResponse="clearCommentResponse"
- @commentsResponseData="commentsResponseData"
- />
- </div>
- </div>
- <div class="video-alias-aside">
- <div class="aside-list" v-if="filteredPodcasts.length > 0">
- <PodcastItem
- class="aside-item"
- v-for="podcast in filteredPodcasts"
- :key="podcast.id"
- :item="podcast"
- ></PodcastItem>
- </div>
- <div class="aside-banner">
- <BannersW240H400 />
- </div>
- </div>
- </div>
- </div>
- </section>
- </template>
- <script>
- export default {
- props: {
- podcastItem: {
- type: Object,
- required: true
- },
- filteredPodcasts: {
- type: Array,
- default: () => []
- }
- },
- data() {
- return {
- userPermissionGroup: null,
- comment: {
- response_user_id: "",
- response_user_name: ""
- },
- commentsList: {}
- };
- },
- mounted() {
- if(this.$store.state.auth.user){
- this.userPermissionGroup = this.$store.state.auth.user.user_permission_group;
- }
- },
- methods: {
- commentResponseData(data) {
- this.comment.response_user_id = data.user_id;
- this.comment.response_user_name = data.user_name;
- },
- commentsResponseData(data){
- this.commentsList = data;
- },
- clearCommentResponse() {
- this.comment.response_user_id = "";
- this.comment.response_user_name = "";
- },
- convertDate(dateTampstamp) {
- const date = new Date(dateTampstamp * 1000);
- const dateString =
- date.toLocaleString("ru", {
- day: "numeric",
- month: "long",
- }) +
- " " +
- date.getFullYear() +
- ", " +
- ("0" + date.getHours()).slice(-2) +
- ":" +
- ("0" + date.getMinutes()).slice(-2);
- return dateString;
- },
- inject(item) {
- let res = "##news_" + item.id + "##";
- this.$clipboard(res);
- alert('Инжект скопирован в буфер обмена');
- },
- },
- computed: {
- }
- };
- </script>
- <style lang="less" scoped>
- .section {
- padding-top: 20px;
- }
- .podcast{
- &-detail{
- &-top{
- margin-top: 30px;
- }
- }
- }
- .video-alias {
- padding-bottom: 50px;
- &-header {
- position: relative;
- box-shadow: 0px 26px 38px -11px rgba(255, 0, 214, 0.25);
- }
- &-body {
- margin-top: 35px;
- display: flex;
- justify-content: space-between;
- }
- &-main {
- color: white;
- flex: 0 1 815px;
- }
- &-aside {
- margin-left: 10px;
- flex: 0 1 420px;
- max-width: 420px;
- }
- @media screen and(max-width: 1000px) {
- &-body {
- flex-direction: column;
- margin-top: 30px;
- }
- &-main {
- flex: auto;
- }
- &-aside {
- flex: auto;
- max-width: 100%;
- margin: 40px auto 0;
- }
- }
- }
- .header {
- &-video {
- position: relative;
- z-index: 1;
- width: 100%;
- aspect-ratio: 16 / 9;
- iframe {
- width: 100%;
- height: 100%;
- }
- }
- &-bg {
- z-index: 0;
- position: absolute;
- bottom: 0;
- transform: translateY(50%);
- img {
- width: 100%;
- height: auto;
- }
- }
- }
- .main {
- &-title {
- h1 {
- font-size: 48px;
- line-height: 120%;
- color: #000;
- }
- }
- &-description {
- margin-top: 20px;
- font-size: 24px;
- color: #737373;
- }
- &-content {
- margin-top: 40px;
- }
- @media screen and(max-width: 768px) {
- &-title {
- h1 {
- font-size: 22px;
- }
- }
- &-description {
- font-size: 18px;
- }
- }
- }
- .aside {
- &-list {
- display: flex;
- flex-direction: column;
- }
- &-item {
- margin-bottom: 28px;
- }
- }
- .admin-button-in-news{
- margin-bottom: 30px;
- a{
- background-color: #000;
- color: #fff;
- font-size: 14px;
- padding: 8px 19px;
- cursor: pointer;
- }
- .inject{
- background-color: #1976d2;
- }
- .copy{
- background-color: #4caf50;
- }
- }
- </style>
|