Skip to content

Commit

Permalink
Updated the abstract template to use expandable-preview and removed t…
Browse files Browse the repository at this point in the history
…he component
  • Loading branch information
bp-cos committed Oct 24, 2023
1 parent 5a2d8db commit af7e5d7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 58 deletions.
44 changes: 0 additions & 44 deletions app/preprints/-components/preprint-abstract/component.ts

This file was deleted.

17 changes: 3 additions & 14 deletions app/preprints/-components/preprint-abstract/template.hbs
Original file line number Diff line number Diff line change
@@ -1,17 +1,6 @@
<div>
<h4>{{t 'preprints.detail.abstract'}}</h4>
<p local-class='{{and (not this.expandedAbstract) this.hasShortenedDescription 'abstract-truncated'}}'>
{{this.description}}
</p>
{{#if this.hasShortenedDescription}}
<Button
data-test-toggle-abstract
data-analytics-name='Expand Abstract'
{{on 'click' (action this.expandAbstract)}}
aria-label={{if this.expandedAbstract (t 'preprints.detail.see_less') ( t 'preprints.detail.see_more')}}
@type='default'
>
{{~t (if this.expandedAbstract 'preprints.detail.see_less' 'preprints.detail.see_more')~}}
</Button>
{{/if}}
<ExpandablePreview @height='50'>
{{@preprint.description}}
</ExpandablePreview>
</div>

0 comments on commit af7e5d7

Please sign in to comment.