var $$ = Dom7;

var app = new Framework7({

  root: '#app', // App root element

  id: 'com.a1.news',

  el: '#app',

  name: 'Framework7', // App name

  theme: 'ios',

  routes: routes,

});

const config = {

  storage_key: 'a1n3s'

};

let ar = {

  'lang': [{"code":"id","lang":"Indonesia"},{"code":"en","lang":"English"}],

  'sex': {1:'Laki-laki',2:'Perempuan'},

  'gelar': {1:'Tuan',2:'Nyonya',3:'Nona',4:'Anak'},

  'interest': ['Analisis','Banking','Bisnis','Bursa','Business','Digital','Economics','Economy','Ekbis','Ekonomi','Energi','Enterpreneurship','Entrepreneur','Finance','Finansial','Fintech','Global','Industri','Infrastruktur','Investasi','Keuangan','Loker','Makro','Market','Moneter','Money','Opini','Pangan','Peluangusaha','Perencanaan','Personalfinance','Properti','Research','Riil','Sawit','Sustainability','Syariah','Teknologi','Valas']

};

//console.log(ar.interest)

function checkConnection(url) {}

var auth_data_member = get_localstorage('member');

if(auth_data_member.status==true) {

  console.log(auth_data_member.status)

  document.getElementById('toolbar_bottom').style.display = 'block';

  let dt=auth_data_member.data;

  //console.log(dt) 

  console.log('is logged')

  account_image_reload();

  $("#user_name").html(dt.nama_member); 

  $("#user_subtitle").html(dt.email); 

  home_latest();

  tab_content_channel();

  tab_content_category();

  tab_content_who();

  home_site();

  home_section();

  home_who();

} else {

  //document.getElementById('signout').style.display = 'none'; 

  document.getElementById('toolbar_bottom').style.display = 'none'; 

  console.log('not logged')

  app.views.main.router.navigate('/signin/');

}



var dl = get_localstorage('lang');

if(dl.status==true) {

  let lang=dl.data;

  console.log(lang);

  lang_change(lang)

} else {

  let lang='id';

  console.log(lang);

  lang_change(lang)

}