From faf460470ed1f35a5b5d18cc665967189cf6c638 Mon Sep 17 00:00:00 2001 From: Florian Hoss Date: Wed, 30 Mar 2022 14:54:01 +0200 Subject: [PATCH] basic navigation and basic forms --- Lab01/app/.idea/app.iml | 1 + Lab01/app/.idea/dataSources.xml | 12 +++ Lab01/app/.idea/jsLibraryMappings.xml | 6 ++ Lab01/app/api/api.go | 26 ------- Lab01/app/database/types.go | 1 + Lab01/app/go.mod | 1 + Lab01/app/go.sum | 4 + Lab01/app/main.go | 4 +- .../static/icons/android-chrome-192x192.png | Bin 0 -> 3022 bytes .../static/icons/android-chrome-512x512.png | Bin 0 -> 9077 bytes Lab01/app/static/icons/apple-touch-icon.png | Bin 0 -> 2181 bytes Lab01/app/static/icons/browserconfig.xml | 9 +++ Lab01/app/static/icons/favicon-16x16.png | Bin 0 -> 616 bytes Lab01/app/static/icons/favicon-32x32.png | Bin 0 -> 909 bytes Lab01/app/static/icons/favicon.ico | Bin 0 -> 15086 bytes Lab01/app/static/icons/mstile-144x144.png | Bin 0 -> 2191 bytes Lab01/app/static/icons/mstile-150x150.png | Bin 0 -> 2390 bytes Lab01/app/static/icons/mstile-310x150.png | Bin 0 -> 2590 bytes Lab01/app/static/icons/mstile-310x310.png | Bin 0 -> 5125 bytes Lab01/app/static/icons/mstile-70x70.png | Bin 0 -> 1665 bytes Lab01/app/static/icons/safari-pinned-tab.svg | 35 +++++++++ Lab01/app/static/icons/site.webmanifest | 19 +++++ Lab01/app/templates/index.tmpl | 49 +++++++++++++ Lab01/app/templates/login.tmpl | 29 ++++++++ Lab01/app/templates/register.tmpl | 45 ++++++++++++ Lab01/app/{api => webpage}/types.go | 4 +- Lab01/app/webpage/webpage.go | 69 ++++++++++++++++++ 27 files changed, 284 insertions(+), 30 deletions(-) create mode 100644 Lab01/app/.idea/dataSources.xml create mode 100644 Lab01/app/.idea/jsLibraryMappings.xml delete mode 100644 Lab01/app/api/api.go create mode 100644 Lab01/app/static/icons/android-chrome-192x192.png create mode 100644 Lab01/app/static/icons/android-chrome-512x512.png create mode 100644 Lab01/app/static/icons/apple-touch-icon.png create mode 100644 Lab01/app/static/icons/browserconfig.xml create mode 100644 Lab01/app/static/icons/favicon-16x16.png create mode 100644 Lab01/app/static/icons/favicon-32x32.png create mode 100644 Lab01/app/static/icons/favicon.ico create mode 100644 Lab01/app/static/icons/mstile-144x144.png create mode 100644 Lab01/app/static/icons/mstile-150x150.png create mode 100644 Lab01/app/static/icons/mstile-310x150.png create mode 100644 Lab01/app/static/icons/mstile-310x310.png create mode 100644 Lab01/app/static/icons/mstile-70x70.png create mode 100644 Lab01/app/static/icons/safari-pinned-tab.svg create mode 100644 Lab01/app/static/icons/site.webmanifest create mode 100644 Lab01/app/templates/index.tmpl create mode 100644 Lab01/app/templates/login.tmpl create mode 100644 Lab01/app/templates/register.tmpl rename Lab01/app/{api => webpage}/types.go (74%) create mode 100644 Lab01/app/webpage/webpage.go diff --git a/Lab01/app/.idea/app.iml b/Lab01/app/.idea/app.iml index 5e764c4..2be4a98 100644 --- a/Lab01/app/.idea/app.iml +++ b/Lab01/app/.idea/app.iml @@ -5,5 +5,6 @@ + \ No newline at end of file diff --git a/Lab01/app/.idea/dataSources.xml b/Lab01/app/.idea/dataSources.xml new file mode 100644 index 0000000..b9c0962 --- /dev/null +++ b/Lab01/app/.idea/dataSources.xml @@ -0,0 +1,12 @@ + + + + + sqlite.xerial + true + org.sqlite.JDBC + jdbc:sqlite:C:\Users\FlorianHoss\Documents\GitHub\SWB6-ITSec\Lab01\app\sqlite.db + $ProjectFileDir$ + + + \ No newline at end of file diff --git a/Lab01/app/.idea/jsLibraryMappings.xml b/Lab01/app/.idea/jsLibraryMappings.xml new file mode 100644 index 0000000..b843835 --- /dev/null +++ b/Lab01/app/.idea/jsLibraryMappings.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Lab01/app/api/api.go b/Lab01/app/api/api.go deleted file mode 100644 index cf6e83c..0000000 --- a/Lab01/app/api/api.go +++ /dev/null @@ -1,26 +0,0 @@ -package api - -import ( - "app/database" - "github.com/gin-gonic/gin" -) - -func (api *Api) defineRoutes() { - api.Router.GET("/ping", func(c *gin.Context) { - c.JSON(200, gin.H{ - "message": "pong", - }) - }) -} - -func (api *Api) initialize() { - api.Database = database.Database{Location: "sqlite.db"} - api.Database.Initialize() -} - -func (api *Api) Run() { - api.initialize() - api.Router = gin.Default() - api.defineRoutes() - api.Router.Run() -} diff --git a/Lab01/app/database/types.go b/Lab01/app/database/types.go index 2aef4a9..a0078b8 100644 --- a/Lab01/app/database/types.go +++ b/Lab01/app/database/types.go @@ -8,6 +8,7 @@ type Database struct { } type User struct { + ID int Username string Password string } diff --git a/Lab01/app/go.mod b/Lab01/app/go.mod index a6591fa..89c6d96 100644 --- a/Lab01/app/go.mod +++ b/Lab01/app/go.mod @@ -3,6 +3,7 @@ module app go 1.18 require ( + github.com/gin-contrib/static v0.0.1 github.com/gin-gonic/gin v1.7.7 gorm.io/driver/sqlite v1.3.1 gorm.io/gorm v1.23.3 diff --git a/Lab01/app/go.sum b/Lab01/app/go.sum index 3260c61..3f07ea8 100644 --- a/Lab01/app/go.sum +++ b/Lab01/app/go.sum @@ -3,6 +3,9 @@ github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/gin-contrib/sse v0.1.0 h1:Y/yl/+YNO8GZSjAhjMsSuLt29uWRFHdHYUb5lYOV9qE= github.com/gin-contrib/sse v0.1.0/go.mod h1:RHrZQHXnP2xjPF+u1gW/2HnVO7nvIa9PG3Gm+fLHvGI= +github.com/gin-contrib/static v0.0.1 h1:JVxuvHPuUfkoul12N7dtQw7KRn/pSMq7Ue1Va9Swm1U= +github.com/gin-contrib/static v0.0.1/go.mod h1:CSxeF+wep05e0kCOsqWdAWbSszmc31zTIbD8TvWl7Hs= +github.com/gin-gonic/gin v1.6.3/go.mod h1:75u5sXoLsGZoRN5Sgbi1eraJ4GU3++wFwWzhwvtwp4M= github.com/gin-gonic/gin v1.7.7 h1:3DoBmSbJbZAWqXJC3SLjAPfutPJJRN1U5pALB7EeTTs= github.com/gin-gonic/gin v1.7.7/go.mod h1:axIBovoeJpVj8S3BwE0uPMTeReE4+AfFtqpqaZ1qq1U= github.com/go-playground/assert/v2 v2.0.1 h1:MsBgLAaY856+nPRTKrp3/OZK38U/wa0CcBYNjji3q3A= @@ -11,6 +14,7 @@ github.com/go-playground/locales v0.13.0 h1:HyWk6mgj5qFqCT5fjGBuRArbVDfE4hi8+e8c github.com/go-playground/locales v0.13.0/go.mod h1:taPMhCMXrRLJO55olJkUXHZBHCxTMfnGwq/HNwmWNS8= github.com/go-playground/universal-translator v0.17.0 h1:icxd5fm+REJzpZx7ZfpaD876Lmtgy7VtROAbHHXk8no= github.com/go-playground/universal-translator v0.17.0/go.mod h1:UkSxE5sNxxRwHyU+Scu5vgOQjsIJAF8j9muTVoKLVtA= +github.com/go-playground/validator/v10 v10.2.0/go.mod h1:uOYAAleCW8F/7oMFd6aG0GOhaH6EGOAJShg8Id5JGkI= github.com/go-playground/validator/v10 v10.4.1 h1:pH2c5ADXtd66mxoE0Zm9SUhxE20r7aM3F26W0hOn+GE= github.com/go-playground/validator/v10 v10.4.1/go.mod h1:nlOn6nFhuKACm19sB/8EGNn9GlaMV7XkbRSipzJ0Ii4= github.com/golang/protobuf v1.3.3 h1:gyjaxf+svBWX08ZjK86iN9geUJF0H6gp2IRKX6Nf6/I= diff --git a/Lab01/app/main.go b/Lab01/app/main.go index 98786d7..917bdea 100644 --- a/Lab01/app/main.go +++ b/Lab01/app/main.go @@ -1,8 +1,8 @@ package main -import "app/api" +import "app/webpage" func main() { - backend := api.Api{} + backend := webpage.Webpage{} backend.Run() } diff --git a/Lab01/app/static/icons/android-chrome-192x192.png b/Lab01/app/static/icons/android-chrome-192x192.png new file mode 100644 index 0000000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gx=@OW(>@<4*SVzINbaTFn1IP$nt!Am@!?Xw><)$Q-O_XwfauQUnn zeob;b-cYVuew4`1xe|Mq2?ebPNfR$0ESK*v$BICIX8J-n)ogB!hAbHyZiFCM<1?FX9>R4rTVNXqjf#$34?wW+562%IC-HmMChTmq@fh7fe1pZ_? z6HtT@qU5QIWQW}i16fV7!X}GLkjkkd{rFRN+qCuj!v4aJipX*U$s*#jHM4HGvthu2 zld(TEi$eLHoK?RrmKN$r*ZP@2wyaLb; zdi|A}maMpSD9RMINDhi zwrBfaQPgEHU5s(UD*nE0T8$D{he`rq)}O=@)bLkyleS6D3H2I5RLbvN#Gkfa^CZ8j zv|V~Sy2Ysc-jzphs~9mwpLQ98YZ1oJ?oaV_WS$2E>ilff3`3{>B9P%FOfnUw!&Pq` zc?YV(*2jEQ#S-HoPKZ__r=!pk9c{U=G78*sxDt)CEFVz&BeEC$aN@~sY5a*6r&9%! zaLq)EII+UtH6Cl{_M>B$__Y@$wwg-6Eqh7(q+hRCWuAVy#{~34NG4u#yQ^2`wRBdd zoS+?~%q+bi8tVVIMeN@Vy5#PIC$nCY_}@Qxf;23HoE?K);D`Vhdi!a1oKcxGequjo|I;?BN>veEtL^%4n2>AxM Z5U|5S7j&p9nSl=h=x7+KSE)L@_#bsTG%)}G literal 0 HcmV?d00001 diff --git a/Lab01/app/static/icons/apple-touch-icon.png b/Lab01/app/static/icons/apple-touch-icon.png new file mode 100644 index 0000000000000000000000000000000000000000..b0daa64c8d47e8c452c8e3dbaddde784b5f7718f GIT binary patch literal 2181 zcmZ{lX*d*m8^-?{G?t0Unyt}B%w%jc$5_J57!o4epzK?bZ7gGJD5AxjNRrYRONSV1 z_AKGeK14zh*(M#7I32Q_c|W`#-s`>I56^R7&;4BYb$|S&Ua%y=1Z4yP05CICf(=(| z{yk9c0@6j~Rj%;*8d(?tP)Qfsap&XS2v1WR3jm@|0YJM6z&6*SaR3NM1F-A{0PYb0 zQo&Cet@XH%10Loi0@%Mr?{DQ^2Pt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;<&BV}&tLZAC3+v&%8W}>Tdd{Yxwj&pM=bf*! z!?kfy(4Ne@##5-;yTucQ&A8U7}z zTOBE+y754#w12hyO_ed;`WRK)u`>QZ;cd#$>7Z(Lw(x$4f~OYJOT!Eq4|!R#F~llE zS}qD@JYvqK1W8LNNCU;xx;~QqQaV%Mv zjMC=;$u>26%R16$eO}*zIXX};!BeVFV|i_vHDc^1d56?4j+QbV{}sD)Ry&0 zHy^ezw+zh_sum*>eZ!Q}^9paraPqQLRnI7r*B?mwj5X+fwl&b!3Qa*Yis_f4G*<3g zjyGoPz%jdq5qeBB2(Cx5aX9RS{e?#US~=X0bNJ2O7<+qETh4xuy0M63L0Q@5ZeNgk zOa}3?-hJtOlXI%ZHy_=9%`es}pmZH)J9;CaGT?BL)j?MaZ@ZDru`$fYq{bV|6)MBc zZ#fj-eywKI{#+&(42HT0UMB|MB+q}CvFDnfn#`u82O5c4?8_FTn12Taeb0CAhW+`m zKxXCl1e7z*UnlqxP2k3 + + + + + #da532c + + + diff --git a/Lab01/app/static/icons/favicon-16x16.png b/Lab01/app/static/icons/favicon-16x16.png new file mode 100644 index 0000000000000000000000000000000000000000..ff14dccb445e4340cb3beac7796d485f88e62e1b GIT binary patch literal 616 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!60wlNoGJgf6SkfJR9T^xl_H+M9WCijSl0AZa z85pY67#JE_7#My5g&JNkFq9fFFuY1&V6d9Oz#v{QXIG#NP=YDR+ueoXe|!I#{Xiaj ziKnkC`!i-a9&X)`c_lL$7#MjyT^vI+&X-Qy>(#_4(l%e;cd6s7Cb7)VOeP#FryWy} zy5+oyXIJC2w!Fm)6?b(moA!!HspEdrOLQ zl;`zqce^boJ#$mx$>P8edln?6A-T}QZeyJU4M_r69Id1i&9Om8_8y5+MR zdO{QUirxtJyk)s<6S(-8GN(eok0-ONtyoSdEtmPou%^&i=ne0=mp8X&U!TWotdy3M zW$)E$;*jzs;86-^qfX(9q=Ub5+;V4|sHgKi%N5z)O$emAGKZ UCnwXXKr0wLUHx3vIVCg!0JrwtKL7v# literal 0 HcmV?d00001 diff --git a/Lab01/app/static/icons/favicon-32x32.png b/Lab01/app/static/icons/favicon-32x32.png new file mode 100644 index 0000000000000000000000000000000000000000..5557af473541dc3c5d711b15118dfc9941dd8488 GIT binary patch literal 909 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnE0wix1Z>k4UEa{HEjtmSN`?>!lvVtU&J%W50 z7^>757#dm_7=8hT8eT9klo~KFyh>nTu$sZZAYL$MSD+10f+@+{-G$+Qd;gjJKpuOE zr>`sfGiEs+ZoRY9Rh5DAMxHK?As)x)PCf5^#ZjVt{@t)t=jj^OTt~ao+`KLszDN*j zYB!m1z~NwYz<-A;o*XJ1uLQ0*cKDTX^f>sJ>Hb41@a3)qTbipP1FZ@igq5P~XY6_RmAz^*`CJ6wV61!onQHGId(f z9lq77(pSqY^0YokFfnA``+lL#Qk;G7^Qg)O^<&#^3MSj>u||B~eLjb0i?W$zJkN*2 z(q<7`7t0n_q#tOKZR?sPc;4czmq5bN)2e4X60`R{=-wlJlIhr;__n>rcDVOe9dK`L zSgm?CkiF*RqHe#cqdW3HF>;=tz9HNy#VNKd(zoLD>_`WT%M)J;>E1tQdWq+-!aa53-^E87J@rzPg)E#z86q9n-?}oS zXR=N@!q73%#cAi!JEcB1w>dM4+J&n3+)kTcyG^oOX~oq277rda(zoOGIlT3aybUg77zvPwuKyyv*HJ%CPT$2~*NZNR{Mrs_F zTaYqt9YyZaku5V-r4_7A3JvY$H}xKdDBlhi@eyr zcjkV>obB?y?@!J7ws~(`@qc5v&wa&>@4uBTo%4O&*_rSE+CM!X|7dzrg(xsVsg}4# zl%ynUNX0^vat7L5oTcpmj;u=Da^{7LljQmxN_pinIkes*iScjEb!7}cqJ}a^2y0` QD$oiBPgg&ebxsLQ08GGl2mk;8 literal 0 HcmV?d00001 diff --git a/Lab01/app/static/icons/favicon.ico b/Lab01/app/static/icons/favicon.ico new file mode 100644 index 0000000000000000000000000000000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$8|ojQe;KUCkA$9?Fi5Pph<3l|2uA`dT`j!Iks{z2PjEGfP< zeESe~tEp3`2Kpxt4~irM{)|}qbl1f;zkK;})5n@MYXpBT`Z*vE54x##9c+!k1g~AY zc6sg}S$GC7U%oUxnOU=D8DARyH1gO6c|MC4Eeh$gp@00d?lHxh=hyaZz=Bt0?CH@B=KmOMH_wO4J)6}nDKl2WpJsVz~+r4|YZ$8>mrAnFp zYSgGs&z_BnkT=2(h|hTE&YhB$mKL)NwQJY*7LO$&w`|{vq64TR!o0ix)2rKIeGqCsHN8oBQ_dGi#F=Fx#I^;jwP1 z6YU!t)X&$Tp&(|sOX6R3t*o}LA9SED3Tz>XB6PhT^bKh~Nr4RK74du)%sJ!krU>YtU!^c| z@GMvl)bUL($!_Z(nxgB~vi*^&{ouPywIpPyRUzG28k8AFO4mLzw69Fl9TZ@~ literal 0 HcmV?d00001 diff --git a/Lab01/app/static/icons/mstile-144x144.png b/Lab01/app/static/icons/mstile-144x144.png new file mode 100644 index 0000000000000000000000000000000000000000..b00b0a19e227b6a0118006198a47d75b882a4d94 GIT binary patch literal 2191 zcmb7FX*AT28vcop42monlaMXUSSF0Ev4mliA<7m;Gfmd9FPRi&C$fYI*$YWyDG6E9 z-wfG@BD*Pn`^Z-EpL@UDb3fb<_nh~ApYuHLdCvRkJx}}~f&sviD*zy# z0Dy=exyf3WwK(E#VQLH<#-`F*S&S>t9Bsn2$PVE>4%2)hdXc4Qm>VN)L%*y%4f8r> z0`4~O_V!$PcEq8rSTbRRBUQAxWMEX|c2XKQJijY0Iel7e&2S=2*!rET<-|a2f;O&*X9g?q`{?y(5?cTn=wO=?~NHD(K zwf35laAKGHe}JSQpck&nP>mKN_vP5C-#cQ3%V67Pp3z%&7crjfi5c@;fmlbyO2 zz-!V!0cS5)xU;bdD$j=JR$-=35!=>r=zydXgVLh~nd!bb`lddUOWPVD#I$89v5V!+ z-HPh6e8l$`_>^uh8+K7^iLp^!EZe(aKewp0|J1RxgPLUCoDB~ER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;0|RzuC0{Ei@|eZu;*!IN=93%4@90n8lV}mg zs>Ns!c9@Q(|f!jb08zCzIlPM=IH8BS%GE^}LtgVvKVw8G!W-%7zrSkR#B|5E~_ z=s)m$Y{4(1UC@3{Xvz(XSPx<5V-X)#RA}JJTbmUmQo>Lmhxv#jSI0hW2mgd3mAZ1`nU@AxS+J4#bY6MK}q8%jSdfXX^O2Rb!_-kC#@6Q$wiGaD@3UP YOCl!%Hx1#LtP_B_iIwq7L)ZKN0OJS)jQ{`u literal 0 HcmV?d00001 diff --git a/Lab01/app/static/icons/mstile-150x150.png b/Lab01/app/static/icons/mstile-150x150.png new file mode 100644 index 0000000000000000000000000000000000000000..2b3744e4bae10a31b6467927f70a7ef417f1cff1 GIT binary patch literal 2390 zcmb7`dpOhWAIHC0(c`q5(3mKp=Cn!XEakLhBF~J9<}jf!CJTw4v~tQ*PB|17DzYCU zXE{!WnRqBhTC=5+<70&V)}OyWe$RD1*LC05=X$?i_xp3-|9$RzXEF9Nl1h>Q0LY*n zY+M0ghwQJtd#A`5u1D&L%FY05Cu;zxx-Yef-zCy&z7DQV01&MS0P(j0U_)fZ^8p|d z0RVHC0KhZ{02IUW8(qvrK+MO{-Ubj-?)SHelmrRwWGgWXIv_2DK;`T|A##4AZLHnM zAHK71R$wDl-Yl-Q>^{T-XR3bE-*>yT94HCpSZ;iVwr)F3Aw_Opr$-a=~N1faY zJ?r_FpKDH$Y6^6(e1=Y?VBEfwWTpe8zU_wJOStyayunL-Mz_ZINM?iJ|u*N#as4ouE=MpK1m%=>oPxOPe{HF9ZyizmtHc0Djb|GbV-l+#TW=4cA=@gk z*TU8cJ3&?{^M8j6JOuG$2bjp(ge)&+>$b_(*iW%hpHqVLF(qds^Fnu-dhq}viJook zEGQgn9J$;xy>Wai%3pXxzAjOsVg%Jio}Y!MzrbF- zbivCj$_iFK9Mn3f!ziFXvOIKytVmHjQH#sXTYd>@B_ep(hJs1dM`cRRW3y~|)?e9~$%0-VL!w_pn1+|4nzc$}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xa#ddK`GIb^ z;D@+fM^AYEBbkN?7rqe>$9AV-*dw|>ySk`6e0>mNI<0TgNO?I5+C|Ld(snC7E4fgv z368YpGrzAq=9{84`^ace%h^5pR9L-fa)s8v@VEct7NF14^?6=T8~*!L8KaB8;*JmS z!w16sqXT6HfI(p}Fw_KW0!16c;Ks)Ab5KJl6b^;jO354l14Lj0LNJ8?51fB-%321v z5z+2=C%-stTr?IF5+10HC*T6LLvVP10Ej0~ixlOfTn!BR9awDJ87BawqX6+&P}Nbj zdvXY*s%@QO$_N1IG@!Lv6C=Gn>>iDty{r_Q=hq;BQ0)L-bm?5d*TrqG+_0{>i DWlXGg literal 0 HcmV?d00001 diff --git a/Lab01/app/static/icons/mstile-310x310.png b/Lab01/app/static/icons/mstile-310x310.png new file mode 100644 index 0000000000000000000000000000000000000000..9872429d960cb35072faf6aaa6a0f4954f8a790c GIT binary patch literal 5125 zcmdUzX*65w*TAFP%dJ)?_i7QX>Q%0an46fYX{)Yzo+7BJxj_&?%&nqT4K>A((o&_y zR$8QjwyqiyiP9hl*N~)QswirHbN}Do5C4zvhxe>?*0c8SIeV|Y_jAtPdz}Zi)@DZ! z%N_;*07uPlUb6=P4uSr?CB%e83ufUcT*LxRtxN%c*O`*LK0gWNbG|q2tpI=+WdI=Q z9ssZ{L`h!(04x{);CllA&;kHJCY1Qj&QQ2<=$3`qHNZhyCaps#iAR`QT^HwyDjbp2 zyi%$%3;>+0Hos=-7(KScM!xa%kN^2w+7a*LH?QA2F80wo$zJ{Gn_QLWmutty+_65N ztCzB&wdu@?p9p#Gb#Ig3UbO(){`v5>r&En1;WtSO7*j$b^)LDNBDQxAoj7^(?gcV= z@7&>Ec$38VW!7e5>eR|!Ha47Y%)o6<9<+8xT@*U>|L5vN68L~4weh6One=^@0j3d* zA&u-cplR`BwI~jKS7nNEjPw?&l58F}Ez-)7SsOLf%cS}?UT(#%7e1IMLUXp`l)U<} zEZ4nLr{&Wnd)pxpD#jj9qnxn{JU>Mvkj}fzarv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ayUcp-?=9~1!Gd0sEhSm*^^=UY#E&cN{G9%#6 zFysghqA46I?aFp|P@p~VZMi3@1^V%ou=Q-@$rmTec4}I^J3A_{W7<`|^1>$h2+g5k zh&=zT4*qFTlWr2_JuPf2dBPbe8jv}o<2GRu98&Du` zfYSD%Q2MlcIyIo>!wF;4ic4psu0|)uOgmVP_PIKP3SENKF@g zcSTKF=IO8Lk^_gke!879bLh?0FcJ4>Er2>(c#^XU=>KHfHW-6VQl#qYNXt~$y_5o{ zoOKjG9hol4Y|p7zo*XlCPW`ON!Ord;L zq$xHHu=iRgDqkj7d~CDP=3h}TH{pVCOc-14`^|h_>l)Ih zuqP$*zPICE45)AW?#J-h$wJ?n#NFGh3Me4rmC6od#{Z-T#v%c}mm~83=QqoL_4M$r ziQIyMV-NaaxA2+YBd)tf`1wTmLw&>jg$qCntfi$6)>hXBJ8Eh{H8r6+5H&Cu3I-qV zXTAMj3c+YUWB~5JEBIvj{329viE(s|u=j~N7aEQZKnD4ri@=5YpF@U5_yPdY#96@+ zi7;msl|CCP&75No5LJ={`AVKrI%Sa~EqdzQwIrQRKT#!;<2mZ+m!7|Af6MV5Zr0IYF*G5`Po literal 0 HcmV?d00001 diff --git a/Lab01/app/static/icons/mstile-70x70.png b/Lab01/app/static/icons/mstile-70x70.png new file mode 100644 index 0000000000000000000000000000000000000000..7342bc829a4f73eff0d4e0c39ffedc0080790862 GIT binary patch literal 1665 zcmZ{kc~H`M7{-5IU}|McE7q!zrZpAF;gMjb2CL=)C|XpQisBJoh!%>)cw|JVNtv}` zo?Tn1VYpsthH0XiW#-Z9mS?$ELR(s-%l@%5yF0Tp-}n2>^S68tsF|Eu(MHGj0@bytn(M!NaB0YGh@p*mDg+}N zx)k-gZWlJgI_Es=D$G8vc*=0lKLk&E*292YwaItEG!Dtn%ft>HJAy0r?crg*aPz!b zTP`~Vs^>HgH|#nf(_LA=zy-Y)*B-rL0j^hG&{{Geo-r5=``94Fo}ApiKK-T);hFc< zrupTYhsJ?2;+rlQX2*%440~BNmvON_^F+9jPj-?Ux>LKLn#`$bleH}fo*0+%vda_M zd4_|a9f!-V$q;N7lWnQ1lUfvi@EX2>XO_Xs4wF8r!(Lvyze{p1pu4K97a^y)dwZsf zype%C=+j`BIc%hG%`g=rwG1wsjgZlorqnUM>I7#diDy!+iy3$>Y>`bul~u_L1|9hl zm|Izuxa1)9(%DKWGGSfXR_Uvz?TH6wLs89ZDh3XY&pkGs+%op+)4&(^QdS-E=8t(XQs53uEyX%5a)^e_FYC4pH-@cm$fZ?$sv!N>+kN|9Zb#?F&*ygoIljc-bCJ+KN-x;TBr>&Otlx6{jMnp@$+cJL%NC^ABa=6%(H6E<@3hxcicF69 znv!EW`0veWKHl?lAS8#CX7{|?X}R@9mKJ3MVfx{$mGCry>zG7m`?%yc3{y(xh+_nK zubJm1GcRmN5h*I^`nMYuK?T7OkgG^f2WNg+ES4N@8XW7R0n@Xs!0Qfvrd?KC+lJ1W za`|}5i;)EaxA2ol+?h5F-BY-`%{I4Sa)~bLx4d2DG0NZdyFTS!nEBTSZ+m`bke--d z(u%*BZq$87%Y(bQ@=RE>aS2Z{?t^%rQ_!!7-p644n&GSY%%B>Z*gA)cA9(D~O}xsX z_ONZk(W>5fNVt+0s3B9usnKg88-!i;2pg8pNvB6aGHtTYz2#qvG8qAV{1w4EL;Sa% ziv!hgfmRsb6b?G|x6IUPEe9=rg?LBI@U=$M?~dHhpO^QR?FJ7sr28F>O zP*?;OMMYz9Xf)2waXSiyL!n%i + + + +Created by potrace 1.14, written by Peter Selinger 2001-2017 + + + + + + diff --git a/Lab01/app/static/icons/site.webmanifest b/Lab01/app/static/icons/site.webmanifest new file mode 100644 index 0000000..b20abb7 --- /dev/null +++ b/Lab01/app/static/icons/site.webmanifest @@ -0,0 +1,19 @@ +{ + "name": "", + "short_name": "", + "icons": [ + { + "src": "/android-chrome-192x192.png", + "sizes": "192x192", + "type": "image/png" + }, + { + "src": "/android-chrome-512x512.png", + "sizes": "512x512", + "type": "image/png" + } + ], + "theme_color": "#ffffff", + "background_color": "#ffffff", + "display": "standalone" +} diff --git a/Lab01/app/templates/index.tmpl b/Lab01/app/templates/index.tmpl new file mode 100644 index 0000000..b1d9195 --- /dev/null +++ b/Lab01/app/templates/index.tmpl @@ -0,0 +1,49 @@ + + + + + {{ .title }} + {{template "head" .}} + + +{{template "navbar" .}} + +
+
Welcome
+
+ + + + + +{{define "head"}} + + + + + + + + +{{end}} + +{{define "navbar"}} + +{{end}} \ No newline at end of file diff --git a/Lab01/app/templates/login.tmpl b/Lab01/app/templates/login.tmpl new file mode 100644 index 0000000..bfec003 --- /dev/null +++ b/Lab01/app/templates/login.tmpl @@ -0,0 +1,29 @@ + + + + + {{ .title }} + {{template "head" .}} + + +{{template "navbar" .}} + +
+
+
+ + +
The username needs to be unique
+
+
+ + +
The password needs to be different from the username
+
+ +
+
+ + + + \ No newline at end of file diff --git a/Lab01/app/templates/register.tmpl b/Lab01/app/templates/register.tmpl new file mode 100644 index 0000000..b64084b --- /dev/null +++ b/Lab01/app/templates/register.tmpl @@ -0,0 +1,45 @@ + + + + + {{ .title }} + {{template "head" .}} + + +{{template "navbar" .}} + +
+
+
+ + +
The username needs to be unique
+
+
+ + +
The password needs to be different from the username
+
+ +
+
+ + + + + \ No newline at end of file diff --git a/Lab01/app/api/types.go b/Lab01/app/webpage/types.go similarity index 74% rename from Lab01/app/api/types.go rename to Lab01/app/webpage/types.go index e9b4aed..578fc26 100644 --- a/Lab01/app/api/types.go +++ b/Lab01/app/webpage/types.go @@ -1,11 +1,11 @@ -package api +package webpage import ( "app/database" "github.com/gin-gonic/gin" ) -type Api struct { +type Webpage struct { Database database.Database Router *gin.Engine } diff --git a/Lab01/app/webpage/webpage.go b/Lab01/app/webpage/webpage.go new file mode 100644 index 0000000..e6da9a9 --- /dev/null +++ b/Lab01/app/webpage/webpage.go @@ -0,0 +1,69 @@ +package webpage + +import ( + "app/database" + "github.com/gin-contrib/static" + "github.com/gin-gonic/gin" + "net/http" + "time" +) + +func (wp *Webpage) defineRoutes() { + + wp.Router.GET("/", func(c *gin.Context) { + c.HTML(http.StatusOK, "index.tmpl", gin.H{ + "title": "Register", + }) + }) + wp.Router.GET("/login", func(c *gin.Context) { + c.HTML(http.StatusOK, "login.tmpl", gin.H{ + "title": "Login", + }) + }) + wp.Router.GET("/register", func(c *gin.Context) { + c.HTML(http.StatusOK, "register.tmpl", gin.H{ + "title": "Register", + }) + }) + wp.Router.GET("/health", func(c *gin.Context) { + currentTime := time.Now().UnixMilli() + c.JSON(http.StatusOK, gin.H{ + "timestamp": currentTime, + }) + }) + wp.Router.NoRoute(func(c *gin.Context) { + c.Redirect(http.StatusTemporaryRedirect, "/") + }) + + wp.Router.POST("/register", func(c *gin.Context) { + username, err := c.GetPostForm("username") + password, err := c.GetPostForm("password") + if err == false { + c.JSON(400, gin.H{"message": "bad post form"}) + return + } + user := database.User{Username: username, Password: password} + result := wp.Database.ORM.Create(&user) + if result.Error != nil { + c.JSON(200, gin.H{"message": "cannot create user"}) + } + c.JSON(200, gin.H{"message": "user registered"}) + }) +} + +func (wp *Webpage) initialize() { + wp.Database = database.Database{Location: "sqlite.db"} + wp.Database.Initialize() +} + +func (wp *Webpage) Run() { + wp.initialize() + wp.Router = gin.New() + wp.Router.Use(gin.Recovery()) + wp.Router.Use(gin.Logger()) + wp.Router.SetTrustedProxies(nil) + wp.Router.Use(static.Serve("/static", static.LocalFile("./static", false))) + wp.Router.LoadHTMLGlob("templates/*") + wp.defineRoutes() + wp.Router.Run() +}