master
Kar 2024-01-09 21:53:59 +05:30
commit 7cc4488690
46 changed files with 12220 additions and 0 deletions

13
.editorconfig Normal file
View File

@ -0,0 +1,13 @@
# editorconfig.org
root = true
[*]
indent_style = space
indent_size = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
[*.md]
trim_trailing_whitespace = false

3
.env.sample Normal file
View File

@ -0,0 +1,3 @@
PORT=
baseURL=https://api5.siliconpin.com
imageURL=

91
.gitignore vendored Normal file
View File

@ -0,0 +1,91 @@
# Created by .ignore support plugin (hsz.mobi)
### Node template
# Logs
/logs
*.log
/.nuxt
npm-debug.log*
yarn-debug.log*
yarn-error.log*
# Runtime data
pids
*.pid
*.seed
*.pid.lock
# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov
# Coverage directory used by tools like istanbul
coverage
# nyc test coverage
.nyc_output
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
.grunt
# Bower dependency directory (https://bower.io/)
bower_components
# node-waf configuration
.lock-wscript
# Compiled binary addons (https://nodejs.org/api/addons.html)
build/Release
# Dependency directories
node_modules/
jspm_packages/
# TypeScript v1 declaration files
typings/
# Optional npm cache directory
.npm
# Optional eslint cache
.eslintcache
# Optional REPL history
.node_repl_history
# Output of 'npm pack'
*.tgz
# Yarn Integrity file
.yarn-integrity
# dotenv environment variables file
.env
# parcel-bundler cache (https://parceljs.org/)
.cache
# next.js build output
.next
# nuxt.js build output
.nuxt/
# Nuxt generate
dist
# vuepress build output
.vuepress/dist
# Serverless directories
.serverless
# IDE / Editor
.idea
# Service worker
sw.*
# macOS
.DS_Store
# Vim swap files
*.swp

69
README.md Normal file
View File

@ -0,0 +1,69 @@
# barta-india.in
## Build Setup
```bash
# install dependencies
$ yarn install
# serve with hot reload at localhost:3000
$ yarn dev
# build for production and launch server
$ yarn build
$ yarn start
# generate static project
$ yarn generate
```
For detailed explanation on how things work, check out the [documentation](https://nuxtjs.org).
## Special Directories
You can create the following extra directories, some of which have special behaviors. Only `pages` is required; you can delete them if you don't want to use their functionality.
### `assets`
The assets directory contains your uncompiled assets such as Stylus or Sass files, images, or fonts.
More information about the usage of this directory in [the documentation](https://nuxtjs.org/docs/2.x/directory-structure/assets).
### `components`
The components directory contains your Vue.js components. Components make up the different parts of your page and can be reused and imported into your pages, layouts and even other components.
More information about the usage of this directory in [the documentation](https://nuxtjs.org/docs/2.x/directory-structure/components).
### `layouts`
Layouts are a great help when you want to change the look and feel of your Nuxt app, whether you want to include a sidebar or have distinct layouts for mobile and desktop.
More information about the usage of this directory in [the documentation](https://nuxtjs.org/docs/2.x/directory-structure/layouts).
### `pages`
This directory contains your application views and routes. Nuxt will read all the `*.vue` files inside this directory and setup Vue Router automatically.
More information about the usage of this directory in [the documentation](https://nuxtjs.org/docs/2.x/get-started/routing).
### `plugins`
The plugins directory contains JavaScript plugins that you want to run before instantiating the root Vue.js Application. This is the place to add Vue plugins and to inject functions or constants. Every time you need to use `Vue.use()`, you should create a file in `plugins/` and add its path to plugins in `nuxt.config.js`.
More information about the usage of this directory in [the documentation](https://nuxtjs.org/docs/2.x/directory-structure/plugins).
### `static`
This directory contains your static files. Each file inside this directory is mapped to `/`.
Example: `/static/robots.txt` is mapped as `/robots.txt`.
More information about the usage of this directory in [the documentation](https://nuxtjs.org/docs/2.x/directory-structure/static).
### `store`
This directory contains your Vuex store files. Creating a file in this directory automatically activates Vuex.
More information about the usage of this directory in [the documentation](https://nuxtjs.org/docs/2.x/directory-structure/store).

12
assets/common.css Normal file
View File

@ -0,0 +1,12 @@
.text_over_image {
background-color: red;
color: white;
font-weight: bold;
font-size:15px;
opacity: 0.7;
width:120px;
padding: 5px 0;
display: flex;
justify-content: center;
}

4
assets/variables.scss Normal file
View File

@ -0,0 +1,4 @@
// Ref: https://github.com/nuxt-community/vuetify-module#customvariables
//
// The variables you want to modify
// $font-size-root: 20px;

143
components/Menu.vue Normal file
View File

@ -0,0 +1,143 @@
<template>
<v-container>
<div class="topnav" :class="{responsive: isMobile}" >
<nuxt-link v-for="item in menuItems" :key="item.title" :to="item.path" @click="mobileMenu">{{ item.title }}</nuxt-link>
<!-- <nuxt-link to="#home" class="active">Home</nuxt-link> -->
<!-- <nuxt-link to="#news">News</nuxt-link>
<nuxt-link to="#contact">Contact</nuxt-link>
<nuxt-link to="#about">About</nuxt-link> -->
<button @click="mobileMenu" class="icon"> Menu </button>
</div>
<!-- <v-toolbar >button
<span class="hidden-md-and-up"> {{ appTitle }}
<v-toolbar-side-icon @click="sidebar = !sidebar"> <v-icon left dark> "mdi-email" </v-icon> </v-toolbar-side-icon>
</span>
<v-toolbar-title>
<nuxt-link to="/" style="cursor: pointer">
{{ appTitle }}
</nuxt-link>
</v-toolbar-title>
<v-spacer></v-spacer>
<v-toolbar-items class="hidden-xs-only">
<v-btn v-for="item in menuItems" :key="item.title" :to="item.path">
<v-icon left dark>{{ item.icon }}</v-icon>
{{ item.title }}
</v-btn>
</v-toolbar-items>
</v-toolbar> -->
</v-container>
</template>
<script>
export default {
data() {
return {
appTitle: 'Menu',
isMobile: false,
menuItems: [
{ title: 'Home', path: '/', icon: 'mdi-home' },
{ title: 'বিশ্ব', path: '/category/world', icon: '' },
{ title: 'জাতীয়', path: '/category/national', icon: '' },
{ title: 'স্থানীয়', path: '/category/local', icon: '' },
{ title: 'নিবন্ধ', path: '/category/article', icon: '' },
{ title: 'সম্পাদকীয়', path: '/category/editorial', icon: '' },
{ title: 'ভিডিও', path: '/category/video', icon: '' },
{ title: 'আমাদের সম্পর্কে', path: '/category/about', icon: '' },
{ title: 'যোগাযোগ', path: '/category/contact', icon: '' },
{ title: 'English', path: '/en/', icon: '' },
]
}
// async fetch() {
// this.mountains = await fetch(process.env.apiLink).then((res) => res.json());
// },
},
watch: {
'$route' () {
// // this will close the dropdown
// this.dropdownPopoverShow = false,
// // this will close the mobile menu on page change
// this.isOpen = false
this.isMobile = false
}
},
methods: {
mobileMenu: function() {
this.isMobile = !this.isMobile;
// some code to filter users
}
}
}
</script>
<style scoped>
.topnav {
overflow: hidden;
position:relative;
padding: 0;
border-radius: 5px;
background-color: rgba(255,0,0,1);
background-image: linear-gradient(180deg, rgba(166,22,22,1), rgba(228,30,30,19) );
}
.topnav a {
float: left;
display: block;
color: #f2f2f2;
text-align: center;
padding: 14px 16px;
text-decoration: none;
font-size: 17px;
}
.topnav button{
position:absolute;
top:0px;
right:0px;
color:white;
padding:15px 20px;
}
.topnav button:hover {
background-color: #ffaf13;
color: rgba(255,0,0,1);
}
.topnav a.active {
background-color: #04AA6D;
color: white;
}
@media screen and (max-width: 630px) {
.topnav a:not(:first-child) {display: none;}
.topnav a.icon {
float: right;
display: block;
}
}
@media screen and (min-width: 630px){
button{
display:none;
}
}
@media screen and (max-width: 630px) {
.topnav.responsive {position: relative;}
.topnav.responsive .icon {
position: absolute;
right: 0;
top: 0;
}
.topnav.responsive a {
float: none;
display: block;
text-align: left;
}
}
</style>

128
components/MenuEn.vue Normal file
View File

@ -0,0 +1,128 @@
<template>
<v-container>
<div class="topnav" :class="{responsive: isMobile}" >
<nuxt-link v-for="item in menuItems" :key="item.title" :to="item.path" @click="mobileMenu">{{ item.title }}</nuxt-link>
<!-- <nuxt-link to="#home" class="active">Home</nuxt-link> -->
<!-- <nuxt-link to="#news">News</nuxt-link>
<nuxt-link to="#contact">Contact</nuxt-link>
<nuxt-link to="#about">About</nuxt-link> -->
<a @click="mobileMenu" class="icon"> Menu </a>
</div>
<!-- <v-toolbar >
<span class="hidden-md-and-up"> {{ appTitle }}
<v-toolbar-side-icon @click="sidebar = !sidebar"> <v-icon left dark> "mdi-email" </v-icon> </v-toolbar-side-icon>
</span>
<v-toolbar-title>
<nuxt-link to="/" style="cursor: pointer">
{{ appTitle }}
</nuxt-link>
</v-toolbar-title>
<v-spacer></v-spacer>
<v-toolbar-items class="hidden-xs-only">
<v-btn v-for="item in menuItems" :key="item.title" :to="item.path">
<v-icon left dark>{{ item.icon }}</v-icon>
{{ item.title }}
</v-btn>
</v-toolbar-items>
</v-toolbar> -->
</v-container>
</template>
<script>
export default {
data() {
return {
appTitle: 'Menu',
isMobile: false,
menuItems: [
{ title: 'Home', path: '/en/', icon: 'mdi-email' },
{ title: 'World', path: '/en/category/world', icon: '' },
{ title: 'National', path: '/en/category/national', icon: '' },
{ title: 'Local', path: '/en/category/local', icon: '' },
{ title: 'Article', path: '/en/category/article', icon: '' },
{ title: 'Editorial', path: '/en/category/editorial', icon: '' },
{ title: 'Video', path: '/en/category/video', icon: '' },
{ title: 'About Us', path: '/en/category/about', icon: '' },
{ title: 'Contact Us', path: '/en/category/contact', icon: '' },
{ title: 'বাংলা', path: '/', icon: '' },
]
}
// async fetch() {
// this.mountains = await fetch(process.env.apiLink).then((res) => res.json());
// },
},
watch: {
'$route' () {
// // this will close the dropdown
// this.dropdownPopoverShow = false,
// // this will close the mobile menu on page change
// this.isOpen = false
this.isMobile = false
}
},
methods: {
mobileMenu: function() {
this.isMobile = !this.isMobile;
// some code to filter users
}
}
}
</script>
<style scoped>
.topnav {
overflow: hidden;
padding: 0;
border-radius: 5px;
background-color: rgba(255,0,0,1);
background-image: linear-gradient(180deg, rgba(166,22,22,1), rgba(228,30,30,19) );
}
.topnav a {
float: left;
display: block;
color: #f2f2f2;
text-align: center;
padding: 14px 16px;
text-decoration: none;
font-size: 17px;
}
.topnav a:hover {
background-color: #ffaf13;
color: rgba(255,0,0,1);
}
.topnav a.active {
background-color: #04AA6D;
color: white;
}
.topnav .icon {
display: none;
}
@media screen and (max-width: 630px) {
.topnav a:not(:first-child) {display: none;}
.topnav a.icon {
float: right;
display: block;
}
}
@media screen and (max-width: 630px) {
.topnav.responsive {position: relative;}
.topnav.responsive .icon {
position: absolute;
right: 0;
top: 0;
}
.topnav.responsive a {
float: none;
display: block;
text-align: left;
}
}
</style>

30
components/TheFooter.vue Normal file
View File

@ -0,0 +1,30 @@
<template>
<v-img gradient="180deg, rgba(166,22,22,1), rgba(228,30,30,19)"><v-row class="py-4">
<v-col cols="12" lg="12" sm="12" md="12">
<!-- <v-row justify="center">
<nuxt-link class="my-3 mx-3 white--text" to="/">Home</nuxt-link>
<nuxt-link class="my-3 mx-3 white--text" to="/page/news">All News</nuxt-link>
<nuxt-link class="my-3 mx-3 white--text" to="/page/about">About</nuxt-link>
<nuxt-link class="my-3 mx-3 white--text" to="/contact">Contact</nuxt-link>
<nuxt-link class="my-3 mx-3 white--text" to="/privacy">Privacy</nuxt-link>
</v-row> -->
<v-row justify="center"><a class="py-1 px-4 white--text" href="https://dwd.siliconpin.com"> Powered by DWD Consultancy Services</a></v-row>
</v-col>
</v-row></v-img>
</template>
<script>
export default {
data(){
return{
}
}
}
</script>
<style scoped>
</style>

18
components/TheHeader.vue Normal file
View File

@ -0,0 +1,18 @@
<template>
<v-container fluid>
<img
src="/header-img.png"
width="100%"
height="100%"
align="left"
alt="GeeksforGeeks logo"
/>
</v-container>
</template>
<style scoped>
*{
margin: 0;
padding: 0;
}
</style>

View File

@ -0,0 +1,18 @@
<template>
<v-container fluid>
<img
src="/header-img-en.jpg"
width="100%"
height="100%"
align="left"
alt="GeeksforGeeks logo"
/>
</v-container>
</template>
<style scoped>
*{
margin: 0;
padding: 0;
}
</style>

52
components/Tutorial.vue Normal file
View File

@ -0,0 +1,52 @@
<!-- Please remove this file from your project -->
<template>
<div class="relative flex items-top justify-center min-h-screen bg-gray-100 sm:items-center sm:pt-0">
<link href="https://cdn.jsdelivr.net/npm/tailwindcss@2.1.2/dist/tailwind.min.css" rel="stylesheet">
<div class="max-w-4xl mx-auto sm:px-6 lg:px-8">
<a class="flex justify-center pt-8 sm:pt-0" href="https://nuxtjs.org" target="_blank">
<svg width="218" height="45" viewBox="0 0 159 30" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M55.5017 6.81866H60.1727L70.0719 22.9912V6.81866H74.3837V29.7345H69.7446L59.8135 13.5955V29.7345H55.5017V6.81866Z" fill="#003543" /> <path d="M93.657 29.7344H89.6389V27.1747C88.7241 28.9761 86.8628 29.9904 84.5113 29.9904C80.7869 29.9904 78.3684 27.3059 78.3684 23.4423V13.2339H82.3865V22.5976C82.3865 24.8566 83.7594 26.4276 85.8171 26.4276C88.0712 26.4276 89.6389 24.6598 89.6389 22.2377V13.2339H93.657V29.7344Z" fill="#003543" /> <path d="M107.64 29.7344L103.784 24.2342L99.9291 29.7344H95.6492L101.596 21.1242L96.1074 13.2339H100.485L103.784 17.9821L107.051 13.2339H111.461L105.94 21.1242L111.886 29.7344H107.64Z" fill="#003543" /> <path d="M120.053 8.25848V13.2339H124.627V16.6063H120.053V24.7974C120.053 25.0725 120.162 25.3363 120.356 25.531C120.55 25.7257 120.813 25.8353 121.087 25.8357H124.627V29.728H121.98C118.386 29.728 116.035 27.6323 116.035 23.9687V16.6095H112.801V13.2339H114.83C115.776 13.2339 116.327 12.6692 116.327 11.7349V8.25848H120.053Z" fill="#003543" /> <path d="M134.756 24.5446V6.81866H139.066V23.1864C139.066 27.6067 136.943 29.7345 133.349 29.7345H128.332V25.8421H133.461C133.804 25.8421 134.134 25.7054 134.377 25.4621C134.619 25.2188 134.756 24.8888 134.756 24.5446Z" fill="#003543" /> <path d="M141.649 22.0409H145.799C146.029 24.6006 147.728 26.2308 150.472 26.2308C152.923 26.2308 154.623 25.2501 154.623 23.2199C154.623 18.3085 142.331 21.7129 142.331 12.9395C142.334 9.17515 145.568 6.55945 150.215 6.55945C155.05 6.55945 158.317 9.34153 158.516 13.6306H154.388C154.193 11.6341 152.632 10.2918 150.207 10.2918C147.953 10.2918 146.548 11.3397 146.548 12.9427C146.548 18.0173 159 14.2226 159 23.1576C159 27.4131 155.504 30 150.474 30C145.279 30 141.882 26.8563 141.654 22.0441" fill="#003543" /> <path d="M24.7203 29.704H41.1008C41.6211 29.7041 42.1322 29.5669 42.5828 29.3061C43.0334 29.0454 43.4075 28.6704 43.6675 28.2188C43.9275 27.7672 44.0643 27.2549 44.0641 26.7335C44.0639 26.2121 43.9266 25.6999 43.6662 25.2485L32.6655 6.15312C32.4055 5.70162 32.0315 5.32667 31.581 5.06598C31.1305 4.8053 30.6195 4.66805 30.0994 4.66805C29.5792 4.66805 29.0682 4.8053 28.6177 5.06598C28.1672 5.32667 27.7932 5.70162 27.5332 6.15312L24.7203 11.039L19.2208 1.48485C18.9606 1.03338 18.5864 0.658493 18.1358 0.397853C17.6852 0.137213 17.1741 0 16.6538 0C16.1336 0 15.6225 0.137213 15.1719 0.397853C14.7213 0.658493 14.3471 1.03338 14.0868 1.48485L0.397874 25.2485C0.137452 25.6999 0.000226653 26.2121 2.8053e-07 26.7335C-0.000226092 27.2549 0.136554 27.7672 0.396584 28.2188C0.656614 28.6704 1.03072 29.0454 1.48129 29.3061C1.93185 29.5669 2.44298 29.7041 2.96326 29.704H13.2456C17.3195 29.704 20.3239 27.9106 22.3912 24.4118L27.4102 15.7008L30.0986 11.039L38.1667 25.0422H27.4102L24.7203 29.704ZM13.0779 25.0374L5.9022 25.0358L16.6586 6.36589L22.0257 15.7008L18.4322 21.9401C17.0593 24.2103 15.4996 25.0374 13.0779 25.0374Z" fill="#00DC82" /></svg>
</a>
<div class="mt-8 bg-white overflow-hidden shadow sm:rounded-lg p-6">
<h2 class="text-2xl leading-7 font-semibold">
Welcome to your Nuxt Application
</h2>
<p class="mt-3 text-gray-600">
We recommend you take a look at the <a href="https://nuxtjs.org" target="_blank" class="button--doc text-green-500 hover:underline">Nuxt documentation</a>, whether you are new or have previous experience with the framework.<br>
</p>
<p class="mt-4 pt-4 text-gray-800 border-t border-dashed">
To get started, remove <code class="bg-gray-100 text-sm p-1 rounded border">components/Tutorial.vue</code> and start coding in <code class="bg-gray-100 text-sm p-1 rounded border">pages/index.vue</code>. Have fun!
</p>
</div>
<div class="flex justify-center pt-4 space-x-2">
<a href="https://github.com/nuxt/nuxt.js" target="_blank"><svg
class="w-6 h-6 text-gray-600 hover:text-gray-800 button--github"
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
aria-hidden="true"
role="img"
width="32"
height="32"
preserveAspectRatio="xMidYMid meet"
viewBox="0 0 24 24"
><path d="M12 2.247a10 10 0 0 0-3.162 19.487c.5.088.687-.212.687-.475c0-.237-.012-1.025-.012-1.862c-2.513.462-3.163-.613-3.363-1.175a3.636 3.636 0 0 0-1.025-1.413c-.35-.187-.85-.65-.013-.662a2.001 2.001 0 0 1 1.538 1.025a2.137 2.137 0 0 0 2.912.825a2.104 2.104 0 0 1 .638-1.338c-2.225-.25-4.55-1.112-4.55-4.937a3.892 3.892 0 0 1 1.025-2.688a3.594 3.594 0 0 1 .1-2.65s.837-.262 2.75 1.025a9.427 9.427 0 0 1 5 0c1.912-1.3 2.75-1.025 2.75-1.025a3.593 3.593 0 0 1 .1 2.65a3.869 3.869 0 0 1 1.025 2.688c0 3.837-2.338 4.687-4.563 4.937a2.368 2.368 0 0 1 .675 1.85c0 1.338-.012 2.413-.012 2.75c0 .263.187.575.687.475A10.005 10.005 0 0 0 12 2.247z" fill="currentColor" /></svg></a>
<a href="https://twitter.com/nuxt_js" target="_blank"><svg
class="w-6 h-6 text-gray-600 hover:text-gray-800"
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
aria-hidden="true"
role="img"
width="32"
height="32"
preserveAspectRatio="xMidYMid meet"
viewBox="0 0 24 24"
><path d="M22.46 6c-.77.35-1.6.58-2.46.69c.88-.53 1.56-1.37 1.88-2.38c-.83.5-1.75.85-2.72 1.05C18.37 4.5 17.26 4 16 4c-2.35 0-4.27 1.92-4.27 4.29c0 .34.04.67.11.98C8.28 9.09 5.11 7.38 3 4.79c-.37.63-.58 1.37-.58 2.15c0 1.49.75 2.81 1.91 3.56c-.71 0-1.37-.2-1.95-.5v.03c0 2.08 1.48 3.82 3.44 4.21a4.22 4.22 0 0 1-1.93.07a4.28 4.28 0 0 0 4 2.98a8.521 8.521 0 0 1-5.33 1.84c-.34 0-.68-.02-1.02-.06C3.44 20.29 5.7 21 8.12 21C16 21 20.33 14.46 20.33 8.79c0-.19 0-.37-.01-.56c.84-.6 1.56-1.36 2.14-2.23z" fill="currentColor" /></svg></a>
</div>
</div>
</div>
</template>
<script>
export default {
name: 'NuxtTutorial'
}
</script>

View File

@ -0,0 +1,22 @@
<template>
<img
class="vuetify-logo"
alt="Vuetify Logo"
src="/vuetify-logo.svg"
>
</template>
<style>
.vuetify-logo {
height: 180px;
width: 180px;
transform: rotateY(560deg);
animation: turn 3.5s ease-out forwards 1s;
}
@keyframes turn {
100% {
transform: rotateY(0deg);
}
}
</style>

18
content/hello.md Normal file
View File

@ -0,0 +1,18 @@
---
title: Getting started
description: 'Empower your NuxtJS application with @nuxt/content module: write in a content/ directory and fetch your Markdown, JSON, YAML and CSV files through a MongoDB like API, acting as a Git-based Headless CMS.'
---
Empower your NuxtJS application with `@nuxtjs/content` module: write in a `content/` directory and fetch your Markdown, JSON, YAML and CSV files through a MongoDB like API, acting as a **Git-based Headless CMS**.
## Writing content
Learn how to write your `content/`, supporting Markdown, YAML, CSV and JSON: https://content.nuxtjs.org/writing.
## Fetching content
Learn how to fetch your content with `$content`: https://content.nuxtjs.org/fetching.
## Displaying content
Learn how to display your Markdown content with the `<nuxt-content>` component directly in your template: https://content.nuxtjs.org/displaying.

46
layouts/default.vue Normal file
View File

@ -0,0 +1,46 @@
<template>
<v-app>
<TheHeader/>
<Menu />
<nuxt keep-alive :keep-alive-props="{ max: 20 }" />
<!-- <nuxt keep-alive :keep-alive-props="{ max: 20 }" /> -->
<section>
<!-- <Sidebar/> -->
<TheFooter/>
</section>
</v-app>
</template>
<script>
// import TheHeader from '../components/TheHeader'
// import TheFooter from '../components/TheFooter'
// import Menu from '../components/menu'
// import Sidebar from '../components/SideBar'
export default {
// components:{
// TheHeader,
// TheFooter,
// Menu
// // Sidebar
// }
}
</script>
<style>
* {
margin: 0;
padding: 0;
/* font-family: 'Raleway', sans-serif; */
}
section{
overflow-x: hidden;
}
a {
text-decoration: none;
}
</style>

44
layouts/en.vue Normal file
View File

@ -0,0 +1,44 @@
<template>
<v-app>
<TheHeaderen />
<MenuEn />
<nuxt keep-alive :keep-alive-props="{ max: 20 }" />
<nuxt keep-alive :keep-alive-props="{ max: 20 }" />
<section>
<!-- <Sidebar/> -->
<TheFooter/>
</section>
</v-app>
</template>
<script>
// import TheHeader from '../components/TheHeader'
// import TheFooter from '../components/TheFooter'
// import Menu from '../components/menu'
// import Sidebar from '../components/SideBar'
export default {
// components:{
// TheHeader,
// TheFooter,
// Menu
// // Sidebar
// }
}
</script>
<style>
* {
margin: 0;
padding: 0;
/* font-family: 'Raleway', sans-serif; */
}
section{
overflow-x: hidden;
}
a {
text-decoration: none;
}
</style>

45
layouts/error.vue Normal file
View File

@ -0,0 +1,45 @@
<template>
<v-app dark>
<h1 v-if="error.statusCode === 404">
{{ pageNotFound }}
</h1>
<h1 v-else>
{{ otherError }}
</h1>
<NuxtLink to="/">
Home page
</NuxtLink>
</v-app>
</template>
<script>
export default {
name: 'EmptyLayout',
layout: 'empty',
props: {
error: {
type: Object,
default: null
}
},
data () {
return {
pageNotFound: '404 Not Found',
otherError: 'An error occurred'
}
},
head () {
const title =
this.error.statusCode === 404 ? this.pageNotFound : this.otherError
return {
title
}
}
}
</script>
<style scoped>
h1 {
font-size: 20px;
}
</style>

17
layouts/fn.vue Normal file
View File

@ -0,0 +1,17 @@
<template>
<v-app>
<TheHeaderen />
<MenuEn />
<nuxt keep-alive :keep-alive-props="{ max: 20 }" />
<nuxt keep-alive :keep-alive-props="{ max: 20 }" />
<section>
<!-- <Sidebar/> -->
<TheFooter/>
</section>
</v-app>
</template>

104
layouts/nuxt.config.js Normal file
View File

@ -0,0 +1,104 @@
import colors from 'vuetify/es5/util/colors'
export default {
// Global page headers: https://go.nuxtjs.dev/config-head
head: {
titleTemplate: '%s - barta-india.in',
title: 'barta-india.in',
meta: [
{ charset: 'utf-8' },
{ name: 'viewport', content: 'width=device-width, initial-scale=1' },
{ hid: 'description', name: 'description', content: '' },
{ name: 'format-detection', content: 'telephone=no' }
],
link: [
{ rel: 'icon', type: 'image/x-icon', href: '/favicon.ico' }
]
},
server: {
port: process.env.SITE_PORT || 1031, // default: 3000
host: '0.0.0.0' // default: localhost
},
// Global CSS: https://go.nuxtjs.dev/config-css
css: ['~/assets/common.css','node_modules/lite-youtube-embed/src/lite-yt-embed.css'],
// Plugins to run before rendering page: https://go.nuxtjs.dev/config-plugins
plugins: ['~/plugins/youtube.client.js'],
// Auto import components: https://go.nuxtjs.dev/config-components
components: true,
// Modules for dev and build (recommended): https://go.nuxtjs.dev/config-modules
buildModules: [
// https://go.nuxtjs.dev/vuetify
'@nuxtjs/vuetify',
],
// Modules: https://go.nuxtjs.dev/config-modules
modules: [
// https://go.nuxtjs.dev/axios
'@nuxtjs/axios',
// https://go.nuxtjs.dev/pwa
'@nuxtjs/pwa',
// https://go.nuxtjs.dev/content
'@nuxt/content',
'vue-social-sharing/nuxt'
],
// Axios module configuration: https://go.nuxtjs.dev/config-axios
// axios: {
// // Workaround to avoid enforcing hard-coded localhost:3000: https://github.com/nuxt-community/axios-module/issues/308
// baseURL: '/',
// },
publicRuntimeConfig: {
axios: {
baseURL: 'https://api5.siliconpin.com'
}
},
privateRuntimeConfig: {
myPrivateToken: process.env.PRIVATE_TOKEN
},
// PWA module configuration: https://go.nuxtjs.dev/pwa
pwa: {
manifest: {
lang: 'en'
}
},
// Content module configuration: https://go.nuxtjs.dev/config-content
content: {},
// Vuetify module configuration: https://go.nuxtjs.dev/config-vuetify
vuetify: {
customVariables: ['~/assets/variables.scss'],
theme: {
dark: false,
themes: {
dark: {
primary: colors.blue.darken2,
accent: colors.grey.darken3,
secondary: colors.amber.darken3,
info: colors.teal.lighten1,
warning: colors.amber.base,
error: colors.deepOrange.accent4,
success: colors.green.accent3
}
}
}
},
pwa: {
manifest: {
name: 'barta-india.in',
short_name: 'Barta',
theme_color: 'red',
lang: 'en',
useWebmanifestExtension: false
}
},
// Build Configuration: https://go.nuxtjs.dev/config-build
build: {
}
}

111
nuxt.config.js Normal file
View File

@ -0,0 +1,111 @@
import colors from 'vuetify/es5/util/colors'
export default {
// Global page headers: https://go.nuxtjs.dev/config-head
head: {
titleTemplate: '%s - barta-india.in',
title: 'barta-india.in',
meta: [
{ charset: 'utf-8' },
{ name: 'viewport', content: 'width=device-width, initial-scale=1' },
{ hid: 'description', name: 'description', content: '' },
{ name: 'format-detection', content: 'telephone=no' }
],
link: [
{ rel: 'icon', type: 'image/x-icon', href: '/favicon.ico' }
]
},
server: {
port: process.env.SITE_PORT || 1060, // default: 3000
host: '0.0.0.0' // default: localhost
},
// Global CSS: https://go.nuxtjs.dev/config-css
css: ['~/assets/common.css','node_modules/lite-youtube-embed/src/lite-yt-embed.css'],
// Plugins to run before rendering page: https://go.nuxtjs.dev/config-plugins
plugins: ['~/plugins/youtube.client.js'],
script: [
{
src: "https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-9252259454702469",
async: true,
crossorigin: "anonymous"
},
],
// Auto import components: https://go.nuxtjs.dev/config-components
components: true,
// Modules for dev and build (recommended): https://go.nuxtjs.dev/config-modules
buildModules: [
// https://go.nuxtjs.dev/vuetify
'@nuxtjs/vuetify',
],
// Modules: https://go.nuxtjs.dev/config-modules
modules: [
// https://go.nuxtjs.dev/axios
'@nuxtjs/axios',
// https://go.nuxtjs.dev/pwa
'@nuxtjs/pwa',
// https://go.nuxtjs.dev/content
'@nuxt/content',
'vue-social-sharing/nuxt'
],
// Axios module configuration: https://go.nuxtjs.dev/config-axios
// axios: {
// // Workaround to avoid enforcing hard-coded localhost:3000: https://github.com/nuxt-community/axios-module/issues/308
// baseURL: '/',
// },
publicRuntimeConfig: {
axios: {
baseURL: 'https://api5.siliconpin.com'
}
},
privateRuntimeConfig: {
myPrivateToken: process.env.PRIVATE_TOKEN
},
// PWA module configuration: https://go.nuxtjs.dev/pwa
pwa: {
manifest: {
lang: 'en'
}
},
// Content module configuration: https://go.nuxtjs.dev/config-content
content: {},
// Vuetify module configuration: https://go.nuxtjs.dev/config-vuetify
vuetify: {
customVariables: ['~/assets/variables.scss'],
theme: {
dark: false,
themes: {
dark: {
primary: colors.blue.darken2,
accent: colors.grey.darken3,
secondary: colors.amber.darken3,
info: colors.teal.lighten1,
warning: colors.amber.base,
error: colors.deepOrange.accent4,
success: colors.green.accent3
}
}
}
},
pwa: {
manifest: {
name: 'barta-india.in',
short_name: 'Barta',
theme_color: 'red',
lang: 'en',
useWebmanifestExtension: false
}
},
// Build Configuration: https://go.nuxtjs.dev/config-build
build: {
}
}

29
package.json Normal file
View File

@ -0,0 +1,29 @@
{
"name": "barta-india.in",
"version": "2.0.0",
"description": "Barta india, news with views.",
"private": true,
"scripts": {
"dev": "export NODE_OPTIONS=--openssl-legacy-provider && nuxt",
"build": "nuxt build",
"start": "nuxt start",
"generate": "nuxt generate"
},
"dependencies": {
"@nuxt/content": "^1.15.1",
"@nuxtjs/axios": "^5.13.6",
"@nuxtjs/pwa": "^3.3.5",
"core-js": "^3.19.3",
"lite-youtube-embed": "^0.2.0",
"nuxt": "^2.15.8",
"vue": "^2.6.14",
"vue-server-renderer": "^2.6.14",
"vue-social-sharing": "^3.0.9",
"vue-template-compiler": "^2.6.14",
"vuetify": "^2.6.1",
"webpack": "^4.46.0"
},
"devDependencies": {
"@nuxtjs/vuetify": "^1.12.3"
}
}

193
pages/_slug.vue Normal file
View File

@ -0,0 +1,193 @@
<template>
<v-container mt-4 style="padding-bottom:120px;">
<v-row>
<v-col sm="12" xl="8" v-if="newsBySlug.length > 0">
<v-card>
<div style="padding: 0 100px;">
<v-card class="justify-center ">
<v-img :src="`https://api5.siliconpin.com${newsBySlug[0].image.url}`" aspect-ratio="1.75">
<span v-text="newsBySlug[0].text_over_image" class="text_over_image"></span>
</v-img>
</v-card>
<span>Published on : {{latestNews[0].created_at.slice(0,10)}} , </span>
<span>at : {{latestNews[0].created_at.slice(11,-5)}} </span>
</div>
<v-card-title class="font-weight-bold justify-center " style="overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 3; font-size:2em; line-height: 1.6;">
{{ newsBySlug[0].title }}</v-card-title>
<!-- :class="{'subheading': $vuetify.breakpoint.xs}" -->
<hr>
<p class="text-justify"
style="padding:20px; white-space:pre-wrap;font-size:1.2em; line-height: 1.6;font-weight:bold;"
mb-40>
&nbsp; &nbsp; {{ newsBySlug[0].content }}
</p>
<br />
<div id="block_container">
<div>
<ShareNetwork network="facebook" :title="newsBySlug[0].title"
:url="'https://barta-india.in/'+$route.params.slug">
<v-icon class="facebook">mdi-facebook</v-icon>
<span>Share on Facebook</span>
</ShareNetwork>
</div>
<div>
<ShareNetwork network="twitter" :title="newsBySlug[0].title"
:url="'https://barta-india.in/'+$route.params.slug">
<v-icon class="twitter">mdi-twitter</v-icon>
<span>Share on Twitter </span>
</ShareNetwork>
</div>
<div>
<ShareNetwork network="whatsapp" :title="newsBySlug[0].title"
:url="'https://barta-india.in/'+$route.params.slug">
<v-icon class="whatsapp">mdi-whatsapp</v-icon>
<span>Share on whatsapp</span>
</ShareNetwork>
</div>
</div>
<div id="fb"></div>
<!-- <h2 v-html="url"></h2> -->
</v-card>
</v-col>
<v-col sm="12" xl="8" v-else >
<v-card>
<div style="padding: 0 100px;">
<v-card height="200" class="justify-center ">
404 ! Not found
</v-card>
</div>
<!-- <h2 v-html="url"></h2> -->
</v-card>
</v-col>
<v-col sm="12" xl="4">
<div style="padding: 0 50px;">
<v-flex v-for="ln in latestNews" :key="latestNews.slug" xl12>
<div style="padding: 20px 10px;">
<nuxt-link :to="`/${ln.slug}`">
<v-card width="85%">
<v-img :src="`https://api5.siliconpin.com${ln.image.url}`" aspect-ratio="1.75">
<span v-text="ln.text_over_image" class="text_over_image"></span>
</v-img>
<p class="px-4"> <span>Published on : {{latestNews[0].created_at.slice(0,10)}} , </span>
<span>at : {{latestNews[0].created_at.slice(11,-5)}} </span></p>
<v-card-title primary-title>
<div>
<h3 class="headline mb-0" v-text="ln.title"></h3>
</div>
</v-card-title>
</v-card>
</nuxt-link>
</div>
</v-flex>
</div>
</v-col>
</v-row>
</v-container>
</template>
<script>
export default {
// data: () => ({
// posts: [],
// pageTitle:"barta-india.in news portal",
// }),
// data() {
// return {
// world: {},
// national: {},
// local: {},
// editorial: {},
// totalNoOfNews: null,
// slug: "",
// pageTitle:"",
// // apiLink:process.env.apiLink
// };
// },
async asyncData({ $axios, route }) {
const newsBySlug = await $axios.$get(`/bartas/?slug=` + route.params.slug)
let latestNews = await $axios.$get(`/bartas/?lang=bn&_sort=id:DESC&_limit=8`)
let pageTitle = ""
let imageUrl = ""
if(newsBySlug.length > 0) {
pageTitle = newsBySlug[0].title;
imageUrl = newsBySlug[0].image.url;
}
else {
pageTitle = "this page not found";
imageUrl = "https://barta-india.in/icon.png";
}
// $route.fullPath
// console.log(route.params.slug);
// console.log(this.pageTitle)
latestNews = JSON.parse(JSON.stringify(latestNews).replace(/\:null/gi, "\:\"\""));
const slugUrl = route.params.slug
return { newsBySlug, latestNews, slugUrl, pageTitle, imageUrl }
},
head() {
return {
title: this.pageTitle,
meta: [
// hid is used as unique identifier. Do not use `vmid` for it as it will not work
{
hid: 'description',
name: 'description',
content: this.pageTitle
},
{
hid: 'og:description',
name: 'og:description',
content: this.pageTitle
},
{
hid: 'og:title',
name: 'og:title',
content: this.pageTitle
},
{
hid: 'og:url',
name: 'og:url',
content: 'https://barta-india.in/' + this.slugUrl
},
{
hid: 'og:image',
name: 'og:image',
content: 'https://api5.siliconpin.com' + this.imageUrl
},
{
hid: 'og:image:secure_url',
name: 'og:image:secure_url',
content: 'https://api5.siliconpin.com' + this.imageUrl
},
{
hid: 'og:type',
name: 'og:type',
content: 'News'
}
]
}
}
}
</script>
<style scopped>
</style>

6
pages/about.vue Normal file
View File

@ -0,0 +1,6 @@
<template>
<v-container> <p> 0123456789
</p>
</v-container>
</template>

47
pages/category/_slug.vue Normal file
View File

@ -0,0 +1,47 @@
<template>
<v-container grid-list-md>
<!-- <h1>Mountaiins</h1> -->
<!-- <ul v-for="wn in worldNews.slice(-4)" :key="wn.slug">
<li>{{ wn.title }}</li>
<li>{{ wn.image.url }}</li>
</ul> -->
<v-layout row wrap v-if="worldNews.length > 0">
<v-flex v-for="wn in worldNews" :key="worldNews.slug" xs12 md6 lg3>
<nuxt-link :to="`/${wn.slug}`">
<v-card width="95%">
<v-img :src="`https://api5.siliconpin.com${wn.image.url}`" aspect-ratio="2.75"></v-img>
<v-card-title primary-title>
<span class="px-4">Published on : {{wn.created_at.slice(0,10)}} </span><br>
<span class="px-4">At : {{wn.created_at.slice(11, -5)}} </span>
<div>
<p style="overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp:2;" class="" v-text="wn.title">
</p>
</div>
</v-card-title>
</v-card>
</nuxt-link>
</v-flex>
</v-layout>
<v-layout v-else>
<h4 style="margin-left: 20px;">No news available in this topic now! Please visit again.</h4>
</v-layout>
</v-container>
</template>
<script>
export default {
async asyncData({ $axios, route }) {
let worldNews = await $axios.$get(
`/bartas/?category=` + route.params.slug + `&lang=bn&_sort=id:DESC`
);
// console.log(worldNews);
worldNews = JSON.parse(JSON.stringify(worldNews).replace(/\:null/gi, "\:\"\""));
return { worldNews };
},
};
</script>

78
pages/category/video.vue Normal file
View File

@ -0,0 +1,78 @@
<template>
<v-container grid-list-md>
<!-- <lite-youtube
v-bind:videoid= "`${videoNews[0].slug}`"
playlabel="Play: Keynote (Google I/O '18)"
params="controls=0&start=10&end=30&modestbranding=2&rel=0&enablejsapi=1"
/>
<h2> {{videoNews[0].title}} </h2> -->
<v-layout row wrap >
<v-flex v-for="vn in videoNews" :key="videoNews.id" xs12 md6 lg3>
<v-card width="95%">
<lite-youtube
v-bind:videoid= "`${vn.content}`"
params="controls=0&start=10&end=30&modestbranding=2&rel=0&enablejsapi=1"
/>
<p class="px-4">On : <span v-text="vn.created_at.slice(0,10)"></span>
, at : <span v-text="vn.created_at.slice(11,-5)"></span></p>
<v-card-title primary-title>
<div>
<h3 class="headline mb-0" v-text="vn.title"></h3>
</div>
<div>
<a
:href="`https://youtu.be/${vn.content}`">
<v-btn color="error"> </v-btn>
</a></div>
</v-card-title>
</v-card>
</v-flex>
</v-layout>
</v-container>
</template>
<script>
// import VueYoutube from 'vue-youtube'
export default {
data() {
return {
videoId: 'l5yX7cY0iSE',
videoNews:[]
}
},
// methods: {
// playVideo() {
// this.player.playVideo()
// },
// playing() {
// console.log('\o/ we are watching!!!')
// }
// },
// computed: {
// player() {
// return this.$refs.youtube.player
// }
// },
async asyncData({ $axios, $config }) {
let videoNews = await $axios.$get(`/bartas/?category=video&_sort=id:DESC&_limit=20`)
// need to create the json / var first
// if(worldNews.length < 1) { worldNews[0].image.url="", worldNews[0].slug="404", worldNews[0].slug="not found";}
// if(nationalNews.length < 1) { nationalNews[0].image.url="", nationalNews[0].slug="404", nationalNews[0].slug="not found";}
// if(localNews.length < 1) { localNews[0].image.url="", localNews[0].slug="404", localNews[0].slug="not found";}
// if(articleNews.length < 1) { articleNews[0].image.url="", articleNews[0].slug="404", articleNews[0].slug="not found";}
// if(editorialNews.length < 1) { editorialNews[0].image.url="", editorialNews[0].slug="404", editorialNews[0].slug="not found";}
// if(videoNews.length < 1) { videoNews[0].image.url="", videoNews[0].slug="404", videoNews[0].slug="not found";}
videoNews = JSON.parse(JSON.stringify(videoNews).replace(/\:null/gi, "\:\"\""));
return { videoNews }
}
}
</script>

8
pages/contact.vue Normal file
View File

@ -0,0 +1,8 @@
<template>
<v-container>
<p class="text-h2">
Ph-0123456789
</p>
</v-container>
</template>

190
pages/en/_slug.vue Normal file
View File

@ -0,0 +1,190 @@
<template>
<v-container mt-4 style="padding-bottom: 120px">
<v-row>
<v-col sm="12" xl="8" v-if="newsBySlug.length > 0">
<v-card>
<div style="padding: 0 100px">
<v-card class="justify-center">
<v-img :src="`https://api5.siliconpin.com${newsBySlug[0].image.url}`" aspect-ratio="1.75">
<span v-text="newsBySlug[0].text_over_image" class="text_over_image"></span>
</v-img>
</v-card>
<span>Date: {{ newsBySlug[0].created_at.slice(0, 10) }} / </span>
<span>Time: {{ newsBySlug[0].created_at.slice(11, -5) }} </span>
</div>
<v-card-title class="font-weight-bold justify-center" style="font-size: 2em; line-height: 1.6">
{{ newsBySlug[0].title }}
</v-card-title>
<!-- :class="{'subheading': $vuetify.breakpoint.xs}" -->
<hr />
<p class="text-justify" style="
padding: 20px;
white-space: pre-wrap;
font-size: 1.2em;
line-height: 1.6;
font-weight: bold;
" >
&nbsp; &nbsp; {{ newsBySlug[0].content }}
</p>
<br />
<div id="block_container">
<div>
<ShareNetwork network="facebook" :title="newsBySlug[0].title"
:url="'https://barta-india.in/' + $route.params.slug">
<v-icon class="facebook">mdi-facebook</v-icon>
<span>Share on Facebook</span>
</ShareNetwork>
</div>
<div>
<ShareNetwork network="twitter" :title="newsBySlug[0].title"
:url="'https://barta-india.in/' + $route.params.slug">
<v-icon class="twitter">mdi-twitter</v-icon>
<span>Share on Twitter </span>
</ShareNetwork>
</div>
<div>
<ShareNetwork network="whatsapp" :title="newsBySlug[0].title"
:url="'https://barta-india.in/' + $route.params.slug">
<v-icon class="whatsapp">mdi-whatsapp</v-icon>
<span>Share on whatsapp</span>
</ShareNetwork>
</div>
</div>
<div id="fb"></div>
<!-- <h2 v-html="url"></h2> -->
</v-card>
</v-col>
<v-col sm="12" xl="8" v-else>
<v-card>
<div style="padding: 0 100px">
<v-card class="justify-center"> 404 ! Not found </v-card>
</div>
<!-- <h2 v-html="url"></h2> -->
</v-card>
</v-col>
<v-col sm="12" xl="4">
<div style="padding: 0 50px;">
<v-flex v-for="ln in worldNews" :key="worldNews.slug" xl12>
<div style="padding: 20px 10px;">
<v-card width="85%">
<v-img :src="`https://api5.siliconpin.com${ln.image.url}`" aspect-ratio="1.75">
<span v-text="ln.text_over_image" class="text_over_image"></span>
</v-img>
<p class="px-4"> <span>Published on : {{latestNews[0].created_at.slice(0,10)}} , </span>
<span>at : {{latestNews[0].created_at.slice(11,-5)}} </span></p>
<v-card-title primary-title>
<div>
<h3 class="headline mb-0" v-text="ln.title"></h3>
</div>
</v-card-title>
</v-card>
</div>
</v-flex>
</div>
</v-col>
</v-row>
</v-container>
</template>
<script>
export default {
layout: "en",
// data: () => ({
// posts: [],
// pageTitle:"barta-india.in news portal",
// }),
// data() {
// return {
// world: {},
// national: {},
// local: {},
// editorial: {},
// totalNoOfNews: null,
// slug: "",
// pageTitle:"",
// // apiLink:process.env.apiLink
// };
// },
async asyncData({ $axios, route }) {
const newsBySlug = await $axios.$get(`/bartas/?slug=` + route.params.slug);
let latestNews = await $axios.$get(`/bartas/?_sort=id:DESC&_limit=8`);
let worldNews = await $axios.$get(`/bartas/?category=world&lang=en&_sort=id:DESC&_limit=8`)
let pageTitle = "";
let imageUrl = "";
if (newsBySlug.length > 0) {
pageTitle = newsBySlug[0].title;
imageUrl = newsBySlug[0].image.url;
} else {
pageTitle = "this page not found";
imageUrl = "https://barta-india.in/icon.png";
}
// $route.fullPath
// console.log(route.params.slug);
// console.log(this.pageTitle)
latestNews = JSON.parse(
JSON.stringify(latestNews).replace(/\:null/gi, '\:""')
);
const slugUrl = route.params.slug;
return { newsBySlug, latestNews, slugUrl, pageTitle, imageUrl,worldNews };
},
head() {
return {
title: this.pageTitle,
meta: [
// hid is used as unique identifier. Do not use `vmid` for it as it will not work
{
hid: "description",
name: "description",
content: this.pageTitle,
},
{
hid: "og:description",
name: "og:description",
content: this.pageTitle,
},
{
hid: "og:title",
name: "og:title",
content: this.pageTitle,
},
{
hid: "og:url",
name: "og:url",
content: "https://barta-india.in/" + this.slugUrl,
},
{
hid: "og:image",
name: "og:image",
content: "https://api5.siliconpin.com" + this.imageUrl,
},
{
hid: "og:image:secure_url",
name: "og:image:secure_url",
content: "https://api5.siliconpin.com" + this.imageUrl,
},
{
hid: "og:type",
name: "og:type",
content: "News",
},
],
};
},
};
</script>
<style scopped>
</style>

View File

@ -0,0 +1,43 @@
<template>
<v-container grid-list-md>
<!-- <h1>Mountaiins</h1> -->
<!-- <ul v-for="wn in worldNews.slice(-4)" :key="wn.slug">
<li>{{ wn.title }}</li>
<li>{{ wn.image.url }}</li>
</ul> -->
<v-layout row wrap v-if="worldNews.length > 0">
<v-flex v-for="wn in worldNews" :key="worldNews.slug" xs12 md6 lg3>
<nuxt-link :to="`/en/${wn.slug}`">
<v-card width="95%">
<v-img :src="`https://api5.siliconpin.com${wn.image.url}`" aspect-ratio="2.75"></v-img>
<span class="px-4">On : {{wn.created_at.slice(0,10)}},
at{{wn.created_at.slice(0,10)}} </span>
<v-card-title primary-title>
<div>
<h3 class="headline mb-0" v-text="wn.title"></h3>
</div>
</v-card-title>
</v-card>
</nuxt-link>
</v-flex>
</v-layout>
<v-layout v-else>
<h4 style="margin-left: 20px;">No news available in this topic now! Please visit again.</h4>
</v-layout>
</v-container>
</template>
<script>
export default {
layout: 'en',
async asyncData({ $axios, route }) {
let worldNews = await $axios.$get(
`/bartas/?category=` + route.params.slug + `&lang=en&_sort=id:DESC`
);
// console.log(worldNews);
worldNews = JSON.parse(JSON.stringify(worldNews).replace(/\:null/gi, "\:\"\""));
return { worldNews };
},
};
</script>

439
pages/en/index.vue Normal file
View File

@ -0,0 +1,439 @@
<template>
<v-container>
<v-row class="px-lg-14 ">
<v-col cols="12" sm="12" md="12" lg="6">
<nuxt-link :to="`/en/${worldNews[0].slug}`">
<v-card>
<v-img :src="`https://api5.siliconpin.com${worldNews[0].image.url}`" aspect-ratio="1.75">
<span v-text="worldNews[0].text_over_image" class="text_over_image"></span>
</v-img>
<v-card-title primary-title>
<p> <span>Publish on : {{ worldNews[0].created_at.slice(0, 10) }}, </span>
<span>at : {{ worldNews[0].created_at.slice(11, -5) }} </span></p>
<p v-text="worldNews[0].title" class="text-lg-h4 text-sm-h5"></p>
<!-- <v-text class="text-lg-h4 text-sm-h5">{{worldNews[0].title}}</v-text> -->
</v-card-title>
</v-card>
</nuxt-link>
</v-col>
<v-col sm="12" md="12" lg="6">
<v-row>
<v-col lg="6" sm="6">
<nuxt-link :to="`/en/${worldNews[1].slug}`">
<v-card>
<v-img :src="`https://api5.siliconpin.com${worldNews[1].image.url}`" aspect-ratio="1.75">
<span v-text="worldNews[1].text_over_image" class="text_over_image"></span>
</v-img>
<p class="pa-2"> <span>On : {{ worldNews[1].created_at.slice(0, 10) }} , </span>
<span>at : {{ worldNews[1].created_at.slice(11, -5) }} </span><br>
<span class="font-weight-bold">{{worldNews[1].title}}</span></p>
</v-card>
</nuxt-link>
</v-col>
<v-col sm="6" lg="6">
<nuxt-link :to="`/en/${worldNews[2].slug}`">
<v-card>
<v-img :src="`https://api5.siliconpin.com${worldNews[2].image.url}`" aspect-ratio="1.75">
<span v-text="worldNews[2].text_over_image" class="text_over_image"></span>
</v-img>
<p class="pa-2"> <span>On : {{ worldNews[2].created_at.slice(0, 10) }} , </span>
<span>at : {{ worldNews[2].created_at.slice(11, -5) }} </span><br>
<span class="font-weight-bold">{{worldNews[2].title}}</span></p>
</v-card>
</nuxt-link>
</v-col>
</v-row>
<v-row>
<v-col lg="6" sm="6">
<nuxt-link :to="`/en/${worldNews[3].slug}`">
<v-card>
<v-img :src="`https://api5.siliconpin.com${worldNews[3].image.url}`" aspect-ratio="1.75">
<span v-text="worldNews[3].text_over_image" class="text_over_image"></span>
</v-img>
<p class="pa-2"> <span>On : {{ worldNews[3].created_at.slice(0, 10) }} , </span>
<span>at : {{ worldNews[3].created_at.slice(11, -5) }} </span><br>
<span class="font-weight-bold">{{worldNews[3].title}}</span></p>
</v-card>
</nuxt-link>
</v-col>
<v-col sm="6" lg="6">
<nuxt-link :to="`/en/${worldNews[4].slug}`">
<v-card>
<v-img :src="`https://api5.siliconpin.com${worldNews[4].image.url}`" aspect-ratio="1.75">
<span v-text="worldNews[4].text_over_image" class="text_over_image"></span>
</v-img>
<p class="pa-2"> <span>On : {{ worldNews[4].created_at.slice(0, 10) }} , </span>
<span>at : {{ worldNews[4].created_at.slice(11, -5) }} </span><br>
<span class="font-weight-bold">{{worldNews[4].title}}</span></p>
</v-card>
</nuxt-link>
</v-col>
</v-row>
</v-col>
</v-row>
<!-- ////////////////////////////////////// -->
<v-row class="px-lg-14 ">
<v-col cols="12" sm="12" md="12" lg="6">
<nuxt-link :to="`/en/${localNews[0].slug}`">
<v-card>
<v-img :src="`https://api5.siliconpin.com${localNews[0].image.url}`" aspect-ratio="1.75">
<span v-text="localNews[0].text_over_image" class="text_over_image"></span>
</v-img>
<v-card-title primary-title>
<p> <span>Publish on : {{ worldNews[0].created_at.slice(0, 10) }}, </span>
<span>at : {{ worldNews[0].created_at.slice(11, -5) }} </span></p>
<span v-text="localNews[0].title" class="text-lg-h4 text-sm-h5"></span>
<!-- <v-text class="text-lg-h4 text-sm-h5">{{localNews[0].title}}</v-text> -->
</v-card-title>
</v-card>
</nuxt-link>
</v-col>
<v-col sm="12" md="12" lg="6">
<v-row>
<v-col lg="6" sm="6">
<nuxt-link :to="`/en/${localNews[1].slug}`">
<v-card>
<v-img :src="`https://api5.siliconpin.com${localNews[1].image.url}`" aspect-ratio="1.75">
<span v-text="localNews[1].text_over_image" class="text_over_image"></span>
</v-img>
<p class="pa-2"> <span>On : {{ localNews[1].created_at.slice(0, 10) }} , </span>
<span>at : {{ localNews[1].created_at.slice(11, -5) }} </span><br>
<span class="font-weight-bold">{{localNews[1].title}}</span></p>
</v-card>
</nuxt-link>
</v-col>
<v-col sm="6" lg="6">
<nuxt-link :to="`/en/${localNews[2].slug}`">
<v-card>
<v-img :src="`https://api5.siliconpin.com${localNews[2].image.url}`" aspect-ratio="1.75">
<span v-text="localNews[2].text_over_image" class="text_over_image"></span>
</v-img>
<p class="pa-2"> <span>On : {{ localNews[2].created_at.slice(0, 10) }} , </span>
<span>at : {{ localNews[2].created_at.slice(11, -5) }} </span><br>
<span class="font-weight-bold">{{localNews[2].title}}</span></p>
</v-card>
</nuxt-link>
</v-col>
</v-row>
<v-row>
<v-col lg="6" sm="6">
<nuxt-link :to="`/en/${localNews[3].slug}`">
<v-card>
<v-img :src="`https://api5.siliconpin.com${localNews[3].image.url}`" aspect-ratio="1.75">
<span v-text="localNews[3].text_over_image" class="text_over_image"></span>
</v-img>
<p class="pa-2"> <span>On : {{ localNews[3].created_at.slice(0, 10) }} , </span>
<span>at : {{ localNews[3].created_at.slice(11, -5) }} </span><br>
<span class="font-weight-bold">{{localNews[3].title}}</span></p>
</v-card>
</nuxt-link>
</v-col>
<v-col sm="6" lg="6">
<nuxt-link :to="`/en/${localNews[4].slug}`">
<v-card>
<v-img :src="`https://api5.siliconpin.com${localNews[4].image.url}`" aspect-ratio="1.75">
<span v-text="localNews[4].text_over_image" class="text_over_image"></span>
</v-img>
<p class="pa-2"> <span>On : {{ localNews[4].created_at.slice(0, 10) }} , </span>
<span>at : {{ localNews[4].created_at.slice(11, -5) }} </span><br>
<span class="font-weight-bold">{{localNews[4].title}}</span></p>
</v-card>
</nuxt-link>
</v-col>
</v-row>
</v-col>
</v-row>
<!-- /////////////////////////////////////////////// -->
<v-row class="px-lg-14 ">
<v-col cols="12" sm="12" md="12" lg="6">
<nuxt-link :to="`/en/${nationalNews[0].slug}`">
<v-card>
<v-img :src="`https://api5.siliconpin.com${nationalNews[0].image.url}`" aspect-ratio="1.75">
<span v-text="nationalNews[0].text_over_image" class="text_over_image"></span>
</v-img>
<v-card-title primary-title>
<p> <span>Publish on : {{ nationalNews[0].created_at.slice(0, 10) }}, </span>
<span>at : {{ nationalNews[0].created_at.slice(11, -5) }} </span></p>
<span v-text="nationalNews[0].title" class="text-lg-h4 text-sm-h5"></span>
<!-- <v-text class="text-lg-h4 text-sm-h5">{{nationalNews[0].title}}</v-text> -->
</v-card-title>
</v-card>
</nuxt-link>
</v-col>
<v-col sm="12" md="12" lg="6">
<v-row>
<v-col lg="6" sm="6">
<nuxt-link :to="`/en/${nationalNews[1].slug}`">
<v-card>
<v-img :src="`https://api5.siliconpin.com${nationalNews[1].image.url}`" aspect-ratio="1.75">
<span v-text="nationalNews[1].text_over_image" class="text_over_image"></span>
</v-img>
<p class="pa-2"> <span>On : {{ nationalNews[1].created_at.slice(0, 10) }} , </span>
<span>at : {{ nationalNews[1].created_at.slice(11, -5) }} </span><br>
<span class="font-weight-bold">{{nationalNews[1].title}}</span></p>
</v-card>
</nuxt-link>
</v-col>
<v-col sm="6" lg="6">
<nuxt-link :to="`/en/${nationalNews[2].slug}`">
<v-card>
<v-img :src="`https://api5.siliconpin.com${nationalNews[2].image.url}`" aspect-ratio="1.75">
<span v-text="nationalNews[2].text_over_image" class="text_over_image"></span>
</v-img>
<p class="pa-2"> <span>On : {{ nationalNews[2].created_at.slice(0, 10) }} , </span>
<span>at : {{ nationalNews[2].created_at.slice(11, -5) }} </span><br>
<span class="font-weight-bold">{{nationalNews[2].title}}</span></p>
</v-card>
</nuxt-link>
</v-col>
</v-row>
<v-row>
<v-col lg="6" sm="6">
<nuxt-link :to="`/en/${nationalNews[3].slug}`">
<v-card>
<v-img :src="`https://api5.siliconpin.com${nationalNews[3].image.url}`" aspect-ratio="1.75">
<span v-text="nationalNews[3].text_over_image" class="text_over_image"></span>
</v-img>
<p class="pa-2"> <span>On : {{ nationalNews[3].created_at.slice(0, 10) }} , </span>
<span>at : {{ nationalNews[3].created_at.slice(11, -5) }} </span><br>
<span class="font-weight-bold">{{nationalNews[3].title}}</span></p>
</v-card>
</nuxt-link>
</v-col>
<v-col sm="6" lg="6">
<nuxt-link :to="`/en/${nationalNews[4].slug}`">
<v-card>
<v-img :src="`https://api5.siliconpin.com${nationalNews[4].image.url}`" aspect-ratio="1.75">
<span v-text="nationalNews[4].text_over_image" class="text_over_image"></span>
</v-img>
<p class="pa-2"> <span>On : {{ nationalNews[4].created_at.slice(0, 10) }} , </span>
<span>at : {{ nationalNews[4].created_at.slice(11, -5) }} </span><br>
<span class="font-weight-bold">{{nationalNews[4].title}}</span></p>
</v-card>
</nuxt-link>
</v-col>
</v-row>
</v-col>
</v-row>
<!-- ////////////////////////////////////////// -->
<!-- <v-layout row wrap >
<v-flex v-for="wn in latestNews" :key="latestNews.slug" xs12 md6 lg3>
<nuxt-link :to="`/${wn.slug}`">
<v-card >
<v-img
:src="`https://api5.siliconpin.com${wn.image.url}`"
aspect-ratio="1.75"
>
<span v-text="wn.text_over_image" class="text_over_image"></span>
</v-img>
<v-card-title primary-title>
<div>
<h3 class="headline mb-0" v-text="wn.title"></h3>
</div>
</v-card-title>
</v-card>
</nuxt-link>
</v-flex>
</v-layout>-->
<v-layout row wrap>
<v-flex v-for="wn in worldNews" :key="worldNews.slug" xs6 md6 lg3>
<nuxt-link :to="`/en/${wn.slug}`">
<v-card class="mx-2 mb-2">
<v-img :src="`https://api5.siliconpin.com${wn.image.url}`" aspect-ratio="1.75">
<span v-text="wn.text_over_image" class="text_over_image"></span>
</v-img>
<div class="pa-4">
<p>On : <span >{{wn.created_at.slice(0,10)}} ,</span>
at : <span >{{wn.created_at.slice(11,-5)}} </span></p>
<div>
<h3 class="headline mb-0" v-text="wn.title"></h3>
</div>
</div>
</v-card>
</nuxt-link>
</v-flex>
</v-layout>
<v-layout row wrap>
<v-flex v-for="wn in nationalNews" :key="nationalNews.slug" xs6 md6 lg3>
<nuxt-link :to="`/en/${wn.slug}`">
<v-card class="mx-2 mt-8">
<v-img :src="`https://api5.siliconpin.com${wn.image.url}`" aspect-ratio="1.75">
<span v-text="wn.text_over_image" class="text_over_image"></span>
</v-img>
<div class="pa-4">
<p>On : <span >{{wn.created_at.slice(0,10)}} ,</span>
at : <span >{{wn.created_at.slice(11,-5)}} </span></p>
<div>
<h3 class="headline mb-0" v-text="wn.title"></h3>
</div>
</div>
</v-card>
</nuxt-link>
</v-flex>
</v-layout>
<v-layout row wrap>
<v-flex v-for="wn in localNews" :key="localNews.slug" xs6 md6 lg3>
<nuxt-link :to="`/en/${wn.slug}`">
<v-card class="mx-2 mt-8">
<v-img :src="`https://api5.siliconpin.com${wn.image.url}`" aspect-ratio="1.75">
<span v-text="wn.text_over_image" class="text_over_image"></span>
</v-img>
<div class="pa-4">
<p>On : <span >{{wn.created_at.slice(0,10)}} ,</span>
at : <span >{{wn.created_at.slice(11,-5)}} </span></p>
<div>
<h3 class="headline mb-0" v-text="wn.title"></h3>
</div>
</div>
</v-card>
</nuxt-link>
</v-flex>
</v-layout>
<v-layout row wrap>
<v-flex v-for="vn in videoNews" :key="videoNews.id" xs6 md6 lg3>
<v-card width="95%">
<lite-youtube v-bind:videoid="`${vn.content}`"
params="controls=0&start=10&end=30&modestbranding=2&rel=0&enablejsapi=1" />
<v-card-title primary-title>
<div>
<h3 class="headline mb-0" v-text="vn.title"></h3>
</div>
</v-card-title>
</v-card>
</v-flex>
</v-layout>
</v-container>
</template>
<script>
export default {
layout: 'en',
async asyncData({ $axios, $config }) {
let worldNews = await $axios.$get(`/bartas/?category=world&lang=en&_sort=id:DESC&_limit=8`)
let nationalNews = await $axios.$get(`/bartas/?category=national&lang=en&_sort=id:DESC&_limit=8`)
let localNews = await $axios.$get(`/bartas/?category=local&lang=en&_sort=id:DESC&_limit=8`)
// let articleNews = await $axios.$get(`/bartas/?category=article&_sort=id:DESC&_limit=4`)
// let editorialNews = await $axios.$get(`/bartas/?category=editorial&_sort=id:DESC&_limit=4`)
let videoNews = await $axios.$get(`/bartas/?category=video&lang=en&_sort=id:DESC&_limit=8`)
//_ne:category=video&
// let latestNews = await $axios.$get(`/bartas/?_sort=id:DESC&_limit=40&category=:video`)
// need to create the json / var first
// if(worldNews.length < 1) { worldNews[0].image.url="", worldNews[0].slug="404", worldNews[0].slug="not found";}
// if(nationalNews.length < 1) { nationalNews[0].image.url="", nationalNews[0].slug="404", nationalNews[0].slug="not found";}
// if(localNews.length < 1) { localNews[0].image.url="", localNews[0].slug="404", localNews[0].slug="not found";}
// if(articleNews.length < 1) { articleNews[0].image.url="", articleNews[0].slug="404", articleNews[0].slug="not found";}
// if(editorialNews.length < 1) { editorialNews[0].image.url="", editorialNews[0].slug="404", editorialNews[0].slug="not found";}
// if(videoNews.length < 1) { videoNews[0].image.url="", videoNews[0].slug="404", videoNews[0].slug="not found";}
worldNews = JSON.parse(JSON.stringify(worldNews).replace(/\:null/gi, "\:\"\""));
nationalNews = JSON.parse(JSON.stringify(nationalNews).replace(/\:null/gi, "\:\"\""));
localNews = JSON.parse(JSON.stringify(localNews).replace(/\:null/gi, "\:\"\""));
// articleNews = JSON.parse(JSON.stringify(articleNews).replace(/\:null/gi, "\:\"\""));
// editorialNews = JSON.parse(JSON.stringify(editorialNews).replace(/\:null/gi, "\:\"\""));
videoNews = JSON.parse(JSON.stringify(videoNews).replace(/\:null/gi, "\:\"\""));
// latestNews = JSON.parse(JSON.stringify(latestNews).replace(/\:null/gi, "\:\"\""));
return { worldNews, nationalNews, localNews, videoNews }
},
head() {
return {
title: "barta-india.in news with views",
meta: [
// hid is used as unique identifier. Do not use `vmid` for it as it will not work
{
hid: 'description',
name: 'description',
content: "local news, national and international news with our views."
},
{
hid: 'og:description',
name: 'og:description',
content: "local news, national and international news with our views."
},
{
hid: 'og:title',
name: 'og:title',
content: "barta-india.in news with views"
},
{
hid: 'og:url',
name: 'og:url',
content: 'https://barta-india.in/'
},
{
hid: 'og:image',
name: 'og:image',
content: 'https://barta-india.in/icon.png'
},
{
hid: 'og:image:secure_url',
name: 'og:image:secure_url',
content: 'https://barta-india.in/icon.png'
},
{
hid: 'og:type',
name: 'og:type',
content: 'News list'
}
]
}
}
}
</script>
<style scoped>
</style>

597
pages/index.vue Normal file
View File

@ -0,0 +1,597 @@
<template>
<p v-if="$fetchState.pending">Fetching news...</p>
<p v-else-if="$fetchState.error">Error while fetching news</p>
<div v-else>
<v-container>
<div>
<template>
<div>
<v-row>
<v-col class="mb-4" cols="12" md="6" sm="12" lg="6">
<v-card color="" class="pb-16">
<h1 class=" ml-1">Latest News</h1>
<!-- first bengali news link -->
<!-- world news input here -->
<nuxt-link :to="`/${latestNews[0].slug}`">
<v-card flat outlined class="mb-4 mx-1 pa-2">
<v-img :src="`https://api5.siliconpin.com${latestNews[0].image.url}`" aspect-ratio="1.75"> <span
v-text="latestNews[0].text_over_image" class="text_over_image"> </span>
</v-img>
<p primary-title class="text-lg-h6 text-sm-h6">
{{ latestNews[0].title }}
<!-- <v-text class="text-lg-h4 text-sm-h5">{{latestNews[0].title}}</v-text> -->
</p>
<span>Publish on : {{ latestNews[0].created_at.slice(0, 10) }}, </span>
<span>at : {{ latestNews[0].created_at.slice(11, -5) }} </span>
</v-card>
</nuxt-link>
<!-- bengali news -->
<v-row>
<v-col>
<!-- news img -->
<nuxt-link :to="`/${latestNews[1].slug}`">
<v-card flat outlined class="mx-1">
<v-row>
<v-col>
<p primary-title class="text-lg-h6 text-sm-h6">
{{ latestNews[1].title }}
<!-- <v-text class="text-lg-h4 text-sm-h5">{{latestNews[1].title}}</v-text> -->
</p>
<span>Published on: {{ latestNews[1].created_at.slice(0, 10) }}, </span><br>
<span>at: {{ latestNews[1].created_at.slice(11, -5) }} </span>
</v-col>
<v-col>
<v-img :src="`https://api5.siliconpin.com${latestNews[1].image.url}`" aspect-ratio="1.75">
<span v-text="latestNews[1].text_over_image" class="text_over_image"></span>
</v-img>
</v-col>
</v-row>
</v-card>
</nuxt-link>
</v-col>
</v-row>
<v-row>
<v-col>
<!-- news img -->
<nuxt-link :to="`/${latestNews[2].slug}`">
<v-card flat outlined class="mx-1">
<v-row>
<v-col>
<p primary-title class="text-lg-h6 text-sm-h6">
{{ latestNews[2].title }}
<!-- <v-text class="text-lg-h4 text-sm-h5">{{latestNews[2].title}}</v-text> -->
</p>
<span>Published on: {{ latestNews[2].created_at.slice(0, 10) }}, </span><br> <span>at: {{ latestNews[2].created_at.slice(11, -5) }} </span>
</v-col>
<v-col>
<v-img :src="`https://api5.siliconpin.com${latestNews[2].image.url}`" aspect-ratio="1.75">
<span v-text="latestNews[2].text_over_image" class="text_over_image"></span>
</v-img>
</v-col>
</v-row>
</v-card>
</nuxt-link>
</v-col>
</v-row>
<v-row>
<v-col>
<!-- news img -->
<nuxt-link :to="`/${latestNews[3].slug}`">
<v-card flat outlined class="mx-1">
<v-row>
<v-col>
<p primary-title class="text-lg-h6 text-sm-h6">
{{ latestNews[3].title }}
<!-- <v-text class="text-lg-h4 text-sm-h5">{{latestNews[3].title}}</v-text> -->
</p>
<span>Published on: {{ latestNews[3].created_at.slice(0, 10) }}, </span><br> <span>at: {{ latestNews[3].created_at.slice(11, -5) }} </span>
</v-col>
<v-col>
<v-img :src="`https://api5.siliconpin.com${latestNews[3].image.url}`" aspect-ratio="1.75">
<span v-text="latestNews[3].text_over_image" class="text_over_image"></span>
</v-img>
</v-col>
</v-row>
</v-card>
<!-- nuyfncfuifhc rhc
nuimwcheucm
cuiyhmtc -->
</nuxt-link>
</v-col>
</v-row>
</v-card>
</v-col>
<v-col cols="12" md="6" sm="12" lg="6">
<v-card color="" class="pb-12">
<h1 class=" ml-1">Latest Videos</h1>
<v-card flat outlined class="mx-1 mb-2 pa-2">
<lite-youtube v-bind:videoid="`${videoNews[0].content}`"
params="controls=0&start=10&end=30&modestbranding=2&rel=0&enablejsapi=1" />
<div>
<p class="text-lg-h6 text-sm-h6" v-text="videoNews[0].title"></p>
<span>Published on : {{ videoNews[0].created_at.slice(0, 10) }}, </span>
<span>at : {{ videoNews[0].created_at.slice(11, -5) }} </span> <a
:href="`https://youtu.be/${videoNews[0].content}`">
<v-btn color="error"> </v-btn>
</a>
</div>
</v-card>
<div>
<v-card flat outlined class="mx-1 mb-2 pa-2">
<v-row>
<v-col>
<div>
<p class="text-lg-h6 text-sm-h6" v-text="videoNews[1].title"></p>
<span>Published on : {{ videoNews[1].created_at.slice(0, 10) }}, </span><br> <span>at : {{ videoNews[1].created_at.slice(11, -5) }} </span> <a
:href="`https://youtu.be/${videoNews[1].content}`">
<v-btn color="error"> </v-btn>
</a>
</div>
</v-col>
<v-col>
<lite-youtube v-bind:videoid="`${videoNews[1].content}`"
params="controls=0&start=10&end=30&modestbranding=2&rel=0&enablejsapi=1" />
</v-col>
</v-row>
</v-card>
</div>
<div>
<v-card flat outlined class="mx-1 mb-2 pa-2">
<v-row>
<v-col>
<div>
<p class="text-lg-h6 text-sm-h6" v-text="videoNews[2].title"></p>
<span>Published on : {{ videoNews[2].created_at.slice(0, 10) }}, </span><br>
<span>at : {{ videoNews[2].created_at.slice(11, -5) }} </span> <a
:href="`https://youtu.be/${videoNews[2].content}`">
<v-btn color="error"> </v-btn>
</a>
</div>
</v-col>
<v-col>
<lite-youtube v-bind:videoid="`${videoNews[2].content}`"
params="controls=0&start=10&end=30&modestbranding=2&rel=0&enablejsapi=1" />
<p primary-title>
</p>
</v-col>
</v-row>
</v-card>
</div>
<div>
<v-card flat outlined class="mx-1 mb-2 pa-2">
<v-row>
<v-col>
<div>
<p class="text-lg-h6 text-sm-h6" v-text="videoNews[3].title"></p>
<span>Published on : {{ videoNews[3].created_at.slice(0, 10) }}, </span><br>
<span>at : {{ videoNews[3].created_at.slice(11, -5) }} </span> <a
:href="`https://youtu.be/${videoNews[3].content}`">
<v-btn color="error"> </v-btn>
</a>
</div>
</v-col>
<v-col>
<lite-youtube v-bind:videoid="`${videoNews[3].content}`"
params="controls=0&start=10&end=30&modestbranding=2&rel=0&enablejsapi=1" />
<p primary-title>
</p>
</v-col>
</v-row>
</v-card>
</div>
</v-card>
</v-col>
</v-row>
</div>
</template>
<template>
<div>
<h1 class=" ml-1">Popular News</h1>
</div>
<v-sheet color="" class="mx-auto">
<v-slide-group class="mb-14 py-10">
<v-slide-item>
<nuxt-link :to="`/${latestNews[4].slug}`">
<v-card width="400" flat outlined class="mx-1 pa-2">
<v-img :src="`https://api5.siliconpin.com${latestNews[4].image.url}`" aspect-ratio="1.75">
<span v-text="latestNews[4].text_over_image" class="text_over_image"></span>
</v-img>
<p primary-title class="text-lg-h6 text-sm-h6">
<span>On : {{ latestNews[4].created_at.slice(0, 10) }},</span>
<span>at : {{ latestNews[4].created_at.slice(11,-5) }}</span>
<br>
{{ latestNews[4].title }}
<!-- <v-text class="text-lg-h4 text-sm-h5">{{latestNews[4].title}}</v-text> -->
</p>
</v-card>
</nuxt-link>
</v-slide-item>
<v-slide-item>
<nuxt-link :to="`/${latestNews[5].slug}`">
<v-card width="400" flat outlined class="mx-1 pa-2">
<v-img :src="`https://api5.siliconpin.com${latestNews[5].image.url}`" aspect-ratio="1.75">
<span v-text="latestNews[5].text_over_image" class="text_over_image"></span>
</v-img>
<p primary-title class="text-lg-h6 text-sm-h6"> <span>On : {{ latestNews[5].created_at.slice(0, 10) }},</span>
<span>at : {{ latestNews[5].created_at.slice(11,-5) }}</span><br>
{{ latestNews[5].title }}
<!-- <v-text class="text-lg-h4 text-sm-h5">{{latestNews[5].title}}</v-text> -->
</p>
</v-card>
</nuxt-link>
</v-slide-item>
<v-slide-item>
<nuxt-link :to="`/${latestNews[6].slug}`">
<v-card width="400" flat outlined class="mx-1 pa-2">
<v-img :src="`https://api5.siliconpin.com${latestNews[6].image.url}`" aspect-ratio="1.75">
<span v-text="latestNews[6].text_over_image" class="text_over_image"></span>
</v-img>
<p primary-title class="text-lg-h6 text-sm-h6"> <span>On : {{ latestNews[6].created_at.slice(0, 10) }},</span>
<span>at : {{ latestNews[6].created_at.slice(11,-5) }}</span><br>
{{ latestNews[6].title }}
<!-- <v-text class="text-lg-h4 text-sm-h5">{{latestNews[6].title}}</v-text> -->
</p>
</v-card>
</nuxt-link>
</v-slide-item>
<v-slide-item>
<nuxt-link :to="`/${latestNews[7].slug}`">
<v-card width="400" flat outlined class="mx-1 pa-2">
<v-img :src="`https://api5.siliconpin.com${latestNews[7].image.url}`" aspect-ratio="1.75">
<span v-text="latestNews[7].text_over_image" class="text_over_image"></span>
</v-img>
<p primary-title class="text-lg-h6 text-sm-h6"> <span>On : {{ latestNews[7].created_at.slice(0, 10) }},</span>
<span>at : {{ latestNews[7].created_at.slice(11,-5) }}</span><br>
{{ latestNews[7].title }}
<!-- <v-text class="text-lg-h4 text-sm-h5">{{latestNews[7].title}}</v-text> -->
</p>
</v-card>
</nuxt-link>
</v-slide-item>
<v-slide-item>
<nuxt-link :to="`/${latestNews[8].slug}`">
<v-card width="400" flat outlined class="mx-1 pa-2">
<v-img :src="`https://api5.siliconpin.com${latestNews[8].image.url}`" aspect-ratio="1.75">
<span v-text="latestNews[8].text_over_image" class="text_over_image"></span>
</v-img>
<p primary-title class="text-lg-h6 text-sm-h6"> <span>On : {{ latestNews[8].created_at.slice(0, 10) }},</span>
<span>at : {{ latestNews[8].created_at.slice(11,-5) }}</span><br>
{{ latestNews[8].title }}
<!-- <v-text class="text-lg-h4 text-sm-h5">{{latestNews[8].title}}</v-text> -->
</p>
</v-card>
</nuxt-link>
</v-slide-item>
<v-slide-item>
<nuxt-link :to="`/${latestNews[9].slug}`">
<v-card width="400" flat outlined class="mx-1 pa-2">
<v-img :src="`https://api5.siliconpin.com${latestNews[9].image.url}`" aspect-ratio="1.75">
<span v-text="latestNews[9].text_over_image" class="text_over_image"></span>
</v-img>
<p primary-title class="text-lg-h6 text-sm-h6"><span>On : {{ latestNews[9].created_at.slice(0, 10) }},</span>
<span>at : {{ latestNews[9].created_at.slice(11,-5) }}</span><br>
{{ latestNews[9].title }}
</p>
</v-card>
</nuxt-link>
</v-slide-item>
<v-slide-item>
<nuxt-link :to="`/${latestNews[10].slug}`">
<v-card width="400" flat outlined class="mx-1 pa-2">
<v-img :src="`https://api5.siliconpin.com${latestNews[10].image.url}`" aspect-ratio="1.75">
<span v-text="latestNews[10].text_over_image" class="text_over_image"></span>
</v-img>
<p primary-title class="text-lg-h6 text-sm-h6"> <span>On : {{ latestNews[10].created_at.slice(0, 10) }},</span>
<span>at : {{ latestNews[10].created_at.slice(11,-5) }}</span><br>
{{ latestNews[10].title }}
</p>
</v-card>
</nuxt-link>
</v-slide-item>
</v-slide-group>
</v-sheet>
<div>
<h1 class=" ml-1">Popular Videos</h1>
</div>
<v-sheet color="" class="mx-auto">
<v-slide-group class="mb-14 py-10">
<v-slide-item>
<v-card flat width="400" outlined class="mx-1 mb-2 pa-2">
<lite-youtube v-bind:videoid="`${videoNews[4].content}`"
params="controls=0&start=10&end=30&modestbranding=2&rel=0&enablejsapi=1" />
<p primary-title>
<span>On : {{ videoNews[4].created_at.slice(0, 10) }},</span>
<span>at : {{ videoNews[4].created_at.slice(11,-5) }}</span>
<br>
<div>
<h3 class="headline mb-0" v-text="videoNews[4].title"></h3>
</div>
</p>
<a :href="`https://youtu.be/${videoNews[4].content}`">
<v-btn color="error"> </v-btn>
</a>
</v-card>
</v-slide-item>
<v-slide-item>
<v-card flat width="400" outlined class="mx-1 mb-2 pa-2">
<lite-youtube v-bind:videoid="`${videoNews[2].content}`"
params="controls=0&start=10&end=30&modestbranding=2&rel=0&enablejsapi=1" />
<p primary-title>
<span>On : {{ videoNews[2].created_at.slice(0, 10) }},</span>
<span>at : {{ videoNews[2].created_at.slice(11,-5) }}</span><br>
<div>
<h3 class="headline mb-0" v-text="videoNews[2].title"></h3>
</div>
</p>
<a :href="`https://youtu.be/${videoNews[2].content}`">
<v-btn color="error"> </v-btn>
</a>
</v-card>
</v-slide-item>
<v-slide-item>
<v-card flat width="400" outlined class="mx-1 mb-2 pa-2">
<lite-youtube v-bind:videoid="`${videoNews[0].content}`"
params="controls=0&start=10&end=30&modestbranding=2&rel=0&enablejsapi=1" />
<p primary-title>
<span>On : {{ videoNews[0].created_at.slice(0, 10) }},</span>
<span>at : {{ videoNews[0].created_at.slice(11,-5) }}</span><br>
<div>
<h3 class="headline mb-0" v-text="videoNews[0].title"></h3>
</div>
</p>
<a :href="`https://youtu.be/${videoNews[0].content}`">
<v-btn color="error"> </v-btn>
</a>
</v-card>
</v-slide-item>
<v-slide-item>
<v-card flat width="400" outlined class="mx-1 mb-2 pa-2">
<lite-youtube v-bind:videoid="`${videoNews[1].content}`"
params="controls=0&start=10&end=30&modestbranding=2&rel=0&enablejsapi=1" />
<p primary-title>
<span>On : {{ videoNews[1].created_at.slice(0, 10) }},</span>
<span>at : {{ videoNews[1].created_at.slice(11,-5) }}</span><br>
<div>
<h3 class="headline mb-0" v-text="videoNews[1].title"></h3>
</div>
</p>
<a :href="`https://youtu.be/${videoNews[1].content}`">
<v-btn color="error"> </v-btn>
</a>
</v-card>
</v-slide-item>
<v-slide-item>
<v-card flat width="400" outlined class="mx-1 mb-2 pa-2">
<lite-youtube v-bind:videoid="`${videoNews[0].content}`"
params="controls=0&start=10&end=30&modestbranding=2&rel=0&enablejsapi=1" />
<p primary-title>
<span>On : {{ videoNews[0].created_at.slice(0, 10) }},</span>
<span>at : {{ videoNews[0].created_at.slice(11,-5) }}</span><br>
<div>
<h3 class="headline mb-0" v-text="videoNews[0].title"></h3>
</div>
</p>
<a v-if="videoNews[0].content" :href="`https://youtu.be/${videoNews[0].content}`">
<v-btn color="error"> </v-btn>
</a>
</v-card>
</v-slide-item>
</v-slide-group>
</v-sheet>
</template>
</div>
</v-container>
</div>
</template>
<script>
export default {
data() {
return {
posts: {},
videoNews: [],
latestNews: []
}
},
async fetch() {
// this.posts = await fetch(`https://jsonplaceholder.typicode.com/posts/${this.$route.name}`)
const post = await fetch(`https://api5.siliconpin.com/bartas/?lang=bn&_sort=id:DESC&_limit=160`).then((res) => res.json())
// console.log(post)
// async asyncData({ $axios, $config }) {
// // let worldNews = await $axios.$get(
// // `/bartas/?lang=bn&category=world&_sort=id:DESC&_limit=8`
// // );
// let barta = await $axios.$get(`/bartas/?lang=bn&_sort=id:DESC&_limit=30`)
// let nationalNews = await $axios.$get(
// `/bartas/?lang=bn&category=national&_sort=id:DESC&_limit=8`
// );
// let localNews = await $axios.$get(
// `/bartas/?lang=bn&category=local&_sort=id:DESC&_limit=8`
// let articleNews = await $axios.$get(`/bartas/?category=article&_sort=id:DESC&_limit=4`)
// let editorialNews = await $axios.$get(`/bartas/?category=editorial&_sort=id:DESC&_limit=4`)
// let videoNews = await $axios.$get(`/bartas/?lang=bn&category=video&_sort=id:DESC&_limit=5`)
//_ne:category=video&
// let latestNews = await $axios.$get(`/bartas/?_sort=id:DESC&_limit=40&category=:video`)
// need to create the json / var first
// if(worldNews.length < 1) { worldNews[0].image.url="", worldNews[0].slug="404", worldNews[0].slug="not found";}
// if(nationalNews.length < 1) { nationalNews[0].image.url="", nationalNews[0].slug="404", nationalNews[0].slug="not found";}
// if(localNews.length < 1) { localNews[0].image.url="", localNews[0].slug="404", localNews[0].slug="not found";}
// if(articleNews.length < 1) { articleNews[0].image.url="", articleNews[0].slug="404", articleNews[0].slug="not found";}
// if(editorialNews.length < 1) { editorialNews[0].image.url="", editorialNews[0].slug="404", editorialNews[0].slug="not found";}
// if(videoNews.length < 1) { videoNews[0].image.url="", videoNews[0].slug="404", videoNews[0].slug="not found";}
// worldNews = JSON.parse(
// JSON.stringify(worldNews).replace(/\:null/gi, '\:""')
// );
// nationalNews = JSON.parse(
// JSON.stringify(nationalNews).replace(/\:null/gi, '\:""')
// );
// localNews = JSON.parse(
// JSON.stringify(localNews).replace(/\:null/gi, '\:""')
// );
// articleNews = JSON.parse(JSON.stringify(articleNews).replace(/\:null/gi, "\:\"\""));
// editorialNews = JSON.parse(JSON.stringify(editorialNews).replace(/\:null/gi, "\:\"\""));
let video = post.filter(item => { if (item.category == "video") return item }); //console.log(video)
video = JSON.parse(JSON.stringify(video).replace(/\:null/gi, "\:\"\""));
this.videoNews = video;
let latest = post.filter(item => { if (item.category != "video") return item });
latest = JSON.parse(JSON.stringify(latest).replace(/\:null/gi, "\:\"\""));
this.latestNews = latest;
// return { videoNews, latestNews };
},
// fetchOnServer: false,
head() {
return {
title: "barta-india.in news with views",
meta: [
// hid is used as unique identifier. Do not use `vmid` for it as it will not work
{
hid: "description",
name: "description",
content:
"local news, national and international news with our views.",
},
{
hid: "og:description",
name: "og:description",
content:
"local news, national and international news with our views.",
},
{
hid: "og:title",
name: "og:title",
content: "barta-india.in news with views",
},
{
hid: "og:url",
name: "og:url",
content: "https://barta-india.in/",
},
{
hid: "og:image",
name: "og:image",
content: "https://barta-india.in/icon.png",
},
{
hid: "og:image:secure_url",
name: "og:image:secure_url",
content: "https://barta-india.in/icon.png",
},
{
hid: "og:type",
name: "og:type",
content: "News list",
},
],
};
},
};
</script>
<style scoped>
</style>

86
pages/privacy.vue Normal file
View File

@ -0,0 +1,86 @@
<template>
<v-container>
<h1>Privacy Policy for barta</h1>
<p>At barta-india, accessible from www.barta-india.in, one of our main priorities is the privacy of our visitors. This Privacy Policy document contains types of information that is collected and recorded by barta-india and how we use it.</p>
<p>If you have additional questions or require more information about our Privacy Policy, do not hesitate to contact us.</p>
<p>This Privacy Policy applies only to our online activities and is valid for visitors to our website with regards to the information that they shared and/or collect in barta-india. This policy is not applicable to any information collected offline or via channels other than this website. .</p>
<h2>Consent</h2>
<p>By using our website, you hereby consent to our Privacy Policy and agree to its terms.</p>
<h2>Information we collect</h2>
<p>The personal information that you are asked to provide, and the reasons why you are asked to provide it, will be made clear to you at the point we ask you to provide your personal information.</p>
<p>If you contact us directly, we may receive additional information about you such as your name, email address, phone number, the contents of the message and/or attachments you may send us, and any other information you may choose to provide.</p>
<p>When you register for an Account, we may ask for your contact information, including items such as name, company name, address, email address, and telephone number.</p>
<h2>How we use your information</h2>
<p>We use the information we collect in various ways, including to:</p>
<ul>
<li>Provide, operate, and maintain our website</li>
<li>Improve, personalize, and expand our website</li>
<li>Understand and analyze how you use our website</li>
<li>Develop new products, services, features, and functionality</li>
<li>Communicate with you, either directly or through one of our partners, including for customer service, to provide you with updates and other information relating to the website, and for marketing and promotional purposes</li>
<li>Send you emails</li>
<li>Find and prevent fraud</li>
</ul>
<h2>Log Files</h2>
<p>barta-india follows a standard procedure of using log files. These files log visitors when they visit websites. All hosting companies do this and a part of hosting services' analytics. The information collected by log files include internet protocol (IP) addresses, browser type, Internet Service Provider (ISP), date and time stamp, referring/exit pages, and possibly the number of clicks. These are not linked to any information that is personally identifiable. The purpose of the information is for analyzing trends, administering the site, tracking users' movement on the website, and gathering demographic information.</p>
<h2>Cookies and Web Beacons</h2>
<p>Like any other website, barta-india uses 'cookies'. These cookies are used to store information including visitors' preferences, and the pages on the website that the visitor accessed or visited. The information is used to optimize the users' experience by customizing our web page content based on visitors' browser type and/or other information.</p>
<p>For more general information on cookies, please read <a href="https://www.generateprivacypolicy.com/#cookies">the Cookies article on Generate Privacy Policy website</a>.</p>
<h2>Advertising Partners Privacy Policies</h2>
<P>You may consult this list to find the Privacy Policy for each of the advertising partners of barta-india.</p>
<p>Third-party ad servers or ad networks uses technologies like cookies, JavaScript, or Web Beacons that are used in their respective advertisements and links that appear on barta-india, which are sent directly to users' browser. They automatically receive your IP address when this occurs. These technologies are used to measure the effectiveness of their advertising campaigns and/or to personalize the advertising content that you see on websites that you visit.</p>
<p>Note that barta-india has no access to or control over these cookies that are used by third-party advertisers.</p>
<h2>Third Party Privacy Policies</h2>
<p>barta-india's Privacy Policy does not apply to other advertisers or websites. Thus, we are advising you to consult the respective Privacy Policies of these third-party ad servers for more detailed information. It may include their practices and instructions about how to opt-out of certain options. </p>
<p>You can choose to disable cookies through your individual browser options. To know more detailed information about cookie management with specific web browsers, it can be found at the browsers' respective websites.</p>
<h2>CCPA Privacy Rights (Do Not Sell My Personal Information)</h2>
<p>Under the CCPA, among other rights, California consumers have the right to:</p>
<p>Request that a business that collects a consumer's personal data disclose the categories and specific pieces of personal data that a business has collected about consumers.</p>
<p>Request that a business delete any personal data about the consumer that a business has collected.</p>
<p>Request that a business that sells a consumer's personal data, not sell the consumer's personal data.</p>
<p>If you make a request, we have one month to respond to you. If you would like to exercise any of these rights, please contact us.</p>
<h2>GDPR Data Protection Rights</h2>
<p>We would like to make sure you are fully aware of all of your data protection rights. Every user is entitled to the following:</p>
<p>The right to access You have the right to request copies of your personal data. We may charge you a small fee for this service.</p>
<p>The right to rectification You have the right to request that we correct any information you believe is inaccurate. You also have the right to request that we complete the information you believe is incomplete.</p>
<p>The right to erasure You have the right to request that we erase your personal data, under certain conditions.</p>
<p>The right to restrict processing You have the right to request that we restrict the processing of your personal data, under certain conditions.</p>
<p>The right to object to processing You have the right to object to our processing of your personal data, under certain conditions.</p>
<p>The right to data portability You have the right to request that we transfer the data that we have collected to another organization, or directly to you, under certain conditions.</p>
<p>If you make a request, we have one month to respond to you. If you would like to exercise any of these rights, please contact us.</p>
<h2>Children's Information</h2>
<p>Another part of our priority is adding protection for children while using the internet. We encourage parents and guardians to observe, participate in, and/or monitor and guide their online activity.</p>
<p>barta-india does not knowingly collect any Personal Identifiable Information from children under the age of 13. If you think that your child provided this kind of information on our website, we strongly encourage you to contact us immediately and we will do our best efforts to promptly remove such information from our records.</p>
</v-container>
</template>

50
pages/test.vue Normal file
View File

@ -0,0 +1,50 @@
<template>
<div>
<h2>fk</h2>
<!-- <button @click="$fetch">Refresh</button> -->
</div>
</template>
<script>
export default {
data() {
return {
posts: []
}
},
// async fetch() {
// const post = await fetch(`https://jsonplaceholder.typicode.com/posts/${this.$route.name}`)
// .then((res) => res.json())
// console.log(post)
// if (post.id === this.$route.params.id) {
// this.post = post
// } else {
// // set status code on server and
// if (process.server) {
// this.$nuxt.context.res.statusCode = 404
// }
// // use throw new Error()
// throw new Error('Post not found')
// }
// }
async fetch() {
this.posts = await this.$http.$get('https://api.nuxtjs.dev/posts')
console.log(posts)
},
fetchOnServer: false,
// multiple components can return the same `fetchKey` and Nuxt will track them both separately
fetchKey: 'site-sidebar',
// alternatively, for more control, a function can be passed with access to the component instance
// It will be called in `created` and must not depend on fetched data
fetchKey(getCounter) {
// getCounter is a method that can be called to get the next number in a sequence
// as part of generating a unique fetchKey.
return this.someOtherData + getCounter('sidebar')
}
}
</script>
<style lang="scss" scoped></style>

View File

@ -0,0 +1 @@
import 'lite-youtube-embed'

7
static/.htaccess Normal file
View File

@ -0,0 +1,7 @@
RewriteCond %{HTTPS} !=on
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301,NE]
RewriteCond %{HTTP_HOST} ^www\.(.+)$ [NC]
RewriteRule ^(.*)$ https://%1/$1 [R=301,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*) /

BIN
static/1.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

BIN
static/2.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

BIN
static/3.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 45 KiB

BIN
static/4.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

BIN
static/5.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.6 KiB

BIN
static/favicon.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

BIN
static/header-img-en.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

BIN
static/header-img.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 95 KiB

BIN
static/icon.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

BIN
static/icon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

10
store/README.md Normal file
View File

@ -0,0 +1,10 @@
# STORE
**This directory is not required, you can delete it if you don't want to use it.**
This directory contains your Vuex Store files.
Vuex Store option is implemented in the Nuxt.js framework.
Creating a file in this directory automatically activates the option in the framework.
More information about the usage of this directory in [the documentation](https://nuxtjs.org/guide/vuex-store).

9448
yarn.lock Normal file

File diff suppressed because it is too large Load Diff