-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
97 lines (76 loc) · 3.2 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Beach menu</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<h1>welcome to da beach</h1>
<h2>meny</h2>
<div class="topnav">
<a href="#leggtilmeny">meny</a>
<a class="active" href="#home">Home</a>
</div>
</div>
<div id="leggtilmeny">
<form>
<label for="inputBox1">hovedrett: </label>
<input type="text" id="inputBox1" name="hovedrett">
<br>
<label for="inputBox2">Desert:</label>
<input type="text" id="inputBox2" name="Desert">
<button type="button" id="leggtilmeny">Add hovedrett to meny</button>
<button type="button" id="leggtilmeny">Add Desert to meny </button>
</form>
</div>
<br>
<br>
<br>
<br>
<br>
<div id="activities">
<h1 id="activities">Activities</h1>
<button id="viewActBtn">Display</button>
<p id="viewAct">aktiviteter idag:</p>
<!-- <img id="myImage" src="placeholder.jpg" alt="blank"> -->
</div>
<script type="module">
// Import the functions you need from the SDKs you need
import { initializeApp } from "https://www.gstatic.com/firebasejs/9.6.3/firebase-app.js";
// TODO: Add SDKs for Firebase products that you want to use
// https://firebase.google.com/docs/web/setup#available-libraries
import { getFirestore, addDoc, collection } from "https://www.gstatic.com/firebasejs/9.6.3/firebase-firestore.js"
// Your web app's Firebase configuration
const firebaseConfig = {
apiKey: "AIzaSyCrCsxxIIYTUpF8uJ12a49UTsDx9KIrbtU",
authDomain: "white-sand-beach.firebaseapp.com",
projectId: "white-sand-beach",
storageBucket: "white-sand-beach.appspot.com",
messagingSenderId: "195541876312",
appId: "1:195541876312:web:9c2e5805b988c51071542d",
};
// Initialize Firebase
const app = initializeApp(firebaseConfig);
const db = getFirestore();
document.getElementById("leggtilmeny").addEventListener("click", addDocFOOD)
function addDocFOOD() {
const input = document.getElementById("inputBox1","inputbox2").value; // retrieve input data
if (input === "") {
} else {
addDoc(_hovedrett_, { Text: input }); // legg til i hovedrett collection?
}}
// display all activities inni activites tab i firestore tingen
// const ACTV10 = document.getElementById("ViewAct")
// ACTV10.addEventlistener("click", randomshitGO())
// function randomshitGO() {
// const activityDoc = db.collection("activities").doc("activities");
// }
</script>
<script src="/script.js"></script>
<!-- <script src="https://www.gstatic.com/firebasejs/8.10.1/firebase-app.js"></script>
<script src="https://www.gstatic.com/firebasejs/8.10.1/firebase-firestore.js"></script> -->
</body>
</html>