diff --git a/static/css/s2.css b/static/css/s2.css index 327d51a792..092efc53c1 100644 --- a/static/css/s2.css +++ b/static/css/s2.css @@ -8940,6 +8940,7 @@ span.purim-emoji img{ max-width: 760px; position: relative; padding: 0 30px; + counter-reset: css-counter 0; } .sheetContent .ref { cursor: pointer; @@ -9580,6 +9581,42 @@ section.SheetOutsideBiText { box-shadow: 0px 1px 6px rgba(0, 0, 0, 0.25); margin-bottom: 30px; } + +.SheetOutsideBiText, .SheetSource { + counter-increment: css-counter 1; +} + +.SheetOutsideBiText:before, +.SheetSource:before { + position: absolute; + color: var(--medium-grey); + font-size: 12px; +} + +.english .SheetOutsideBiText:before, +.english .SheetSource:before { + content: counter(css-counter); + left: -34px; + font-family: var(--english-sans-serif-font-family); +} + +.bilingual .SheetOutsideBiText:before, +.bilingual .SheetSource:before { + content: counter(css-counter); + right: -34px; + font-family: var(--english-sans-serif-font-family); + +} + + +.hebrew .SheetOutsideBiText:before, +.hebrew .SheetSource:before { + content: counter(css-counter, hebrew); + right: -34px; + font-family: var(--hebrew-sans-serif-font-family); +} + + .readerPanel.hebrew section.SheetSource .sheetItem > .he, .readerPanel.english section.SheetSource .sheetItem > .en, .readerPanel.hebrew section.SheetOutsideBiText .sheetItem > .he, diff --git a/static/js/Sheet.jsx b/static/js/Sheet.jsx index 097fcc7c64..dbce61c8fe 100644 --- a/static/js/Sheet.jsx +++ b/static/js/Sheet.jsx @@ -242,7 +242,6 @@ class SheetContent extends Component { key={i} source={source} sourceNum={i + 1} - linkCount={Sefaria.linkCount(source.ref)} cleanHTML={this.cleanHTML} sheetSourceClick={this.props.sheetSourceClick.bind(this, source)} highlighted={highlighted} @@ -372,17 +371,6 @@ class SheetContent extends Component { class SheetSource extends Component { render() { - var linkCountElement; - var linkCount = this.props.linkCount; - var minOpacity = 20, maxOpacity = 70; - var linkScore = linkCount ? Math.min(linkCount + minOpacity, maxOpacity) / 100.0 : 0; - var style = {opacity: linkScore}; - - linkCountElement = ( -
- -
- ); const sectionClasses= classNames( "SheetSource", @@ -404,7 +392,7 @@ class SheetSource extends Component {
{this.props.source.title.stripHtml()}
: null} - -
- - - {this.props.sheetNumbered === 0 ? null : this.props.sourceNum} - - - - - {this.props.sheetNumbered === 0 ? null : Sefaria.hebrew.encodeHebrewNumeral(this.props.sourceNum)} - - -
- - {linkCountElement} - + {this.props.source.text && this.props.source.text.he && this.props.source.text.he !== "" ?
{this.props.source.options && this.props.source.options.sourcePrefix && this.props.source.options.sourcePrefix != "" ? {this.props.source.options.sourcePrefix} : null } @@ -478,15 +451,7 @@ class SheetComment extends Component { return (
-
- - {this.props.sheetNumbered == 0 ? null : this.props.sourceNum} - - - {this.props.sheetNumbered == 0 ? null : Sefaria.hebrew.encodeHebrewNumeral(this.props.sourceNum)} - -
- +
-
- - {this.props.sheetNumbered === 0 ? null : this.props.sourceNum} - - - {this.props.sheetNumbered === 0 ? null : Sefaria.hebrew.encodeHebrewNumeral(this.props.sourceNum)} - -
{this.props.source.options && this.props.source.options.sourcePrefix && this.props.source.options.sourcePrefix != "" ? {this.props.source.options.sourcePrefix} : null }
@@ -590,14 +547,6 @@ class SheetOutsideBiText extends Component { return (
-
- - {this.props.sheetNumbered === 0 ? null : this.props.sourceNum} - - - {this.props.sheetNumbered === 0 ? null : Sefaria.hebrew.encodeHebrewNumeral(this.props.sourceNum)} - -
{this.props.source.options && this.props.source.options.sourcePrefix && this.props.source.options.sourcePrefix != "" ? {this.props.source.options.sourcePrefix} : null } @@ -678,11 +627,6 @@ class SheetMedia extends Component { return (
-
- {this.props.sheetNumbered === 0 ? null : this.props.sourceNum} - {this.props.sheetNumbered === 0 ? null : Sefaria.hebrew.encodeHebrewNumeral(this.props.sourceNum)} -