diff --git a/index.html b/index.html index f721730..0137444 100644 --- a/index.html +++ b/index.html @@ -57,7 +57,19 @@ body{font:15px/1.6 -apple-system,BlinkMacSystemFont,"Segoe UI",Inter,system-ui,s .feed-info{flex:1;min-width:0} .feed-title{font-weight:600;font-size:14px;line-height:1.3;margin-bottom:4px} .feed-title a{color:var(--text);text-decoration:none} -.feed-title a:hover{color:var(--cyan)} +.feed-title a:hover{color:var(--cyan);text-decoration:underline} +.feed-meta a.src-link{color:var(--blue);text-decoration:none;font-size:12px} +.feed-meta a.src-link:hover{text-decoration:underline} +.feed-item.clickable{cursor:pointer;transition:background .15s;border-radius:8px;margin:0 -8px;padding:12px 8px} +.feed-item.clickable:hover{background:rgba(0,229,255,.04)} +.tl-item.clickable{cursor:pointer;transition:background .15s;border-radius:8px;margin:0 -8px;padding:14px 8px} +.tl-item.clickable:hover{background:rgba(0,229,255,.04)} +.tl-text a{color:var(--text);text-decoration:none} +.tl-text a:hover{color:var(--cyan);text-decoration:underline} +.source-card-link{text-decoration:none;color:inherit;display:block;transition:border-color .15s,transform .15s} +.source-card-link:hover{border-color:var(--cyan)!important;transform:translateY(-2px)} +.feed-item a{z-index:2;position:relative} + .feed-meta{font-size:12px;color:var(--text-dim);display:flex;gap:12px} .sources-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px} .source-card{background:var(--bg);border:1px solid var(--border);border-radius:8px;padding:14px} @@ -273,20 +285,30 @@ const COMPANIES = [ const CATEGORIES = ['Экономика','Социальная сфера','Трудовые споры','Экология','Инфраструктура','Кадровые назначения','Финансы','Производство','Транспорт','Безопасность']; const NEWS_SOURCES = [ - {name:'Tengrinews',type:'news'},{name:'Zakon.kz',type:'news'},{name:'Informburo',type:'news'}, - {name:'Kapital.kz',type:'news'},{name:'Forbes Kazakhstan',type:'news'},{name:'Orda.kz',type:'news'}, - {name:'DKnews',type:'news'},{name:'Baigenews',type:'news'} + {name:'Tengrinews',type:'news',url:'https://tengrinews.kz'}, + {name:'Zakon.kz',type:'news',url:'https://www.zakon.kz'}, + {name:'Informburo',type:'news',url:'https://informburo.kz'}, + {name:'Kapital.kz',type:'news',url:'https://kapital.kz'}, + {name:'Forbes Kazakhstan',type:'news',url:'https://forbes.kz'}, + {name:'Orda.kz',type:'news',url:'https://orda.kz'}, + {name:'DKnews',type:'news',url:'https://dknews.kz'}, + {name:'Baigenews',type:'news',url:'https://baigenews.kz'} ]; const SOCIAL_SOURCES = [ - {name:'Telegram-каналы',type:'social'},{name:'Facebook',type:'social'}, - {name:'Instagram',type:'social'},{name:'X (Twitter)',type:'social'} + {name:'Telegram-каналы',type:'social',url:'https://t.me'}, + {name:'Facebook',type:'social',url:'https://facebook.com'}, + {name:'Instagram',type:'social',url:'https://instagram.com'}, + {name:'X (Twitter)',type:'social',url:'https://x.com'} ]; const GOV_SOURCES = [ - {name:'Самрук-Казына (оф. сайт)',type:'gov'},{name:'KASE (биржа)',type:'gov'}, - {name:'Правительство РК',type:'gov'},{name:'Минэнерго РК',type:'gov'}, - {name:'Минтранс РК',type:'gov'},{name:'Агентство по финмониторингу',type:'gov'} + {name:'Самрук-Казына (оф. сайт)',type:'gov',url:'https://sk.kz'}, + {name:'KASE (биржа)',type:'gov',url:'https://kase.kz'}, + {name:'Правительство РК',type:'gov',url:'https://www.gov.kz'}, + {name:'Минэнерго РК',type:'gov',url:'https://www.gov.kz/memleket/entities/energo'}, + {name:'Минтранс РК',type:'gov',url:'https://www.gov.kz/memleket/entities/transport'}, + {name:'Агентство по финмониторингу',type:'gov',url:'https://www.gov.kz/memleket/entities/afm'} ]; const ALL_SOURCES = [...NEWS_SOURCES,...SOCIAL_SOURCES,...GOV_SOURCES]; @@ -359,32 +381,39 @@ function typeLabel(type){ function renderAll(){ const feed=generateFeed(6); - document.getElementById('feedList').innerHTML=feed.map(f=>` -
+ document.getElementById('feedList').innerHTML=feed.map(f=>{ + const q=encodeURIComponent(f.company||'Самрук-Казына'); + const searchUrl='https://news.google.com/search?q='+q+'&hl=ru'; + const srcUrl=f.source.url||('https://news.google.com/search?q='+encodeURIComponent(f.source.name+' '+f.company)+'&hl=ru'); + return ` +
${srcIcon(f.type)}
-
${f.text}
-
${f.source.name}${f.time}${f.category}
+ +
${f.source.name}${f.time}${f.category}
-
`).join(''); +
`}).join(''); const tl=generateTimeline(12); - document.getElementById('timelineList').innerHTML=tl.map(f=>` -
+ document.getElementById('timelineList').innerHTML=tl.map(f=>{ + const q=encodeURIComponent(f.company||'Самрук-Казына'); + const searchUrl='https://news.google.com/search?q='+q+'&hl=ru'; + return ` +
${f.time}
-
${f.text}
+ ${typeLabel(f.type)}
-
`).join(''); +
`}).join(''); document.getElementById('sourcesGrid').innerHTML=ALL_SOURCES.map(s=>` -
+
${srcIcon(s.type)} ${s.name}
Активен
${r(5,50)}
-
`).join(''); + `).join(''); document.getElementById('stat24h').textContent=r(45,120); document.getElementById('stat24hChange').innerHTML='▲ '+r(5,25)+'%'; @@ -401,59 +430,74 @@ function renderAll(){ document.getElementById('statCompanies').textContent=COMPANIES.length; const newsFeed=generateFeed(10).filter(f=>f.type==='news'); - document.getElementById('newsTabContent').innerHTML=newsFeed.length?newsFeed.map(f=>` -
+ document.getElementById('newsTabContent').innerHTML=newsFeed.length?newsFeed.map(f=>{ + const q=encodeURIComponent(f.company||'Самрук-Казына'); + const searchUrl='https://news.google.com/search?q='+q+'&hl=ru'; + const srcUrl=f.source.url||'#'; + return ` +
📰
-
${f.text}
-
${f.source.name}${f.time}${f.category}
+ +
${f.source.name}${f.time}${f.category}
-
`).join(''):'
📭
Нет данных
'; +
`}).join(''):'
📭
Нет данных
'; const socFeed=generateFeed(10).filter(f=>f.type==='social'); - document.getElementById('socialTabContent').innerHTML=socFeed.length?socFeed.map(f=>` -
+ document.getElementById('socialTabContent').innerHTML=socFeed.length?socFeed.map(f=>{ + const q=encodeURIComponent(f.company||'Самрук-Казына'); + const searchUrl='https://news.google.com/search?q='+q+'&hl=ru'; + const srcUrl=f.source.url||'#'; + return ` +
-
${f.text}
-
${f.source.name}${f.time}${f.category}
+ +
${f.source.name}${f.time}${f.category}
-
`).join(''):'
📭
Нет данных
'; +
`}).join(''):'
📭
Нет данных
'; const govFeed=generateFeed(10).filter(f=>f.type==='gov'); - document.getElementById('officialTabContent').innerHTML=govFeed.length?govFeed.map(f=>` -
+ document.getElementById('officialTabContent').innerHTML=govFeed.length?govFeed.map(f=>{ + const q=encodeURIComponent(f.company||'Самрук-Казына'); + const searchUrl='https://news.google.com/search?q='+q+'&hl=ru'; + const srcUrl=f.source.url||'#'; + return ` +
🏛
-
${f.text}
-
${f.source.name}${f.time}${f.category}
+ +
${f.source.name}${f.time}${f.category}
-
`).join(''):'
📭
Нет данных
'; +
`}).join(''):'
📭
Нет данных
'; document.getElementById('analyticsTabContent').innerHTML=`
Всего компаний в периметре мониторинга: ${COMPANIES.length}
- ${COMPANIES.map(c=>` -
+ ${COMPANIES.map(c=>{ + const q=encodeURIComponent(c); + const searchUrl='https://news.google.com/search?q='+q+'&hl=ru'; + return ` +
${c}
Упоминаний: ${r(10,80)}
📰 Новости: ${r(3,20)}   💬 Соцсети: ${r(5,40)}   🏛 Офиц: ${r(1,10)}
-
`).join('')} + `}).join('')}
`; document.getElementById('allSourcesTabContent').innerHTML=`
${ALL_SOURCES.map(s=>` -
+
${srcIcon(s.type)} ${s.name}
Мониторинг активен
${r(5,50)} упоминаний
Обновлено: ${r(1,59)} мин. назад
-
`).join('')} + `).join('')}
`; } @@ -467,6 +511,13 @@ updateClock(); setInterval(()=>{updateClock();},1000); setInterval(()=>{renderAll();},30000); +document.addEventListener('click',function(e){ + const row=e.target.closest('.clickable[data-href]'); + if(row&&e.target.tagName!=='A'){ + window.open(row.dataset.href,'_blank'); + } +}); + document.querySelectorAll('.nav-item').forEach(el=>{ el.addEventListener('click',()=>{ document.querySelectorAll('.nav-item').forEach(e=>e.classList.remove('active'));