commit a8b097ba1839673576bcacc30280d2c95a104f06
Author: ffff:60.163.37.244 <ffff:60.163.37.244@hub.scroll.pub>
Date: 2024-12-30 01:25:32 +0000
Subject: created untitled.scroll
diff --git a/untitled.scroll b/untitled.scroll
new file mode 100644
index 0000000..e69de29
commit bb424ef8f8ab5a29adac232a405be21e0ba32f9e
Author: root <root@hub.scroll.pub>
Date: 2024-12-30 01:23:01 +0000
Subject: Initial commit
diff --git a/body.html b/body.html
new file mode 100644
index 0000000..b6779c7
--- /dev/null
+++ b/body.html
@@ -0,0 +1,29 @@
+<header>
+ <h1>FlyTrack</h1>
+ <p>Real-Time Flight Price Tracker</p>
+</header>
+
+<main>
+ <section class="search">
+ <input type="text" id="origin" placeholder="From (City or Airport)" aria-label="Origin">
+ <input type="text" id="destination" placeholder="To (City or Airport)" aria-label="Destination">
+ <button id="track-btn">Track Prices</button>
+ </section>
+
+ <section class="results">
+ <h2>Tracked Flights</h2>
+ <div class="sort-controls">
+ <label for="sort">Sort by:</label>
+ <select id="sort">
+ <option value="price-asc">Price (Low to High)</option>
+ <option value="price-desc">Price (High to Low)</option>
+ <option value="date">Date</option>
+ </select>
+ </div>
+ <div id="flight-list" class="flight-list"></div>
+ </section>
+</main>
+
+<footer>
+ <p>FlyTrack - Your smart flight price tracker</p>
+</footer>
\ No newline at end of file
diff --git a/index.scroll b/index.scroll
new file mode 100644
index 0000000..17d77b4
--- /dev/null
+++ b/index.scroll
@@ -0,0 +1,8 @@
+buildHtml
+baseUrl https://flytrack.scroll.pub
+metaTags
+editButton /edit.html
+title FlyTrack - Real-Time Flight Price Tracker
+style.css
+body.html
+script.js
\ No newline at end of file
diff --git a/prompt.json b/prompt.json
new file mode 100644
index 0000000..88dfda7
--- /dev/null
+++ b/prompt.json
@@ -0,0 +1,25 @@
+{
+ "id": "b0045aa3-0a5c-4680-b227-c48ab8b0f87d",
+ "object": "chat.completion",
+ "created": 1735521762,
+ "model": "deepseek-chat",
+ "choices": [
+ {
+ "index": 0,
+ "message": {
+ "role": "assistant",
+ "content": "---domain---\nflytrack.scroll.pub\n---index.scroll---\nbuildHtml\nbaseUrl https://flytrack.scroll.pub\nmetaTags\neditButton /edit.html\ntitle FlyTrack - Real-Time Flight Price Tracker\nstyle.css\nbody.html\nscript.js\n---body.html---\n<header>\n <h1>FlyTrack</h1>\n <p>Real-Time Flight Price Tracker</p>\n</header>\n\n<main>\n <section class=\"search\">\n <input type=\"text\" id=\"origin\" placeholder=\"From (City or Airport)\" aria-label=\"Origin\">\n <input type=\"text\" id=\"destination\" placeholder=\"To (City or Airport)\" aria-label=\"Destination\">\n <button id=\"track-btn\">Track Prices</button>\n </section>\n\n <section class=\"results\">\n <h2>Tracked Flights</h2>\n <div class=\"sort-controls\">\n <label for=\"sort\">Sort by:</label>\n <select id=\"sort\">\n <option value=\"price-asc\">Price (Low to High)</option>\n <option value=\"price-desc\">Price (High to Low)</option>\n <option value=\"date\">Date</option>\n </select>\n </div>\n <div id=\"flight-list\" class=\"flight-list\"></div>\n </section>\n</main>\n\n<footer>\n <p>FlyTrack - Your smart flight price tracker</p>\n</footer>\n---style.css---\n:root {\n --primary: #2563eb;\n --secondary: #1e40af;\n --background: #f8fafc;\n --text: #1e293b;\n --border: #e2e8f0;\n}\n\n* {\n margin: 0;\n padding: 0;\n box-sizing: border-box;\n}\n\nbody {\n font-family: system-ui, -apple-system, sans-serif;\n line-height: 1.5;\n color: var(--text);\n background: var(--background);\n min-height: 100vh;\n display: flex;\n flex-direction: column;\n}\n\nheader {\n background: var(--primary);\n color: white;\n padding: 2rem;\n text-align: center;\n}\n\nheader h1 {\n font-size: 2.5rem;\n margin-bottom: 0.5rem;\n}\n\nmain {\n flex: 1;\n padding: 2rem;\n max-width: 1200px;\n margin: 0 auto;\n width: 100%;\n}\n\n.search {\n display: grid;\n grid-template-columns: 1fr 1fr auto;\n gap: 1rem;\n margin-bottom: 2rem;\n}\n\n.search input,\n.search button {\n padding: 0.75rem;\n border: 1px solid var(--border);\n border-radius: 0.5rem;\n font-size: 1rem;\n}\n\n.search button {\n background: var(--primary);\n color: white;\n cursor: pointer;\n transition: background 0.2s;\n}\n\n.search button:hover {\n background: var(--secondary);\n}\n\n.results {\n background: white;\n border-radius: 0.5rem;\n box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);\n padding: 1.5rem;\n}\n\n.sort-controls {\n display: flex;\n align-items: center;\n gap: 0.5rem;\n margin-bottom: 1rem;\n}\n\n.sort-controls select {\n padding: 0.5rem;\n border: 1px solid var(--border);\n border-radius: 0.25rem;\n}\n\n.flight-list {\n display: grid;\n gap: 1rem;\n}\n\n.flight-item {\n display: grid;\n grid-template-columns: 1fr auto;\n gap: 1rem;\n padding: 1rem;\n border: 1px solid var(--border);\n border-radius: 0.5rem;\n}\n\n.flight-item .price {\n font-weight: bold;\n color: var(--primary);\n}\n\nfooter {\n text-align: center;\n padding: 1rem;\n background: var(--primary);\n color: white;\n}\n\n@media (max-width: 768px) {\n .search {\n grid-template-columns: 1fr;\n }\n}\n---script.js---\nconst flightList = document.getElementById('flight-list');\nconst trackBtn = document.getElementById('track-btn');\nconst sortSelect = document.getElementById('sort');\n\nlet flights = [];\n\nfunction addFlight(origin, destination, price) {\n const flight = {\n id: Date.now(),\n origin,\n destination,\n price,\n date: new Date().toLocaleString()\n };\n flights.push(flight);\n renderFlights();\n}\n\nfunction renderFlights() {\n const sortedFlights = sortFlights();\n flightList.innerHTML = sortedFlights.map(flight => `\n <div class=\"flight-item\">\n <div>\n <strong>${flight.origin} → ${flight.destination}</strong>\n <div class=\"date\">${flight.date}</div>\n </div>\n <div class=\"price\">$${flight.price}</div>\n </div>\n `).join('');\n}\n\nfunction sortFlights() {\n const sortValue = sortSelect.value;\n return [...flights].sort((a, b) => {\n if (sortValue === 'price-asc') return a.price - b.price;\n if (sortValue === 'price-desc') return b.price - a.price;\n return new Date(b.date) - new Date(a.date);\n });\n}\n\ntrackBtn.addEventListener('click', () => {\n const origin = document.getElementById('origin').value;\n const destination = document.getElementById('destination').value;\n const price = Math.floor(Math.random() * 500) + 100; // Simulated price\n if (origin && destination) {\n addFlight(origin, destination, price);\n }\n});\n\nsortSelect.addEventListener('change', renderFlights);\n\n// Initial data\naddFlight('New York (JFK)', 'London (LHR)', 450);\naddFlight('Los Angeles (LAX)', 'Tokyo (NRT)', 850);\naddFlight('Chicago (ORD)', 'Paris (CDG)', 600);\n---end---"
+ },
+ "logprobs": null,
+ "finish_reason": "stop"
+ }
+ ],
+ "usage": {
+ "prompt_tokens": 257,
+ "completion_tokens": 1355,
+ "total_tokens": 1612,
+ "prompt_cache_hit_tokens": 0,
+ "prompt_cache_miss_tokens": 257
+ },
+ "system_fingerprint": "fp_f1afce2943"
+}
\ No newline at end of file
diff --git a/readme.scroll b/readme.scroll
new file mode 100644
index 0000000..890ffe0
--- /dev/null
+++ b/readme.scroll
@@ -0,0 +1,2 @@
+# flytrack.scroll.pub
+Website generated by DeepSeek from prompt: 我需要一个网页,用来实时记录所选地往返机票的当前价格和历史价格,并且能按照价格顺序排列
\ No newline at end of file
diff --git a/script.js b/script.js
new file mode 100644
index 0000000..e9bcab5
--- /dev/null
+++ b/script.js
@@ -0,0 +1,55 @@
+const flightList = document.getElementById('flight-list');
+const trackBtn = document.getElementById('track-btn');
+const sortSelect = document.getElementById('sort');
+
+let flights = [];
+
+function addFlight(origin, destination, price) {
+ const flight = {
+ id: Date.now(),
+ origin,
+ destination,
+ price,
+ date: new Date().toLocaleString()
+ };
+ flights.push(flight);
+ renderFlights();
+}
+
+function renderFlights() {
+ const sortedFlights = sortFlights();
+ flightList.innerHTML = sortedFlights.map(flight => `
+ <div class="flight-item">
+ <div>
+ <strong>${flight.origin} → ${flight.destination}</strong>
+ <div class="date">${flight.date}</div>
+ </div>
+ <div class="price">$${flight.price}</div>
+ </div>
+ `).join('');
+}
+
+function sortFlights() {
+ const sortValue = sortSelect.value;
+ return [...flights].sort((a, b) => {
+ if (sortValue === 'price-asc') return a.price - b.price;
+ if (sortValue === 'price-desc') return b.price - a.price;
+ return new Date(b.date) - new Date(a.date);
+ });
+}
+
+trackBtn.addEventListener('click', () => {
+ const origin = document.getElementById('origin').value;
+ const destination = document.getElementById('destination').value;
+ const price = Math.floor(Math.random() * 500) + 100; // Simulated price
+ if (origin && destination) {
+ addFlight(origin, destination, price);
+ }
+});
+
+sortSelect.addEventListener('change', renderFlights);
+
+// Initial data
+addFlight('New York (JFK)', 'London (LHR)', 450);
+addFlight('Los Angeles (LAX)', 'Tokyo (NRT)', 850);
+addFlight('Chicago (ORD)', 'Paris (CDG)', 600);
\ No newline at end of file
diff --git a/style.css b/style.css
new file mode 100644
index 0000000..79d8bbb
--- /dev/null
+++ b/style.css
@@ -0,0 +1,121 @@
+:root {
+ --primary: #2563eb;
+ --secondary: #1e40af;
+ --background: #f8fafc;
+ --text: #1e293b;
+ --border: #e2e8f0;
+}
+
+* {
+ margin: 0;
+ padding: 0;
+ box-sizing: border-box;
+}
+
+body {
+ font-family: system-ui, -apple-system, sans-serif;
+ line-height: 1.5;
+ color: var(--text);
+ background: var(--background);
+ min-height: 100vh;
+ display: flex;
+ flex-direction: column;
+}
+
+header {
+ background: var(--primary);
+ color: white;
+ padding: 2rem;
+ text-align: center;
+}
+
+header h1 {
+ font-size: 2.5rem;
+ margin-bottom: 0.5rem;
+}
+
+main {
+ flex: 1;
+ padding: 2rem;
+ max-width: 1200px;
+ margin: 0 auto;
+ width: 100%;
+}
+
+.search {
+ display: grid;
+ grid-template-columns: 1fr 1fr auto;
+ gap: 1rem;
+ margin-bottom: 2rem;
+}
+
+.search input,
+.search button {
+ padding: 0.75rem;
+ border: 1px solid var(--border);
+ border-radius: 0.5rem;
+ font-size: 1rem;
+}
+
+.search button {
+ background: var(--primary);
+ color: white;
+ cursor: pointer;
+ transition: background 0.2s;
+}
+
+.search button:hover {
+ background: var(--secondary);
+}
+
+.results {
+ background: white;
+ border-radius: 0.5rem;
+ box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
+ padding: 1.5rem;
+}
+
+.sort-controls {
+ display: flex;
+ align-items: center;
+ gap: 0.5rem;
+ margin-bottom: 1rem;
+}
+
+.sort-controls select {
+ padding: 0.5rem;
+ border: 1px solid var(--border);
+ border-radius: 0.25rem;
+}
+
+.flight-list {
+ display: grid;
+ gap: 1rem;
+}
+
+.flight-item {
+ display: grid;
+ grid-template-columns: 1fr auto;
+ gap: 1rem;
+ padding: 1rem;
+ border: 1px solid var(--border);
+ border-radius: 0.5rem;
+}
+
+.flight-item .price {
+ font-weight: bold;
+ color: var(--primary);
+}
+
+footer {
+ text-align: center;
+ padding: 1rem;
+ background: var(--primary);
+ color: white;
+}
+
+@media (max-width: 768px) {
+ .search {
+ grid-template-columns: 1fr;
+ }
+}
\ No newline at end of file