Commit Graph

94 Commits

Author SHA1 Message Date
toasted-nutbread
10e9f7acb8
Fix the color of links in display footer notifications (#2151) 2022-05-21 15:28:36 -04:00
Stephen Kraus
6a74746113
Add new structured content features: lists and the HTML lang attribute (#2129)
* Add support for structured content lists and `list-style-type` style

A full list of supported style types is documented here:
https://developer.mozilla.org/en-US/docs/Web/CSS/list-style-type

There's nothing in this code preventing a term bank from assigning,
for example, a `list-style-type` style to a `div` element, but it
doesn't seem like browsers will complain about things like that.

* Add support for `lang` attribute in structured content

Support added for the following node types:

"ruby", "rt", "rp", "table", "thead", "tbody", "tfoot", "tr", "td",
"th", "span", "div", "ol", "ul", "li", "a"

I couldn't get it to work for the alt-hover text on "img" tags.

Tests are included in the file
"test/data/dictionaries/valid-dictionary/term_bank_1.json"

* Add styles for structured content lists

* Add override rules for new structured-content list styles

see: https://github.com/FooSoft/yomichan/pull/2129

Co-authored-by: stephenmk <stephenmk@users.noreply.github.com>
2022-05-14 09:59:38 -04:00
toasted-nutbread
f61690ea2c
Theme updates (#2105)
* Change siteColor to siteTheme

* Fix potential null exception

* Simplify

* Update display theme assignment

* Add a data-browser-theme attribute

* Add "browser" option for theme

* Create ThemeController

* Add theme-controller.js to relevant pages

* Use ThemeController

* Simplify

* Fix 'light' being used instead of 'default'

* Update the settings values to more accurately reflect their usage

* Change default site theme in display.js

* Remove async

* Restore async for consistency
2022-04-03 16:20:55 -04:00
toasted-nutbread
3150da92fe
Update input action prevention settings (#2104)
* Update styles for the input action prevention modal

* Add information
2022-04-02 15:24:59 -04:00
toasted-nutbread
eb80fb233b
Settings advanced indicators (#2103)
* Update the advanced toggle to have a custom color

* Add indicators to advanced-only settings
2022-04-02 14:59:16 -04:00
toasted-nutbread
ea1d64c9dd
Settings page mobile layout updates (#2102)
* Remove use of --settings-group-inner-vertical-margin

* Update alignment
2022-04-02 14:48:57 -04:00
toasted-nutbread
7a2ab86609
Structured content links (#2089)
* Update CSS to JSON converter to generalize the remove-property comment

* Fix navigation not being updated when _clearContent is run

* Add structured content schema for link tags

* Add test links

* Add external-link icon

* Pass Display instance to DisplayContentManager

* Update structured content generation

* Update link styles
2022-03-17 19:01:59 -04:00
toasted-nutbread
89ac85afd0
Update copyright date (#2062)
* Update eslint settings

* Update 2021 files

* Update other files
2022-02-02 20:43:10 -05:00
toasted-nutbread
9ae38bd8e9
Display menu button (#1992)
* Implement new menu which includes a debug log option

* Update wording
2021-10-17 09:55:13 -04:00
toasted-nutbread
ca4ed0300b
Display button updates (#1991)
* Update display buttons

* Remove use of _addMultipleEventListeners
2021-10-17 00:15:43 -04:00
toasted-nutbread
0e4b769390
Search CSS updates (#1979)
* Update styles

* Limit the height of the query parser
2021-10-09 14:32:56 -04:00
toasted-nutbread
9899727d7d
Frequency dictionary sort (#1938)
* Add sortDictionary/sortDictionaryOrder options

* Update options

* Add API.getTermFrequencies

* Add settings

* Implement frequency dictionary sorting

* Update test

* Update test data

* Fix handling of undefined rank-based frequencies
2021-09-26 11:08:16 -04:00
toasted-nutbread
6661933d47
Display button updates (#1945)
* Use span rather than div for button badges

* Update action button icons

* Rename class

* Update current entry indicator
2021-09-10 20:48:03 -04:00
toasted-nutbread
069ca1a97b
Anki field templates suggestions (#1940)
* Remove unused

* Bold the suggested default field value
2021-09-08 20:12:26 -04:00
toasted-nutbread
9bc708bb8d
Fix border radius on the outline-item style (#1901) 2021-08-20 18:20:56 -04:00
toasted-nutbread
e56734fc88
Input styles updates (#1900)
* Rename class

* Update styles

* Use input-group class

* Update styles

* Update input line height

* Update border styles

* Update styles

* Update line height

* Update styles

* Update line height

* Update line height

* Update outline item style
2021-08-20 18:13:56 -04:00
toasted-nutbread
b08bf103eb
Add connection icon (#1898) 2021-08-15 10:52:50 -04:00
toasted-nutbread
ad31b70b67
Add accessibility icon (#1874) 2021-08-07 11:49:36 -04:00
toasted-nutbread
a9710b8acf
Rename CSS class names "pitch-accent" to "pronunciation" (#1850)
* pitch-accents => pronunciations

* Update dataset property names

* pitch-accent-dictionary => pronunciation-dictionary

* Update styles

* Update template name

* Update attributes
2021-07-25 18:16:07 -04:00
toasted-nutbread
3e938f1a1f
Display pronunciation refactor (#1835)
* Simplify svg and container styles

* Rename pitch-accent-details to pitch-accent-graph-container

* Rename pitch-accent-graph* to pronunciation-graph*

* Remove unused template

* Omit quotes

* Rename pitch-accent-character to pronunciation-mora

* Simplify names

* Replace pronunciation-mora-inner with pronunciation-character

* Improve grouping of nasal characters

* Simplify character replacement

* Replace pseudo-elements with real elements

* Use an element rather than a fragment

* Rename functions

* Add wrapper

* Rename pitch-accent-characters to pronunciation-text-container

* Update test data

* Update downstep notation generation

* Rename pitch-accent-position to pronunciation-downstep-notation-container

* Space

* Wrap pronunciations in a container node

* Update preview

* Embed pitch accent styles directly
2021-07-17 14:44:36 -04:00
toasted-nutbread
a933cfdc07
Pronunciation nasal improvement (#1834)
* Organize

* Add utility to get diacritic information about a character

* Show mora without diacritic

* Add a hidden handakuten for copy-paste purposes
2021-07-17 12:20:11 -04:00
toasted-nutbread
4a2b824371
Display pronunciation separation (#1833)
* Create PronunciationGenerator

* Update DisplayGenerator

* Update templates

* Move pronunciation styles to a separate file

* Simplify pitch-accents-preview.html
2021-07-17 10:26:20 -04:00
toasted-nutbread
41fc76d6fd
Devoice and nasal pronunciation info (#1832)
* Update schema to support information about nasal and devoiced mora

* Expose nasalPositions and devoicePositions in dictionary entry data

* Expose nasalPositions, devoicePositions in grouped pitch info

* Update display generator

* Update test dictionary data

* Update test data
2021-07-15 22:39:33 -04:00
toasted-nutbread
22f048e527
Update Anki field marker menu (#1816)
* Update anki field marker menu to have less vertical padding

* Update positioning of field marker menu
2021-07-09 18:21:29 -04:00
toasted-nutbread
deb2a742ed
Update dictionary image link color (#1778) 2021-06-28 22:19:55 -04:00
toasted-nutbread
1f1a958a71
Update CSS rules for images (#1777) 2021-06-28 22:12:17 -04:00
toasted-nutbread
002da9fba8
Structured content style json (#1771)
* Install css

* Remove unnecessary rule

* Create CSS overrides file

* Create script to generate CSS JSON file

* Generate JSON

* Add test
2021-06-27 17:57:00 -04:00
toasted-nutbread
24ef820ba8
Update structured content CSS styles (#1770) 2021-06-27 15:01:35 -04:00
toasted-nutbread
94819e0ec3
Move structured content CSS into a separate file (#1769) 2021-06-27 11:46:16 -04:00
toasted-nutbread
5756885fa9
Structured content updates (#1753)
* Update schema

* Update content generation

* Update styles

* Update test data

* Update style names
2021-06-25 17:24:29 -04:00
toasted-nutbread
7ae964c830
Structured content updates (#1733)
* Add support for imageRendering

* Make crisp-edges appearance on Firefox more similar to Chrome

* Refactor

* Add background option

* Move data-image-rendering attribute

* Restructure

* Organize

* Add support for appearance

* Update test dictionary

* Update tests
2021-06-06 14:47:48 -04:00
toasted-nutbread
5bf82a5b81
Primary audio fixes (#1719)
* Fix case when subIndex is not assigned

* Fix incorrect assignment of primary card audio

* Improve opacity style

* Improve styles for :focus-visible
2021-05-30 13:29:55 -04:00
toasted-nutbread
cca01e85a3
Improve multiple audio sources (#1718)
* Add url/voice options to audio sources

* Add help for TTS

* Remove old settings

* Update tests

* Update use of audio source URL

* Improve labels for sources with the same type
2021-05-30 12:41:19 -04:00
toasted-nutbread
be23acf499
Structured content image size units (#1692)
* Add support for sizeUnits on image content

* Update test data
2021-05-20 19:33:08 -04:00
toasted-nutbread
eddd028864
Add support for definitions with structured content (#1689)
* Add structured content to schema

* Add support for generating custom content

* Update importer

* Update test data

* Add verticalAlign property
2021-05-19 18:24:50 -04:00
toasted-nutbread
f3cf4d10c7
Dictionary image display refactoring (#1687)
* Generalize image definition generation

* Enable optional aspect ratio

* Move styles

* Update styles

* Add more options for collapsing images

* Add image options for collapsing

* Improve layout for images that are collapsed
2021-05-18 17:41:27 -04:00
toasted-nutbread
66d048832f
Sentence termination character mode (#1682)
* Change enableTerminationCharacters to terminationCharacterMode

* Update settings

* Update sentence extraction

* Update tests

* Add tests
2021-05-16 15:24:38 -04:00
toasted-nutbread
2c752fd89d
Popup action search (#1678)
* Set up search page in the action popup

* Fix a style causing incorrect overflow

* Fix error when trying to take a screenshot

* Fix popup size on Firefox
2021-05-15 16:30:33 -04:00
toasted-nutbread
de57d73826
Improve overflow wrap (#1663) 2021-05-10 20:02:06 -04:00
toasted-nutbread
b50f5e1cf6
Improve internal page overflow (#1660)
* Improve overflow of internal pages

* Improve wrapping of the Origin: example text
2021-05-10 19:06:07 -04:00
toasted-nutbread
f935623f35
Fix secondary search dictionary options layout (#1654) 2021-05-08 15:18:41 -04:00
toasted-nutbread
32f5544021
Add "Move to" menu option for moving dictionary options to a specific location (#1651)
* Add "Move to" option

* Fix IDs
2021-05-02 21:04:39 -04:00
toasted-nutbread
c433819c1b
Update search tags to always be displayed in a consistent manner (#1645) 2021-05-01 11:53:56 -04:00
toasted-nutbread
076e201225
Improve dictionary options (#1640)
* Update dictionary options layout

* Update extras

* Improve display when no dictionaries are installed

* Implement "All" toggle

* Move modal

* Update welcome page

* Remove resizer button

* Fix ordering

* Fix extra closing tag
2021-04-30 18:01:16 -04:00
soriac
ba3f7b3e96
Show any custom tags on words that have anki cards created (#1628)
* Proof-of-concept for showing card tags (#1626)

* Resolved most PR comments:
- Added a snackbar notification when clicking tag button
- Replaced magnifying glass icon with new tag icon
- Button now contains a span w/icon, to use text color
- Removed unnecessary attributes from button
- Backend now returns full noteInfos object
- Frontend now handles filtering tags

* Add options to show/hide tag button & filter tags

* Do not show tags button if, after filtering, we have zero tags.

* Change tags option to enums, optimize tags intersection check & fix code style.

* Update options-util.js to include new tag options.

* Fix wording on new tag setting.

* Add CSS to remove hidden buttons from the display layout.

* getAnkiNoteInfo extra parameter for additional info.

* Add new tag option to tests.

* Remove unnecessary changes related to anki tags option.

* Code style fixes.
2021-04-30 17:57:53 -04:00
toasted-nutbread
0a7def1c01
Fix triangle current selection indicator using incorrect rule (#1637) 2021-04-28 21:57:56 -04:00
toasted-nutbread
83e73800b0
Add tag icon (#1629) 2021-04-26 19:59:49 -04:00
toasted-nutbread
20d60a2ba7
Initial safari compatibility (#1609)
* Update environment info to return the 'safari' browser

* Fix popup display on Safari

* Update environment assignment

* Add data-loading-stalled property when loading takes longer than expected

* Add notification when loading has stalled

* Allow getDictionaryInfo invocation on non-privileged contexts

* Update _validatePrivilegedMessageSender

* Don't listen to 'voiceschanged' event unless addEventListener is present

Also expose an event
2021-04-10 23:55:11 -04:00
toasted-nutbread
331b164900
Remove settings-old.css (#1604) 2021-04-08 22:55:09 -04:00
toasted-nutbread
51c9bef032
Add PermissionsOriginController (#1603) 2021-04-08 22:52:28 -04:00