Skip to content

Commit c5641a1

Browse files
committed
Add #guid anchor link icon and refactor icon on the results page.
1 parent 939ed4d commit c5641a1

File tree

6 files changed

+35
-18
lines changed

6 files changed

+35
-18
lines changed

site/lang.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
"public.suggestContent": "Content",
2323
"public.suggestDefLang": "Definition language",
2424
"public.suggestDefsTitle": "Definitions",
25-
"public.suggestEdit": "Suggest edit for \"{word}\"",
25+
"public.suggestEdit": "Suggest an edit",
2626
"public.suggestEntryLang": "Entry language",
2727
"public.suggestPhones": "Phonetic notations (pronunciation)",
2828
"public.suggestPhonesPlaceholder": "eg: pɛts, pɛt (commma separated)",

site/results.html

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,10 @@
66
<div class="eight columns">
77
<ol class="entries">
88
{% for r in results.entries | slice(end=num_results) %}
9-
<li class="entry" data-guid="{{ r.guid }}" data-head="{{ r.content | join(sep=", ") }}">
9+
<li class="entry" id="{{ r.guid }}" data-guid="{{ r.guid }}" data-head="{{ r.content | join(sep=", ") }}">
1010
<header class="head">
1111
<div>
12-
<h3 class="title">{{ r.content | join(sep=", ") }}
13-
{% if consts.enable_submissions %}
14-
<a href="#" data-from="{{ r.guid }}" class="edit" title="{{ i18n.public_suggestEdit }}">
15-
<img src="/static/edit.svg?v={{ asset_ver }}" alt="{{ i18n.public_suggestEdit }}">
16-
</a>
17-
{% endif %}
18-
</h3>
12+
<h3 class="title">{{ r.content | join(sep=", ") }}</h3>
1913

2014
{% if r.phones and r.phones | length > 0 %}
2115
<span class="pronun">&#9834; {{ r.phones | join(sep=",") }}</span>
@@ -30,7 +24,14 @@ <h3 class="title">{{ r.content | join(sep=", ") }}
3024
{% endfor %}
3125
</span>
3226
{% endif %}
33-
<a href="#" title="Share screenshot" class="export" data-guid="{{ r.guid }}"><img src="/static/export.svg?v={{ asset_ver }}" alt="Share screenshot"></a>
27+
28+
<div class="toolbar">
29+
{% if consts.enable_submissions %}
30+
<a href="#" data-from="{{ r.guid }}" class="edit" title="{{ i18n.public_suggestEdit }}"><img src="/static/edit.svg?v={{ asset_ver }}" alt="{{ i18n.public_suggestEdit }}"></a>
31+
{% endif %}
32+
<a href="#{{ r.guid }}" title="Share link" class="link"><img src="/static/link.svg?v={{ asset_ver }}" alt="Share link"></a>
33+
<a href="#" title="Share screenshot" class="export" data-guid="{{ r.guid }}"><img src="/static/export.svg?v={{ asset_ver }}" alt="Share screenshot"></a>
34+
</div>
3435
</div>
3536
</header>
3637

site/static/edit.svg

Lines changed: 1 addition & 1 deletion
Loading

site/static/export.svg

Lines changed: 1 addition & 1 deletion
Loading

site/static/link.svg

Lines changed: 1 addition & 0 deletions
Loading

site/static/style.css

Lines changed: 21 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
:root {
2+
--bg: #fbfbfb;
23
--primary: #111;
34
--secondary: #333;
45
--light: #666;
@@ -14,7 +15,7 @@
1415
}
1516

1617
body {
17-
background: #fbfbfb;
18+
background: var(--bg);
1819
font-family: "Helvetica Neue", "Segoe UI", Helvetica, sans-serif;
1920
margin: 0;
2021
color: var(--primary);
@@ -277,6 +278,10 @@ button:hover,
277278
list-style-type: none;
278279
}
279280

281+
.entries .entry:target {
282+
outline: 3px solid var(--blue);
283+
}
284+
280285
.entries .head {
281286
position: relative;
282287
margin-bottom: 10px;
@@ -370,16 +375,12 @@ button:hover,
370375
margin-right: 10px;
371376
}
372377

373-
.entry .edit {
378+
.entry .defs .edit {
374379
padding: 3px 10px;
375380
margin-left: 15px;
376381
display: none;
377382
position: absolute;
378383
text-decoration: none;
379-
z-index: 1000;
380-
line-height: 1;
381-
text-shadow: 0px 3px 3px #fff;
382-
font-size: 0.8rem;
383384
}
384385
.entry .edit img {
385386
max-height: 12px;
@@ -409,6 +410,15 @@ button:hover,
409410
align-items: center;
410411
gap: 10px;
411412
}
413+
.entries .meta a {
414+
text-decoration: none;
415+
display: inline-block;
416+
margin-left: 5px;
417+
}
418+
.entries .meta .toolbar img {
419+
max-height: 12px;
420+
width: auto;
421+
}
412422

413423
.related .word {
414424
margin: 0 5px 8px 0;
@@ -448,10 +458,15 @@ button:hover,
448458
}
449459

450460
.form-comments {
461+
background: var(--bg);
451462
margin: 10px 0 45px 0;
452463
display: none;
453464
padding: 15px;
454465
clear: both;
466+
position: absolute;
467+
left: 0;
468+
right: 0;
469+
z-index: 10;
455470
}
456471

457472
.form-comments textarea {

0 commit comments

Comments
 (0)