Skip to content

Commit

Permalink
refactor(dicts): update static speaker styles
Browse files Browse the repository at this point in the history
  • Loading branch information
crimx committed Dec 4, 2018
1 parent 22b3b7d commit 992b505
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 11 deletions.
2 changes: 1 addition & 1 deletion src/components/dictionaries/googledict/_style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -948,7 +948,7 @@
margin-bottom: 5px;
}

.ellip {
.ellip, .D8IBCf {
display: none !important;
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/components/dictionaries/googledict/engine.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export interface GoogleDictResult {

type GoogleDictSearchResult = DictSearchResult<GoogleDictResult>

const getInnerHTML = getInnerHTMLBuilder('https://www.google.com/')
const getInnerHTML = getInnerHTMLBuilder('https://www.google.com/', {})

export const search: SearchFunction<GoogleDictSearchResult> = (
text, config, payload
Expand Down
2 changes: 1 addition & 1 deletion src/components/dictionaries/longman/_style.scss
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
.dictLongman-Speaker {
// cover the original bulet point
position: absolute;
top: 0.2em;
top: 0;
left: 0.6em;
background: white;

Expand Down
9 changes: 1 addition & 8 deletions src/components/dictionaries/longman/engine.ts
Original file line number Diff line number Diff line change
Expand Up @@ -106,14 +106,7 @@ function handleDOMLex (
const mp3 = $speaker.dataset.srcMp3
if (mp3) {
$speaker.outerHTML =
`<button data-src-mp3="${mp3}" title="${$speaker.title}" class="dictLongman-Speaker">
<svg width="1.2em" height="1.2em" viewBox="0 0 58 58" xmlns="http://www.w3.org/2000/svg">
<path d="M14.35 20.237H5.77c-1.2 0-2.17.97-2.17 2.17v13.188c0 1.196.97 2.168 2.17 2.168h8.58c.387 0 .766.103 1.1.3l13.748 12.8c1.445.85 3.268-.192 3.268-1.87V9.006c0-1.677-1.823-2.72-3.268-1.87l-13.747 12.8c-.334.196-.713.3-1.1.3z"/>
<path d="M36.772 39.98c-.31 0-.62-.118-.856-.355-.476-.475-.476-1.243 0-1.716 5.212-5.216 5.212-13.702 0-18.916-.476-.473-.476-1.24 0-1.716.473-.474 1.24-.474 1.715 0 6.162 6.16 6.162 16.185 0 22.347-.234.237-.546.356-.858.356z"/>
<path d="M41.07 44.886c-.312 0-.62-.118-.86-.356-.473-.475-.473-1.24 0-1.715 7.573-7.57 7.573-19.89 0-27.462-.473-.474-.473-1.24 0-1.716.478-.473 1.243-.473 1.717 0 8.517 8.52 8.517 22.377 0 30.893-.238.238-.547.356-.857.356z"/>
<path d="M44.632 50.903c-.312 0-.622-.118-.858-.356-.475-.474-.475-1.24 0-1.716 5.287-5.283 8.198-12.307 8.198-19.77 0-7.466-2.91-14.49-8.198-19.775-.475-.474-.475-1.24 0-1.715.475-.474 1.24-.474 1.717 0 5.745 5.744 8.91 13.375 8.91 21.49 0 8.112-3.165 15.744-8.91 21.487-.237.238-.547.356-.858.356z"/>
</svg>
</button>`
`<button data-src-mp3="${mp3}" title="${$speaker.title}" class="dictLongman-Speaker">🔊</button>`
}
}
)
Expand Down

0 comments on commit 992b505

Please sign in to comment.