Source View more articles and date fix

This commit is contained in:
2020-08-21 02:33:35 +05:00
parent be04822ce3
commit 660eda24cf
15 changed files with 251 additions and 94 deletions

View File

@@ -35,7 +35,7 @@
<div class="flex justify-end items-center">
<div>
<p
class="font-semibold text-gray-700 text-sm capitalize MvTyper"
class="font-semibold text-gray-600 text-sm capitalize MvTyper"
v-text="story.source.name"
></p>
</div>
@@ -47,9 +47,12 @@
</div>
</a>
</div>
<span class="text-gray-600 text-xs ml-1">
{{ story.published_date | moment("calendar") }}
</span>
<p
class="ml-1 text-gray-600 text-right MvTyper"
style="direction:rtl; font-size:13px;"
>
{{ story.published_date | dhivehiDate }}
</p>
</div>
</div>
</div>
@@ -58,6 +61,8 @@
</template>
<script>
import * as moment from "moment";
export default {
name: "recent-stories",
@@ -67,6 +72,14 @@ export default {
};
},
filters: {
dhivehiDate: function(date) {
if (!date) return "";
moment.locale("dv");
return moment(date).format("Do MMMM YYYY h:mm");
}
},
mounted() {
axios
.get("api/recent")