first commit
This commit is contained in:
89
src/routes/contact/+page.svelte
Executable file
89
src/routes/contact/+page.svelte
Executable file
@@ -0,0 +1,89 @@
|
||||
<script>
|
||||
import "../../app.postcss";
|
||||
import { onMount } from "svelte";
|
||||
import { PUBLIC_BASE_URL } from "$env/static/public";
|
||||
|
||||
let oil_price = [];
|
||||
let price_of_oil = 0;
|
||||
let company = [];
|
||||
let tel_number = "";
|
||||
let company_name = "";
|
||||
|
||||
onMount(async () => {
|
||||
await fetch(PUBLIC_BASE_URL + "/info/price/oil", {
|
||||
method: "get",
|
||||
credentials: "include",
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
},
|
||||
})
|
||||
.then((response) => response.json())
|
||||
.then((result) => (oil_price = result));
|
||||
|
||||
if (oil_price["ok"] == true) {
|
||||
price_of_oil = oil_price["price"];
|
||||
}
|
||||
});
|
||||
onMount(async () => {
|
||||
await fetch(PUBLIC_BASE_URL + "/info/company", {
|
||||
method: "get",
|
||||
credentials: "include",
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
},
|
||||
})
|
||||
.then((response) => response.json())
|
||||
.then((result) => (company = result));
|
||||
|
||||
if (company["ok"] == true) {
|
||||
company_name = company["name"];
|
||||
tel_number = company["telephone"];
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
<div class="bg-blue-400 px-10">
|
||||
<div
|
||||
class="max-w-7xl justify-center py-5 mx-auto font-bold text-2xl text-blue-800"
|
||||
>
|
||||
Contact
|
||||
</div>
|
||||
</div>
|
||||
<div class="max-w-7xl mx-auto mb-20">
|
||||
<div class="grid grid-cols-2">
|
||||
<div class="col-span-1 p-5">
|
||||
<div class="text-2xl font-bold text-blue-600">Contact Good Oil</div>
|
||||
<div class="mb-20 text-xl">Phone: {tel_number}</div>
|
||||
|
||||
<div class="mb-10">
|
||||
<div class="font-bold text-2xl text-blue-600 max-w-7xl mx-auto">
|
||||
Business Hours Summer
|
||||
</div>
|
||||
<div class="font-bold text-xl bg-blue-600 text-blue-800 h-2 mb-2"></div>
|
||||
<div class="text-xl">8:00 a.m. – 5:00 p.m.</div>
|
||||
<div class="text-xl">Tuesday: 8:30 a.m. – 5:00 p.m.</div>
|
||||
<div class="text-xl">Wednesday: 8:30 a.m. – 5:00 p.m.</div>
|
||||
<div class="text-xl">Thursday: 8:00 a.m. – 5:00 p.m.</div>
|
||||
<div class="text-xl">Friday: 8:00 a.m. – 3:00 p.m.</div>
|
||||
<div class="text-xl">Saturday: Closed</div>
|
||||
<div class="text-xl">Sunday: Closed</div>
|
||||
</div>
|
||||
<div class="">
|
||||
<div class="font-bold text-2xl text-blue-600 max-w-7xl mx-auto">
|
||||
Business Hours Winter
|
||||
</div>
|
||||
<div class="font-bold text-xl bg-blue-600 text-blue-800 h-2 mb-2"></div>
|
||||
<div class="text-xl">8:00 a.m. – 5:00 p.m.</div>
|
||||
<div class="text-xl">Tuesday: 8:30 a.m. – 5:00 p.m.</div>
|
||||
<div class="text-xl">Wednesday: 8:30 a.m. – 5:00 p.m.</div>
|
||||
<div class="text-xl">Thursday: 8:00 a.m. – 5:00 p.m.</div>
|
||||
<div class="text-xl">Friday: 8:00 a.m. – 5:00 p.m.</div>
|
||||
<div class="text-xl">Saturday: 8:00 a.m. – 1:00 p.m.</div>
|
||||
<div class="text-xl">Sunday: Closed</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-span-1">
|
||||
<img class=" w-auto" src="/images/contact.png" alt="" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
Reference in New Issue
Block a user