DMV Ethiopian Directory — DC • MD • VA
◀︎ Back
Next ▶︎
የቦ ኮሚኒኬሽን ኔት ወርክ ፣ ለ25 አመታት በላይ የስራ ልምድ ያካበተው የእናንተው በእናንተው። ከምሰጣቸው አገልግሎቶች ውስጥ የውክልና አገልጎት መስጠት የኢትዮጵያ ፓስፖርት አገልጎት መስጠት የቢጫ ካርድ የማውጣት አገልጎት የታክስ አገልጎት መስጠት (የትም የኢትዮጵያ ግዛት ይኑሩ) የጉዞ ወኪል የትርጉም ስራ አገልጎት ለበለጠ መረጃ በስልክ ቁጥር 619-255-5530 ይደውሉ።`;
const AMAZON_TAG = "yebbo-20";
/* ---------- RENDER ---------- */
const slider = document.getElementById('slider');
const dots = document.getElementById('dots');
let filtered = [...DATA];
let index = 0, timer = null;
function amazonBox(name){
const kw = encodeURIComponent(`Ethiopian ${name} coffee spice injera`);
const url = `https://www.amazon.com/s?k=${kw}&tag=${AMAZON_TAG}`;
return `
Shop Ethiopian essentials on Amazon
This uses Amazon affiliate tag: ${AMAZON_TAG}
`;
}
function slideTemplate(item, first=false){
const sTel = item.phone ? item.phone.replace(/[^+0-9]/g,'') : "";
return `
Details
Category
${item.cat}
Phone
${item.phone || '—'}
Address
${item.address || '—'}
Hours
${item.hours || 'Varies / call'}
City/State
${[item.city,item.state].filter(Boolean).join(', ')}
Website
${sTel ? `
Call `:''}
${item.address ? `
Map `:''}
${item.url ? `
Website `:''}
Sponsored / Info
${amazonBox(item.name)}
${AMHARIC_PROMO}
`;
}
function render(){
slider.innerHTML = filtered.map((it,i)=>slideTemplate(it,i===0)).join('');
dots.innerHTML = filtered.map((_,i)=>`
`).join('');
index = 0; sync();
}
function sync(){
document.querySelectorAll('.slide').forEach((s,i)=>s.classList.toggle('active', i===index));
document.querySelectorAll('.dot').forEach((d,i)=>d.classList.toggle('active', i===index));
}
function go(i){ const N = filtered.length; index=(i+N)%N; sync(); }
function stop(){ if(timer){clearInterval(timer); timer=null;} }
function autoplayStart(){ stop(); timer=setInterval(()=>go(index+1), 8000); }
document.getElementById('prev').addEventListener('click', ()=>go(index-1));
document.getElementById('next').addEventListener('click', ()=>go(index+1));
document.getElementById('applyFilter').addEventListener('click', ()=>{
const cat = document.getElementById('filterCategory').value;
const q = document.getElementById('searchBox').value.trim().toLowerCase();
filtered = DATA.filter(it=>{
const okCat = (cat==='all') || (it.cat===cat);
const hay = `${it.name} ${it.address||''} ${it.city||''} ${it.state||''}`.toLowerCase();
const okQ = !q || hay.includes(q);
return okCat && okQ;
});
if(!filtered.length){
filtered = [{cat:'Info',name:'No matches found',phone:'',address:'',hours:'',city:'',state:''}];
}
render();
});
document.getElementById('slider').addEventListener('mouseenter', stop);
document.getElementById('slider').addEventListener('mouseleave', autoplayStart);
dots.addEventListener('click', e=>{
const d = e.target.closest('.dot'); if(!d) return;
go(parseInt(d.dataset.i,10));
});
render();
autoplayStart();
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.