results.html 1.0 KB

12345678910111213141516171819202122232425262728293031323334
  1. <!doctype html>
  2. <html>
  3. <head>
  4. <title>Search results for "{{.SearchPhrase}}"</title>
  5. <style>
  6. table, th, td {
  7. border: 1px solid black;
  8. border-collapse: collapse;
  9. }
  10. </style>
  11. </head>
  12. <body>
  13. <a href="/">Search again</a>
  14. {{range .Results}}
  15. <h1>Results from {{.TMName}} ({{len .Segments}} results)</h1>
  16. <table>
  17. <tr style='text-align: left'>
  18. <th>No.</th>
  19. <th>Source</th>
  20. <th>Translation</th>
  21. </tr>
  22. {{range $i, $segment := .Segments}}
  23. <tr style='text-align: left'>
  24. <td>{{add $i 1}}</td>
  25. <td>{{$segment.Source}}</td>
  26. <td>{{$segment.Target}}</td>
  27. </tr>
  28. {{end}}
  29. </table>
  30. <br/>
  31. <a href="/">Search again</a>
  32. {{end}}
  33. </body>
  34. </html>