mirror of
https://github.com/alex-s168/website.git
synced 2025-09-09 17:05:07 +02:00
c
This commit is contained in:
@@ -54,7 +54,7 @@ rule minhtml
|
||||
|
||||
build build.ninja: regen | config.py build/badges.txt res pages
|
||||
|
||||
build build/deploy/coffee.js : python_capture coffee/gen_js.py
|
||||
build build/deploy/coffee.js : python_capture gen_coffee_js.py
|
||||
|
||||
rule cargo_release_bin
|
||||
command = (cd $in && cargo build --release) && cp $in/target/release/$file $out
|
||||
@@ -64,6 +64,7 @@ build build/coffee_server : cargo_release_bin coffee
|
||||
file = coffee
|
||||
"""
|
||||
|
||||
web_targets.append("build/deploy/coffee.js")
|
||||
web_targets.append("build/coffee_server")
|
||||
|
||||
pages = [x for x in os.listdir("./pages/")]
|
||||
|
@@ -17,14 +17,14 @@ const tz = Intl.DateTimeFormat().resolvedOptions().timeZone;
|
||||
if(tz==null) return null;
|
||||
const c=\""""+out+"""\".split("|");
|
||||
for(let i=0;i<c.length;i+=2){
|
||||
if(c[i]===timezone){
|
||||
if(c[i]===tz){
|
||||
return c[i+1];
|
||||
}}
|
||||
return null;
|
||||
}
|
||||
|
||||
async function byCountry(country) {
|
||||
const url = `http://127.0.0.1:3000/price/${encodeURIComponent(country)}`;
|
||||
const url = `https://coffee-price.vxcc.dev/price/${encodeURIComponent(country)}`;
|
||||
|
||||
try {
|
||||
const response = await fetch(url);
|
@@ -105,6 +105,8 @@
|
||||
gotoVariant('.min.pdf');
|
||||
});
|
||||
")
|
||||
|
||||
html.elem("script", attrs:("src":"coffee.js","async":""))
|
||||
}
|
||||
]
|
||||
}
|
||||
|
Reference in New Issue
Block a user