This commit is contained in:
Emilie Ouwerx 2023-12-05 16:01:51 +03:00
commit 62ad2261e2
4 changed files with 48 additions and 2 deletions

2
.gitignore vendored
View File

@ -21,10 +21,10 @@ yarn.lock
package-lock.json
dist
.temp
run*
install*
public
public/*
public/home/index.html
static/css
tailwindcss
tmp_content

View File

@ -1,5 +1,5 @@
# The URL the site will be built for
base_url = "https://www2.something.tf/"
base_url = "http://localhost:8089/"
# Change this to your own URL! Please note this variable **must** be uncommented.
title = "A Template Website"

View File

@ -7,6 +7,25 @@ draft: false
weight: 1
---
!!flowrift.hero
subtext: ''
header: 'Une fleur pour la paix'
description: 'Dr Denis Mukwege is a world-renowned gynaecologist, human rights activist and Nobel Peace Prize laureate from east Congo. He has become the worlds leading specialist in the treatment of wartime sexual violence and a global campaigner against the use of rape as a weapon of war. Dr Mukwege is running for president and wants to restore peace and defeat hunger.'
image: 'home/flowers4peace.jpeg'
blue_btn_label: 'Learn more'
blue_btn_url: '#'
gray_btn_label: 'Donate'
gray_btn_url: '#'
!!flowrift.cta
header: 'Call to Action!'
subheader: 'Up to 70% off.'
description: 'This is a section of some simple filler text, also known as placeholder text. It shares some characteristics of a real written text.'
button_label: 'Save now'
button_url: '/save_now'
image: 'https://images.unsplash.com/photo-1505846951821-e25bacf2eccd?auto=format&q=75&fit=crop&crop=top&w=1000&h=500'
{% row(style="center" margin="tight" bgPath="flower.png" bgStyle="full") %}

27
run.vsh Normal file
View File

@ -0,0 +1,27 @@
import freeflowuniverse.webcomponents.preprocessor
import freeflowuniverse.webcomponents.tailwind
import vweb
import os
pub struct App {
vweb.Context
}
fn main() {
cp_all('${dir(@FILE)}/content', '${dir(@FILE)}/tmp_content', true)!
preprocessor.preprocess('${os.dir(@FILE)}/content')!
rmdir_all('public')!
rmdir_all('static/css')!
execute('./tailwindcss -i css/index.css -o ./static/css/index.css --minify')
execute('zola build')
execute('rsync -a ${dir(@FILE)}/tmp_content/ ${dir(@FILE)}/content/')
rmdir_all('${dir(@FILE)}/tmp_content')!
mut app := App{}
app.mount_static_folder_at('${dir(@FILE)}/public', '/')
vweb.run(&app, 8089)
}
pub fn (mut app App) index() vweb.Result {
return app.html(read_file('./public/index.html') or { panic(err) })
}