Initial project import

This commit is contained in:
Agila Forge Importer committed 2026-07-13 15:20:32 +00:00
commit 23f2d29e32
11957 files changed
+1754577

No files matched your search

@@ -0,0 +1,25 @@
body {
font-family: Arial, Helvetica, sans-serif;
color: #eee;
background-color: #333;
background-image: url("v-logo.svg");
background-repeat: no-repeat;
background-size: 10em;
margin: 0;
padding-left: 11em;
}
h1 {
color: #6699CC;
}
img.logo {
float: left;
width: 10em;
}
html {
display:block;
}
@@ -0,0 +1,4 @@
<svg width="500" height="500" viewBox="0 0 500 500" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill="#536b8a" d="M 323.509,471.167 480.202,32.185 C 482.857,24.74 478.671,19.312 470.853,20.071 L 347.629,32.03 c -7.816,0.759 -16.259,7.44 -18.841,14.911 L 183.753,466.465 c -2.583,7.47 1.693,13.535 9.546,13.535 h 119.938 c 3.925,0 8.192,-3.02 9.52,-6.744 l 0.746,-2.089 v 0 0 z"/>
<path fill="#5d87be" d="M 30.055,20.07 152.165,32.029 c 7.745,0.76 16.122,7.438 18.692,14.905 l 146.766,426.302 c 1.284,3.735 -0.83,6.764 -4.721,6.764 H 193.294 c -7.781,0 -16.239,-6.044 -18.871,-13.489 L 20.791,32.185 c -2.633,-7.445 1.518,-12.874 9.264,-12.114 v 0 0 z"/>
</svg>

After

Width:  |  Height:  |  Size: 671 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

@@ -0,0 +1,12 @@
<html>
<head>
<title>@title</title>
<style>html{display:none}</style>
@css 'index.css'
</head>
<body>
<h1>@title</h1>
<h2>@subtitle</h2>
<p>@message</p>
</body>
</html>
@@ -0,0 +1,42 @@
module main
import os
import veb
// import veb.assets
import time
pub struct Context {
veb.Context
}
pub struct App {
veb.StaticHandler
}
fn main() {
mut app := &App{}
app.serve_static('/favicon.ico', 'favicon.ico')!
// Automatically make available known static mime types found in given directory.
os.chdir(os.dir(os.executable()))!
app.handle_static('assets', true)!
veb.run[App, Context](mut app, 8080)
}
pub fn (mut app App) index(mut ctx Context) veb.Result {
// We can dynamically specify which assets are to be used in template.
// mut am := assets.new_manager()
// am.add_css('assets/index.css')
// css := am.include_css(false)
title := 'Veb Assets Example'
subtitle := 'Veb can serve static assets too!'
message := 'It also has an Assets Manager that allows dynamically specifying which CSS and JS files to be used.'
return $veb.html()
}
fn (mut app App) text(mut ctx Context) veb.Result {
return ctx.text('Hello, world from veb!')
}
fn (mut app App) time(mut ctx Context) veb.Result {
return ctx.text(time.now().format())
}
@@ -0,0 +1,42 @@
module main
import os
import veb
// import veb.assets
import time
pub struct Context {
veb.Context
}
pub struct App {
veb.StaticHandler
}
fn main() {
mut app := &App{}
app.serve_static('/favicon.ico', 'favicon.ico')!
// Automatically make available known static mime types found in given directory.
os.chdir(os.dir(os.executable()))!
app.handle_static('assets', true)!
veb.run[App, Context](mut app, 8080)
}
pub fn (mut app App) index(mut ctx Context) veb.Result {
// We can dynamically specify which assets are to be used in template.
// mut am := assets.new_manager()
// am.add_css('assets/index.css')
// css := am.include_css(false)
title := 'Veb Assets Example'
subtitle := 'Veb can serve static assets too!'
message := 'It also has an Assets Manager that allows dynamically specifying which CSS and JS files to be used.'
return $veb.html()
}
fn (mut app App) text(mut ctx Context) veb.Result {
return ctx.text('Hello, world from veb!')
}
fn (mut app App) time(mut ctx Context) veb.Result {
return ctx.text(time.now().format())
}