Remove Cambridge dictionary link, make link text smaller.
This commit is contained in:
parent
79e1ade153
commit
f15c6ba2f5
3 changed files with 16 additions and 9 deletions
|
@ -125,10 +125,9 @@ var resultsTmpl = template.Must(template.New("results").Parse(`
|
||||||
<ul>
|
<ul>
|
||||||
{{ range .Results }}
|
{{ range .Results }}
|
||||||
<li>
|
<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=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">WordNet</a>
|
<a href="https://dicoweb.gnu.org.ua/?q={{.}}&db=WordNet&define=1" target="defn"><span class="small">WordNet</span></a>
|
||||||
<a href="https://dictionary.cambridge.org/dictionary/english/{{.}}" target="defn">Cambridge</a>
|
|
||||||
</li>
|
</li>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</ul>
|
</ul>
|
||||||
|
|
|
@ -11,3 +11,7 @@ div#results > ul {
|
||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
span.small {
|
||||||
|
font-size: x-small;
|
||||||
|
}
|
||||||
|
|
|
@ -21,10 +21,10 @@ var home = template.Must(template.New("home").Parse(`
|
||||||
<main>
|
<main>
|
||||||
<form action="/search" method="post" hx-boost="true" hx-target="#results">
|
<form action="/search" method="post" hx-boost="true" hx-target="#results">
|
||||||
<div class="center">
|
<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="match">Match</button>
|
||||||
<button name="mode" value="anagrams">Anagrams</button>
|
<button name="mode" value="anagrams">Anagrams</button>
|
||||||
<button type="reset">Clear</button>
|
<button type="reset" onclick="getfocus()">Clear</button>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
<div id="results">
|
<div id="results">
|
||||||
|
@ -32,6 +32,11 @@ var home = template.Must(template.New("home").Parse(`
|
||||||
</main>
|
</main>
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
|
<script>
|
||||||
|
function getfocus() {
|
||||||
|
document.getElementById("pattern").focus();
|
||||||
|
}
|
||||||
|
</script>
|
||||||
</html>
|
</html>
|
||||||
`))
|
`))
|
||||||
|
|
||||||
|
@ -47,9 +52,8 @@ var results = template.Must(template.New("results").Parse(`
|
||||||
<ul>
|
<ul>
|
||||||
{{ range .Results }}
|
{{ range .Results }}
|
||||||
<li>{{.}}
|
<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=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">WordNet</a>
|
<a href="https://dicoweb.gnu.org.ua/?q={{.}}&db=WordNet&define=1" target="defn"><span class="small">WordNet</span></a>
|
||||||
<a href="https://dictionary.cambridge.org/dictionary/english/{{.}}" target="defn">Cambridge</a>
|
|
||||||
</li>
|
</li>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</ul>
|
</ul>
|
||||||
|
|
Loading…
Reference in a new issue