OSDN Git Service

timeline: fix feed item's link url
authorhylom <hylom@users.osdn.me>
Thu, 6 Jun 2019 10:05:48 +0000 (10:05 +0000)
committerhylom <hylom@users.osdn.me>
Thu, 6 Jun 2019 10:05:48 +0000 (10:05 +0000)
src/newslash_web/templates/common/components/timeline.html.tt2

index c8d40c6..99ae49b 100644 (file)
     <header>
       <h1 :class="item.color ? 'color-' + item.color : ''">
         <img :src="item.icon_url" v-if="item.icon_url" />
-        <a :href="item.content_url" v-if="item.content_url">
+        <a :href="item.content_url" v-if="item.content_url && item.content_type != 'feed'">
+          <span v-html="item.title"></span>
+        </a>
+        <a :href="item.content_url" v-else-if="item.url">
           <span v-html="item.title"></span>
         </a>
         <span v-html="item.title" v-else></span>
 
     <footer>
       <div class="link-to-story">
-        <a :href="item.content_url">
+        <a :href="item.url" v-if="item.content_type == 'feed'">
+         <span>フィード元で記事を読む</span>
+       </a>
+        <a :href="item.content_url" v-else>
          <span v-if='item.comment_count > 0'>
             <span v-text="item.comment_count"></span>件のコメントを見る
           </span>