-
📜 Нарушения законодательства РК
-
Опишите ситуацию или введите ключевые слова — найдём соответствующие статьи кодексов, законов и правил РК.
-
-
-
+
📜 Поиск по НПА Республики Казахстан
+
Опишите нарушение — получите ссылку на нормативный правовой акт и подборку статей из базы.
+
+
+
+
+
+
+
+
Поиск по вашему запросу на adilet.zan.kz:
+
+
+
🔗 Открыть НПА
+
@@ -214,7 +252,7 @@ footer a { color: var(--cyan); text-decoration: none; }
@@ -332,6 +370,25 @@ function matchesQuery(v, query) {
);
}
+function adiletSearchUrl(query) {
+ const src = query || currentQuery;
+ return "https://adilet.zan.kz/rus/search/all?q=" + encodeURIComponent(src.trim());
+}
+
+function updateAdiletBar() {
+ const bar = document.getElementById("adiletBar");
+ const queryEl = document.getElementById("adiletQuery");
+ const btn = document.getElementById("adiletBtn");
+ const q = currentQuery.trim();
+ if (q.length > 0) {
+ bar.classList.add("active");
+ queryEl.textContent = q;
+ btn.href = adiletSearchUrl(q);
+ } else {
+ bar.classList.remove("active");
+ }
+}
+
function render(results, query) {
const grid = document.getElementById("results");
const empty = document.getElementById("empty");
@@ -347,8 +404,9 @@ function render(results, query) {
return;
}
empty.style.display = "none";
- grid.innerHTML = results.map(v => `
-
+ grid.innerHTML = results.map(v => {
+ const searchQ = encodeURIComponent(v.article + " " + v.desc.split(" —")[0]);
+ return `
${highlight(v.desc, query)}
@@ -358,9 +416,10 @@ function render(results, query) {
-
- `).join("");
+
`;
+ }).join("");
}
function filterAndSearch() {
@@ -372,6 +431,7 @@ function filterAndSearch() {
results = results.filter(v => matchesQuery(v, currentQuery));
}
render(results, currentQuery);
+ updateAdiletBar();
}
function search() {
@@ -388,7 +448,14 @@ function setFilter(code, btn) {
document.getElementById("search").addEventListener("input", search);
document.getElementById("search").addEventListener("keydown", function(e) {
- if (e.key === "Enter") search();
+ if (e.key === "Enter") {
+ currentQuery = this.value;
+ filterAndSearch();
+ updateAdiletBar();
+ if (currentQuery.trim()) {
+ window.open(adiletSearchUrl(currentQuery.trim()), "_blank");
+ }
+ }
});
filterAndSearch();