feat: add routes page with filtering and drawer details

- Implemented a new routes page with search and category filtering.
- Added a drawer component to display detailed information about selected routes.
- Created a CSS file for styling the routes page and its components.
- Introduced a Python script to upload seed images to SeaweedFS and generate SQL insert statements for the images table.
This commit is contained in:
phattaranun.a committed 2026-07-18 16:51:23 +07:00
commit bc1edb39ef
69 files changed
+3670

No files matched your search

+881
View File
@@ -0,0 +1,881 @@
#!/usr/bin/env python3
"""Horizontal click-flow diagram with row-aware centering and orthogonal arrows."""
import asyncio
import os
import random
import sys
import subprocess
from pathlib import Path
from math import atan2, cos, sin
VENV_DIR = Path(__file__).resolve().parent.parent / ".venv"
VENV_PY = VENV_DIR / "bin" / "python"
if Path(sys.prefix).resolve() != VENV_DIR.resolve() and VENV_PY.exists():
raise SystemExit(subprocess.run([str(VENV_PY), *sys.argv], check=False).returncode)
from playwright.async_api import async_playwright
from PIL import Image, ImageDraw, ImageFont
Image.MAX_IMAGE_PIXELS = None
ROOT = Path(__file__).resolve().parent
SHOTS_DIR = ROOT / "screenshots"
OUT_PNG = ROOT / "frontend-web-transit-flow.png"
VIEWPORT = {"width": 1600, "height": 1000}
OUTPUT_SCALE = 2
BASE = os.environ.get("FRONTEND_BASE", "http://localhost:13000")
STOP_CODE = os.environ.get("STOP_CODE", "at_main_terminal")
ROUTE_ID = os.environ.get("ROUTE_ID", "101")
URLS = {
"index.html": "/",
"busStop.html": "/stops",
"stopDetail.html": f"/stops/details?code={STOP_CODE}",
"stopDetailExpanded.html": f"/stops/details?code={STOP_CODE}",
"busDetail.html": f"/routes/{ROUTE_ID}",
"busDetailExpanded.html": f"/routes/{ROUTE_ID}",
}
# id, page, selector_or_None, col, row, marker_label, panel_title, span_rows, align_mode
# row: integer row index (0=top). span_rows: if >1, node is centered across N rows.
# align_mode: "top" or "center-row" (centered vertically within its row band when span_rows == 1)
NODES = [
# Row 0 (top) — stop discovery flow
("N1", "index.html", None,
0, 0, "", "index.html", 1, "top"),
("N2a", "index.html", '.hero__actions a[href="/stops"]',
1, 0, "คลิก 'ป้ายหยุดรถ'", "index.html · ป้ายหยุดรถ", 1, "top"),
("N3a", "busStop.html", '.tile-grid a.tile[href^="/stops/"]',
2, 0, "คลิกจุดจอด 'บขส.อ่างทอง'", "busStop.html", 1, "center-row"),
("N4a", "stopDetail.html", None,
4, 0, "ถึงรายละเอียดป้าย ?stop=at_main_terminal", "stopDetail.html", 1, "center-row"),
("N4b", "stopDetailExpanded.html", '.schedule-card__route[href^="/routes/"]',
5, 0, "คลิกสายจากตารางเวลา", "stopDetail.html (expanded)", 1, "center-row"),
# Row 1 (bottom) — route detail flow
("N2b", "index.html", f'.zone .grid a.card[href="/routes/{ROUTE_ID}"]',
1, 1, "คลิกหมายเลขสาย 101", "index.html · สาย 101", 1, "top"),
("N3b", "busDetail.html", ".stop-timeline a.stop-node__title",
2, 1, "คลิกจุดจอดแรกในสาย", "busDetail.html", 1, "center-row"),
("N4c", "busDetailExpanded.html", ".stop-timeline a.stop-node__arrow",
3, 1, "คลิกไปหน้ารายละเอียดจุดจอด", "busDetail.html (expanded)", 1, "center-row"),
]
EDGES = [
("N1", "N2a"), ("N1", "N2b"),
("N2a", "N3a"), ("N2b", "N3b"),
("N3a", "N4a"), ("N3b", "N4c"),
("N4c", "N4a"), ("N4a", "N4b"),
]
PAGES = sorted({n[1] for n in NODES})
STOP_DETAIL_ACTIONS = [
("A1", "stopDetail.html", "N4", "ดูตารางเวลาสายรถ", "busDetail.html", "N3", "?stop=at_main_terminal"),
("A2", "stopDetail.html", "N4", "เปิดรายละเอียดสาย 101", "busDetail.html", "N3", "?route=101&origin=at_main_terminal"),
("A3", "stopDetail.html", "N4", "กลับไปรายการป้าย", "busStop.html", "N2", "กลับหน้า list"),
("A4", "stopDetail.html", "N4", "กลับหน้าแรก (breadcrumb)", "index.html", "N1", "ผ่าน breadcrumb"),
("A5", "stopDetail.html", "N4", "ขยายเวลารถของสาย", "stopDetailExpanded", "N4e", "state transition"),
]
async def capture_all():
SHOTS_DIR.mkdir(parents=True, exist_ok=True)
boxes, sizes = {}, {}
async with async_playwright() as p:
browser = await p.chromium.launch()
ctx = await browser.new_context(viewport=VIEWPORT, device_scale_factor=1)
page = await ctx.new_page()
for name in PAGES:
url = f"{BASE}{URLS.get(name, '/') }"
try:
await page.goto(url, wait_until="networkidle", timeout=20000)
except Exception as e:
print(f"WARN load {url}: {e}")
await page.goto(url, wait_until="domcontentloaded", timeout=20000)
await page.wait_for_timeout(600)
doc = await page.evaluate(
"({w: document.documentElement.scrollWidth, h: document.documentElement.scrollHeight})")
sizes[name] = (doc["w"], doc["h"])
await page.screenshot(path=str(SHOTS_DIR / name.replace(".html", ".png")), full_page=True)
for nid, p_name, sel, *_ in NODES:
if p_name != name or not sel:
continue
el = await page.query_selector(sel)
if not el:
print(f"WARN missing {sel} on {name}")
continue
boxes[nid] = await el.bounding_box()
print(f"captured {name} {sizes[name]}")
await browser.close()
return boxes, sizes
def get_font(size):
for path in [
"/System/Library/Fonts/Supplemental/Arial Unicode.ttf",
"/System/Library/Fonts/Supplemental/Tahoma.ttf",
]:
try:
return ImageFont.truetype(path, size)
except Exception:
pass
return ImageFont.load_default()
def hex_to_rgb(value):
value = value.lstrip("#")
return tuple(int(value[i:i+2], 16) for i in (0, 2, 4))
def draw_cursor_icon(base_img, tip_x, tip_y, color_hex, scale=1.0):
# Render only the split two-prong motif (no main arrow-head triangle).
ss = 6
icon_w = int(30 * scale)
icon_h = int(30 * scale)
local = Image.new("RGBA", (icon_w * ss, icon_h * ss), (0, 0, 0, 0))
d = ImageDraw.Draw(local)
core = (int(9 * scale * ss), int(9 * scale * ss))
# Two-prong symbol balanced to avoid obscuring the center core.
prong_right = [
core,
(int(32 * scale * ss), int(18 * scale * ss)),
(int(19 * scale * ss), int(19 * scale * ss)),
]
prong_down = [
core,
(int(18 * scale * ss), int(32 * scale * ss)),
(int(19 * scale * ss), int(19 * scale * ss)),
]
connector = [
core,
(int(19 * scale * ss), int(19 * scale * ss)),
(int(16 * scale * ss), int(22 * scale * ss)),
(int(22 * scale * ss), int(16 * scale * ss)),
]
r, g, b = hex_to_rgb(color_hex)
d.polygon(prong_right, fill=(r, g, b, 248))
d.polygon(prong_down, fill=(r, g, b, 248))
d.polygon(connector, fill=(r, g, b, 248))
d.ellipse(
[
core[0] - int(1.6 * ss),
core[1] - int(1.6 * ss),
core[0] + int(1.6 * ss),
core[1] + int(1.6 * ss),
],
fill=(r, g, b, 255),
)
local = local.resize((icon_w, icon_h), Image.Resampling.LANCZOS)
px = int(tip_x - 8 * scale)
py = int(tip_y - 8 * scale)
base_img.paste(local, (px, py), local)
def compose(boxes, sizes):
s = OUTPUT_SCALE
cell_w = int(900 * s)
margin_h, margin_v = int(40 * s), int(30 * s)
# Keep enough horizontal/vertical whitespace so connectors stay visible.
gutter_h = int(440 * s)
row_gap = int(240 * s)
label_block_h = int(48 * s)
px_per_col = cell_w + gutter_h
grid = {}
for nid, page, sel, col, row, marker_lbl, title, span_rows, align_mode in NODES:
grid[nid] = {
"col": col, "row": row, "span_rows": span_rows,
"marker_label": marker_lbl, "title": title,
"align_mode": align_mode,
"page": page, "selector": sel
}
# Precompute scaled sizes for each node and dynamic row heights.
scaled_sizes = {}
for nid, page, *_ in NODES:
page_w, page_h = sizes.get(page, (cell_w, 800))
scale = cell_w / page_w if page_w else 1
scaled_w = int(page_w * scale)
scaled_h = int(page_h * scale)
scaled_sizes[nid] = (scaled_w, scaled_h)
unique_rows = sorted(set(n[4] for n in NODES))
row_heights = {}
for row in unique_rows:
row_nodes = [n[0] for n in NODES if n[4] == row]
row_heights[row] = max((scaled_sizes[nid][1] for nid in row_nodes), default=800)
row_tops = {}
cursor_y = margin_v
for row in unique_rows:
row_tops[row] = cursor_y
cursor_y += row_heights[row] + label_block_h + row_gap
# Compute bounds
cols = [n[3] for n in NODES]
rows = [n[4] for n in NODES]
max_col = max(cols) if cols else 0
max_row = max(rows) if rows else 0
canvas_w = (max_col + 1) * px_per_col + 2 * margin_h
canvas_h = cursor_y + margin_v
img = Image.new("RGB", (int(canvas_w), int(canvas_h)), "white")
draw = ImageDraw.Draw(img)
font_label = get_font(int(12 * s))
font_title = get_font(int(13 * s))
font_arrow = get_font(int(12 * s))
font_marker = get_font(int(11 * s))
# Per-node action color: deterministic random so output is stable across runs.
color_rng = random.Random(20260512)
color_palette = [
"#2563eb", "#7c3aed", "#db2777", "#ea580c",
"#0f766e", "#0891b2", "#4338ca", "#be123c",
]
action_colors = {nid: color_rng.choice(color_palette) for nid, *_ in NODES}
# Draw node panels: each is a screenshot at target grid cell with rounded corners
node_boxes = {}
click_points = {}
for nid, page, sel, col, row, marker_lbl, title, span_rows, align_mode in NODES:
# Load screenshot
png_path = SHOTS_DIR / page.replace(".html", ".png")
if not png_path.exists():
print(f"WARN no screenshot {png_path}")
continue
ss = Image.open(png_path)
page_w, page_h = ss.size
# Compute panel position
px = margin_h + col * px_per_col
py = row_tops[row] + label_block_h
# Scale screenshot
scale = cell_w / page_w
scaled_w = int(page_w * scale)
scaled_h = int(page_h * scale)
# Vertical centering within row band(s) for all nodes.
span_rows_list = [row + i for i in range(span_rows)]
band_h = sum(row_heights.get(r, row_heights[row]) for r in span_rows_list) + row_gap * (span_rows - 1)
if scaled_h < band_h:
py += (band_h - scaled_h) // 2
# Horizontal centering within column cell
if scaled_w < px_per_col:
px += (px_per_col - scaled_w) // 2
ss_scaled = ss.resize((scaled_w, scaled_h), Image.Resampling.LANCZOS)
# Paste onto main canvas
img.paste(ss_scaled, (int(px), int(py)))
# Record bounds for arrow drawing
node_boxes[nid] = (px, py, px + scaled_w, py + scaled_h)
# Record click marker position from selector bounding box on original page.
if nid in boxes and boxes[nid]:
b = boxes[nid]
cx = px + (b["x"] + b["width"] / 2) * scale
cy = py + (b["y"] + b["height"] / 2) * scale
click_points[nid] = (cx, cy)
# Add colored bar with filename/title and action description above screenshot.
action_color = action_colors.get(nid, "#1f4f7a")
bar_h = int(42 * s)
bar_y1 = py - label_block_h
bar_y2 = bar_y1 + bar_h
# Draw full-width colored bar
draw.rectangle([px, bar_y1, px + scaled_w, bar_y2], fill=action_color)
# Draw title and marker label inside bar
title_y = bar_y1 + int(12 * s)
draw.text((px + int(8 * s), title_y), title, fill="#ffffff", font=font_title, anchor="lm")
desc_y = bar_y1 + int(28 * s)
draw.text((px + int(8 * s), desc_y), marker_lbl, fill="#ffffff", font=font_label, anchor="lm")
def draw_edge_label(text, x, y, label_color="#1f4f7a"):
pad_x = int(12 * s)
pad_y = int(6 * s)
font_bold = get_font(int(14 * s))
text_w = draw.textlength(text, font=font_bold)
text_h = int(16 * s)
x1 = x - text_w / 2 - pad_x
y1 = y - text_h / 2 - pad_y
x2 = x + text_w / 2 + pad_x
y2 = y + text_h / 2 + pad_y
draw.rounded_rectangle([x1, y1, x2, y2], radius=int(8 * s), fill=label_color, outline="#ffffff", width=int(2 * s))
draw.text((x, y), text, fill="#ffffff", font=font_bold, anchor="mm")
def draw_soft_gradient_circle(base_img, cx, cy, rgb):
# Render gradient on a local RGBA surface, then composite to keep soft edges.
circle_scale = 1.3 * 1.2 * s
outer = int(round(20 * circle_scale))
inner = int(round(9 * circle_scale))
pad = int(4 * s)
size = outer * 2 + pad * 2
local = Image.new("RGBA", (size, size), (0, 0, 0, 0))
ld = ImageDraw.Draw(local)
center = outer + pad
r, g, b = rgb
# Outer soft halo.
for rr in range(outer, inner, -1):
t = (rr - inner) / max(1, (outer - inner))
alpha = int(12 + (1 - t) * 56)
ld.ellipse(
[center - rr, center - rr, center + rr, center + rr],
fill=(r, g, b, alpha),
)
# Inner light core for the "soft gradient" look.
for rr in range(inner, 2, -1):
t = rr / max(1, inner)
alpha = int(110 + (1 - t) * 80)
ld.ellipse(
[center - rr, center - rr, center + rr, center + rr],
fill=(255, 255, 255, alpha),
)
# Crisp center dot to preserve click focal point.
dot = max(2, int(2 * s))
ld.ellipse([center - dot, center - dot, center + dot, center + dot], fill=(r, g, b, 230))
base_img.paste(local, (cx - center, cy - center), local)
def draw_click_marker(nid, x, y):
# Normal cursor orientation with tip at click center.
cx = int(x)
cy = int(y)
action_color = action_colors.get(nid, "#334155")
r, g, b = hex_to_rgb(action_color)
# Soft gradient circle that shares the same hue as action label text.
draw_soft_gradient_circle(img, cx, cy, (r, g, b))
# Upright cursor with anti-aliased edges; tip lands exactly on click center.
draw_cursor_icon(img, cx, cy, action_color, scale=1.38 * s)
# Arrow routing: orthogonal with elbow
src_gap = int(15 * s)
dst_gap = int(10 * s)
def route_arrow(p1, p2, src_y_offset=0, dst_y_offset=0):
"""Return [(x_start, y0), (x_elbow, y0), (x_elbow, y1), (x_end, y1)]."""
x0, y0, x1_r, y1_r = p1
x2, y2, x3_r, y3_r = p2
src_y = (y0 + y1_r) / 2 + src_y_offset
dst_y = (y2 + y3_r) / 2 + dst_y_offset
mid_x = x1_r + (x2 - x1_r) * 0.25
return [(x1_r + src_gap, src_y), (mid_x, src_y), (mid_x, dst_y), (x2 - dst_gap, dst_y)]
arrow_width = int(5 * s)
# Count outgoing and incoming edges per node to compute per-edge y-offsets.
src_edge_counter = {}
dst_edge_counter = {}
for src, dst in EDGES:
src_edge_counter[src] = src_edge_counter.get(src, 0)
dst_edge_counter[dst] = dst_edge_counter.get(dst, 0)
src_seen = {k: 0 for k in src_edge_counter}
dst_seen = {k: 0 for k in dst_edge_counter}
src_labeled = set()
for src, dst in EDGES:
if src not in node_boxes or dst not in node_boxes:
continue
src_y_offset = src_seen[src] * int(4 * s)
dst_y_offset = 0
src_seen[src] += 1
dst_seen[dst] += 1
points = route_arrow(node_boxes[src], node_boxes[dst], src_y_offset=src_y_offset, dst_y_offset=dst_y_offset)
arrow_color = action_colors.get(src, "#0066cc")
# Compute arrowhead geometry first so line ends exactly at arrowhead base.
x_dst, y_dst = points[-1]
x_prev, y_prev = points[-2]
angle = atan2(y_dst - y_prev, x_dst - x_prev)
arr_len = arrow_width * 6
arr_w = arrow_width * 3
xa = x_dst - arr_len * cos(angle)
ya = y_dst - arr_len * sin(angle)
perp_angle = angle + 3.14159 / 2 # perpendicular (90 degrees) to arrow direction
xbl = xa + arr_w * cos(perp_angle)
ybl = ya + arr_w * sin(perp_angle)
xbr = xa - arr_w * cos(perp_angle)
ybr = ya - arr_w * sin(perp_angle)
# Draw line segments; last segment stops at arrowhead base (xa, ya).
for i in range(len(points) - 1):
x0, y0 = points[i]
x1, y1 = points[i + 1]
if i == len(points) - 2:
x1, y1 = xa, ya
draw.line([(x0, y0), (x1, y1)], fill=arrow_color, width=arrow_width)
# Draw arrowhead on top to create clean connection.
draw.polygon([(x_dst, y_dst), (xbl, ybl), (xbr, ybr)], fill=arrow_color)
# Add edge label above the final horizontal segment — only once per source.
lbl = grid.get(src, {}).get("marker_label", "")
if lbl and src not in src_labeled:
lx = (points[2][0] + points[3][0]) / 2
ly = points[2][1] - int(20 * s)
lbl_color = action_colors.get(src, "#1f4f7a")
draw_edge_label(lbl, lx, ly, lbl_color)
src_labeled.add(src)
# Draw click markers last so they stay above screenshots and arrows.
for nid, (cx, cy) in click_points.items():
draw_click_marker(nid, cx, cy)
# ── Stacked action-flow frames ──────────────────────────────────────────
# Layout constants
outer_pad = int(34 * s)
section_gap = int(30 * s)
header_h = int(70 * s)
footer_h = int(18 * s)
inner_pad = int(34 * s) # inside each frame
frame_tag_h = int(56 * s) # frame title-bar height
cell_pad = int(20 * s) # gutter between grid-line and cell box
cell_tag_h = int(34 * s) # per-cell label bar height
img_pad = int(12 * s) # space between cell-box edge and screenshot
arrow_gap = int(40 * s) # horizontal gutter between columns for arrows
# ONE global standard image width — every screenshot is scaled to exactly
# this many pixels wide; height follows the natural aspect ratio (no crop).
STANDARD_IMG_W = int(480 * s)
# Pre-read native screenshot dimensions from disk
def _shot_orig(name):
p = SHOTS_DIR / name.replace(".html", ".png")
if not p.exists():
return (1600, 900)
with Image.open(p) as im:
return im.size
_orig = {pg: _shot_orig(pg) for pg in [
"index.html", "busStop.html", "busDetail.html", "stopDetail.html",
"busDetailExpanded.html", "stopDetailExpanded.html",
]}
def _natural_h(page):
ow, oh = _orig.get(page, (1600, 900))
return int(oh * STANDARD_IMG_W / ow)
# ── Frame table definitions ─────────────────────────────────────────────
frame1_table = {
'cols': [
{'col': 0, 'rows': [
{'id': 'I', 'page': 'index.html', 'label': 'index.html', 'show_marker': False, 'emphasis_start': True},
]},
{'col': 1, 'rows': [
{'id': 'IA', 'page': 'index.html', 'label': 'index.html (คลิก "ป้ายหยุดรถ")', 'show_marker': True},
{'id': 'IB', 'page': 'index.html', 'label': 'index.html (คลิก "คลิกหมายเลขสาย 101")', 'show_marker': True},
]},
{'col': 2, 'rows': [
{'id': 'S', 'page': 'busStop.html', 'label': 'busStop.html', 'show_marker': False, 'emphasis_end': True},
{'id': 'B', 'page': 'busDetail.html', 'label': 'busDetail.html', 'show_marker': False, 'emphasis_end': True},
]},
],
'edges': [
{'src': 'I', 'dst': 'IA', 'label': 'คลิก "ป้ายหยุดรถ"', 'color': '#2563eb'},
{'src': 'I', 'dst': 'IB', 'label': 'คลิกหมายเลขสาย 101', 'color': '#2563eb'},
{'src': 'IA', 'dst': 'S', 'label': 'ไป busStop', 'color': '#2563eb'},
{'src': 'IB', 'dst': 'B', 'label': 'ไป busDetail', 'color': '#2563eb'},
],
}
frame2_table = {
'cols': [
{'col': 0, 'rows': [{'id': 'S', 'page': 'busStop.html', 'label': 'busStop.html', 'show_marker': False, 'emphasis_start': True}]},
{'col': 1, 'rows': [{'id': 'SC', 'page': 'busStop.html', 'label': 'busStop.html (คลิก "บขส.อ่างทอง")', 'show_marker': True, 'marker_box_id': 'N3a'}]},
{'col': 2, 'rows': [{'id': 'D', 'page': 'stopDetail.html', 'label': 'stopDetail.html', 'show_marker': False}]},
{'col': 3, 'rows': [{'id': 'BE', 'page': 'busDetailExpanded.html','label': 'busDetail (expanded)', 'show_marker': True}]},
{'col': 4, 'rows': [{'id': 'DE', 'page': 'stopDetailExpanded.html','label':'stopDetail (expanded)', 'show_marker': True}]},
{'col': 5, 'rows': [{'id': 'B', 'page': 'busDetail.html', 'label': 'busDetail.html', 'show_marker': False, 'emphasis_end': True}]},
],
'edges': [
{'src': 'S', 'dst': 'SC', 'label': 'คลิก "บขส.อ่างทอง"', 'color': '#7c3aed'},
{'src': 'SC', 'dst': 'D', 'label': 'ไป stopDetail', 'color': '#7c3aed'},
{'src': 'D', 'dst': 'BE', 'label': 'ไป busDetail(exp)', 'color': '#7c3aed'},
{'src': 'BE', 'dst': 'DE', 'label': 'ไป stopDetail(exp)', 'color': '#7c3aed'},
{'src': 'DE', 'dst': 'B', 'label': 'สิ้นสุด busDetail', 'color': '#7c3aed'},
],
}
frame3_table = {
'cols': [
{'col': 0, 'rows': [{'id': 'B', 'page': 'busDetail.html', 'label': 'busDetail.html', 'show_marker': False, 'emphasis_start': True}]},
{'col': 1, 'rows': [{'id': 'BE', 'page': 'busDetailExpanded.html', 'label': 'busDetail (expanded)', 'show_marker': True}]},
{'col': 2, 'rows': [{'id': 'DE', 'page': 'stopDetailExpanded.html','label': 'stopDetail (expanded)', 'show_marker': True}]},
{'col': 3, 'rows': [{'id': 'D', 'page': 'stopDetail.html', 'label': 'stopDetail.html', 'show_marker': False, 'emphasis_end': True}]},
],
'edges': [
{'src': 'B', 'dst': 'BE', 'label': 'ไป busDetail(exp)', 'color': '#0f766e'},
{'src': 'BE', 'dst': 'DE', 'label': 'ไป stopDetail(exp)', 'color': '#0f766e'},
{'src': 'DE', 'dst': 'D', 'label': 'สิ้นสุด stopDetail','color': '#0f766e'},
],
}
FRAMES = [
(frame1_table, "#2563eb",
"index.html action flow",
"start at index.html → busStop.html / busDetail.html"),
(frame2_table, "#7c3aed",
"busStop action flow",
"busStop → stopDetail → busDetail(exp) → stopDetail(exp) → busDetail"),
(frame3_table, "#0f766e",
"busDetail action flow",
"busDetail → busDetail(exp) → stopDetail(exp) → stopDetail"),
]
# Pages that are used as a flow start. Reuse the same "start signature"
# frame style whenever these pages appear in other flows.
START_SIGNATURE_PAGES = {
node['page']
for table, *_ in FRAMES
for col in table['cols']
for node in col['rows']
if node.get('emphasis_start')
}
START_SIGNATURE_PAGE_TINT = {
node['page']: tint
for table, tint, *_ in FRAMES
for col in table['cols']
for node in col['rows']
if node.get('emphasis_start')
}
# ── Dynamic layout computation ──────────────────────────────────────────
# cell content width: STANDARD_IMG_W + padding on both sides
cell_content_w = STANDARD_IMG_W + 2 * img_pad
# full column width (cell box + gutter)
col_slot_w = cell_content_w + 2 * cell_pad + arrow_gap
def _row_img_heights(table):
"""Per-row max natural image height at STANDARD_IMG_W."""
cols = table['cols']
max_rows = max(len(c['rows']) for c in cols)
heights = []
for ri in range(max_rows):
mh = 0
for c in cols:
if ri < len(c['rows']):
mh = max(mh, _natural_h(c['rows'][ri]['page']))
heights.append(mh)
return heights
def _frame_h(row_img_heights):
rows_total = sum(
cell_tag_h + 2 * img_pad + h + 2 * cell_pad
for h in row_img_heights
)
return frame_tag_h + 2 * inner_pad + rows_total
def _frame_content_w(table):
return len(table['cols']) * col_slot_w
all_row_heights = [_row_img_heights(t) for t, *_ in FRAMES]
all_frame_h = [_frame_h(rh) for rh in all_row_heights]
frame_w = max(_frame_content_w(t) for t, *_ in FRAMES) + 2 * inner_pad
frame_w = max(frame_w, int(2000 * s))
total_h = (outer_pad + header_h
+ sum(all_frame_h)
+ section_gap * (len(FRAMES) - 1)
+ footer_h + outer_pad)
final_img = Image.new("RGBA", (outer_pad * 2 + frame_w, total_h), "#f4f7ff")
final_draw = ImageDraw.Draw(final_img)
# ── Helper functions ────────────────────────────────────────────────────
def mix_rgb(c1, c2, t):
return (
int(c1[0] + (c2[0] - c1[0]) * t),
int(c1[1] + (c2[1] - c1[1]) * t),
int(c1[2] + (c2[2] - c1[2]) * t),
)
def tint_towards_white(hex_color, strength):
base = hex_to_rgb(hex_color)
return mix_rgb(base, (255, 255, 255), strength)
def draw_linear_gradient(rect, c1, c2, vertical=True):
x1, y1, x2, y2 = [int(v) for v in rect]
if vertical:
h = max(1, y2 - y1)
for i in range(h):
t = i / max(1, h - 1)
final_draw.line([(x1, y1 + i), (x2, y1 + i)], fill=mix_rgb(c1, c2, t))
else:
w = max(1, x2 - x1)
for i in range(w):
t = i / max(1, w - 1)
final_draw.line([(x1 + i, y1), (x1 + i, y2)], fill=mix_rgb(c1, c2, t))
def draw_soft_rounded_gradient(rect, radius, c1, c2, outline=None, outline_w=1, vertical=True):
x1, y1, x2, y2 = [int(v) for v in rect]
w = max(1, x2 - x1)
h = max(1, y2 - y1)
grad = Image.new("RGBA", (w, h), (0, 0, 0, 0))
gd = ImageDraw.Draw(grad)
if vertical:
for i in range(h):
t = i / max(1, h - 1)
gd.line([(0, i), (w, i)], fill=(*mix_rgb(c1, c2, t), 255))
else:
for i in range(w):
t = i / max(1, w - 1)
gd.line([(i, 0), (i, h)], fill=(*mix_rgb(c1, c2, t), 255))
mask = Image.new("L", (w, h), 0)
md = ImageDraw.Draw(mask)
md.rounded_rectangle([0, 0, w - 1, h - 1], radius=radius, fill=255)
final_img.paste(grad, (x1, y1), mask)
if outline:
final_draw.rounded_rectangle([x1, y1, x2, y2], radius=radius, outline=outline, width=outline_w)
bg_c1 = (246, 248, 255)
bg_c2 = (237, 245, 255)
draw_linear_gradient([0, 0, final_img.width, final_img.height], bg_c1, bg_c2, vertical=True)
def fit_shot_std(name):
"""Scale screenshot to exactly STANDARD_IMG_W; height is natural (no crop)."""
p = SHOTS_DIR / name.replace(".html", ".png")
if not p.exists():
return None
shot = Image.open(p).convert("RGB")
new_h = int(shot.height * STANDARD_IMG_W / shot.width)
return shot.resize((STANDARD_IMG_W, new_h), Image.Resampling.LANCZOS)
def place_cell(col_x1, row_y1, page_name, label, tint, row_img_h, node_def=None, shared_start_pages=None, shared_start_tints=None):
"""
Draw one table cell: label bar + screenshot at STANDARD_IMG_W.
Cell is vertically centered inside a row band driven by row_img_h.
Returns both frame and screenshot bounds for downstream routing.
"""
cx1 = col_x1 + cell_pad
cx2 = cx1 + cell_content_w
# Fit each frame to the actual image height so the border hugs the image.
shot = fit_shot_std(page_name)
content_h = shot.height if shot is not None else row_img_h
cell_h = cell_tag_h + 2 * img_pad + content_h + 2 * cell_pad
row_h = cell_tag_h + 2 * img_pad + row_img_h + 2 * cell_pad
cy1 = row_y1 + max(0, (row_h - cell_h) // 2)
cy2 = cy1 + cell_h
# Determine emphasis state for highlight
is_emphasis_start = node_def and node_def.get('emphasis_start')
is_emphasis_end = node_def and node_def.get('emphasis_end')
has_click_marker = bool(node_def and node_def.get('show_marker'))
is_clean_node = not has_click_marker
is_shared_start_page = bool(shared_start_pages and page_name in shared_start_pages)
is_start_signature = bool((is_emphasis_start or is_shared_start_page) and is_clean_node)
signature_tint = tint
if is_start_signature and shared_start_tints and page_name in shared_start_tints:
signature_tint = shared_start_tints[page_name]
tint_rgb = hex_to_rgb(tint)
signature_tint_rgb = hex_to_rgb(signature_tint)
cell_top = tint_towards_white(tint, 0.94)
cell_bottom = tint_towards_white(tint, 0.88)
# Start-signature redesign: stronger visual presence with an outer ring.
if is_start_signature:
ring_pad = int(10 * s)
ring_top = tint_towards_white(signature_tint, 0.84)
ring_bottom = tint_towards_white(signature_tint, 0.68)
draw_soft_rounded_gradient(
[cx1 - ring_pad, cy1 - ring_pad, cx2 + ring_pad, cy2 + ring_pad],
radius=int(18 * s),
c1=ring_top,
c2=ring_bottom,
outline=signature_tint,
outline_w=int(2 * s),
vertical=True,
)
cell_top = tint_towards_white(signature_tint, 0.90)
cell_bottom = tint_towards_white(signature_tint, 0.78)
# Cell box with enhanced border for emphasized nodes
border_width = int(8 * s) if is_start_signature else (int(6 * s) if is_emphasis_end else int(3 * s))
draw_soft_rounded_gradient(
[cx1, cy1, cx2, cy2],
radius=int(14 * s),
c1=cell_top,
c2=cell_bottom,
outline=signature_tint if is_start_signature else tint,
outline_w=border_width,
vertical=True,
)
if is_start_signature:
# Double-edge look for start frames to make them stand out from others.
inner_pad = int(8 * s)
final_draw.rounded_rectangle(
[cx1 + inner_pad, cy1 + inner_pad, cx2 - inner_pad, cy2 - inner_pad],
radius=int(10 * s), outline=signature_tint, width=int(2 * s)
)
# Label bar
bar_color_rgb = signature_tint_rgb if is_start_signature else tint_rgb
bar_top = mix_rgb(bar_color_rgb, (255, 255, 255), 0.12) if is_start_signature else mix_rgb(bar_color_rgb, (255, 255, 255), 0.22)
bar_bottom = mix_rgb(bar_color_rgb, (255, 255, 255), 0.02) if is_start_signature else mix_rgb(bar_color_rgb, (255, 255, 255), 0.08)
draw_soft_rounded_gradient(
[cx1, cy1, cx2, cy1 + cell_tag_h],
radius=int(12 * s),
c1=bar_top,
c2=bar_bottom,
outline=None,
vertical=True,
)
final_draw.rectangle([cx1, cy1 + cell_tag_h - int(6 * s), cx2, cy1 + cell_tag_h],
fill=bar_bottom)
final_draw.text((cx1 + int(10 * s), cy1 + int(18 * s)),
label, fill="#ffffff", font=get_font(int(11 * s)), anchor="lm")
# Screenshot — always STANDARD_IMG_W wide
ix = cx1 + img_pad
iy = cy1 + cell_tag_h + img_pad
if shot is not None:
final_img.paste(shot, (int(ix), int(iy)))
return {
"frame": (int(cx1), int(cy1), int(cx2), int(cy2)),
"image": (int(ix), int(iy), int(ix) + shot.width, int(iy) + shot.height),
}
else:
mx = (cx1 + cx2) // 2
my = (cy1 + cy2) // 2
final_draw.text((mx, my), page_name, fill="#64748b",
font=get_font(int(10 * s)), anchor="mm")
return {
"frame": (int(cx1), int(cy1), int(cx2), int(cy2)),
"image": (int(cx1), int(cy1), int(cx2), int(cy2)),
}
def draw_frame_box(rect, title, subtitle, tint):
x1, y1, x2, y2 = rect
frame_top = tint_towards_white(tint, 0.96)
frame_bottom = tint_towards_white(tint, 0.90)
draw_soft_rounded_gradient(
[x1, y1, x2, y2],
radius=int(18 * s),
c1=frame_top,
c2=frame_bottom,
outline=tint,
outline_w=int(3 * s),
vertical=True,
)
bar_h = int(48 * s)
tint_rgb = hex_to_rgb(tint)
bar_top = mix_rgb(tint_rgb, (255, 255, 255), 0.20)
bar_bottom = mix_rgb(tint_rgb, (255, 255, 255), 0.04)
draw_soft_rounded_gradient(
[x1, y1, x2, y1 + bar_h],
radius=int(16 * s),
c1=bar_top,
c2=bar_bottom,
outline=None,
vertical=True,
)
final_draw.rectangle([x1, y1 + bar_h - int(8 * s), x2, y1 + bar_h], fill=bar_bottom)
final_draw.text((x1 + int(12 * s), y1 + int(16 * s)),
title, fill="#ffffff", font=get_font(int(14 * s)), anchor="lm")
final_draw.text((x1 + int(12 * s), y1 + int(36 * s)),
subtitle, fill="#edf2ff", font=get_font(int(11 * s)), anchor="lm")
def draw_arrow_with_label(sx, sy, dx, dy, label, color):
mid_x = sx + (dx - sx) * 0.45
path = [(sx, sy), (mid_x, sy), (mid_x, dy), (dx, dy)]
for i in range(len(path) - 1):
final_draw.line([path[i], path[i + 1]], fill=color, width=int(4 * s))
angle = atan2(dy - path[-2][1], dx - path[-2][0])
aln, alw = int(16 * s), int(9 * s)
xa = dx - aln * cos(angle); ya = dy - aln * sin(angle)
perp = angle + 3.14159 / 2
final_draw.polygon([(dx, dy),
(xa + alw * cos(perp), ya + alw * sin(perp)),
(xa - alw * cos(perp), ya - alw * sin(perp))], fill=color)
lx = (path[1][0] + path[2][0]) / 2
ly = min(path[1][1], path[2][1]) - int(16 * s)
tw = final_draw.textlength(label, font=get_font(int(11 * s)))
final_draw.rounded_rectangle(
[lx - tw / 2 - int(10 * s), ly - int(17 * s),
lx + tw / 2 + int(10 * s), ly + int(6 * s)],
radius=int(8 * s), fill=color)
final_draw.text((lx, ly - int(4 * s)), label,
fill="#ffffff", font=get_font(int(11 * s)), anchor="mm")
def render_frame(frame_rect, table, tint, row_img_heights):
fx1, fy1, fx2, fy2 = frame_rect
# Content area starts below frame title bar
cx1 = fx1 + inner_pad
cy1 = fy1 + frame_tag_h + inner_pad
cols = table['cols']
max_rows = max(len(c['rows']) for c in cols)
# Build cumulative row y-positions
row_tops = []
cy = cy1
for rh in row_img_heights:
row_tops.append(cy)
cy += cell_tag_h + 2 * img_pad + rh + 2 * cell_pad
node_boxes = {}
for col_idx, col in enumerate(cols):
col_x1 = cx1 + col_idx * col_slot_w
for row_idx, node in enumerate(col['rows']):
rh = row_img_heights[row_idx]
bbox = place_cell(col_x1, row_tops[row_idx],
node['page'], node['label'], tint, rh, node_def=node,
shared_start_pages=START_SIGNATURE_PAGES,
shared_start_tints=START_SIGNATURE_PAGE_TINT)
node_boxes[node['id']] = bbox
if col_idx < len(cols) - 1:
sep_x = col_x1 + col_slot_w - arrow_gap // 2
final_draw.line([sep_x, int(cy1), sep_x, int(cy)],
fill="#d1d5db", width=int(2 * s))
# Draw horizontal row separator before each row > 0 in this column
if row_idx > 0:
sep_y = row_tops[row_idx]
final_draw.line([col_x1, sep_y, col_x1 + col_slot_w, sep_y],
fill="#d1d5db", width=int(2 * s))
# Click markers
for node_id, bounds in node_boxes.items():
node_def = next(
n for c in cols for n in c['rows'] if n['id'] == node_id)
if node_def.get('show_marker'):
bbox = bounds['image']
cmx = int((bbox[0] + bbox[2]) / 2)
cmy = int((bbox[1] + bbox[3]) / 2)
marker_box_id = node_def.get('marker_box_id')
if marker_box_id and marker_box_id in boxes:
mb = boxes[marker_box_id]
page_w = _orig.get(node_def['page'], (1600, 900))[0]
scale = (bbox[2] - bbox[0]) / page_w if page_w else 1
cmx = int(bbox[0] + (mb['x'] + mb['width'] / 2) * scale)
cmy = int(bbox[1] + (mb['y'] + mb['height'] / 2) * scale)
r, g, b = hex_to_rgb(tint)
draw_soft_gradient_circle(final_img, cmx, cmy, (r, g, b))
draw_cursor_icon(final_img, cmx, cmy, tint, scale=1.38 * s)
# Arrows
for edge in table['edges']:
src_bounds = node_boxes.get(edge['src'])
dst_bounds = node_boxes.get(edge['dst'])
if src_bounds is None or dst_bounds is None:
continue
src_frame = src_bounds['frame']
dst_frame = dst_bounds['frame']
dst_x = dst_frame[0] - int(6 * s)
draw_arrow_with_label(
src_frame[2], (src_frame[1] + src_frame[3]) / 2,
dst_x, (dst_frame[1] + dst_frame[3]) / 2,
edge['label'], edge['color'])
# ── Compose canvas ──────────────────────────────────────────────────────
final_draw.text((outer_pad, outer_pad + int(18 * s)),
"AT Transit Action Flow (Stacked Frames)",
fill="#1f2a44", font=get_font(int(18 * s)), anchor="lm")
cursor_y = outer_pad + header_h
for (table, tint, title, subtitle), rh_list, fh in zip(FRAMES, all_row_heights, all_frame_h):
frame_rect = (outer_pad, cursor_y, outer_pad + frame_w, cursor_y + fh)
draw_frame_box(frame_rect, title, subtitle, tint)
render_frame(frame_rect, table, tint, rh_list)
cursor_y += fh + section_gap
final_img.convert("RGB").save(OUT_PNG)
print(f"saved {OUT_PNG}")
if __name__ == "__main__":
print("Capturing screenshots...")
boxes, sizes = asyncio.run(capture_all())
print(f"Composing diagram with {len(NODES)} nodes...")
compose(boxes, sizes)
Binary file not shown.

After

Width:  |  Height:  |  Size: 9.9 MiB

+17
View File
@@ -0,0 +1,17 @@
# AT Transit Static HTML Showcase
Generated from page structure in:
- src/app/page.tsx
- src/app/routes/page.tsx
- src/app/routes/[routeId]/page.tsx
- src/app/routes/[routeId]/expanded/page.tsx
- src/app/stops/page.tsx
- src/app/stops/[stopId]/page.tsx
- src/app/stops/details/page.tsx
- src/app/layout.tsx
- src/app/globals.css
## Notes
- Uses static mock data for preview only.
- Shared CSS copied from the real project and extended with showcase-only helpers.
- Open `index.html` to browse every sample page.
@@ -0,0 +1,18 @@
/* Dark showcase overrides for routes.html — minimal, self-contained */
:root{--bg:linear-gradient(135deg,#0f172a,#1e1b34,#1b2332);--surface:rgba(255,255,255,0.03);--muted:#94a3b8}
html,body{height:100%;background:var(--bg);color:#f8fafc}
.topbar, .topbar__inner, .brand, .nav, .cta-pill{background:transparent}
.brand__title,.brand__subtitle{color:#f8fafc}
.page, .panel, .card, .grid, .zone{background:transparent;border:0;box-shadow:none}
.zone__tag,.chip{background:rgba(255,255,255,0.03);color:#fff}
.card__name{color:#fff}
.card__chips .chip{background:rgba(255,255,255,0.02)}
.pill-link{display:none}
/* tile/grid -> card list adjustments */
.grid{display:block}
.card{background:linear-gradient(180deg,rgba(255,255,255,0.02),rgba(255,255,255,0.01));border:1px solid rgba(255,255,255,0.03);border-radius:12px;padding:12px;margin-bottom:10px}
.card__head{display:none}
.card__body{padding:0}
.card__num{color:#fff}
.footer, .footer__grid, .footer__col {color:var(--muted)}
@media (max-width:900px){body{background:#0f172a}}
@@ -0,0 +1,18 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64" width="64" height="64">
<defs>
<linearGradient id="bg" x1="0%" y1="0%" x2="100%" y2="100%">
<stop offset="0%" stop-color="#8b5cf6"/>
<stop offset="100%" stop-color="#ec4899"/>
</linearGradient>
</defs>
<rect width="64" height="64" rx="16" fill="url(#bg)"/>
<g fill="#fff" transform="translate(8 14)">
<rect x="2" y="6" width="44" height="22" rx="6" fill="#fff"/>
<rect x="6" y="10" width="14" height="10" rx="2" fill="#8b5cf6"/>
<rect x="22" y="10" width="14" height="10" rx="2" fill="#8b5cf6"/>
<circle cx="12" cy="32" r="5" fill="#1f2a44"/>
<circle cx="36" cy="32" r="5" fill="#1f2a44"/>
<circle cx="12" cy="32" r="2" fill="#fff"/>
<circle cx="36" cy="32" r="2" fill="#fff"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 808 B

File diff suppressed because it is too large. Load diff
+138
View File
@@ -0,0 +1,138 @@
<!DOCTYPE html>
<html lang="th">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>AT Transit - Home Preview</title>
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
<link href="https://fonts.googleapis.com/css2?family=Noto+Sans+Thai:wght@400;500;600;700;800&family=Prompt:wght@400;500;600;700&display=swap" rel="stylesheet" />
<link rel="stylesheet" href="assets/styles.css" />
</head>
<body class="">
<header class="topbar">
<div class="topbar__inner">
<a href="home.html" class="brand">
<img src="assets/logo.svg" alt="AT Transit" width="44" height="44" class="brand__logo" />
<div>
<p class="brand__title">AT Transit</p>
<p class="brand__subtitle">สถานีขนส่งผู้โดยสารจังหวัดอ่างทอง</p>
</div>
</a>
<nav class="nav" aria-label="เมนูหลัก"><a href="home.html" class="active">หน้าแรก</a><a href="stops.html" class="">ป้ายหยุดรถ</a><a href="routes.html" class="">รายละเอียดสายรถ</a></nav>
<a href="routes.html" class="cta-pill">เช็กเวลาเดินรถ</a>
</div>
</header>
<section class="hero">
<div class="hero__blob one" aria-hidden></div>
<div class="hero__blob two" aria-hidden></div>
<div class="hero__blob three" aria-hidden></div>
<div class="container hero__inner">
<span class="hero__badge">✨ ยินดีต้อนรับ</span>
<h1>
สถานีขนส่งผู้โดยสารภายใน<br />
<span class="hero__grad">จังหวัดอ่างทอง</span>
</h1>
<p class="hero__lead">
หน้า mockup นี้อิงจาก <code>src/app/page.tsx</code> เพื่อใช้ preview หน้า Home โดยไม่ต้องรัน Next.js หรือ backend
</p>
<div class="hero__actions">
<a class="pill-link pill-link--primary" href="routes.html">ดูรายละเอียดสายรถ</a>
<a class="pill-link pill-link--secondary" href="stops.html">ค้นหาป้ายหยุดรถ</a>
<a class="pill-link pill-link--accent" href="route-detail-101.html">ดูตัวอย่างสายรถ</a>
</div>
</div>
</section>
<main class="main">
<div class="container">
<section class="zone">
<div class="zone__head">
<span class="zone__tag sky">กรุงเทพมหานคร</span>
<p class="zone__desc">เส้นทางเชื่อมต่อกรุงเทพมหานคร · 2 เส้นทาง</p>
</div>
<div class="grid">
<a href="route-detail-101.html" class="card">
<div class="card__head sky"><p class="card__num">101</p></div>
<div class="card__body"><p class="card__name">อ่างทอง → อยุธยา</p><span class="chip purple">✅ ดูตาราง</span></div>
</a>
<a href="route-detail-101.html" class="card">
<div class="card__head sky"><p class="card__num">902</p></div>
<div class="card__body"><p class="card__name">อ่างทอง → กรุงเทพฯ (ปิ่นเกล้า)</p><span class="chip sky">✅ ดูตาราง</span></div>
</a>
</div>
</section>
<section class="zone">
<div class="zone__head">
<span class="zone__tag purple">เชื่อมต่อจังหวัดใกล้เคียง</span>
<p class="zone__desc">เส้นทางเชื่อมต่อจังหวัดใกล้เคียง · 3 เส้นทาง</p>
</div>
<div class="grid">
<a href="route-detail-101.html" class="card">
<div class="card__head purple"><p class="card__num">464</p></div>
<div class="card__body"><p class="card__name">สุพรรณบุรี → สระบุรี</p><span class="chip pink">✅ ดูตาราง</span></div>
</a>
<a href="route-detail-101.html" class="card">
<div class="card__head purple"><p class="card__num">217</p></div>
<div class="card__body"><p class="card__name">วิเศษชัยชาญ → ลพบุรี</p><span class="chip mint">✅ ดูตาราง</span></div>
</a>
<a href="route-detail-101.html" class="card">
<div class="card__head purple"><p class="card__num">307</p></div>
<div class="card__body"><p class="card__name">อ่างทอง → สิงห์บุรี</p><span class="chip purple">✅ ดูตาราง</span></div>
</a>
</div>
</section>
</div>
</main>
<footer class="footer">
<div class="container">
<div class="footer__grid">
<div class="footer__brand">
<div class="footer__brand-row">
<img src="assets/logo.svg" alt="AT Transit" width="48" height="48" />
<div>
<strong>AT Transit</strong>
<span>สถานีขนส่งผู้โดยสารจังหวัดอ่างทอง</span>
</div>
</div>
<p>
ศูนย์รวมข้อมูลตารางเดินรถ จุดจอด และเส้นทางในจังหวัดอ่างทองและจังหวัดใกล้เคียง
พร้อม mock data สำหรับ preview งานออกแบบหน้าเว็บแบบ static HTML
</p>
</div>
<div class="footer__col">
<h4>เมนู</h4>
<ul>
<li><a href="home.html">หน้าแรก</a></li>
<li><a href="stops.html">ค้นหาป้ายหยุดรถ</a></li>
<li><a href="routes.html">รายละเอียดสายรถ</a></li>
</ul>
</div>
<div class="footer__col">
<h4>หน้าตัวอย่าง</h4>
<ul>
<li><a href="route-detail-101.html">Route detail /routes/[routeId]</a></li>
<li><a href="stop-detail-at001.html">Stop detail /stops/details</a></li>
<li><a href="route-expanded.html">Expanded route redirect</a></li>
</ul>
</div>
<div class="footer__col footer__contact">
<h4>หมายเหตุ</h4>
<div class="row"><span>🧪 ใช้ mock data เพื่อ preview layout</span></div>
<div class="row"><span>🗂️ แยกเป็นไฟล์ HTML เปิดได้ทันที</span></div>
<div class="row"><span>🎨 อิง class/style จาก frontend จริง</span></div>
<div class="row"><a href="index.html">📋 กลับหน้า showcase</a></div>
</div>
</div>
<div class="footer__bottom">
<p>© 2026 AT Transit <span class="pill">static preview bundle</span></p>
</div>
</div>
</footer>
</body>
</html>
+67
View File
@@ -0,0 +1,67 @@
<!DOCTYPE html>
<html lang="th">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>AT Transit Showcase</title>
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
<link href="https://fonts.googleapis.com/css2?family=Noto+Sans+Thai:wght@400;500;600;700;800&family=Prompt:wght@400;500;600;700&display=swap" rel="stylesheet" />
<link rel="stylesheet" href="assets/styles.css" />
</head>
<body class="showcase">
<div class="showcase-shell">
<main class="showcase-main">
<section class="hero" style="border-radius: 32px; margin-bottom: 28px;">
<div class="hero__blob one"></div>
<div class="hero__blob two"></div>
<div class="hero__blob three"></div>
<div class="hero__inner container">
<span class="hero__badge">🗂️ Static HTML Showcase</span>
<h1>รวมหน้าเว็บตัวอย่างทั้งหมดของ <span class="hero__grad">AT Transit Frontend</span></h1>
<p class="hero__lead">Bundle นี้สรุป routes/page files จากโปรเจกต์ Next.js แล้วแปลงเป็น static HTML ที่เปิดดูได้ทันทีในโฟลเดอร์เดียว</p>
<div class="hero__actions">
<a class="pill-link pill-link--primary" href="home.html">เปิดหน้า Home</a>
<a class="pill-link pill-link--secondary" href="routes.html">เปิดหน้า Routes</a>
<a class="pill-link pill-link--accent" href="stops.html">เปิดหน้า Stops</a>
</div>
</div>
</section>
<section class="showcase-grid">
<article class="showcase-card">
<div class="showcase-card__head"><div><h2>Home page</h2><div class="showcase-card__meta">src/app/page.tsx</div></div><span class="chip purple">/</span></div>
<div class="showcase-card__actions"><a href="home.html">Open full page</a></div>
<iframe class="showcase-frame" src="home.html" title="Home preview"></iframe>
</article>
<article class="showcase-card">
<div class="showcase-card__head"><div><h2>Routes listing</h2><div class="showcase-card__meta">src/app/routes/page.tsx</div></div><span class="chip sky">/routes</span></div>
<div class="showcase-card__actions"><a href="routes.html">Open full page</a></div>
<iframe class="showcase-frame" src="routes.html" title="Routes preview"></iframe>
</article>
<article class="showcase-card">
<div class="showcase-card__head"><div><h2>Route detail</h2><div class="showcase-card__meta">src/app/routes/[routeId]/page.tsx</div></div><span class="chip pink">/routes/101</span></div>
<div class="showcase-card__actions"><a href="route-detail-101.html">Open full page</a></div>
<iframe class="showcase-frame" src="route-detail-101.html" title="Route detail preview"></iframe>
</article>
<article class="showcase-card">
<div class="showcase-card__head"><div><h2>Stops listing</h2><div class="showcase-card__meta">src/app/stops/page.tsx</div></div><span class="chip mint">/stops</span></div>
<div class="showcase-card__actions"><a href="stops.html">Open full page</a></div>
<iframe class="showcase-frame" src="stops.html" title="Stops preview"></iframe>
</article>
<article class="showcase-card">
<div class="showcase-card__head"><div><h2>Stop detail</h2><div class="showcase-card__meta">src/app/stops/details/page.tsx</div></div><span class="chip amber">/stops/details?code=AT001</span></div>
<div class="showcase-card__actions"><a href="stop-detail-at001.html">Open full page</a></div>
<iframe class="showcase-frame" src="stop-detail-at001.html" title="Stop detail preview"></iframe>
</article>
<article class="showcase-card">
<div class="showcase-card__head"><div><h2>Redirect pages</h2><div class="showcase-card__meta">expanded / stop redirect behavior</div></div><span class="chip sky">redirect</span></div>
<div class="showcase-card__actions"><a href="route-expanded.html">Route expanded</a><a href="stop-redirect-at001.html">Stop redirect</a></div>
<iframe class="showcase-frame" src="route-expanded.html" title="Redirect preview"></iframe>
</article>
</section>
</main>
</div>
</body>
</html>
@@ -0,0 +1,171 @@
<!DOCTYPE html>
<html lang="th">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>AT Transit - Route 101 Preview</title>
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
<link href="https://fonts.googleapis.com/css2?family=Noto+Sans+Thai:wght@400;500;600;700;800&family=Prompt:wght@400;500;600;700&display=swap" rel="stylesheet" />
<link rel="stylesheet" href="assets/styles.css" />
</head>
<body class="">
<header class="topbar">
<div class="topbar__inner">
<a href="home.html" class="brand">
<img src="assets/logo.svg" alt="AT Transit" width="44" height="44" class="brand__logo" />
<div>
<p class="brand__title">AT Transit</p>
<p class="brand__subtitle">สถานีขนส่งผู้โดยสารจังหวัดอ่างทอง</p>
</div>
</a>
<nav class="nav" aria-label="เมนูหลัก"><a href="home.html" class="">หน้าแรก</a><a href="stops.html" class="">ป้ายหยุดรถ</a><a href="routes.html" class="active">รายละเอียดสายรถ</a></nav>
<a href="routes.html" class="cta-pill">เช็กเวลาเดินรถ</a>
</div>
</header>
<main class="page">
<section class="page-hero page-hero--alt route-hero">
<span class="page-hero__blob page-hero__blob--a" aria-hidden></span>
<span class="page-hero__blob page-hero__blob--b" aria-hidden></span>
<span class="page-hero__blob page-hero__blob--c" aria-hidden></span>
<div class="route-hero__top">
<div class="route-hero__badge">101</div>
<div class="route-hero__title-wrap">
<div class="route-hero__chips">
<span class="chip-soft chip-soft--purple">REGIONAL</span>
<span class="chip-soft chip-soft--sky">minibus</span>
<span class="chip-soft chip-soft--mint">2 จังหวัด</span>
</div>
<h1 class="page-hero__title"><span class="page-hero__title-grad">อ่างทอง → อยุธยา</span></h1>
<p class="page-hero__subtitle">เส้นทางหมายเลข 101 · ผ่าน 5 จุดจอด · 3 รอบเวลา</p>
</div>
</div>
<div class="page-hero__stats">
<span class="page-hero__stat"><b>5</b> จุดจอด</span>
<span class="page-hero__stat"><b>3</b> รอบเวลา</span>
<span class="page-hero__stat"><b>2</b> จังหวัด</span>
</div>
<div class="route-hero__actions"><a href="routes.html" class="route-hero__back">← กลับสายทั้งหมด</a></div>
<section>
<h2 class="section-title">ภาพประกอบ</h2>
<div class="mock-gallery">
<div class="mock-gallery__grid">
<div class="mock-gallery__hero"><span class="mock-gallery__label">รถตู้สาย 101</span></div>
<div class="mock-gallery__stack">
<div><span class="mock-gallery__label">ชานชาลา</span></div>
<div><span class="mock-gallery__label">ป้ายต้นทาง</span></div>
<div><span class="mock-gallery__label">จุดพักรถ</span></div>
</div>
</div>
</div>
</section>
<section>
<h2 class="section-title">ติดต่อ</h2>
<ul>
<li><strong>โทร:</strong> <a href="tel:+66649639025">+66 64 963 9025</a></li>
<li><strong>LINE:</strong> @attransit</li>
<li><strong>Facebook:</strong> AT Transit Angthong</li>
</ul>
</section>
<section>
<h2 class="section-title">เมตาดาตา</h2>
<pre class="code-block">{
"operator": "AT Transit Demo",
"route_group_code": "REGIONAL",
"vehicle_type": "minibus",
"wheelchair_access": false,
"preview_mode": true
}</pre>
</section>
</section>
<section class="route-map-section">
<div class="route-map-section__head">
<h2 class="section-title">เส้นทางวิ่ง</h2>
<span class="route-map-section__legend">
<span><i class="dot dot--start"></i> ต้นทาง</span>
<span><i class="dot dot--mid"></i> จุดผ่าน</span>
<span><i class="dot dot--end"></i> ปลายทาง</span>
</span>
</div>
<div class="map-wrap map-wrap--soft route-map mock-map">
<div class="mock-map__line"></div>
<div class="mock-map__pin mock-map__pin--start" style="left:14%;top:54%"></div>
<div class="mock-map__pin mock-map__pin--mid" style="left:32%;top:46%"></div>
<div class="mock-map__pin mock-map__pin--mid" style="left:49%;top:41%"></div>
<div class="mock-map__pin mock-map__pin--mid" style="left:67%;top:36%"></div>
<div class="mock-map__pin mock-map__pin--end" style="left:84%;top:28%"></div>
<div class="mock-map__legend"><span><b>Preview map</b></span><span>อิง layout จาก LazyMapView</span><span>ไม่เรียก Leaflet / backend</span></div>
</div>
</section>
<section>
<h2 class="section-title">จุดจอดตามลำดับ (5)</h2>
<ol class="stop-timeline">
<li class="stop-node stop-node--sky"><span class="stop-node__line"></span><span class="stop-node__bullet is-start">1</span><div class="stop-node__body"><div class="stop-node__head"><a href="stop-detail-at001.html" class="stop-node__title">สถานีขนส่งอ่างทอง</a><span class="chip-soft chip-soft--mint">ต้นทาง</span></div><div class="stop-node__meta"><span class="chip-soft chip-soft--sky">terminal</span><span class="stop-node__loc">📍 เมืองอ่างทอง · อ่างทอง</span></div></div><a href="stop-detail-at001.html" class="stop-node__arrow">→</a></li>
<li class="stop-node stop-node--purple"><span class="stop-node__line"></span><span class="stop-node__bullet">2</span><div class="stop-node__body"><div class="stop-node__head"><a href="stop-detail-at001.html" class="stop-node__title">ตลาดวิเศษชัยชาญ</a></div><div class="stop-node__meta"><span class="chip-soft chip-soft--sky">market</span><span class="stop-node__loc">📍 วิเศษชัยชาญ · อ่างทอง</span></div></div><a href="stop-detail-at001.html" class="stop-node__arrow">→</a></li>
<li class="stop-node stop-node--pink"><span class="stop-node__line"></span><span class="stop-node__bullet">3</span><div class="stop-node__body"><div class="stop-node__head"><a href="stop-detail-at001.html" class="stop-node__title">แยกบางบาล</a></div><div class="stop-node__meta"><span class="chip-soft chip-soft--sky">pickup</span><span class="stop-node__loc">📍 บางบาล · พระนครศรีอยุธยา</span></div></div><a href="stop-detail-at001.html" class="stop-node__arrow">→</a></li>
<li class="stop-node stop-node--mint"><span class="stop-node__line"></span><span class="stop-node__bullet">4</span><div class="stop-node__body"><div class="stop-node__head"><a href="stop-detail-at001.html" class="stop-node__title">ศูนย์ราชการอยุธยา</a></div><div class="stop-node__meta"><span class="chip-soft chip-soft--sky">landmark</span><span class="stop-node__loc">📍 พระนครศรีอยุธยา</span></div></div><a href="stop-detail-at001.html" class="stop-node__arrow">→</a></li>
<li class="stop-node stop-node--amber"><span class="stop-node__line"></span><span class="stop-node__bullet is-end">5</span><div class="stop-node__body"><div class="stop-node__head"><a href="stop-detail-at001.html" class="stop-node__title">สถานีอยุธยา</a><span class="chip-soft chip-soft--pink">ปลายทาง</span></div><div class="stop-node__meta"><span class="chip-soft chip-soft--sky">station</span><span class="stop-node__loc">📍 พระนครศรีอยุธยา</span></div></div><a href="stop-detail-at001.html" class="stop-node__arrow">→</a></li>
</ol>
</section>
<section>
<h2 class="section-title">ตารางเวลา (3)</h2>
<div class="schedule-list">
<article class="schedule-card schedule-card--sky"><span class="schedule-card__rail" aria-hidden></span><div class="schedule-card__head"><div class="schedule-card__route sky"><span>สถานีขนส่งอ่างทอง</span><small>จุดต้นทาง</small></div><div class="schedule-card__meta"><strong>เที่ยวเช้า</strong><span>วันจันทร์ - ศุกร์</span></div></div><div class="schedule-card__times"><span class="schedule-card__time">🕒 06:00</span><span class="schedule-card__time">🕒 07:30</span><span class="schedule-card__time">🕒 09:00</span></div></article>
<article class="schedule-card schedule-card--purple"><span class="schedule-card__rail" aria-hidden></span><div class="schedule-card__head"><div class="schedule-card__route purple"><span>สถานีขนส่งอ่างทอง</span><small>จุดต้นทาง</small></div><div class="schedule-card__meta"><strong>เที่ยวกลางวัน</strong><span>วิ่งทุกวัน</span></div></div><div class="schedule-card__times"><span class="schedule-card__time">🕒 11:00</span><span class="schedule-card__time">🕒 12:30</span><span class="schedule-card__time">🕒 14:00</span></div></article>
<article class="schedule-card schedule-card--pink"><span class="schedule-card__rail" aria-hidden></span><div class="schedule-card__head"><div class="schedule-card__route pink"><span>สถานีขนส่งอ่างทอง</span><small>จุดต้นทาง</small></div><div class="schedule-card__meta"><strong>เที่ยวเย็น</strong><span>รอบสุดท้ายก่อนปิดบริการ</span></div></div><div class="schedule-card__times"><span class="schedule-card__time">🕒 16:00</span><span class="schedule-card__time">🕒 17:30</span><span class="schedule-card__time">🕒 19:00</span></div></article>
</div>
</section>
</main>
<footer class="footer">
<div class="container">
<div class="footer__grid">
<div class="footer__brand">
<div class="footer__brand-row">
<img src="assets/logo.svg" alt="AT Transit" width="48" height="48" />
<div>
<strong>AT Transit</strong>
<span>สถานีขนส่งผู้โดยสารจังหวัดอ่างทอง</span>
</div>
</div>
<p>
ศูนย์รวมข้อมูลตารางเดินรถ จุดจอด และเส้นทางในจังหวัดอ่างทองและจังหวัดใกล้เคียง
พร้อม mock data สำหรับ preview งานออกแบบหน้าเว็บแบบ static HTML
</p>
</div>
<div class="footer__col">
<h4>เมนู</h4>
<ul>
<li><a href="home.html">หน้าแรก</a></li>
<li><a href="stops.html">ค้นหาป้ายหยุดรถ</a></li>
<li><a href="routes.html">รายละเอียดสายรถ</a></li>
</ul>
</div>
<div class="footer__col">
<h4>หน้าตัวอย่าง</h4>
<ul>
<li><a href="route-detail-101.html">Route detail /routes/[routeId]</a></li>
<li><a href="stop-detail-at001.html">Stop detail /stops/details</a></li>
<li><a href="route-expanded.html">Expanded route redirect</a></li>
</ul>
</div>
<div class="footer__col footer__contact">
<h4>หมายเหตุ</h4>
<div class="row"><span>🧪 ใช้ mock data เพื่อ preview layout</span></div>
<div class="row"><span>🗂️ แยกเป็นไฟล์ HTML เปิดได้ทันที</span></div>
<div class="row"><span>🎨 อิง class/style จาก frontend จริง</span></div>
<div class="row"><a href="index.html">📋 กลับหน้า showcase</a></div>
</div>
</div>
<div class="footer__bottom">
<p>© 2026 AT Transit <span class="pill">static preview bundle</span></p>
</div>
</div>
</footer>
</body>
</html>
@@ -0,0 +1,29 @@
<!DOCTYPE html>
<html lang="th">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>AT Transit - Expanded Route Redirect Preview</title>
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
<link href="https://fonts.googleapis.com/css2?family=Noto+Sans+Thai:wght@400;500;600;700;800&family=Prompt:wght@400;500;600;700&display=swap" rel="stylesheet" />
<link rel="stylesheet" href="assets/styles.css" />
</head>
<body class="">
<div class="redirect-demo">
<div class="redirect-demo__card">
<span class="redirect-demo__code">/routes/[routeId]/expanded</span>
<h1>Expanded Route Page</h1>
<p class="muted">ใน source จริง หน้า <code>src/app/routes/[routeId]/expanded/page.tsx</code> ทำหน้าที่ redirect ไปยัง <code>/routes/[routeId]</code></p>
<div class="kv-grid">
<div class="kv-card"><small>ตัวอย่าง routeId</small><strong>101</strong></div>
<div class="kv-card"><small>Redirect target</small><strong>route-detail-101.html</strong></div>
<div class="kv-card"><small>Behavior</small><strong>server-side redirect</strong></div>
</div>
<p style="margin-top:22px"><a class="pill-link pill-link--primary" href="route-detail-101.html">เปิดหน้าเป้าหมาย</a></p>
</div>
</div>
</body>
</html>
+189
View File
@@ -0,0 +1,189 @@
<!DOCTYPE html>
<html lang="th">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>AT Transit - Routes Preview</title>
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
<link href="https://fonts.googleapis.com/css2?family=Noto+Sans+Thai:wght@400;500;600;700;800&family=Prompt:wght@400;500;600;700&display=swap" rel="stylesheet" />
<link rel="stylesheet" href="assets/styles.css" />
</head>
<body>
<header class="topbar">
<div class="topbar__inner">
<a href="home.html" class="brand">
<img src="assets/logo.svg" alt="AT Transit" width="44" height="44" class="brand__logo" />
<div>
<p class="brand__title">AT Transit</p>
<p class="brand__subtitle">สถานีขนส่งผู้โดยสารจังหวัดอ่างทอง</p>
</div>
</a>
<nav class="nav" aria-label="เมนูหลัก"><a href="home.html">หน้าแรก</a><a href="stops.html">ป้ายหยุดรถ</a><a href="routes.html" class="active">รายละเอียดสายรถ</a></nav>
<a href="routes.html" class="cta-pill">เช็กเวลาเดินรถ</a>
</div>
</header>
<main class="page">
<section class="page-hero page-hero--alt">
<div class="page-hero__blob page-hero__blob--a"></div>
<div class="page-hero__blob page-hero__blob--b"></div>
<div class="page-hero__blob page-hero__blob--c"></div>
<div class="page-hero__inner">
<span class="page-hero__badge">🛣️ ROUTE NETWORK</span>
<h1 class="page-hero__title">เส้นทางเดินรถ<span class="page-hero__title-grad">แยกตามประเภท</span></h1>
<p class="page-hero__subtitle">Preview layout ใหม่ของ routes listing โดยแบ่งเส้นทางเป็น 4 หมวดหลักตามประเภทการวิ่ง</p>
<div class="page-hero__stats">
<span class="page-hero__stat"><b>12</b> เส้นทางทั้งหมด</span>
<span class="page-hero__stat"><b>4</b> หมวดที่มีข้อมูล</span>
<span class="page-hero__stat"><b>4</b> หมวดการแสดงผล</span>
</div>
</div>
</section>
<div class="toolbar toolbar--stacked">
<div class="toolbar__search"><span aria-hidden>🔍</span><input placeholder="ค้นหาเลขสาย หรือชื่อเส้นทาง…" disabled /></div>
<div class="toolbar__chips">
<span class="chip-soft chip-soft--mint">หมวดเส้นทางภายใน อบต เทศบาล · 3</span>
<span class="chip-soft chip-soft--sky">หมวดเส้นทางเข้ากรุงเทพฯ · 2</span>
<span class="chip-soft chip-soft--pink">หมวดเส้นทางระหว่างจังหวัด · 4</span>
<span class="chip-soft chip-soft--purple">หมวดเส้นทางภายในจังหวัด · 3</span>
</div>
</div>
<section class="route-category-summary">
<article class="route-category-summary__card route-category-summary__card--mint">
<div class="route-category-summary__eyebrow">LOCAL LOOP</div>
<h2>หมวดเส้นทางภายใน อบต เทศบาล</h2>
<p>รถวิ่งระยะใกล้ในชุมชน เน้นการเชื่อมตลาด หน่วยงานท้องถิ่น และย่านบริการหลัก</p>
<strong>3 เส้นทาง</strong>
</article>
<article class="route-category-summary__card route-category-summary__card--sky">
<div class="route-category-summary__eyebrow">BANGKOK CONNECT</div>
<h2>หมวดเส้นทางเข้ากรุงเทพฯ</h2>
<p>แสดงเฉพาะเส้นทางที่มุ่งหน้าเข้ากรุงเทพฯ เพื่อให้ผู้ใช้งานเลือกเส้นทางเข้าเมืองได้ง่าย</p>
<strong>2 เส้นทาง</strong>
</article>
<article class="route-category-summary__card route-category-summary__card--pink">
<div class="route-category-summary__eyebrow">INTERPROVINCIAL</div>
<h2>หมวดเส้นทางระหว่างจังหวัด</h2>
<p>รวมเส้นทางเชื่อมต่อจังหวัดข้างเคียงและ hub การเดินทางสำคัญ</p>
<strong>4 เส้นทาง</strong>
</article>
<article class="route-category-summary__card route-category-summary__card--purple">
<div class="route-category-summary__eyebrow">IN-PROVINCE</div>
<h2>หมวดเส้นทางภายในจังหวัด</h2>
<p>เหมาะสำหรับการค้นหาเส้นทางที่วิ่งระหว่างอำเภอ ตลาด และชุมชนในจังหวัดเดียวกัน</p>
<strong>3 เส้นทาง</strong>
</article>
</section>
<div class="route-category-list">
<section class="route-category route-category--mint">
<div class="route-category__head">
<div>
<span class="route-category__badge route-category__badge--mint">LOCAL LOOP</span>
<h2 class="route-category__title">หมวดเส้นทางภายใน อบต เทศบาล</h2>
<p class="route-category__desc">รถวิ่งในพื้นที่ชุมชน เน้นการเชื่อมจุดเศรษฐกิจ ตลาดเทศบาล และหน่วยงานท้องถิ่น</p>
</div>
<div class="route-category__stats"><span class="chip-soft chip-soft--mint">3 เส้นทาง</span></div>
</div>
<div class="tile-grid">
<a href="route-detail-101.html" class="tile tile--mint"><div class="tile__badge tile__badge--mint tile__badge--num"><span>A1</span></div><div class="tile__body"><p class="tile__title">ตลาดอ่างทอง → ศาลากลางจังหวัด</p><p class="tile__meta">LOCAL / เทศบาล</p><div class="tile__chips"><span class="chip-soft chip-soft--mint">ภายใน อบต / เทศบาล</span><span class="chip-soft chip-soft--mint">🚌 shuttle</span></div></div><span class="tile__arrow">→</span></a>
<a href="route-detail-101.html" class="tile tile--sky"><div class="tile__badge tile__badge--sky tile__badge--num"><span>A2</span></div><div class="tile__body"><p class="tile__title">ตลาดโพธิ์ทอง → สำนักงานเทศบาล</p><p class="tile__meta">LOCAL / ชุมชน</p><div class="tile__chips"><span class="chip-soft chip-soft--mint">ภายใน อบต / เทศบาล</span><span class="chip-soft chip-soft--mint">🚌 minibus</span></div></div><span class="tile__arrow">→</span></a>
<a href="route-detail-101.html" class="tile tile--purple"><div class="tile__badge tile__badge--purple tile__badge--num"><span>A3</span></div><div class="tile__body"><p class="tile__title">วิเศษชัยชาญ → ตลาดชุมชน</p><p class="tile__meta">LOCAL / เทศบาล</p><div class="tile__chips"><span class="chip-soft chip-soft--mint">ภายใน อบต / เทศบาล</span><span class="chip-soft chip-soft--mint">🚌 songthaew</span></div></div><span class="tile__arrow">→</span></a>
</div>
</section>
<section class="route-category route-category--sky">
<div class="route-category__head">
<div>
<span class="route-category__badge route-category__badge--sky">BANGKOK CONNECT</span>
<h2 class="route-category__title">หมวดเส้นทางเข้ากรุงเทพฯ</h2>
<p class="route-category__desc">แยกกลุ่มชัดเจนสำหรับผู้โดยสารที่ต้องการเดินทางเข้ากรุงเทพฯ หรือเชื่อมต่อสถานีหลัก</p>
</div>
<div class="route-category__stats"><span class="chip-soft chip-soft--sky">2 เส้นทาง</span></div>
</div>
<div class="tile-grid">
<a href="route-detail-101.html" class="tile tile--sky"><div class="tile__badge tile__badge--sky tile__badge--num"><span>902</span></div><div class="tile__body"><p class="tile__title">อ่างทอง → กรุงเทพฯ (ปิ่นเกล้า)</p><p class="tile__meta">BANGKOK</p><div class="tile__chips"><span class="chip-soft chip-soft--sky">เข้ากรุงเทพฯ</span><span class="chip-soft chip-soft--mint">🚌 coach</span></div></div><span class="tile__arrow">→</span></a>
<a href="route-detail-101.html" class="tile tile--pink"><div class="tile__badge tile__badge--pink tile__badge--num"><span>903</span></div><div class="tile__body"><p class="tile__title">อ่างทอง → หมอชิต</p><p class="tile__meta">BANGKOK EXPRESS</p><div class="tile__chips"><span class="chip-soft chip-soft--sky">เข้ากรุงเทพฯ</span><span class="chip-soft chip-soft--mint">🚌 van</span></div></div><span class="tile__arrow">→</span></a>
</div>
</section>
<section class="route-category route-category--pink">
<div class="route-category__head">
<div>
<span class="route-category__badge route-category__badge--pink">INTERPROVINCIAL</span>
<h2 class="route-category__title">หมวดเส้นทางระหว่างจังหวัด</h2>
<p class="route-category__desc">รวมเส้นทางที่เชื่อมหลายจังหวัดและเส้นทางระยะกลางถึงไกล เพื่อให้เทียบตัวเลือกได้ในกลุ่มเดียว</p>
</div>
<div class="route-category__stats"><span class="chip-soft chip-soft--pink">4 เส้นทาง</span></div>
</div>
<div class="tile-grid">
<a href="route-detail-101.html" class="tile tile--pink"><div class="tile__badge tile__badge--pink tile__badge--num"><span>464</span></div><div class="tile__body"><p class="tile__title">สุพรรณบุรี → สระบุรี</p><p class="tile__meta">INTERPROV</p><div class="tile__chips"><span class="chip-soft chip-soft--pink">ระหว่างจังหวัด</span><span class="chip-soft chip-soft--mint">🚌 coach</span></div></div><span class="tile__arrow">→</span></a>
<a href="route-detail-101.html" class="tile tile--amber"><div class="tile__badge tile__badge--amber tile__badge--num"><span>307</span></div><div class="tile__body"><p class="tile__title">อ่างทอง → สิงห์บุรี</p><p class="tile__meta">REGIONAL</p><div class="tile__chips"><span class="chip-soft chip-soft--pink">ระหว่างจังหวัด</span><span class="chip-soft chip-soft--mint">🚌 minibus</span></div></div><span class="tile__arrow">→</span></a>
<a href="route-detail-101.html" class="tile tile--sky"><div class="tile__badge tile__badge--sky tile__badge--num"><span>401</span></div><div class="tile__body"><p class="tile__title">อ่างทอง → ลพบุรี</p><p class="tile__meta">REGIONAL</p><div class="tile__chips"><span class="chip-soft chip-soft--pink">ระหว่างจังหวัด</span><span class="chip-soft chip-soft--mint">🚌 bus</span></div></div><span class="tile__arrow">→</span></a>
<a href="route-detail-101.html" class="tile tile--purple"><div class="tile__badge tile__badge--purple tile__badge--num"><span>511</span></div><div class="tile__body"><p class="tile__title">อ่างทอง → อยุธยา → ปทุมธานี</p><p class="tile__meta">INTERPROV</p><div class="tile__chips"><span class="chip-soft chip-soft--pink">ระหว่างจังหวัด</span><span class="chip-soft chip-soft--mint">🚌 van</span></div></div><span class="tile__arrow">→</span></a>
</div>
</section>
<section class="route-category route-category--purple">
<div class="route-category__head">
<div>
<span class="route-category__badge route-category__badge--purple">IN-PROVINCE</span>
<h2 class="route-category__title">หมวดเส้นทางภายในจังหวัด</h2>
<p class="route-category__desc">รวมเส้นทางที่เชื่อมอำเภอและชุมชนสำคัญภายในจังหวัดเดียวกัน เพื่อให้หาง่ายขึ้นกว่าการรวมทุกเส้นทางไว้ grid เดียว</p>
</div>
<div class="route-category__stats"><span class="chip-soft chip-soft--purple">3 เส้นทาง</span></div>
</div>
<div class="tile-grid">
<a href="route-detail-101.html" class="tile tile--purple"><div class="tile__badge tile__badge--purple tile__badge--num"><span>15</span></div><div class="tile__body"><p class="tile__title">สถานีอ่างทอง → ตลาดโพธิ์ทอง</p><p class="tile__meta">INTRA</p><div class="tile__chips"><span class="chip-soft chip-soft--purple">ภายในจังหวัด</span><span class="chip-soft chip-soft--mint">🚌 van</span></div></div><span class="tile__arrow">→</span></a>
<a href="route-detail-101.html" class="tile tile--mint"><div class="tile__badge tile__badge--mint tile__badge--num"><span>21</span></div><div class="tile__body"><p class="tile__title">แสวงหา → วิเศษชัยชาญ</p><p class="tile__meta">IN_PROVINCE</p><div class="tile__chips"><span class="chip-soft chip-soft--purple">ภายในจังหวัด</span><span class="chip-soft chip-soft--mint">🚌 minibus</span></div></div><span class="tile__arrow">→</span></a>
<a href="route-detail-101.html" class="tile tile--amber"><div class="tile__badge tile__badge--amber tile__badge--num"><span>33</span></div><div class="tile__body"><p class="tile__title">สามโก้ → เมืองอ่างทอง</p><p class="tile__meta">INTRA</p><div class="tile__chips"><span class="chip-soft chip-soft--purple">ภายในจังหวัด</span><span class="chip-soft chip-soft--mint">🚌 bus</span></div></div><span class="tile__arrow">→</span></a>
</div>
</section>
</div>
</main>
<footer class="footer">
<div class="container">
<div class="footer__grid">
<div class="footer__brand">
<div class="footer__brand-row">
<img src="assets/logo.svg" alt="AT Transit" width="48" height="48" />
<div>
<strong>AT Transit</strong>
<span>สถานีขนส่งผู้โดยสารจังหวัดอ่างทอง</span>
</div>
</div>
<p>ศูนย์รวมข้อมูลตารางเดินรถ จุดจอด และเส้นทางในจังหวัดอ่างทองและจังหวัดใกล้เคียง พร้อม mock data สำหรับ preview งานออกแบบหน้าเว็บแบบ static HTML</p>
</div>
<div class="footer__col">
<h4>เมนู</h4>
<ul>
<li><a href="home.html">หน้าแรก</a></li>
<li><a href="stops.html">ค้นหาป้ายหยุดรถ</a></li>
<li><a href="routes.html">รายละเอียดสายรถ</a></li>
</ul>
</div>
<div class="footer__col">
<h4>หน้าตัวอย่าง</h4>
<ul>
<li><a href="route-detail-101.html">Route detail /routes/[routeId]</a></li>
<li><a href="stop-detail-at001.html">Stop detail /stops/details</a></li>
<li><a href="route-expanded.html">Expanded route redirect</a></li>
</ul>
</div>
<div class="footer__col footer__contact">
<h4>หมายเหตุ</h4>
<div class="row"><span>🧪 ใช้ mock data เพื่อ preview layout</span></div>
<div class="row"><span>🗂️ แยกเป็นไฟล์ HTML เปิดได้ทันที</span></div>
<div class="row"><span>🎨 อิง class/style จาก frontend จริง</span></div>
<div class="row"><a href="index.html">📋 กลับหน้า showcase</a></div>
</div>
</div>
<div class="footer__bottom"><p>© 2026 AT Transit <span class="pill">static preview bundle</span></p></div>
</div>
</footer>
</body>
</html>
@@ -0,0 +1,106 @@
<!DOCTYPE html>
<html lang="th">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>AT Transit - Stop AT001 Preview</title>
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
<link href="https://fonts.googleapis.com/css2?family=Noto+Sans+Thai:wght@400;500;600;700;800&family=Prompt:wght@400;500;600;700&display=swap" rel="stylesheet" />
<link rel="stylesheet" href="assets/styles.css" />
</head>
<body class="">
<header class="topbar">
<div class="topbar__inner">
<a href="home.html" class="brand">
<img src="assets/logo.svg" alt="AT Transit" width="44" height="44" class="brand__logo" />
<div>
<p class="brand__title">AT Transit</p>
<p class="brand__subtitle">สถานีขนส่งผู้โดยสารจังหวัดอ่างทอง</p>
</div>
</a>
<nav class="nav" aria-label="เมนูหลัก"><a href="home.html" class="">หน้าแรก</a><a href="stops.html" class="active">ป้ายหยุดรถ</a><a href="routes.html" class="">รายละเอียดสายรถ</a></nav>
<a href="routes.html" class="cta-pill">เช็กเวลาเดินรถ</a>
</div>
</header>
<main class="page">
<section class="hero">
<span class="pill">terminal</span>
<h1 style="margin-top: 10px;">สถานีขนส่งอ่างทอง</h1>
<p class="muted">📍 เมืองอ่างทอง / อ่างทอง · 14.5890, 100.4551</p>
</section>
<div class="stop-detail__split">
<div class="stop-detail__gallery">
<div class="mock-gallery__grid">
<div class="mock-gallery__hero"><span class="mock-gallery__label">อาคารสถานี</span></div>
<div class="mock-gallery__stack">
<div><span class="mock-gallery__label">ช่องจำหน่ายตั๋ว</span></div>
<div><span class="mock-gallery__label">ชานชาลา</span></div>
<div><span class="mock-gallery__label">ป้ายทางเข้า</span></div>
</div>
</div>
</div>
<div class="stop-detail__map mock-map">
<div class="mock-map__pin mock-map__pin--start" style="left:48%;top:46%"></div>
<div class="mock-map__legend"><span><b>Single stop preview</b></span><span>แทนแผนที่ Leaflet จริง</span></div>
</div>
</div>
<h2 class="section-title">ตารางเวลาที่จุดนี้</h2>
<div class="schedule-list">
<article class="schedule-card schedule-card--sky"><div class="schedule-card__rail"></div><div class="schedule-card__head"><a href="route-detail-101.html" class="schedule-card__route sky"><span class="schedule-card__route-label">เส้นทาง</span><span class="schedule-card__route-id">101</span></a><div class="schedule-card__meta"><span class="schedule-card__direction"><span aria-hidden>🧭</span> ไปอยุธยา</span><span class="schedule-card__note">📝 รถออกทุก 90 นาที</span></div></div><div class="schedule-card__times"><span class="schedule-card__time">🕒 06:00</span><span class="schedule-card__time">🕒 07:30</span><span class="schedule-card__time">🕒 09:00</span></div></article>
<article class="schedule-card schedule-card--purple"><div class="schedule-card__rail"></div><div class="schedule-card__head"><a href="route-detail-101.html" class="schedule-card__route purple"><span class="schedule-card__route-label">เส้นทาง</span><span class="schedule-card__route-id">15</span></a><div class="schedule-card__meta"><span class="schedule-card__direction"><span aria-hidden>🧭</span> ไปตลาดโพธิ์ทอง</span><span class="schedule-card__note">📝 เสริมรอบเช้า</span></div></div><div class="schedule-card__times"><span class="schedule-card__time">🕒 05:45</span><span class="schedule-card__time">🕒 08:15</span><span class="schedule-card__time">🕒 10:45</span></div></article>
</div>
</main>
<footer class="footer">
<div class="container">
<div class="footer__grid">
<div class="footer__brand">
<div class="footer__brand-row">
<img src="assets/logo.svg" alt="AT Transit" width="48" height="48" />
<div>
<strong>AT Transit</strong>
<span>สถานีขนส่งผู้โดยสารจังหวัดอ่างทอง</span>
</div>
</div>
<p>
ศูนย์รวมข้อมูลตารางเดินรถ จุดจอด และเส้นทางในจังหวัดอ่างทองและจังหวัดใกล้เคียง
พร้อม mock data สำหรับ preview งานออกแบบหน้าเว็บแบบ static HTML
</p>
</div>
<div class="footer__col">
<h4>เมนู</h4>
<ul>
<li><a href="home.html">หน้าแรก</a></li>
<li><a href="stops.html">ค้นหาป้ายหยุดรถ</a></li>
<li><a href="routes.html">รายละเอียดสายรถ</a></li>
</ul>
</div>
<div class="footer__col">
<h4>หน้าตัวอย่าง</h4>
<ul>
<li><a href="route-detail-101.html">Route detail /routes/[routeId]</a></li>
<li><a href="stop-detail-at001.html">Stop detail /stops/details</a></li>
<li><a href="route-expanded.html">Expanded route redirect</a></li>
</ul>
</div>
<div class="footer__col footer__contact">
<h4>หมายเหตุ</h4>
<div class="row"><span>🧪 ใช้ mock data เพื่อ preview layout</span></div>
<div class="row"><span>🗂️ แยกเป็นไฟล์ HTML เปิดได้ทันที</span></div>
<div class="row"><span>🎨 อิง class/style จาก frontend จริง</span></div>
<div class="row"><a href="index.html">📋 กลับหน้า showcase</a></div>
</div>
</div>
<div class="footer__bottom">
<p>© 2026 AT Transit <span class="pill">static preview bundle</span></p>
</div>
</div>
</footer>
</body>
</html>
@@ -0,0 +1,29 @@
<!DOCTYPE html>
<html lang="th">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>AT Transit - Stop Redirect Preview</title>
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
<link href="https://fonts.googleapis.com/css2?family=Noto+Sans+Thai:wght@400;500;600;700;800&family=Prompt:wght@400;500;600;700&display=swap" rel="stylesheet" />
<link rel="stylesheet" href="assets/styles.css" />
</head>
<body class="">
<div class="redirect-demo">
<div class="redirect-demo__card">
<span class="redirect-demo__code">/stops/[stopId]</span>
<h1>Stop Redirect Page</h1>
<p class="muted">ใน source จริง หน้า <code>src/app/stops/[stopId]/page.tsx</code> จะ redirect ไป <code>/stops/details?code=...</code></p>
<div class="kv-grid">
<div class="kv-card"><small>ตัวอย่าง stopId</small><strong>AT001</strong></div>
<div class="kv-card"><small>Redirect target</small><strong>stop-detail-at001.html</strong></div>
<div class="kv-card"><small>Behavior</small><strong>notFound ถ้าไม่มี code</strong></div>
</div>
<p style="margin-top:22px"><a class="pill-link pill-link--primary" href="stop-detail-at001.html">เปิดหน้าเป้าหมาย</a></p>
</div>
</div>
</body>
</html>
+119
View File
@@ -0,0 +1,119 @@
<!DOCTYPE html>
<html lang="th">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>AT Transit - Stops Preview</title>
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
<link href="https://fonts.googleapis.com/css2?family=Noto+Sans+Thai:wght@400;500;600;700;800&family=Prompt:wght@400;500;600;700&display=swap" rel="stylesheet" />
<link rel="stylesheet" href="assets/styles.css" />
</head>
<body class="">
<header class="topbar">
<div class="topbar__inner">
<a href="home.html" class="brand">
<img src="assets/logo.svg" alt="AT Transit" width="44" height="44" class="brand__logo" />
<div>
<p class="brand__title">AT Transit</p>
<p class="brand__subtitle">สถานีขนส่งผู้โดยสารจังหวัดอ่างทอง</p>
</div>
</a>
<nav class="nav" aria-label="เมนูหลัก"><a href="home.html" class="">หน้าแรก</a><a href="stops.html" class="active">ป้ายหยุดรถ</a><a href="routes.html" class="">รายละเอียดสายรถ</a></nav>
<a href="routes.html" class="cta-pill">เช็กเวลาเดินรถ</a>
</div>
</header>
<main class="page">
<section class="page-hero">
<div class="page-hero__blob page-hero__blob--a"></div>
<div class="page-hero__blob page-hero__blob--b"></div>
<div class="page-hero__blob page-hero__blob--c"></div>
<div class="page-hero__inner">
<span class="page-hero__badge">🚏 STOP DIRECTORY</span>
<h1 class="page-hero__title">จุดจอด<span class="page-hero__title-grad">ทั่วประเทศ</span></h1>
<p class="page-hero__subtitle">ค้นหาป้าย / สถานีขนส่ง พร้อมแผนที่และเส้นทางที่ผ่าน</p>
<div class="page-hero__stats">
<span class="page-hero__stat"><b>12</b> จุดจอด</span>
<span class="page-hero__stat"><b>10</b> มีพิกัด</span>
<span class="page-hero__stat"><b>5</b> ประเภท</span>
</div>
</div>
</section>
<div class="map-wrap map-wrap--soft mock-map">
<div class="mock-map__pin mock-map__pin--start" style="left:18%;top:56%"></div>
<div class="mock-map__pin mock-map__pin--mid" style="left:27%;top:48%"></div>
<div class="mock-map__pin mock-map__pin--mid" style="left:45%;top:42%"></div>
<div class="mock-map__pin mock-map__pin--mid" style="left:58%;top:35%"></div>
<div class="mock-map__pin mock-map__pin--end" style="left:76%;top:30%"></div>
<div class="mock-map__legend"><span><b>Stop map preview</b></span><span>Mock cluster + route markers</span></div>
</div>
<div class="toolbar">
<div class="toolbar__search"><span aria-hidden>🔍</span><input placeholder="ค้นหาชื่อป้าย หรือจังหวัด…" disabled /></div>
<div class="toolbar__chips">
<span class="chip-soft chip-soft--purple">🚍 สถานีขนส่ง · 2</span>
<span class="chip-soft chip-soft--sky">🚏 ป้ายหลัก · 4</span>
<span class="chip-soft chip-soft--amber">🛣️ จุดรับส่ง · 3</span>
<span class="chip-soft chip-soft--pink">🏪 ตลาด/ชุมชน · 2</span>
<span class="chip-soft chip-soft--mint">📍 จุดสังเกต · 1</span>
</div>
</div>
<div class="tile-grid tile-grid--compact">
<a href="stop-detail-at001.html" class="tile tile--purple"><div class="tile__badge tile__badge--purple"><span>🚍</span></div><div class="tile__body"><p class="tile__title">สถานีขนส่งอ่างทอง</p><p class="tile__meta">เมืองอ่างทอง · อ่างทอง</p><div class="tile__chips"><span class="chip-soft chip-soft--purple">สถานีขนส่ง</span><span class="chip-soft chip-soft--mint">📍 บนแผนที่</span></div></div><span class="tile__arrow">→</span></a>
<a href="stop-detail-at001.html" class="tile tile--sky"><div class="tile__badge tile__badge--sky"><span>🚏</span></div><div class="tile__body"><p class="tile__title">ตลาดวิเศษชัยชาญ</p><p class="tile__meta">วิเศษชัยชาญ · อ่างทอง</p><div class="tile__chips"><span class="chip-soft chip-soft--sky">ป้ายหลัก</span><span class="chip-soft chip-soft--mint">📍 บนแผนที่</span></div></div><span class="tile__arrow">→</span></a>
<a href="stop-detail-at001.html" class="tile tile--amber"><div class="tile__badge tile__badge--amber"><span>🛣️</span></div><div class="tile__body"><p class="tile__title">แยกบางบาล</p><p class="tile__meta">บางบาล · พระนครศรีอยุธยา</p><div class="tile__chips"><span class="chip-soft chip-soft--amber">จุดรับส่ง</span><span class="chip-soft chip-soft--mint">📍 บนแผนที่</span></div></div><span class="tile__arrow">→</span></a>
<div class="tile tile--mint tile--disabled"><div class="tile__badge tile__badge--mint"><span>📍</span></div><div class="tile__body"><p class="tile__title">จุดพักรถโพธิ์ทอง</p><p class="tile__meta">โพธิ์ทอง · อ่างทอง</p><div class="tile__chips"><span class="chip-soft chip-soft--mint">จุดสังเกต</span></div></div><span class="tile__arrow">→</span></div>
</div>
</main>
<footer class="footer">
<div class="container">
<div class="footer__grid">
<div class="footer__brand">
<div class="footer__brand-row">
<img src="assets/logo.svg" alt="AT Transit" width="48" height="48" />
<div>
<strong>AT Transit</strong>
<span>สถานีขนส่งผู้โดยสารจังหวัดอ่างทอง</span>
</div>
</div>
<p>
ศูนย์รวมข้อมูลตารางเดินรถ จุดจอด และเส้นทางในจังหวัดอ่างทองและจังหวัดใกล้เคียง
พร้อม mock data สำหรับ preview งานออกแบบหน้าเว็บแบบ static HTML
</p>
</div>
<div class="footer__col">
<h4>เมนู</h4>
<ul>
<li><a href="home.html">หน้าแรก</a></li>
<li><a href="stops.html">ค้นหาป้ายหยุดรถ</a></li>
<li><a href="routes.html">รายละเอียดสายรถ</a></li>
</ul>
</div>
<div class="footer__col">
<h4>หน้าตัวอย่าง</h4>
<ul>
<li><a href="route-detail-101.html">Route detail /routes/[routeId]</a></li>
<li><a href="stop-detail-at001.html">Stop detail /stops/details</a></li>
<li><a href="route-expanded.html">Expanded route redirect</a></li>
</ul>
</div>
<div class="footer__col footer__contact">
<h4>หมายเหตุ</h4>
<div class="row"><span>🧪 ใช้ mock data เพื่อ preview layout</span></div>
<div class="row"><span>🗂️ แยกเป็นไฟล์ HTML เปิดได้ทันที</span></div>
<div class="row"><span>🎨 อิง class/style จาก frontend จริง</span></div>
<div class="row"><a href="index.html">📋 กลับหน้า showcase</a></div>
</div>
</div>
<div class="footer__bottom">
<p>© 2026 AT Transit <span class="pill">static preview bundle</span></p>
</div>
</div>
</footer>
</body>
</html>
Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 673 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 264 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 40 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 85 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 98 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 38 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 94 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 89 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 81 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 135 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 233 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 73 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 142 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 89 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 89 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 217 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 217 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 82 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 127 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 520 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 520 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 188 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 253 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 251 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 225 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 160 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 MiB

+96
View File
@@ -0,0 +1,96 @@
-- Auto-generated by upload_seed_images.py
-- Run this AFTER 0003_seed.sql is applied.
-- ON CONFLICT (fid) DO NOTHING → safe to re-run.
-- extras/boat-market2transta.jpg
INSERT INTO images (id, entity_type, entity_id, kind, fid, url_path, display_order, meta) VALUES ('d24014c5-a97b-4723-bbf3-4f32f40465cc', 'misc', 'boat-market2transta', 'photo', '/buckets/transit/misc/boat-market2transta/boat-market2transta.jpg', '/misc/boat-market2transta/boat-market2transta.jpg', 0, '{"mime":"image/jpeg","size_bytes":1362964,"sha256":"0e09c1458ccef6ba9c4cd1b7c10f222f468888a7ad38f30ed732deb558551a9f","width":2048,"height":1536}'::jsonb) ON CONFLICT (fid) DO NOTHING;
-- extras/boat.jpeg
INSERT INTO images (id, entity_type, entity_id, kind, fid, url_path, display_order, meta) VALUES ('db884929-1c96-41da-bcb4-bdc90eb46a4b', 'misc', 'boat', 'photo', '/buckets/transit/misc/boat/boat.jpeg', '/misc/boat/boat.jpeg', 0, '{"mime":"image/jpeg","size_bytes":689077,"sha256":"a4598e486bbb8a907d4fbec43828de7d13c6b4cdd4181bd7c14d42b2ab9dbd72","width":3023,"height":1863}'::jsonb) ON CONFLICT (fid) DO NOTHING;
-- icons/minibus-256x256.ico
INSERT INTO images (id, entity_type, entity_id, kind, fid, url_path, display_order, meta) VALUES ('33187d1d-6e06-4c16-968f-e2719d8cce37', 'misc', 'minibus-256x256', 'icon', '/buckets/transit/misc/minibus-256x256/minibus-256x256.ico', '/misc/minibus-256x256/minibus-256x256.ico', 0, '{"mime":"image/x-icon","size_bytes":270398,"sha256":"39a3c902f4308412a3ac2cc6893818de03cfbab096f1b10d3f407b572db6cc0d","width":256,"height":256}'::jsonb) ON CONFLICT (fid) DO NOTHING;
-- icons/minibus-512x512.png
INSERT INTO images (id, entity_type, entity_id, kind, fid, url_path, display_order, meta) VALUES ('13539d22-b617-45ea-a338-0b8ed68aa533', 'misc', 'minibus-512x512', 'icon', '/buckets/transit/misc/minibus-512x512/minibus-512x512.png', '/misc/minibus-512x512/minibus-512x512.png', 0, '{"mime":"image/png","size_bytes":41183,"sha256":"e56b483a93401d0c3da654eae1236fea74de4c1c4be69a334327db559636e820","width":512,"height":511}'::jsonb) ON CONFLICT (fid) DO NOTHING;
-- landmarks/market.png
INSERT INTO images (id, entity_type, entity_id, kind, fid, url_path, display_order, meta) VALUES ('0f0fc957-1992-4362-a49d-10933d4fff79', 'misc', 'market', 'photo', '/buckets/transit/misc/market/market.png', '/misc/market/market.png', 0, '{"mime":"image/png","size_bytes":1993133,"sha256":"960f7612b46cf89e941e4529d7dfc113986763169df4cdcc7e8540f24354f8f8","width":1888,"height":772}'::jsonb) ON CONFLICT (fid) DO NOTHING;
-- landmarks/riverbank.jpg
INSERT INTO images (id, entity_type, entity_id, kind, fid, url_path, display_order, meta) VALUES ('b9e7ea71-8161-499b-81cb-13f20ba98494', 'misc', 'riverbank', 'photo', '/buckets/transit/misc/riverbank/riverbank.jpg', '/misc/riverbank/riverbank.jpg', 0, '{"mime":"image/jpeg","size_bytes":86824,"sha256":"dca1bcf90e73f2c5c1fb9eaa6a4da009556987b06353bc4f3bed8ed544b7c7cf","width":960,"height":720}'::jsonb) ON CONFLICT (fid) DO NOTHING;
-- landmarks/temple.png
INSERT INTO images (id, entity_type, entity_id, kind, fid, url_path, display_order, meta) VALUES ('b63c6e28-ab1a-481a-a3f1-55367c21eeec', 'misc', 'temple', 'photo', '/buckets/transit/misc/temple/temple.png', '/misc/temple/temple.png', 0, '{"mime":"image/png","size_bytes":1646584,"sha256":"968553163cb8ec35d63345e8968e93f55b5689d60f640a32c3c08929d1b98bcc","width":1910,"height":567}'::jsonb) ON CONFLICT (fid) DO NOTHING;
-- landmarks/waterpark.png
INSERT INTO images (id, entity_type, entity_id, kind, fid, url_path, display_order, meta) VALUES ('144ff6ed-6852-4f90-ac4c-1e85fe3fc0e9', 'misc', 'waterpark', 'photo', '/buckets/transit/misc/waterpark/waterpark.png', '/misc/waterpark/waterpark.png', 0, '{"mime":"image/png","size_bytes":1391729,"sha256":"c368d33ad02eafddc63358125d25da5ca7b694c310ca873890b0c8c29039c14c","width":1410,"height":590}'::jsonb) ON CONFLICT (fid) DO NOTHING;
-- network/overview-map.png
INSERT INTO images (id, entity_type, entity_id, kind, fid, url_path, display_order, meta) VALUES ('ca5ecf03-ad19-4025-8ece-8b30a38a1cb6', 'misc', 'overview-map', 'map', '/buckets/transit/misc/overview-map/overview-map.png', '/misc/overview-map/overview-map.png', 0, '{"mime":"image/png","size_bytes":3611925,"sha256":"cb9faf131bd98f931ed384a7d3bad84dd88dab85d7c375777f94f45700f4d070","width":2480,"height":3508}'::jsonb) ON CONFLICT (fid) DO NOTHING;
-- partners/7-11.png
INSERT INTO images (id, entity_type, entity_id, kind, fid, url_path, display_order, meta) VALUES ('2935df60-9733-4ebb-8b1a-4ef939dd69b9', 'sponsor', '7-11', 'logo', '/buckets/transit/sponsor/7-11/7-11.png', '/sponsor/7-11/7-11.png', 0, '{"mime":"image/png","size_bytes":24009,"sha256":"b6051acf2a3652b0fb9d00be6a00d5e3c0bd9a2e66d1a139e06a523149d0f0f5","width":512,"height":512}'::jsonb) ON CONFLICT (fid) DO NOTHING;
-- partners/airasia-move.png
INSERT INTO images (id, entity_type, entity_id, kind, fid, url_path, display_order, meta) VALUES ('0f08c5c2-2eb9-4f1e-97ec-d6a69d25e409', 'sponsor', 'airasia-move', 'logo', '/buckets/transit/sponsor/airasia-move/airasia-move.png', '/sponsor/airasia-move/airasia-move.png', 0, '{"mime":"image/png","size_bytes":21748,"sha256":"ce1f2b2a878baf39b022162d06bc12ed8218049b634d439499cbe47e4c05c2a4","width":512,"height":512}'::jsonb) ON CONFLICT (fid) DO NOTHING;
-- partners/bus-pingraow.jpg
INSERT INTO images (id, entity_type, entity_id, kind, fid, url_path, display_order, meta) VALUES ('0df5842a-dbd0-408c-9853-b1ebab067c3d', 'sponsor', 'bus-pingraow', 'logo', '/buckets/transit/sponsor/bus-pingraow/bus-pingraow.jpg', '/sponsor/bus-pingraow/bus-pingraow.jpg', 0, '{"mime":"image/jpeg","size_bytes":100789,"sha256":"ffecf2ed4353fa8f3dba181d4cf2ee1dbfcfc3f16db41860952f0987b0584480","width":959,"height":959}'::jsonb) ON CONFLICT (fid) DO NOTHING;
-- partners/busonlineticket.png
INSERT INTO images (id, entity_type, entity_id, kind, fid, url_path, display_order, meta) VALUES ('a18030e7-24d2-4518-b369-09e1b401f865', 'sponsor', 'busonlineticket', 'logo', '/buckets/transit/sponsor/busonlineticket/busonlineticket.png', '/sponsor/busonlineticket/busonlineticket.png', 0, '{"mime":"image/png","size_bytes":26910,"sha256":"1e10a2fb0ea132bf9453199a4cc6e0afa73f070a25d348357299aea807e950de","width":512,"height":512}'::jsonb) ON CONFLICT (fid) DO NOTHING;
-- partners/lazada.png
INSERT INTO images (id, entity_type, entity_id, kind, fid, url_path, display_order, meta) VALUES ('28659116-2c07-4092-af55-e21d6e1c3684', 'sponsor', 'lazada', 'logo', '/buckets/transit/sponsor/lazada/lazada.png', '/sponsor/lazada/lazada.png', 0, '{"mime":"image/png","size_bytes":38435,"sha256":"537d48d6964be1bed56ea489ef8ffffc4f69269125bf6fc87ebef82e26fbd327","width":1000,"height":1000}'::jsonb) ON CONFLICT (fid) DO NOTHING;
-- partners/shopee.png
INSERT INTO images (id, entity_type, entity_id, kind, fid, url_path, display_order, meta) VALUES ('e9bf7dd2-2d85-494e-9be9-db285408b2e4', 'sponsor', 'shopee', 'logo', '/buckets/transit/sponsor/shopee/shopee.png', '/sponsor/shopee/shopee.png', 0, '{"mime":"image/png","size_bytes":96641,"sha256":"35fb268ed2e8e3ecf2bf5123396f1558bbd53c3c6701ae191f070dcd374a93db","width":512,"height":512}'::jsonb) ON CONFLICT (fid) DO NOTHING;
-- partners/tcl999-angthong.jpg
INSERT INTO images (id, entity_type, entity_id, kind, fid, url_path, display_order, meta) VALUES ('902170bc-38d6-48bd-a2d7-4f303e6cb434', 'sponsor', 'tcl999-angthong', 'logo', '/buckets/transit/sponsor/tcl999-angthong/tcl999-angthong.jpg', '/sponsor/tcl999-angthong/tcl999-angthong.jpg', 0, '{"mime":"image/jpeg","size_bytes":2640044,"sha256":"952b9a3571324981a6df0d6183a0b4acc36a160c7fb8c9ad3ccc6c9f943a3e31","width":4032,"height":3024}'::jsonb) ON CONFLICT (fid) DO NOTHING;
-- partners/trip.jpg
INSERT INTO images (id, entity_type, entity_id, kind, fid, url_path, display_order, meta) VALUES ('12a3a61c-c4bf-4d89-ae2f-6c64b992b321', 'sponsor', 'trip', 'logo', '/buckets/transit/sponsor/trip/trip.jpg', '/sponsor/trip/trip.jpg', 0, '{"mime":"image/jpeg","size_bytes":3945,"sha256":"afa87e8a2c47d72118d053a2924a9fcefa2e5cfd916dfe49f5e8774819d57638","width":225,"height":225}'::jsonb) ON CONFLICT (fid) DO NOTHING;
-- partners/truck2hand.png
INSERT INTO images (id, entity_type, entity_id, kind, fid, url_path, display_order, meta) VALUES ('36e5c42c-8775-4373-8adb-6378ddef7298', 'sponsor', 'truck2hand', 'logo', '/buckets/transit/sponsor/truck2hand/truck2hand.png', '/sponsor/truck2hand/truck2hand.png', 0, '{"mime":"image/png","size_bytes":3761,"sha256":"4245f16ed45f52f3ea17c4ee95076ad50c2a7222dcd886302eae4f4a7abbc237","width":225,"height":225}'::jsonb) ON CONFLICT (fid) DO NOTHING;
-- qrcode/101.png
INSERT INTO images (id, entity_type, entity_id, kind, fid, url_path, display_order, meta) VALUES ('40d5a177-f94a-4388-ab21-0374da2de296', 'route', '101', 'map', '/buckets/transit/route/101/101.png', '/route/101/101.png', 9, '{"mime":"image/png","size_bytes":90889,"sha256":"fba0c55aeddb8c8f7b679130513e0b72e755a1246559cbd29c28edac7aba9e05","width":600,"height":600}'::jsonb) ON CONFLICT (fid) DO NOTHING;
-- qrcode/15.JPG
INSERT INTO images (id, entity_type, entity_id, kind, fid, url_path, display_order, meta) VALUES ('f4560621-c002-432e-b9a6-edf1cc30895c', 'route', '15', 'map', '/buckets/transit/route/15/15.JPG', '/route/15/15.JPG', 9, '{"mime":"image/jpeg","size_bytes":82619,"sha256":"a8220b5ee86105b801b46361e9fd166f8dbbec013178d7f6b55e4e250217d9f3","width":389,"height":389}'::jsonb) ON CONFLICT (fid) DO NOTHING;
-- qrcode/464.jpeg
INSERT INTO images (id, entity_type, entity_id, kind, fid, url_path, display_order, meta) VALUES ('1715ed50-a675-4182-a022-6de247ecc43c', 'route', '464', 'map', '/buckets/transit/route/464/464.jpeg', '/route/464/464.jpeg', 9, '{"mime":"image/jpeg","size_bytes":138467,"sha256":"21a3d653a17db64b3941cdff5a6d01ab14bc56ebf2c9de517908ade9f7ba383f","width":600,"height":600}'::jsonb) ON CONFLICT (fid) DO NOTHING;
-- qrcode/902.png
INSERT INTO images (id, entity_type, entity_id, kind, fid, url_path, display_order, meta) VALUES ('d24bdffa-51a0-4b65-88e0-c4df8b67049e', 'route', '902', 'map', '/buckets/transit/route/902/902.png', '/route/902/902.png', 9, '{"mime":"image/png","size_bytes":24035,"sha256":"689569e55d907757b74622ab35c10a20794d12ed81ab8323ded6f58bba4f1598","width":360,"height":360}'::jsonb) ON CONFLICT (fid) DO NOTHING;
-- routes/101/car.jpeg
INSERT INTO images (id, entity_type, entity_id, kind, fid, url_path, display_order, meta) VALUES ('164a63f0-ffa4-4d2a-90a6-30b77f5bed12', 'route', '101', 'photo', '/buckets/transit/route/101/car.jpeg', '/route/101/car.jpeg', 0, '{"mime":"image/jpeg","size_bytes":2171446,"sha256":"9f7e11df3184a5a59e72fb4e67d4fc387ad57a344492f95aa5786f339d69fc99","width":4032,"height":3024}'::jsonb) ON CONFLICT (fid) DO NOTHING;
-- routes/101/hero.jpeg
INSERT INTO images (id, entity_type, entity_id, kind, fid, url_path, display_order, meta) VALUES ('8b875289-2410-4117-9981-143a5fd39605', 'route', '101', 'hero', '/buckets/transit/route/101/hero.jpeg', '/route/101/hero.jpeg', 1, '{"mime":"image/jpeg","size_bytes":2608208,"sha256":"6b2fd71bd6977aba294457770235c89d43f53e914f83e9e8307d4711df497cab","width":4032,"height":3024}'::jsonb) ON CONFLICT (fid) DO NOTHING;
-- routes/1011/car.jpeg
INSERT INTO images (id, entity_type, entity_id, kind, fid, url_path, display_order, meta) VALUES ('a6bab7ca-c66b-4cd5-817a-c0ee750770b7', 'route', '1011', 'photo', '/buckets/transit/route/1011/car.jpeg', '/route/1011/car.jpeg', 0, '{"mime":"image/jpeg","size_bytes":1540789,"sha256":"dc4684bc682fcd8c107521c294b9cdbf9e608e2d7c0d961837db8f9a171011ca","width":3024,"height":3024}'::jsonb) ON CONFLICT (fid) DO NOTHING;
-- routes/1011/hero.jpeg
INSERT INTO images (id, entity_type, entity_id, kind, fid, url_path, display_order, meta) VALUES ('f21013dd-bbc5-433f-8dc6-00faa1464f6b', 'route', '1011', 'hero', '/buckets/transit/route/1011/hero.jpeg', '/route/1011/hero.jpeg', 1, '{"mime":"image/jpeg","size_bytes":1540789,"sha256":"dc4684bc682fcd8c107521c294b9cdbf9e608e2d7c0d961837db8f9a171011ca","width":3024,"height":3024}'::jsonb) ON CONFLICT (fid) DO NOTHING;
-- routes/15/car.jpg
INSERT INTO images (id, entity_type, entity_id, kind, fid, url_path, display_order, meta) VALUES ('a6890ab9-2678-4b84-a7ef-2cb59d364ce7', 'route', '15', 'photo', '/buckets/transit/route/15/car.jpg', '/route/15/car.jpg', 0, '{"mime":"image/jpeg","size_bytes":238232,"sha256":"b538249de22e80d79020c8347521c83d15dca663e853b1c3e45d6a895f2fb1e5","width":1477,"height":865}'::jsonb) ON CONFLICT (fid) DO NOTHING;
-- routes/15/hero.jpg
INSERT INTO images (id, entity_type, entity_id, kind, fid, url_path, display_order, meta) VALUES ('02f16f6d-1f26-4817-ad7a-a8a41d13bf6d', 'route', '15', 'hero', '/buckets/transit/route/15/hero.jpg', '/route/15/hero.jpg', 1, '{"mime":"image/jpeg","size_bytes":75238,"sha256":"e61a69975fd4fa4d7c632cac86ee4802e631674e50dfd406c300347ff7b01399","width":1422,"height":640}'::jsonb) ON CONFLICT (fid) DO NOTHING;
-- routes/2194/car.jpg
INSERT INTO images (id, entity_type, entity_id, kind, fid, url_path, display_order, meta) VALUES ('2d962c82-a5aa-4027-9b3a-e7f34269b860', 'route', '2194', 'photo', '/buckets/transit/route/2194/car.jpg', '/route/2194/car.jpg', 0, '{"mime":"image/jpeg","size_bytes":144932,"sha256":"33c2d6bb108aebdced8baf92ff34839f31fb0665c2650748c2969eec5383ea24","width":800,"height":530}'::jsonb) ON CONFLICT (fid) DO NOTHING;
-- routes/2231/car.jpg
INSERT INTO images (id, entity_type, entity_id, kind, fid, url_path, display_order, meta) VALUES ('17b58685-f374-4f81-8f05-da9ead7cd5ba', 'route', '2231', 'photo', '/buckets/transit/route/2231/car.jpg', '/route/2231/car.jpg', 0, '{"mime":"image/jpeg","size_bytes":2240408,"sha256":"09c7d96003b7a58d51571cb2cb85ab7aa8f7c5600dce0e75e2dd9ca415f1c5e8","width":4032,"height":3024}'::jsonb) ON CONFLICT (fid) DO NOTHING;
-- routes/324/car.jpg
INSERT INTO images (id, entity_type, entity_id, kind, fid, url_path, display_order, meta) VALUES ('6fc147e9-722f-4755-8832-55546c1a3abe', 'route', '324', 'photo', '/buckets/transit/route/324/car.jpg', '/route/324/car.jpg', 0, '{"mime":"image/jpeg","size_bytes":91014,"sha256":"a2564f8af7c5b4a8cbcf6a6064dbfe7444ff129df3fe94fce23d8409f7d25a7f","width":581,"height":380}'::jsonb) ON CONFLICT (fid) DO NOTHING;
-- routes/324/hero.jpg
INSERT INTO images (id, entity_type, entity_id, kind, fid, url_path, display_order, meta) VALUES ('0827dc28-41b1-498a-985e-3cf2dfa50e49', 'route', '324', 'hero', '/buckets/transit/route/324/hero.jpg', '/route/324/hero.jpg', 1, '{"mime":"image/jpeg","size_bytes":91014,"sha256":"a2564f8af7c5b4a8cbcf6a6064dbfe7444ff129df3fe94fce23d8409f7d25a7f","width":581,"height":380}'::jsonb) ON CONFLICT (fid) DO NOTHING;
-- routes/464/car.jpeg
INSERT INTO images (id, entity_type, entity_id, kind, fid, url_path, display_order, meta) VALUES ('2bee7e3a-7e95-4644-82f1-4ee9bd56582e', 'route', '464', 'photo', '/buckets/transit/route/464/car.jpeg', '/route/464/car.jpeg', 0, '{"mime":"image/jpeg","size_bytes":2842693,"sha256":"42b426e27ab5be215d972611eea4ff03ee9f09b6b8d66470ab0e463f30a01a15","width":4032,"height":3024}'::jsonb) ON CONFLICT (fid) DO NOTHING;
-- routes/641/car.jpeg
INSERT INTO images (id, entity_type, entity_id, kind, fid, url_path, display_order, meta) VALUES ('4db1332b-9ec2-4bdc-bfaa-8cc1dee71e5a', 'route', '641', 'photo', '/buckets/transit/route/641/car.jpeg', '/route/641/car.jpeg', 0, '{"mime":"image/jpeg","size_bytes":1521733,"sha256":"320ba83c6b140a7a8c1825442691e16cd048fff16505434579a69883e7b6c1de","width":4032,"height":3024}'::jsonb) ON CONFLICT (fid) DO NOTHING;
-- routes/902/car.jpg
INSERT INTO images (id, entity_type, entity_id, kind, fid, url_path, display_order, meta) VALUES ('e42397eb-ffdc-4db4-ad5e-6635eb95986e', 'route', '902', 'photo', '/buckets/transit/route/902/car.jpg', '/route/902/car.jpg', 0, '{"mime":"image/jpeg","size_bytes":221869,"sha256":"49cc989caef34199ed0423fae6bae12f48be7ac8062d35df3bef0112bca5152d","width":1440,"height":1080}'::jsonb) ON CONFLICT (fid) DO NOTHING;
-- routes/902/hero.jpg
INSERT INTO images (id, entity_type, entity_id, kind, fid, url_path, display_order, meta) VALUES ('156a66e4-328b-4247-9672-2beac99f7212', 'route', '902', 'hero', '/buckets/transit/route/902/hero.jpg', '/route/902/hero.jpg', 1, '{"mime":"image/jpeg","size_bytes":221869,"sha256":"49cc989caef34199ed0423fae6bae12f48be7ac8062d35df3bef0112bca5152d","width":1440,"height":1080}'::jsonb) ON CONFLICT (fid) DO NOTHING;
-- routes/951/car.jpg
INSERT INTO images (id, entity_type, entity_id, kind, fid, url_path, display_order, meta) VALUES ('f7a1a791-ca3f-4d27-af6d-87ceb2738a42', 'route', '951', 'photo', '/buckets/transit/route/951/car.jpg', '/route/951/car.jpg', 0, '{"mime":"image/jpeg","size_bytes":83984,"sha256":"bcaf1832d74f82137e700d5b707ece5921817054adeedbd1395ce0bfdf2ba3b7","width":960,"height":720}'::jsonb) ON CONFLICT (fid) DO NOTHING;
-- routes/952/car.jpg
INSERT INTO images (id, entity_type, entity_id, kind, fid, url_path, display_order, meta) VALUES ('fb8dc247-a9d7-421b-bee7-322dee5e7c60', 'route', '952', 'photo', '/buckets/transit/route/952/car.jpg', '/route/952/car.jpg', 0, '{"mime":"image/jpeg","size_bytes":130413,"sha256":"8dd23770f4e67daaaff655c5c0b241b3320b841e13f2fa48ed15b69291239508","width":1046,"height":804}'::jsonb) ON CONFLICT (fid) DO NOTHING;
-- routes/952/car.webp
INSERT INTO images (id, entity_type, entity_id, kind, fid, url_path, display_order, meta) VALUES ('f6ed9fcd-2366-44ff-8abb-581229bd4553', 'route', '952', 'photo', '/buckets/transit/route/952/car.webp', '/route/952/car.webp', 0, '{"mime":"image/webp","size_bytes":532788,"sha256":"4b70fb180bbeb078ba2235b550a3e717509a885aa8a7681ce1b79f5223726354","width":1046,"height":804}'::jsonb) ON CONFLICT (fid) DO NOTHING;
-- routes/952/hero.webp
INSERT INTO images (id, entity_type, entity_id, kind, fid, url_path, display_order, meta) VALUES ('84fbd120-e848-496c-9d96-d6f88bfc5d47', 'route', '952', 'hero', '/buckets/transit/route/952/hero.webp', '/route/952/hero.webp', 1, '{"mime":"image/webp","size_bytes":532788,"sha256":"4b70fb180bbeb078ba2235b550a3e717509a885aa8a7681ce1b79f5223726354","width":1046,"height":804}'::jsonb) ON CONFLICT (fid) DO NOTHING;
-- stops/36020.jpg
INSERT INTO images (id, entity_type, entity_id, kind, fid, url_path, display_order, meta) VALUES ('6aae67a3-d13e-4e1f-b9a6-93e290dd242f', 'station', '36020', 'photo', '/buckets/transit/station/36020/36020.jpg', '/station/36020/36020.jpg', 0, '{"mime":"image/jpeg","size_bytes":192818,"sha256":"4487760ddc46831cc88019d718f32267eaa28be25d8151e28418a2da4c3ba183","width":852,"height":741}'::jsonb) ON CONFLICT (fid) DO NOTHING;
-- stops/39321.jpg
INSERT INTO images (id, entity_type, entity_id, kind, fid, url_path, display_order, meta) VALUES ('f87fda06-5a77-4a32-96d6-1a17d05bf5f5', 'station', '39321', 'photo', '/buckets/transit/station/39321/39321.jpg', '/station/39321/39321.jpg', 0, '{"mime":"image/jpeg","size_bytes":259460,"sha256":"fa0d05e218625df67590f657aa8fd23d5bcb46e122ea224084ebfbc63bdb6ecf","width":1090,"height":868}'::jsonb) ON CONFLICT (fid) DO NOTHING;
-- stops/42110.jpg
INSERT INTO images (id, entity_type, entity_id, kind, fid, url_path, display_order, meta) VALUES ('94b30a45-d783-4c01-8c12-7fdf32b8c877', 'station', '42110', 'photo', '/buckets/transit/station/42110/42110.jpg', '/station/42110/42110.jpg', 0, '{"mime":"image/jpeg","size_bytes":256778,"sha256":"2a455fd50a250903de34208c8ed1027a3136c05cf1957e3ca68842f44954dfe1","width":962,"height":797}'::jsonb) ON CONFLICT (fid) DO NOTHING;
-- stops/42250.jpg
INSERT INTO images (id, entity_type, entity_id, kind, fid, url_path, display_order, meta) VALUES ('18476e9e-e836-4ebb-a49a-835f7b503503', 'station', '42250', 'photo', '/buckets/transit/station/42250/42250.jpg', '/station/42250/42250.jpg', 0, '{"mime":"image/jpeg","size_bytes":230708,"sha256":"a4bdb8dc08b70229c28b87f79dcb3a656c96ea3aad7271ea81677e56d397facc","width":1001,"height":853}'::jsonb) ON CONFLICT (fid) DO NOTHING;
-- stops/54950.jpg
INSERT INTO images (id, entity_type, entity_id, kind, fid, url_path, display_order, meta) VALUES ('8c2fe77a-c08a-4b17-9502-ab0e81678088', 'station', '54950', 'photo', '/buckets/transit/station/54950/54950.jpg', '/station/54950/54950.jpg', 0, '{"mime":"image/jpeg","size_bytes":163400,"sha256":"b4638961997dba7622ea97f61969c5eb13697b16dd18a5ca7eadfcbd0cd0444b","width":1092,"height":558}'::jsonb) ON CONFLICT (fid) DO NOTHING;
-- done: ok=45, skip=0, err=0
@@ -0,0 +1,186 @@
"use client"
import React, { useMemo, useState } from 'react'
import './styles.css'
type RouteItem = {
id: string
number: string
title: string
category: 'local' | 'bkk' | 'interprov' | 'in-province'
vehicle: string
tags: string[]
stopsCount?: number
image?: string
nextDepartures?: string[]
}
const MOCK_ROUTES: RouteItem[] = [
{ id: '101', number: '101', title: 'ตลาดอ่างทอง → ศาลากลางจังหวัด', category: 'local', vehicle: 'songthaew', tags: ['ภายใน อบต / เทศบาล', 'shuttle'], stopsCount: 12, nextDepartures: ['08:00', '09:30'] },
{ id: '902', number: '902', title: 'อ่างทอง → กรุงเทพฯ (ปิ่นเกล้า)', category: 'bkk', vehicle: 'coach', tags: ['เข้ากรุงเทพฯ', 'coach'], stopsCount: 18, nextDepartures: ['06:30', '12:00'] },
{ id: '464', number: '464', title: 'สุพรรณบุรี → สระบุรี', category: 'interprov', vehicle: 'coach', tags: ['ระหว่างจังหวัด', 'coach'], stopsCount: 25, nextDepartures: ['07:00', '13:00'] },
{ id: '15', number: '15', title: 'สถานีอ่างทอง → ตลาดโพธิ์ทอง', category: 'in-province', vehicle: 'van', tags: ['ภายในจังหวัด', 'van'], stopsCount: 9, nextDepartures: ['07:30', '10:10'] },
]
const CATEGORY_META = [
{ id: 'all', label: 'ทุกรายการ' },
{ id: 'local', label: 'Local Loop' },
{ id: 'bkk', label: 'Bangkok Connect' },
{ id: 'interprov', label: 'Interprovincial' },
{ id: 'in-province', label: 'In-Province' },
]
export default function RoutesPage() {
const [query, setQuery] = useState('')
const [category, setCategory] = useState<'all' | RouteItem['category']>('all')
const [openRoute, setOpenRoute] = useState<RouteItem | null>(null)
const groups = useMemo(() => {
const visible = MOCK_ROUTES.filter(r => {
const q = query.trim().toLowerCase()
const matchQuery = !q || r.number.includes(q) || r.title.toLowerCase().includes(q)
const matchCategory = category === 'all' || r.category === category
return matchQuery && matchCategory
})
// group by category order
const order: RouteItem['category'][] = ['local', 'bkk', 'interprov', 'in-province']
return order.map(cat => ({
category: cat,
label: CATEGORY_META.find(m => m.id === cat)?.label ?? cat,
routes: visible.filter(r => r.category === cat),
}))
}, [query, category])
return (
<div className="rg-root">
<header className="rg-topbar">
<div className="rg-topbar-inner">
<div className="rg-brand">
<img src="/images/icons/minibus-256x256.ico" alt="AT" />
<div>
<div className="rg-brand-title">AT Transit</div>
<div className="rg-brand-sub">เส้นทางเดินรถ — Routes</div>
</div>
</div>
<div className="rg-actions">
<button className="rg-cta">เช็กเวลาเดินรถ</button>
</div>
</div>
</header>
<main className="rg-container">
<section className="rg-hero">
<div className="rg-hero-inner">
<h1>เส้นทางเดินรถ</h1>
<p className="muted">ค้นหา เลือกหมวด แล้วคลิกสายเพื่อดูรายละเอียด (drawer)</p>
</div>
</section>
<div className="rg-toolbar">
<div className="search">
<span className="icon" aria-hidden>🔍</span>
<input value={query} onChange={e => setQuery(e.target.value)} placeholder="ค้นหาเลขสาย หรือชื่อเส้นทาง…" aria-label="ค้นหาเส้นทาง" />
</div>
<div className="categories" role="tablist" aria-label="หมวดเส้นทาง">
{CATEGORY_META.map(m => (
<button key={m.id} className={`cat ${category === (m.id === 'all' ? 'all' : m.id) ? 'cat--active':''}`} onClick={() => setCategory(m.id === 'all' ? 'all' : (m.id as any))} role="tab" aria-selected={category === (m.id === 'all' ? 'all' : m.id)}>
{m.label}
</button>
))}
</div>
</div>
<div className="rg-grid">
<div className="rg-list">
{groups.map(g => (
<section key={g.category} className="category" aria-labelledby={`cat-${g.category}`}>
<div className="category-head">
<h2 id={`cat-${g.category}`}>{g.label}</h2>
<div className="count">{g.routes.length}</div>
</div>
<div className="cards">
{g.routes.length === 0 && <div className="empty">ไม่มีเส้นทางในหมวดนี้</div>}
{g.routes.map(r => (
<article key={r.id} className="card" tabIndex={0} role="button" onClick={() => setOpenRoute(r)} onKeyDown={(e)=>{ if(e.key === 'Enter') setOpenRoute(r)}}>
<div className={`badge badge--${r.category}`} aria-hidden>{r.number}</div>
<div className="card-body">
<div className="title">{r.title}</div>
<div className="meta">{r.vehicle} · {r.stopsCount} ป้าย</div>
<div className="chips">
{r.tags.slice(0,2).map(t => <span key={t} className="chip">{t}</span>)}
</div>
</div>
<div className="chev">›</div>
</article>
))}
</div>
</section>
))}
</div>
<aside className="rg-summary">
<div className="summary-card">
<h3>ภาพรวมเครือข่าย</h3>
<p className="muted">รวม {MOCK_ROUTES.length} เส้นทาง — แยกเป็นหมวดเพื่อการค้นหาที่รวดเร็ว</p>
<ul className="summary-list">
<li>Local: {MOCK_ROUTES.filter(r=>r.category==='local').length}</li>
<li>Bangkok: {MOCK_ROUTES.filter(r=>r.category==='bkk').length}</li>
<li>Interprov: {MOCK_ROUTES.filter(r=>r.category==='interprov').length}</li>
<li>In-province: {MOCK_ROUTES.filter(r=>r.category==='in-province').length}</li>
</ul>
</div>
<div className="summary-card muted small">Tip: คลิกการ์ดเพื่อเปิดรายละเอียดด้านขวา</div>
</aside>
</div>
</main>
<footer className="rg-footer">© 2026 AT Transit — static preview</footer>
{openRoute && (
<div className="drawer" role="dialog" aria-modal="false" aria-label={`รายละเอียดสาย ${openRoute.number}`}>
<div className="drawer-inner">
<header className="drawer-head">
<div>
<div className={`badge badge--${openRoute.category}`}>{openRoute.number}</div>
<h3>{openRoute.title}</h3>
<div className="muted">{openRoute.vehicle} · {openRoute.stopsCount} ป้าย</div>
</div>
<div>
<button className="btn ghost" onClick={() => setOpenRoute(null)} aria-label="ปิด">✕</button>
</div>
</header>
<div className="drawer-body">
<section>
<h4>ตารางเวลา (ตัวอย่าง)</h4>
<div className="departures">
{openRoute.nextDepartures?.map(t => <div key={t} className="departure">{t}</div>)}
</div>
</section>
<section>
<h4>ป้ายหยุด ({openRoute.stopsCount})</h4>
<ol>
{Array.from({length: openRoute.stopsCount ?? 0}).map((_,i)=> <li key={i}>ป้ายที่ {i+1}</li>)}
</ol>
</section>
<section>
<h4>แชร์ / QR</h4>
<div className="muted">QR และลิงก์แชร์จะแสดงที่นี่ (mockup)</div>
</section>
</div>
<footer className="drawer-foot">
<button className="btn primary">ดูตารางเต็ม</button>
<button className="btn">บันทึกเป็นรายการโปรด</button>
</footer>
</div>
</div>
)}
</div>
)
}
@@ -0,0 +1,78 @@
:root{
--bg: linear-gradient(135deg,#0f172a,#1e1b34,#1b2332);
--surface: rgba(255,255,255,0.03);
--muted: #94a3b8;
--accent: linear-gradient(135deg,#7c83ff,#b06bff,#ff6b9d);
}
*{box-sizing:border-box}
body,html,#root{height:100%}
body{font-family: 'Prompt', system-ui, -apple-system, 'Segoe UI', Roboto, 'Noto Sans Thai', sans-serif;background:var(--bg);color:#f8fafc;margin:0}
.rg-topbar{backdrop-filter: blur(6px);border-bottom:1px solid rgba(255,255,255,0.04)}
.rg-topbar-inner{max-width:1100px;margin:0 auto;display:flex;align-items:center;justify-content:space-between;padding:12px 16px}
.rg-brand{display:flex;gap:12px;align-items:center}
.rg-brand img{width:44px;height:44px;border-radius:8px}
.rg-brand-title{font-weight:700}
.rg-brand-sub{font-size:13px;color:var(--muted)}
.rg-cta{background:linear-gradient(90deg,#7c83ff,#b06bff);color:white;border:0;padding:8px 12px;border-radius:10px}
.rg-container{max-width:1100px;margin:18px auto;padding:0 16px}
.rg-hero{padding:24px 0}
.rg-hero-inner h1{margin:0;font-size:28px}
.muted{color:var(--muted)}
.rg-toolbar{display:flex;gap:12px;align-items:center}
.search{flex:1;display:flex;align-items:center;background:var(--surface);padding:10px;border-radius:12px}
.search input{flex:1;background:transparent;border:0;color:inherit;padding-left:8px;outline:none}
.search .icon{opacity:0.9}
.categories{display:flex;gap:8px}
.cat{background:transparent;border:1px solid rgba(255,255,255,0.04);padding:8px 10px;border-radius:999px;color:var(--muted)}
.cat--active{background:linear-gradient(90deg,#1f2540,rgba(255,255,255,0.02));border-color:transparent;color:#fff}
.rg-grid{display:grid;grid-template-columns:1fr 320px;gap:18px;margin-top:18px}
.rg-list{min-width:0}
.category{margin-bottom:24px}
.category-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:10px}
.category-head h2{margin:0;font-size:16px}
.count{opacity:0.8}
.cards{display:flex;flex-direction:column;gap:8px}
.empty{padding:12px;border-radius:10px;background:rgba(255,255,255,0.02);color:var(--muted)}
.card{display:flex;align-items:center;gap:12px;padding:12px;border-radius:12px;background:linear-gradient(180deg,rgba(255,255,255,0.02),rgba(255,255,255,0.01));border:1px solid rgba(255,255,255,0.03);cursor:pointer}
.card:focus{outline:2px solid rgba(124,131,255,0.14)}
.badge{width:56px;height:56px;border-radius:10px;display:flex;align-items:center;justify-content:center;font-weight:700}
.badge--local{background:linear-gradient(90deg,#7c83ff,#b06bff);color:#000}
.badge--bkk{background:linear-gradient(90deg,#44bff1,#7c83ff);color:#000}
.badge--interprov{background:linear-gradient(90deg,#ff8a65,#ff6b9d);color:#000}
.badge--in-province{background:linear-gradient(90deg,#a78bfa,#7c83ff);color:#000}
.card-body{flex:1}
.title{font-weight:600}
.meta{font-size:13px;color:var(--muted);margin-top:4px}
.chips{margin-top:8px;display:flex;gap:6px}
.chip{background:rgba(255,255,255,0.02);padding:4px 8px;border-radius:8px;font-size:12px}
.chev{color:var(--muted);font-size:20px}
.rg-summary{position:sticky;top:18px}
.summary-card{background:linear-gradient(135deg,rgba(255,255,255,0.02),rgba(255,255,255,0.01));padding:12px;border-radius:12px;border:1px solid rgba(255,255,255,0.03)}
.summary-list{padding-left:18px}
.small{font-size:13px}
.rg-footer{text-align:center;padding:18px;color:var(--muted)}
/* Drawer */
.drawer{position:fixed;right:0;top:0;bottom:0;width:420px;background:linear-gradient(180deg,#0f172a,#131827);box-shadow:-24px 0 40px rgba(0,0,0,0.6);border-left:1px solid rgba(255,255,255,0.04);display:flex;flex-direction:column}
.drawer-inner{display:flex;flex-direction:column;height:100%}
.drawer-head{display:flex;justify-content:space-between;align-items:center;padding:18px;border-bottom:1px solid rgba(255,255,255,0.02)}
.drawer-body{padding:16px;overflow:auto;flex:1}
.drawer-foot{padding:12px;border-top:1px solid rgba(255,255,255,0.02);display:flex;gap:8px}
.btn{padding:8px 12px;border-radius:8px;border:1px solid rgba(255,255,255,0.06);background:transparent;color:inherit}
.btn.primary{background:linear-gradient(90deg,#7c83ff,#b06bff);color:#000;border:0}
.btn.ghost{background:transparent;border:0;color:var(--muted);font-size:18px}
@media(max-width:900px){
.rg-grid{grid-template-columns:1fr}
.rg-summary{display:none}
.drawer{width:100%;}
}
+218
View File
@@ -0,0 +1,218 @@
#!/usr/bin/env python3
"""
Upload images from script/images/ to SeaweedFS filer and generate
seed_images.sql with INSERT statements for the images table.
Usage:
python script/upload_seed_images.py --filer-url http://VPS_IP:3103
python script/upload_seed_images.py --filer-url http://VPS_IP:3103 --dry-run
Output:
script/seed_images.sql (always written)
"""
import argparse
import hashlib
import mimetypes
import os
import sys
import uuid
from pathlib import Path
try:
import requests
except ImportError:
print("pip install requests", file=sys.stderr)
sys.exit(1)
SCRIPT_DIR = Path(__file__).parent
IMAGES_DIR = SCRIPT_DIR / "images"
OUTPUT_SQL = SCRIPT_DIR / "seed_images.sql"
# --------------------------------------------------------------------------- #
# folder → (entity_type, kind, display_order_hint)
# --------------------------------------------------------------------------- #
FOLDER_MAP = {
"stops": ("station", "photo", 0),
"qrcode": ("route", "map", 9),
"partners": ("sponsor", "logo", 0),
"landmarks": ("misc", "photo", 0),
"network": ("misc", "map", 0),
"extras": ("misc", "photo", 0),
"icons": ("misc", "icon", 0),
}
def classify(rel: Path):
"""Return (entity_type, entity_id, kind, display_order) or None to skip."""
parts = rel.parts # e.g. ('routes', '902', 'car.jpeg')
folder = parts[0]
if folder == "routes" and len(parts) == 3:
route_id = parts[1]
stem = Path(parts[2]).stem.lower()
kind = "hero" if stem == "hero" else "photo"
order = 1 if kind == "hero" else 0
return "route", route_id, kind, order
if folder in FOLDER_MAP and len(parts) == 2:
entity_type, kind, order = FOLDER_MAP[folder]
entity_id = Path(parts[1]).stem
return entity_type, entity_id, kind, order
return None
def get_mime(path: Path) -> str:
# mimetypes doesn't know .webp by default on some platforms
ext = path.suffix.lower()
if ext == ".webp":
return "image/webp"
mime, _ = mimetypes.guess_type(str(path))
return mime or "application/octet-stream"
def sha256_of(path: Path) -> str:
h = hashlib.sha256()
with open(path, "rb") as f:
for chunk in iter(lambda: f.read(65536), b""):
h.update(chunk)
return h.hexdigest()
def get_dimensions(path: Path):
try:
from PIL import Image
with Image.open(path) as img:
return img.size # (width, height)
except Exception:
return None, None
def upload(filer_url: str, entity_type: str, entity_id: str,
filename: str, mime: str, data: bytes) -> dict:
"""
PUT raw bytes to filer — mirrors seaweed.rs upload logic.
Returns {"fid": ..., "url_path": ...}
"""
key = (f"/buckets/transit/{sanitize(entity_type)}"
f"/{sanitize(entity_id)}/{sanitize_name(filename)}")
url = filer_url.rstrip("/") + key
resp = requests.put(url, data=data,
headers={"Content-Type": mime}, timeout=30)
resp.raise_for_status()
body = {}
try:
body = resp.json()
except Exception:
pass
fid = body.get("fid") or key # fallback: path itself (matches Rust code)
url_path = key.removeprefix("/buckets/transit") # stored in DB without prefix
return {"fid": fid, "url_path": url_path}
def sanitize(s: str) -> str:
return "".join(c if c.isalnum() or c in "-_" else "_" for c in s)
def sanitize_name(s: str) -> str:
return "".join(c if c.isalnum() or c in "-_." else "_" for c in s)
def q(s: str) -> str:
"""SQL single-quote escape."""
return s.replace("'", "''")
# --------------------------------------------------------------------------- #
def main():
parser = argparse.ArgumentParser()
parser.add_argument("--filer-url", default="http://localhost:3103",
help="SeaweedFS filer base URL (default: http://localhost:3103)")
parser.add_argument("--dry-run", action="store_true",
help="Skip actual upload; use path as fid placeholder")
args = parser.parse_args()
filer_url = args.filer_url.rstrip("/")
dry_run = args.dry_run
sql_lines = [
"-- Auto-generated by upload_seed_images.py",
"-- Run this AFTER 0003_seed.sql is applied.",
"-- ON CONFLICT (fid) DO NOTHING → safe to re-run.",
"",
]
image_files = sorted(p for p in IMAGES_DIR.rglob("*") if p.is_file())
ok = skip = 0
errors = []
for img_path in image_files:
rel = img_path.relative_to(IMAGES_DIR)
meta = classify(rel)
if meta is None:
print(f" SKIP {rel}")
skip += 1
continue
entity_type, entity_id, kind, display_order = meta
mime = get_mime(img_path)
file_size = img_path.stat().st_size
sha = sha256_of(img_path)
width, height = get_dimensions(img_path)
img_id = str(uuid.uuid4())
if dry_run:
safe_key = (f"/buckets/transit/{sanitize(entity_type)}"
f"/{sanitize(entity_id)}/{sanitize_name(img_path.name)}")
fid = safe_key # use path as pseudo-fid
url_path = safe_key.removeprefix("/buckets/transit")
print(f" DRY {rel}")
else:
try:
data = img_path.read_bytes()
result = upload(filer_url, entity_type, entity_id,
img_path.name, mime, data)
fid = result["fid"]
url_path = result["url_path"]
print(f" OK {rel} fid={fid}")
ok += 1
except Exception as exc:
print(f" ERR {rel} {exc}", file=sys.stderr)
errors.append((str(rel), str(exc)))
continue
# Build meta JSONB inline
meta_kv = [f'"mime":"{q(mime)}"', f'"size_bytes":{file_size}',
f'"sha256":"{sha}"']
if width is not None:
meta_kv.append(f'"width":{width}')
meta_kv.append(f'"height":{height}')
meta_json = "{" + ",".join(meta_kv) + "}"
sql_lines.append(f"-- {rel}")
sql_lines.append(
f"INSERT INTO images "
f"(id, entity_type, entity_id, kind, fid, url_path, display_order, meta) VALUES ("
f"'{img_id}', '{entity_type}', '{q(entity_id)}', '{kind}', "
f"'{q(fid)}', '{q(url_path)}', {display_order}, "
f"'{meta_json}'::jsonb"
f") ON CONFLICT (fid) DO NOTHING;"
)
sql_lines += [
"",
f"-- done: ok={ok if not dry_run else 'DRY'}, skip={skip}, err={len(errors)}",
]
OUTPUT_SQL.write_text("\n".join(sql_lines) + "\n", encoding="utf-8")
print(f"\nSQL written → {OUTPUT_SQL.relative_to(SCRIPT_DIR.parent)}")
if errors:
print(f"Errors ({len(errors)}):")
for r, e in errors:
print(f" {r}: {e}")
sys.exit(1)
if __name__ == "__main__":
main()