-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #29 from akivajgordon/develop
v1.1 – Tooltip to show how to toggle annotations with keyboard shortcut
- Loading branch information
Showing
11 changed files
with
143 additions
and
91 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import { displayRange, textFilter } from '../src' | ||
|
||
const petuchaClass = (isPetucha) => isPetucha ? 'mod-petucha' : '' | ||
const setumaClass = (column) => column.length > 1 ? 'mod-setuma' : '' | ||
|
||
const Line = ({ text, verses, aliyot, isPetucha }, annotated) => ` | ||
<div class="line ${petuchaClass(isPetucha)}"> | ||
${text.map((column) => (` | ||
<div class="column"> | ||
${column.map((fragment) => (` | ||
<span class="fragment ${setumaClass(column)}">${textFilter({ text: fragment, annotated })}</span> | ||
`)).join('')} | ||
</div> | ||
`)).join('')} | ||
<span class="location-indicator mod-verses" ${annotated ? '' : 'hidden'}>${displayRange.asVersesRange(verses)}</span> | ||
<span class="location-indicator mod-aliyot" ${annotated ? '' : 'hidden'}>${displayRange.asAliyotRange(aliyot)}</span> | ||
</div> | ||
` | ||
|
||
export default Line |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import Line from './Line' | ||
|
||
const Page = (lines, annotated) => ` | ||
<table> | ||
${lines.map((line) => (` | ||
<tr> | ||
<td>${Line(line, annotated)}</td> | ||
</tr> | ||
`)).join('')} | ||
</table> | ||
` | ||
|
||
export default Page |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import parshiyot from '../build/parshiyot.json' | ||
|
||
const ParshaPicker = () => ` | ||
<div class="parsha-picker"> | ||
<ol class="parsha-list"> | ||
${parshiyot.map(({ he, page }) => (`<li class="parsha" data-target-id="parsha" data-jump-to-page="${page}">${he}</li>`)).join('')} | ||
</ol> | ||
</div> | ||
` | ||
|
||
export default ParshaPicker |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
[data-tooltip]::after { | ||
content: attr(data-tooltip); | ||
background-color: hsl(0, 0%, 20%); | ||
color: white; | ||
display: inline-block; | ||
position: absolute; | ||
top: 200%; | ||
padding: 1em 1.5em; | ||
border-radius: 4px; | ||
font-size: 0.8em; | ||
white-space: nowrap; | ||
left: 50%; | ||
transform: translate(-50%, 0) scale(0); | ||
transform-origin: top center; | ||
box-shadow: 0 0 8px -4px black; | ||
font-family: sans-serif; | ||
} | ||
|
||
[data-tooltip]:hover::after { | ||
transform: translate(-50%, 0) scale(1.0); | ||
transition: transform 0.15s; | ||
transition-delay: 1s; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters