feat: dynamic engine list in start page
This commit is contained in:
parent
7000189d6d
commit
23a6484e20
@ -1,7 +1,8 @@
|
|||||||
import { FastifyInstance } from "fastify";
|
import { FastifyInstance } from "fastify";
|
||||||
|
import { engineList } from "../handlers/main";
|
||||||
|
|
||||||
export default async function parseRoute(fastify: FastifyInstance) {
|
export default async function parseRoute(fastify: FastifyInstance) {
|
||||||
fastify.get("/start", async (_, reply) => {
|
fastify.get("/start", async (_, reply) => {
|
||||||
return reply.view("/templates/start.ejs");
|
return reply.view("/templates/start.ejs", { engineList });
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -17,7 +17,12 @@
|
|||||||
<label for="engine">Engine</label>
|
<label for="engine">Engine</label>
|
||||||
<select name="engine">
|
<select name="engine">
|
||||||
<option selected value>Standard</option>
|
<option selected value>Standard</option>
|
||||||
<option value="readability">Readability</option>
|
<% engineList.forEach((engine)=>{
|
||||||
|
%>
|
||||||
|
<option value="<%= engine %>">
|
||||||
|
<%= engine %>
|
||||||
|
</option>
|
||||||
|
<% }) %>
|
||||||
</select>
|
</select>
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user