Skip to content

Commit

Permalink
upd
Browse files Browse the repository at this point in the history
  • Loading branch information
li0ard committed May 4, 2024
1 parent 345503c commit 66cf1b3
Show file tree
Hide file tree
Showing 6 changed files with 354 additions and 115 deletions.
144 changes: 144 additions & 0 deletions fedsfm/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,144 @@
<!DOCTYPE html>
<html>
<head>
<meta name="mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="application-name" content="Реестр террористов и экстремистов">
<meta name="apple-mobile-web-app-title" content="Реестр террористов и экстремистов">
<meta name="theme-color" content="#eeeeee">
<meta name="msapplication-navbutton-color" content="#eeeeee">
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
<meta name="msapplication-starturl" content="/">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">

<link rel="icon" type="image/jpeg" sizes="256x256" href="https://hsto.org/webt/a_/xt/c_/a_xtc_o6zp8oqpzkamwvuzlayfq.jpeg">
<link rel="apple-touch-icon" type="image/jpeg" sizes="256x256" href="https://hsto.org/webt/a_/xt/c_/a_xtc_o6zp8oqpzkamwvuzlayfq.jpeg">
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Реестр нежелательных организаций</title>
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet">
<link href="https://cdnjs.cloudflare.com/ajax/libs/gridjs/6.0.6/theme/mermaid.min.css" rel="stylesheet">
<script src="https://cdnjs.cloudflare.com/ajax/libs/gridjs/6.0.6/gridjs.production.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js"></script>
<script src="https://unpkg.com/[email protected]/l10n/dist/l10n.umd.js"></script>
<style>
@media print {
.noprint {
display: none;
}
.print {
display: block;
}
}
</style>
</head>
<body>
<div id="card" class="modal fade">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h1 class="modal-title fs-5" id="exampleModalLabel">Запись №<span id="number"></span></h1>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Закрыть"></button>
</div>
<div class="modal-body">
<p><b>Тип записи:</b> <span id="type"></span></p>
<p><b>ФИО:</b> <span id="name_full"></span></p>
<p><b>Дата рождения:</b> <span id="dob"></span></p>
<p><b>Место рождения:</b> <span id="pob"></span></p>
</div>
<div class="noprint modal-footer">
<button type="button" onclick="window.print()" class="btn btn-primary">Печать</button>
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Закрыть</button>
</div>
</div>
</div>
</div>
<nav class="navbar bg-body-tertiary noprint">
<div class="container-fluid">
<span class="navbar-brand mb-0 h1"><img src="https://habrastorage.org/webt/a_/xt/c_/a_xtc_o6zp8oqpzkamwvuzlayfq.jpeg" alt="Logo" width="30" height="30" class="d-inline-block align-text-top"> Реестр террористов и экстремистов</span>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNav" aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation"><span class="navbar-toggler-icon"></span></button>
<div class="collapse navbar-collapse" id="navbarNav">
<ul class="navbar-nav">
<li class="nav-item"><a class="nav-link active" aria-current="page" href="index.html">Главная</a></li>
<li class="nav-item"><a class="nav-link" href="stats.html">Статистика</a></li>
<li class="nav-item"><a class="nav-link" href="https://extrem.ishukshin.ru/">Источник</a></li>
</ul>
</div>
</div>
</nav>
<div class="container noprint">
<br>
<div class="row">
<center>
<div id="reestr"></div>
</center>
</div>
</div>
<footer class="noprint">
<center>
<br>
<p>&copy; 2024, <a href="https://li0ard.github.io">li0ard</a>. Made with 🕊️</p>
<br>
</center>
</footer>
<script type="text/javascript">
const grid = new gridjs.Grid({
columns: [
{
"id": "id",
"name": "№"
},
{
"id": "name_full",
"name": "ФИО"
},
{
"id": "birth",
"name": "Дата рождения",
},
{
"id": "place",
"name": "Место рождения",
hidden: true
},
{
"id": "is_terr",
"name": "Тип записи",
hidden: true
},
{
"id": "actions",
"name": "",
formatter: (cell, row) => {
return gridjs.h('button', {
className: "btn btn-primary",
onClick: () => {
let data = row.cells
document.getElementById("number").textContent = data[0].data
document.getElementById("name_full").textContent = data[1].data
document.getElementById("dob").textContent = data[2].data
document.getElementById("pob").textContent = data[3].data
document.getElementById("type").textContent = data[4].data ? "Террорист" : "Экстремист"
new bootstrap.Modal("#card").show()
}
}, 'Просмотр')
}
}
],
pagination: {
limit: 10
},
fixedHeader: true,
search: {
ignoreHiddenColumns: false,
},
language: gridjs.l10n.ruRU,
server: {
url: `https://api.li0ard.rest/fuckcors?url=https://extrem.ishukshin.ru/json/all`,
then: data => data
}
})
grid.render(document.getElementById("reestr"));
</script>
</body>
</html>
164 changes: 164 additions & 0 deletions fedsfm/stats.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,164 @@
<!DOCTYPE html>
<html>
<head>
<meta name="mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="application-name" content="Реестр террористов и экстремистов">
<meta name="apple-mobile-web-app-title" content="Реестр террористов и экстремистов">
<meta name="theme-color" content="#eeeeee">
<meta name="msapplication-navbutton-color" content="#eeeeee">
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
<meta name="msapplication-starturl" content="/">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">

<link rel="icon" type="image/jpeg" sizes="256x256" href="https://hsto.org/webt/a_/xt/c_/a_xtc_o6zp8oqpzkamwvuzlayfq.jpeg">
<link rel="apple-touch-icon" type="image/jpeg" sizes="256x256" href="https://hsto.org/webt/a_/xt/c_/a_xtc_o6zp8oqpzkamwvuzlayfq.jpeg">
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Реестр нежелательных организаций</title>
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet">
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
<script src="https://albinodrought.github.io/chartjs-plugin-watermark/chartjs-plugin-watermark.js"></script>
</head>
<body>
<nav class="navbar bg-body-tertiary noprint">
<div class="container-fluid">
<span class="navbar-brand mb-0 h1"><img src="https://habrastorage.org/webt/a_/xt/c_/a_xtc_o6zp8oqpzkamwvuzlayfq.jpeg" alt="Logo" width="30" height="30" class="d-inline-block align-text-top"> Реестр террористов и экстремистов</span>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNav" aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation"><span class="navbar-toggler-icon"></span></button>
<div class="collapse navbar-collapse" id="navbarNav">
<ul class="navbar-nav">
<li class="nav-item"><a class="nav-link active" aria-current="page" href="index.html">Главная</a></li>
<li class="nav-item"><a class="nav-link" href="stats.html">Статистика</a></li>
<li class="nav-item"><a class="nav-link" href="https://extrem.ishukshin.ru/">Источник</a></li>
</ul>
</div>
</div>
</nav>
<div class="container">
<br>
<div class="row">
<center>
<h2>Статистика</h2>
</center>
</div>
<br>
<div style="margin-top: 20px;" class="row">
<div class="col">
<center>
<canvas aria-label="По типу записи" role="img" id="type"></canvas>
</center>
</div>
<div class="col">
<center>
<canvas aria-label="Являются уроженцами Украины" role="img" id="ukr"></canvas>
</center>
</div>
</div>
<div style="margin-top: 20px;" class="row">
<center>
<canvas aria-label="По кол-ву внесений (Диаграмма)" role="img" id="years"></canvas>
<div>
<button disabled onClick='years_cfg.type = "bar"; years.update()' class="btn btn-primary">Диаграмма</button>
<button disabled onClick='years_cfg.type = "line"; years.update()'class="btn btn-primary">График</button>
</div>
</center>
</div>
<br>
</div>
<footer>
<center>
<br>
<p>&copy; 2024, <a href="https://li0ard.github.io">li0ard</a>. Made with 🕊️</p>
<br>
</center>
</footer>
<script type="text/javascript">
fetch(`https://api.li0ard.rest/fuckcors?url=https://extrem.ishukshin.ru/json/all`)
.then(res => res.json())
.then(body => {
let terr = body.filter(i => i.is_terr == true).length
let extr = body.filter(i => i.is_terr == false).length
let ukrn = body.filter(i => i.is_ukrainian == true).length
let type = new Chart(document.getElementById('type'), {
type: 'pie',
data: {
labels: ['Террористы', 'Экстремисты'],
datasets: [{
data: [terr, extr],
backgroundColor: ['#ff5722', '#00e676'],
borderWidth: 0.5 ,
borderColor: '#ddd'
}]
},
options: {
plugins: { title: { display: true, text: 'По типу записи' }, subtitle: { display: true, text: `Всего: ${body.length} записей` } },
watermark: { image: "https://habrastorage.org/webt/a_/xt/c_/a_xtc_o6zp8oqpzkamwvuzlayfq.jpeg", x: 0, y: 0, width: 48, height: 48, opacity: 0.3 }
}
});
let ukr = new Chart(document.getElementById('ukr'), {
type: 'pie',
data: {
labels: ['Уроженцы', 'Не уроженцы'],
datasets: [{
data: [ukrn, body.length - ukrn],
backgroundColor: ['#ff5722', '#00e676'],
borderWidth: 0.5 ,
borderColor: '#ddd'
}]
},
options: {
plugins: {
title: { display: true, text: 'Уроженцы Украины' },
subtitle: { display: true, text: `Всего: ${body.length} записей` } },
watermark: { image: "https://habrastorage.org/webt/a_/xt/c_/a_xtc_o6zp8oqpzkamwvuzlayfq.jpeg", x: 0, y: 0, width: 48, height: 48, opacity: 0.3 }
}
});
let years_labels = ["2018", "2019", "2020", "2021", "2022", "2023", "2024 *"]
let years_in = [body.filter(i => i.added_at.includes("2018")).length, body.filter(i => i.added_at.includes("2019")).length, body.filter(i => i.added_at.includes("2020")).length, body.filter(i => i.added_at.includes("2021")).length, body.filter(i => i.added_at.includes("2022")).length, body.filter(i => i.added_at.includes("2023")).length, body.filter(i => i.added_at.includes("2024")).length]
let years_cfg = {
type: "bar",
data: {
labels: years_labels,
datasets: [
{
label: 'Внесено',
backgroundColor: ["#1e88e5"],
borderColor: "#1e88e5",
data: years_in,
pointStyle: 'circle',
pointRadius: 5,
pointHoverRadius: 10
}
]
},
options: {
plugins: {
title: {
display: true,
text: 'По кол-ву внесений/исключений (Диаграмма)'
},
subtitle: {
display: true,
text: '* - на момент последнего обновления'
}
},
watermark: {
image: "https://habrastorage.org/webt/a_/xt/c_/a_xtc_o6zp8oqpzkamwvuzlayfq.jpeg",
x: 0,
y: 0,
width: 48,
height: 48,
opacity: 0.3
}
}
}
let years = new Chart(document.getElementById('years'), years_cfg)
window.years_cfg = years_cfg
window.years = years
document.querySelectorAll("button.btn-primary")[0].removeAttribute("disabled")
document.querySelectorAll("button.btn-primary")[1].removeAttribute("disabled")
})
</script>
</body>
</html>
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ <h1 class="modal-title fs-5" id="exampleModalLabel">Запись №<span id="nu
<footer class="noprint">
<center>
<br>
<p>&copy; 2023, <a href="https://li0ard.github.io">li0ard</a>. Made with 🕊️</p>
<p>&copy; 2024, <a href="https://li0ard.github.io">li0ard</a>. Made with 🕊️</p>
<br>
</center>
</footer>
Expand Down
7 changes: 3 additions & 4 deletions orgs/index.html
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
<!DOCTYPE html>
<html>
<head>
<link rel="manifest" href="manifest.json">
<meta name="mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="application-name" content="Реестр иноагентов">
<meta name="apple-mobile-web-app-title" content="Реестр иноагентов">
<meta name="application-name" content="Реестр нежелательных организаций">
<meta name="apple-mobile-web-app-title" content="Реестр нежелательных организаций">
<meta name="theme-color" content="#eeeeee">
<meta name="msapplication-navbutton-color" content="#eeeeee">
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
Expand Down Expand Up @@ -81,7 +80,7 @@ <h1 class="modal-title fs-5" id="exampleModalLabel">Запись №<span id="nu
<footer class="noprint">
<center>
<br>
<p>&copy; 2023, <a href="https://li0ard.github.io">li0ard</a>. Made with 🕊️</p>
<p>&copy; 2024, <a href="https://li0ard.github.io">li0ard</a>. Made with 🕊️</p>
<br>
</center>
</footer>
Expand Down
Loading

0 comments on commit 66cf1b3

Please sign in to comment.