From b7953c4b715faba645d79edbdc31b21e54b69231 Mon Sep 17 00:00:00 2001 From: Anton Romanov Date: Wed, 9 Mar 2022 15:09:17 +0400 Subject: [PATCH] #1 -- view news --- data/db.mv.db | Bin 28672 -> 32768 bytes .../ru/ulstu/controller/NewsController.java | 12 +++++++++ src/main/java/ru/ulstu/model/News.java | 3 +++ .../java/ru/ulstu/service/NewsService.java | 4 +++ src/main/resources/public/css/main.css | 8 ++++++ src/main/resources/templates/default.html | 2 +- src/main/resources/templates/editNews.html | 9 +++++-- src/main/resources/templates/index.html | 17 ++++++++++-- src/main/resources/templates/news.html | 25 ++++++++++++++++++ 9 files changed, 75 insertions(+), 5 deletions(-) create mode 100644 src/main/resources/templates/news.html diff --git a/data/db.mv.db b/data/db.mv.db index f2a5f01bea579e0c6be94328e072eae670ce8703..8fe3c2fececf3c4da42c6f2c33870fa4d36b9582 100644 GIT binary patch literal 32768 zcmeHP+m9Pp8Mn8)QAnE5AT^*;(5XwC6j_$-wY^>gYMouDS#@`l?mD4;Av!a2ycs(7 zxN})m@X{*?wX}Vy6d?gZ2%f9bLg*!kN5n;AB>n&-9^fg@MMdRzE^}t$Y%YzGUQZP5 z%$Yft@BF^+eB<+dznNp5dfD=P`>{?-9yi_Zu}-a8t(NUG@#wKmvtgHQkI_-5R<;91 zBj$8!3xgJI(*bKOmIr~RLPD02Ufu?-{19O;md{3iFs6-jYWM%=P-v# zP5hk~e;eX&a~HqftcyZR{FPNLacktL@ke1s`twOt(A%Dg-@ArZTTow!C1~ykM=%8(o{r#f@%9xwH*lDkjZ| zNpoTf{dIQKUq|UrsJoL>JwJ!)3D;gnYfmv`G%__y=$cpN26U&WExVkbs_V#`%IkrwTlW_=$Pr_i5RoVrx2HSFwOt;VX=>|VXuv~{V$7VYd_ zgALlb(x6#wKSD|;P99lZSt?aZCpK2rx*Lz4eyI28>3RvS>z-nDcBZh=-@kj-E53Y7 z;pp7Uw>%&U7w#w?ox54oBR-G zSxdCR#RRo^JKW|KpN60)@G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Cqv@qKDE=qY;b*^_32)lM7~bKf9}BW7QJw8aOUt6pHcegg6P+z!;@KkUY#%0q zQJ#X8ugjcOz+!@orzulNurH8cQO`F^sTY+GuC~o~K z0Wp0ya&0;mE2%D>s+HTvOk<5zN^gov zNv8Lzh*u!IUKdg`;!}(#%4`vQAZ=XKG#1(g1ONd*01!AM0+akZ<^Lq*|5&qateqeK zr;GgKe*u_?|I<0sc>LdpLWMk1NCTK@1XHz@s+>;f=w;72{!jV;%fSDE|8pVa@zm6i zfd6x4>74n0;l%k6$fM^XJ0H(IIdei8XXl}az}_#DWWArhbH;McQY9uP>)BkQd@CoEm?x0*8O;+p zdkSJ!e~&eeT=R03m|Ru3+v4w|DUc! zf&Bjqn!G`?fB+x>2mk_rz*8a+$Ny9QEpq6D|6}8PR6ZHMyzl^?ABT@1se%lD@S getAll() { return newsRepository.findAll(); } + + public void delete(Integer id) { + newsRepository.deleteById(id); + } } diff --git a/src/main/resources/public/css/main.css b/src/main/resources/public/css/main.css index b2b570d..359a34c 100644 --- a/src/main/resources/public/css/main.css +++ b/src/main/resources/public/css/main.css @@ -23,4 +23,12 @@ .error { color: red; +} + +.fa { + color: black; +} + +.link-dark, .link-dark:visited, .link-dark:focus { + color: black; } \ No newline at end of file diff --git a/src/main/resources/templates/default.html b/src/main/resources/templates/default.html index b744d63..819bd2a 100644 --- a/src/main/resources/templates/default.html +++ b/src/main/resources/templates/default.html @@ -17,7 +17,7 @@ - +