-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
úprava načítania databázy, oprava vecí, čo nefungovali, možno aj poka…
…zenie niektorých vecí, čo fungovali
- Loading branch information
Showing
5 changed files
with
230 additions
and
108 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,10 +13,8 @@ | |
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js" | ||
integrity="sha384-C6RzsynM9kWDrMNeT87bh95OGNyZPhcTNXj1NW7RuBCsyN/o0jlpcV8Qyq46cDfL" | ||
crossorigin="anonymous"></script> | ||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/font/bootstrap-icons.css"> | ||
<link rel="stylesheet" href="public/css/styl.css"> | ||
<script src="public/js/script.js"></script> | ||
<link rel="stylesheet" href="App/Views/style.css"> | ||
</head> | ||
<body> | ||
<nav class="navbar navbar-expand-md navbar-dark bg-dark" aria-label="Eighth navbar example"> | ||
|
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,72 +1,83 @@ | ||
create table vaiicko_db.cesty | ||
( | ||
id int auto_increment | ||
primary key, | ||
cesta varchar(255) not null | ||
-- Create the database if it doesn't exist | ||
CREATE DATABASE IF NOT EXISTS vaiicko_db CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; | ||
|
||
-- Use the created database | ||
USE vaiicko_db; | ||
|
||
-- Create tables | ||
CREATE TABLE cesty ( | ||
id INT AUTO_INCREMENT PRIMARY KEY, | ||
cesta VARCHAR(255) NOT NULL | ||
); | ||
|
||
create table vaiicko_db.dialnices | ||
( | ||
nazov varchar(255) not null, | ||
zaciatokVystavby int not null, | ||
koniecVystavby int null, | ||
trasa varchar(255) not null, | ||
kmDokoncene decimal(10, 1) null, | ||
kmVoVystavbe decimal(10, 1) null, | ||
kmVPlane decimal(10, 1) null, | ||
id int auto_increment | ||
primary key | ||
CREATE TABLE dialnices ( | ||
id INT AUTO_INCREMENT PRIMARY KEY, | ||
nazov VARCHAR(255) NOT NULL, | ||
zaciatokVystavby INT NOT NULL, | ||
koniecVystavby INT NULL, | ||
trasa VARCHAR(255) NOT NULL, | ||
kmDokoncene DECIMAL(10, 1) NULL, | ||
kmVoVystavbe DECIMAL(10, 1) NULL, | ||
kmVPlane DECIMAL(10, 1) NULL | ||
); | ||
|
||
create table vaiicko_db.posts | ||
( | ||
id int auto_increment | ||
primary key, | ||
nazov varchar(255) not null, | ||
popis varchar(255) not null, | ||
datumPublikovania date not null, | ||
zdroj varchar(255) not null | ||
CREATE TABLE posts ( | ||
id INT AUTO_INCREMENT PRIMARY KEY, | ||
nazov VARCHAR(255) NOT NULL, | ||
popis VARCHAR(255) NOT NULL, | ||
datumPublikovania DATE NOT NULL, | ||
zdroj VARCHAR(255) NOT NULL | ||
); | ||
|
||
create table vaiicko_db.prepojenie_cesty_posts | ||
( | ||
id int auto_increment | ||
primary key, | ||
id_posts int not null, | ||
id_cesty int not null, | ||
constraint prepojenie_cesty_posts_cesty_id_fk | ||
foreign key (id_cesty) references vaiicko_db.cesty (id), | ||
constraint prepojenie_cesty_posts_posts_id_fk | ||
foreign key (id_posts) references vaiicko_db.posts (id) | ||
CREATE TABLE prepojenie_cesty_posts ( | ||
id INT AUTO_INCREMENT PRIMARY KEY, | ||
id_posts INT NOT NULL, | ||
id_cesty INT NOT NULL, | ||
CONSTRAINT prepojenie_cesty_posts_cesty_id_fk | ||
FOREIGN KEY (id_cesty) REFERENCES cesty (id), | ||
CONSTRAINT prepojenie_cesty_posts_posts_id_fk | ||
FOREIGN KEY (id_posts) REFERENCES posts (id) | ||
); | ||
|
||
create table vaiicko_db.users | ||
( | ||
id int auto_increment | ||
primary key, | ||
name varchar(255) not null, | ||
email varchar(255) not null, | ||
password varchar(255) not null | ||
CREATE TABLE users ( | ||
id INT AUTO_INCREMENT PRIMARY KEY, | ||
name VARCHAR(255) NOT NULL, | ||
email VARCHAR(255) NOT NULL, | ||
password VARCHAR(255) NOT NULL | ||
); | ||
|
||
INSERT INTO vaiicko_db.prepojenie_cesty_posts (id, id_posts, id_cesty) VALUES (1, 1, 1); | ||
INSERT INTO vaiicko_db.prepojenie_cesty_posts (id, id_posts, id_cesty) VALUES (2, 2, 1); | ||
INSERT INTO vaiicko_db.prepojenie_cesty_posts (id, id_posts, id_cesty) VALUES (3, 2, 2); | ||
INSERT INTO vaiicko_db.prepojenie_cesty_posts (id, id_posts, id_cesty) VALUES (4, 3, 3); | ||
INSERT INTO vaiicko_db.prepojenie_cesty_posts (id, id_posts, id_cesty) VALUES (5, 3, 4); | ||
INSERT INTO vaiicko_db.prepojenie_cesty_posts (id, id_posts, id_cesty) VALUES (6, 3, 5); | ||
-- Insert data | ||
INSERT INTO cesty (cesta) VALUES | ||
('I/66'), | ||
('II/540'), | ||
('I/16'), | ||
('I/72'), | ||
('II/531'); | ||
|
||
INSERT INTO vaiicko_db.posts (id, nazov, popis, datumPublikovania, zdroj) VALUES (1, 'Vyskytli sa aj komplikácie: Takto prebieha rekonštrukcia horského priechodu Vernár', 'Aj napriek komplikáciám, ktoré sa počas výstavby vyskytli, sa harmonogram prác na predmetnej stavbe darí dodržiavať.', '2023-10-24', 'https://poprad.dnes24.sk/vyskytli-sa-aj-komplikacie-takto-prebieha-rekonstrukcia-horskeho-priechodu-vernar-foto-440664'); | ||
INSERT INTO vaiicko_db.posts (id, nazov, popis, datumPublikovania, zdroj) VALUES (2, 'Príprava obchvatu Veľkej Lomnice pokračuje, kraj ide vykupovať pozemky', 'Výstavbu chcú začať v roku 2024.', '2023-10-12', 'https://spis.korzar.sme.sk/c/23235295/priprava-obchvatu-velkej-lomnice-pokracuje-kraj-ide-vykupovat-pozemky.html'); | ||
INSERT INTO vaiicko_db.posts (id, nazov, popis, datumPublikovania, zdroj) VALUES (3, 'Práce na výstavbe kruhového objazdu na Sobôtke začnú už budúci týždeň. Dôvodom ich zdržania bolo dopravné značenie', 'Rimavská Sobota sa čoskoro dočká kruhového objazdu na Sobôtke. Práce na najfrekventovanejšej križovatke v meste sa začnú už budúci týždeň.', '2023-08-02', 'https://www.rimava.sk/spravy-z-regionu/prace-na-vystavbe-kruhoveho-objazdu-na-sobotke-zacnu-uz-buduci-tyzden-dovodom-ich-zdrzania-bolo-dopravne-znacenie/'); | ||
INSERT INTO dialnices (nazov, zaciatokVystavby, koniecVystavby, trasa, kmDokoncene, kmVoVystavbe, kmVPlane) VALUES | ||
('D1', 1972, 0, 'Bratislava - Košice - Vyšné Nemecké [SK-UA]', 395.9, 28.4, 87.7), | ||
('D2', 1969, 2003, 'Kúty [CZ-SK] - Bratislava [SK-HU]', 80.5, 0.0, 0.0), | ||
('D3', 1996, 0, 'Žilina - Skalité [SK-PL]', 37.1, 0.0, 22.0), | ||
('D4', 1996, 0, 'Jarovce [AT-SK] - Devínska Nová Ves [SK-AT]', 32.0, 0.0, 16.0); | ||
|
||
INSERT INTO vaiicko_db.dialnices (nazov, zaciatokVystavby, koniecVystavby, trasa, kmDokoncene, kmVoVystavbe, kmVPlane, id) VALUES ('D1', 1972, 0, 'Bratislava - Košice - Vyšné Nemecké [SK-UA]', 395.9, 28.4, 87.7, 1); | ||
INSERT INTO vaiicko_db.dialnices (nazov, zaciatokVystavby, koniecVystavby, trasa, kmDokoncene, kmVoVystavbe, kmVPlane, id) VALUES ('D2', 1969, 2003, 'Kúty [CZ-SK] - Bratislava [SK-HU]', 80.5, 0.0, 0.0, 2); | ||
INSERT INTO vaiicko_db.dialnices (nazov, zaciatokVystavby, koniecVystavby, trasa, kmDokoncene, kmVoVystavbe, kmVPlane, id) VALUES ('D3', 1996, 0, 'Žilina - Skalité [SK-PL]', 37.1, 0.0, 22.0, 3); | ||
INSERT INTO vaiicko_db.dialnices (nazov, zaciatokVystavby, koniecVystavby, trasa, kmDokoncene, kmVoVystavbe, kmVPlane, id) VALUES ('D4', 1996, 0, 'Jarovce [AT-SK] - Devínska Nová Ves [SK-AT]', 32.0, 0.0, 16.0, 4); | ||
INSERT INTO posts (nazov, popis, datumPublikovania, zdroj) VALUES | ||
('Vyskytli sa aj komplikácie: Takto prebieha rekonštrukcia horského priechodu Vernár', | ||
'Aj napriek komplikáciám, ktoré sa počas výstavby vyskytli, sa harmonogram prác na predmetnej stavbe darí dodržiavať.', | ||
'2023-10-24', | ||
'https://poprad.dnes24.sk/vyskytli-sa-aj-komplikacie-takto-prebieha-rekonstrukcia-horskeho-priechodu-vernar-foto-440664'), | ||
('Príprava obchvatu Veľkej Lomnice pokračuje, kraj ide vykupovať pozemky', | ||
'Výstavbu chcú začať v roku 2024.', | ||
'2023-10-12', | ||
'https://spis.korzar.sme.sk/c/23235295/priprava-obchvatu-velkej-lomnice-pokracuje-kraj-ide-vykupovat-pozemky.html'), | ||
('Práce na výstavbe kruhového objazdu na Sobôtke začnú už budúci týždeň. Dôvodom ich zdržania bolo dopravné značenie', | ||
'Rimavská Sobota sa čoskoro dočká kruhového objazdu na Sobôtke. Práce na najfrekventovanejšej križovatke v meste sa začnú už budúci týždeň.', | ||
'2023-08-02', | ||
'https://www.rimava.sk/spravy-z-regionu/prace-na-vystavbe-kruhoveho-objazdu-na-sobotke-zacnu-uz-buduci-tyzden-dovodom-ich-zdrzania-bolo-dopravne-znacenie/'); | ||
|
||
INSERT INTO vaiicko_db.cesty (id, cesta) VALUES (1, 'I/66'); | ||
INSERT INTO vaiicko_db.cesty (id, cesta) VALUES (2, 'II/540'); | ||
INSERT INTO vaiicko_db.cesty (id, cesta) VALUES (3, 'I/16'); | ||
INSERT INTO vaiicko_db.cesty (id, cesta) VALUES (4, 'I/72'); | ||
INSERT INTO vaiicko_db.cesty (id, cesta) VALUES (5, 'II/531'); | ||
INSERT INTO prepojenie_cesty_posts (id_posts, id_cesty) VALUES | ||
(1, 1), | ||
(2, 1), | ||
(2, 2), | ||
(3, 3), | ||
(3, 4), | ||
(3, 5); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,41 @@ | ||
.navbar { | ||
border-bottom: 1px solid grey; | ||
.nav-item.dropdown:hover .dropdown-menu { | ||
display: block; | ||
} | ||
|
||
.navbar-brand img { | ||
width: 50px; | ||
html, body { | ||
height: 100%; | ||
} | ||
body { | ||
display: flex; | ||
flex-direction: column; | ||
} | ||
.content { | ||
flex: 1; | ||
} | ||
.progress-bar-success { | ||
background-color: green; | ||
} | ||
.progress-bar-warning { | ||
background-color: orange; | ||
} | ||
.progress-bar-danger { | ||
background-color: gray; | ||
} | ||
.btn.btn-outline-warning:hover { | ||
background-color: #ffc107; | ||
color: white; | ||
} | ||
.btn.btn-outline-dark:hover { | ||
background-color: #343a40; | ||
color: white; | ||
} | ||
.btn.btn-outline-info:hover { | ||
background-color: #0dcaf0; | ||
color: white; | ||
} | ||
p.obsah, h2.obsah { | ||
margin-left: 20px; | ||
} | ||
h2.obsah { | ||
margin-top: 10px; | ||
margin-bottom: 10px; | ||
} |