initial html changes

This commit is contained in:
Gvidas Juknevičius 2024-03-27 23:19:07 +02:00
parent 7fbfbaa039
commit c55d6d37e2
Signed by: MCorange
GPG Key ID: 12B1346D720B7FBB
6 changed files with 233 additions and 12 deletions

View File

@ -15,7 +15,8 @@ pub(crate) async fn start_actix(config: &Config, database: Database) -> anyhow::
App::new() App::new()
.app_data(actix_web::web::Data::new(database.clone())) .app_data(actix_web::web::Data::new(database.clone()))
.route("/", web::get().to(routes::index)) // index.html .route("/", web::get().to(routes::index)) // index.html
.service(actix_fs::Files::new("/static", "./static").index_file("index.html")) // static directoryh .service(actix_fs::Files::new("/static", "./static").index_file("index.html")) // static directory
.service(web::redirect("/favicon.ico", "/static/favicon.ico")) //? special redirect for favicon
}) })
.bind(bindip)? .bind(bindip)?

23
static/css/global.css Normal file
View File

@ -0,0 +1,23 @@
/* fonts here */
:root {
/* global vars like colors here */
}
#nav {
}
.nav-logo {
}
.nav-btn {
}
.nav-btn-active {
}

3
static/css/index.css Normal file
View File

@ -0,0 +1,3 @@

BIN
static/favicon.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

188
static/logo.svg Normal file
View File

@ -0,0 +1,188 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
width="512"
height="512"
viewBox="0 0 512 512"
version="1.1"
id="svg1"
inkscape:version="1.3 (0e150ed6c4, 2023-07-21)"
sodipodi:docname="logo.svg"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg">
<sodipodi:namedview
id="namedview1"
pagecolor="#ffffff"
bordercolor="#000000"
borderopacity="0.25"
inkscape:showpageshadow="2"
inkscape:pageopacity="0.0"
inkscape:pagecheckerboard="0"
inkscape:deskcolor="#d1d1d1"
inkscape:document-units="px"
showguides="true"
inkscape:zoom="1.4142136"
inkscape:cx="177.13025"
inkscape:cy="249.60869"
inkscape:window-width="1920"
inkscape:window-height="1008"
inkscape:window-x="0"
inkscape:window-y="0"
inkscape:window-maximized="1"
inkscape:current-layer="layer1" />
<defs
id="defs1">
<linearGradient
id="linearGradient31"
inkscape:collect="always">
<stop
style="stop-color:#f67400;stop-opacity:1;"
offset="0"
id="stop31" />
<stop
style="stop-color:#ffa900;stop-opacity:1;"
offset="1"
id="stop32" />
</linearGradient>
<linearGradient
id="linearGradient28"
inkscape:collect="always">
<stop
style="stop-color:#1d99f3;stop-opacity:1;"
offset="0"
id="stop28" />
<stop
style="stop-color:#1d99f3;stop-opacity:0;"
offset="1"
id="stop29" />
</linearGradient>
<rect
x="48.39801"
y="285.93035"
width="420.29851"
height="205.05473"
id="rect27" />
<inkscape:perspective
sodipodi:type="inkscape:persp3d"
inkscape:vp_x="2.7017811 : 509.06683 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_z="512 : 508.16623 : 1"
inkscape:persp3d-origin="256 : 170.66667 : 1"
id="perspective1" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient28"
id="linearGradient29"
x1="67.022438"
y1="377.68173"
x2="449.67835"
y2="377.68173"
gradientUnits="userSpaceOnUse" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient31"
id="linearGradient32"
x1="377.56213"
y1="405.26718"
x2="427.09479"
y2="405.26718"
gradientUnits="userSpaceOnUse"
spreadMethod="pad" />
</defs>
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1">
<g
id="g27"
transform="translate(9.9440233,-52.65273)"
style="fill:#1cdc9a;fill-opacity:1">
<rect
style="fill:#1cdc9a;fill-opacity:1;stroke-width:428.84"
id="rect27-5"
width="171.11281"
height="26.11722"
x="-137.52403"
y="230.87894"
ry="13.05861"
transform="rotate(-38.024163)" />
<rect
style="fill:#1cdc9a;fill-opacity:1;stroke-width:428.84"
id="rect27-5-2"
width="171.11281"
height="26.11722"
x="82.720062"
y="30.666622"
ry="13.05861"
transform="rotate(36.975837)"
inkscape:transform-center-x="1.4392195"
inkscape:transform-center-y="-2.910766" />
</g>
<rect
style="fill:#1cdc9a;fill-opacity:1;stroke-width:467.038"
id="rect27-5-7"
width="202.95358"
height="26.117233"
x="241.77534"
y="203.61469"
ry="13.058617"
transform="matrix(0.99999918,0.00127817,-0.00179812,0.99999838,0,0)" />
<text
xml:space="preserve"
id="text27"
style="font-size:192px;line-height:0;font-family:'Bitstream Vera Sans';-inkscape-font-specification:'Bitstream Vera Sans';white-space:pre;shape-inside:url(#rect27);fill:#1d99f3;fill-opacity:1;stroke-width:428.84;stroke-dasharray:none;paint-order:stroke fill markers"><tspan
x="48.398438"
y="446.22573"
id="tspan2"><tspan
style="line-height:1.1;font-family:'Noto Sans';-inkscape-font-specification:'Noto Sans'"
id="tspan1">MCo</tspan></tspan></text>
<circle
style="fill:url(#linearGradient32);fill-opacity:1;stroke-width:428.84;stroke-dasharray:none;paint-order:stroke fill markers"
id="path29"
cx="402.32846"
cy="405.26718"
r="24.766327" />
<rect
style="fill:#1cdc9a;fill-opacity:1;stroke-width:428.84;stroke-dasharray:none;paint-order:stroke fill markers"
id="rect30"
width="5.8538513"
height="19.362751"
x="399.17639"
y="364.74045"
ry="2.9269295" />
<ellipse
style="fill:#1cdc9a;fill-opacity:1;stroke-width:428.84;stroke-dasharray:none;paint-order:stroke fill markers"
id="path30"
cx="409.08292"
cy="372.17035"
rx="6.3041558"
ry="3.8275232" />
<ellipse
style="fill:#000000;fill-opacity:1;stroke-width:428.84;stroke-dasharray:none;paint-order:stroke fill markers"
id="path33"
cx="387.34329"
cy="399.20398"
rx="2.3880596"
ry="2.5472636" />
<ellipse
style="fill:#000000;fill-opacity:1;stroke-width:428.84;stroke-dasharray:none;paint-order:stroke fill markers"
id="path33-6"
cx="406.97513"
cy="399.05472"
rx="2.3880596"
ry="2.5472636" />
<rect
style="fill:#000000;fill-opacity:1;stroke-width:229.347"
id="rect27-5-7-5"
width="21.194334"
height="1.9206688"
x="387.99863"
y="407.37613"
ry="0.96033442"
transform="matrix(0.99999995,3.0821866e-4,-0.00745654,0.9999722,0,0)" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 5.8 KiB

View File

@ -1,14 +1,20 @@
<!DOCTYPE html> <!DOCTYPE html>
<html> <html lang="en">
<head> <head>
<title>placeholder</title> <title>Document</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<!-- <script src="https://unpkg.com/htmx.org@1.9.11"></script> -->
</head> </head>
<body> <body>
<div id="nav">
<a class="nav-logo" href="#home"> <img src="/static/logo.svg" alt="Website Logo"> </a>
<a class="nav-btn nav-btn-active" href="#home">Home</a>
<a class="nav-btn" href="#projects">Projects</a>
<a class="nav-btn" href="#contact">Contact</a>
<a class="nav-btn" href="#supportme">Support Me</a>
</div>
<h1>{{placeholder}}</h1> <!-- <h1>{{placeholder}}</h1> -->
</body> </body>
</html> </html>