Remove Cambridge dictionary link, make link text smaller.

This commit is contained in:
Ray Miller 2024-04-20 16:04:32 +01:00
parent 79e1ade153
commit f15c6ba2f5
3 changed files with 16 additions and 9 deletions

View file

@ -126,9 +126,8 @@ var resultsTmpl = template.Must(template.New("results").Parse(`
{{ range .Results }}
<li>
{{.}}
<a href="https://dicoweb.gnu.org.ua/?q={{.}}&db=gcide&define=1" target="defn">GCIDE</a>
<a href="https://dicoweb.gnu.org.ua/?q={{.}}&db=WordNet&define=1" target="defn">WordNet</a>
<a href="https://dictionary.cambridge.org/dictionary/english/{{.}}" target="defn">Cambridge</a>
<a href="https://dicoweb.gnu.org.ua/?q={{.}}&db=gcide&define=1" target="defn"><span class="small">GCIDE</span></a>
<a href="https://dicoweb.gnu.org.ua/?q={{.}}&db=WordNet&define=1" target="defn"><span class="small">WordNet</span></a>
</li>
{{ end }}
</ul>

View file

@ -11,3 +11,7 @@ div#results > ul {
overflow-y: auto;
height: 100%;
}
span.small {
font-size: x-small;
}

View file

@ -21,10 +21,10 @@ var home = template.Must(template.New("home").Parse(`
<main>
<form action="/search" method="post" hx-boost="true" hx-target="#results">
<div class="center">
<input type="text" name="pattern" required></input>
<input id="pattern" type="text" name="pattern" required autofocus></input>
<button name="mode" value="match">Match</button>
<button name="mode" value="anagrams">Anagrams</button>
<button type="reset">Clear</button>
<button type="reset" onclick="getfocus()">Clear</button>
</div>
</form>
<div id="results">
@ -32,6 +32,11 @@ var home = template.Must(template.New("home").Parse(`
</main>
</body>
<script>
function getfocus() {
document.getElementById("pattern").focus();
}
</script>
</html>
`))
@ -47,9 +52,8 @@ var results = template.Must(template.New("results").Parse(`
<ul>
{{ range .Results }}
<li>{{.}}
<a href="https://dicoweb.gnu.org.ua/?q={{.}}&db=gcide&define=1" target="defn">GCIDE</a>
<a href="https://dicoweb.gnu.org.ua/?q={{.}}&db=WordNet&define=1" target="defn">WordNet</a>
<a href="https://dictionary.cambridge.org/dictionary/english/{{.}}" target="defn">Cambridge</a>
<a href="https://dicoweb.gnu.org.ua/?q={{.}}&db=gcide&define=1" target="defn"><span class="small">GCIDE</span></a>
<a href="https://dicoweb.gnu.org.ua/?q={{.}}&db=WordNet&define=1" target="defn"><span class="small">WordNet</span></a>
</li>
{{ end }}
</ul>