dx2102 commited on
Commit
e524d59
1 Parent(s): 3ebd253

Update server.py

Browse files
Files changed (1) hide show
  1. server.py +6 -4
server.py CHANGED
@@ -52,12 +52,13 @@ def read_root():
52
  content="""
53
  <html>
54
  <head>
55
- <title>Search</title>
 
56
  <script src="https://cdn.jsdelivr.net/npm/marked/marked.min.js"></script>
57
  <link href="https://cdn.jsdelivr.net/npm/tailwindcss@2.2.19/dist/tailwind.min.css" rel="stylesheet">
58
  </head>
59
- <body class="overflow-scroll mx-24 my-8 text-lg flex flex-col">
60
- <h1 class="text-3xl">Search Mathlib</h1>
61
  <form onsubmit="search(); return false;" class="flex gap-2 mt-2 mb-3">
62
  <input autofocus type="text" name="query" class="grow border p-2 w-full rounded-lg focus:outline-none border-gray-300 focus:ring-1 focus:ring-gray-100">
63
  <button type="submit" class="bg-green-700 text-white p-2 w-24 rounded-lg">Search</button>
@@ -91,7 +92,8 @@ def read_root():
91
  class="text-xl mr-4 text-green-800 hover:text-green-600
92
  ">${result.name}</a>
93
  <div class="flex-grow"></div>
94
- <p class="text-gray-800">Similarity: ${result.similarity.toFixed(3)}</p>
 
95
  </div>
96
  <div class="flex flex-col">
97
  <p class="font-mono">: ${result.type}</p>
 
52
  content="""
53
  <html>
54
  <head>
55
+ <title>Search Mathlib</title>
56
+ <!-- tailwind css -->
57
  <script src="https://cdn.jsdelivr.net/npm/marked/marked.min.js"></script>
58
  <link href="https://cdn.jsdelivr.net/npm/tailwindcss@2.2.19/dist/tailwind.min.css" rel="stylesheet">
59
  </head>
60
+ <body class="overflow-scroll mx-auto w-10/12 my-8 text-base sm:text-lg flex flex-col">
61
+ <h1 class="text-3xl mx-0.5">Search Mathlib</h1>
62
  <form onsubmit="search(); return false;" class="flex gap-2 mt-2 mb-3">
63
  <input autofocus type="text" name="query" class="grow border p-2 w-full rounded-lg focus:outline-none border-gray-300 focus:ring-1 focus:ring-gray-100">
64
  <button type="submit" class="bg-green-700 text-white p-2 w-24 rounded-lg">Search</button>
 
92
  class="text-xl mr-4 text-green-800 hover:text-green-600
93
  ">${result.name}</a>
94
  <div class="flex-grow"></div>
95
+ <!-- The similarity info is only shown on larger screens -->
96
+ <p class="text-gray-800 hidden md:block">Similarity: ${result.similarity.toFixed(3)}</p>
97
  </div>
98
  <div class="flex flex-col">
99
  <p class="font-mono">: ${result.type}</p>