Mercurial Hosting > lang
comparison src/edit_course.html.luan @ 52:27758f3b2d69
add hide_ruby
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Sat, 16 Aug 2025 09:56:10 +0900 |
parents | a119fc092f42 |
children | 285029931499 |
comparison
equal
deleted
inserted
replaced
51:4581a20b8124 | 52:27758f3b2d69 |
---|---|
24 else | 24 else |
25 course = Course.new{ | 25 course = Course.new{ |
26 language = Http.request.parameters.language or error() | 26 language = Http.request.parameters.language or error() |
27 name = "" | 27 name = "" |
28 ai_system_prompt = "" | 28 ai_system_prompt = "" |
29 ai_first_message = "" | |
30 tts_instructions = "" | |
31 has_ruby = false | |
29 } | 32 } |
30 end | 33 end |
31 Io.stdout = Http.response.text_writer() | 34 Io.stdout = Http.response.text_writer() |
32 %> | 35 %> |
33 <!doctype html> | 36 <!doctype html> |
34 <html lang="en"> | 37 <html lang="en"> |
35 <head> | 38 <head> |
36 <% head() %> | 39 <% head() %> |
37 <style> | 40 <style> |
38 input, | 41 input[type=text], |
39 textarea { | 42 textarea { |
40 display: block; | 43 display: block; |
41 } | |
42 input[type=text], | |
43 textarea { | |
44 width: 100%; | 44 width: 100%; |
45 } | 45 } |
46 h4 { | 46 h4 { |
47 margin-top: 22px; | 47 margin-top: 22px; |
48 margin-bottom: 4px; | 48 margin-bottom: 4px; |
64 <h3><%= course.language_name() %></h3> | 64 <h3><%= course.language_name() %></h3> |
65 | 65 |
66 <h4>Course name</h4> | 66 <h4>Course name</h4> |
67 <input type=text required name=name value="<%=html_encode(course.name)%>"> | 67 <input type=text required name=name value="<%=html_encode(course.name)%>"> |
68 | 68 |
69 <p><label clickable><input type=checkbox name=has_ruby <%= course.has_ruby and "checked" or "" %> > Has pronunciation like {japanese|romaji}</label></p> | |
70 | |
69 <h4>AI system prompt</h4> | 71 <h4>AI system prompt</h4> |
70 <textarea required name=ai_system_prompt oninput="fixTextarea(event.target)"><%=html_encode(course.ai_system_prompt)%></textarea> | 72 <textarea required name=ai_system_prompt oninput="fixTextarea(event.target)"><%=html_encode(course.ai_system_prompt)%></textarea> |
71 | 73 |
72 <h4>AI first message (optional)</h4> | 74 <h4>AI first message (optional)</h4> |
73 <textarea name=ai_first_message oninput="fixTextarea(event.target)"><%=html_encode(course.ai_first_message or "")%></textarea> | 75 <textarea name=ai_first_message oninput="fixTextarea(event.target)"><%=html_encode(course.ai_first_message)%></textarea> |
74 | 76 |
75 <h4>Text to speech instructions</h4> | 77 <h4>Text to speech instructions</h4> |
76 <textarea name=tts_instructions oninput="fixTextarea(event.target)"><%=html_encode(course.tts_instructions or "")%></textarea> | 78 <textarea name=tts_instructions oninput="fixTextarea(event.target)"><%=html_encode(course.tts_instructions)%></textarea> |
77 | 79 |
78 <input type=submit> | 80 <input type=submit> |
79 | 81 |
80 <hr> | 82 <hr> |
81 | 83 |