Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ interface ParsedReference {

@Component({
selector: 'app-icon-lib',
imports: [PageLayoutComponent, RouterLink],
imports: [PageLayoutComponent],
templateUrl: './icon-lib.component.html',
styleUrl: './icon-lib.component.scss'
})
Expand Down
34 changes: 27 additions & 7 deletions projects/website-angular/src/app/search/search.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,11 @@ <h2>{{ group.typeName }} ({{ group.entriesCount }})</h2>
<div class="group-entries">
@for (entry of group.entries; track entry.dbId) {
<div class="search-entry">
<div class="entry-header">
<div class="type-icon">
<i [class]="getSpriteClass(entry)" title="Icon"></i>
</div>
<div class="entry-info">
<div class="entry-header">
@if (entry.deleted) {
<mat-icon class="deleted-icon">delete</mat-icon>
<span class="deleted" [innerHTML]="entry.stId"></span>
Expand All @@ -298,7 +302,7 @@ <h2>{{ group.typeName }} ({{ group.entriesCount }})</h2>
[routerLink]="getDetailLink(entry)"
[innerHTML]="entry.name">
</a>
<span class="entry-id">{{ entry.stId }}</span>
<span class="entry-id" [innerHTML]="entry.stId"></span>
}

</div>
Expand All @@ -320,16 +324,32 @@ <h2>{{ group.typeName }} ({{ group.entriesCount }})</h2>
Compartments: {{ entry.compartmentNames.join(', ') }}
</div>
}
@if (entry.iconCuratorName) {
<div class="entry-compartments">Curator: <a [href]="'https://orcid.org/' + entry.iconCuratorOrcidId" target="_blank" rel="noopener">
{{ entry.iconCuratorName }}
</a></div>
}
@if (entry.iconDesignerName) {
<div class="entry-compartments">Designer: <a [href]="entry.iconDesignerUrl" target="_blank" rel="noopener">
{{ entry.iconDesignerName }}
</a></div>
}
@if (entry.summation) {
<p class="entry-summation" [innerHTML]="entry.summation"></p>
}
@if (entry.referenceName) {
@if (entry.referenceName || entry.databaseName) {
<div class="entry-reference">
Reference: <a [href]="entry.referenceURL" target="_blank" rel="noopener"><span [innerHTML]="entry.referenceName"></span> ({{ entry.referenceIdentifier }})</a>
Reference: <a [href]="entry.referenceURL" target="_blank" rel="noopener"><span [innerHTML]="entry.referenceName ?? entry.databaseName"></span> ({{ entry.referenceIdentifier }})</a>
</div>
}
</div>
@if (entry.exactType == "Icon") {
<div class="icon-preview">
<img [src]="iconSvgUrl(entry)" [alt]="entry.stId" loading="lazy" (error)="onImgError($event)" width="100" height="auto"/>
</div>
}
</div>
}
}
</div>
}
</div>
Expand All @@ -343,12 +363,12 @@ <h2>{{ group.typeName }} ({{ group.entriesCount }})</h2>
<div class="search-entry">
<div class="entry-header">
<a class="entry-name" [routerLink]="getDetailLink(entry)" [innerHTML]="entry.name"></a>
<span class="entry-id">{{ entry.stId }}</span>
<span class="entry-id" [innerHTML]="entry.stId"></span>
</div>
@if (entry.species?.length) {
<div class="entry-species">
@for (sp of entry.species; track sp; let last = $last) {
<span class="species-tag">{{ sp }}</span>
<span class="species-tag" [innerHTML]="sp"></span>
}
</div>
}
Expand Down
279 changes: 279 additions & 0 deletions projects/website-angular/src/app/search/search.component.scss
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,282 @@ $border-radius: 8px;
margin-top: 16px;
}

.type-icon {
align-self: flex-start;
padding: 4px;
}

/** START - Sprite base configuration **/
.sprite {
background: url('/assets/spritesheet.png') no-repeat;
display: inline-block;
}

.sprite-resize {
zoom: .75;
transform: scale(.75);
-moz-transform: scale(.75);
}

.sprite-resize-small {
zoom: .6;
transform: scale(.6);
-moz-transform: scale(.6);
}

.sprite-position {
vertical-align: middle;
padding: 2px;
}
/** END - Sprite base configuration **/

/** PASTE NEW CSS HERE **/
.sprite-BlackBoxEvent {
width: 16px;
height: 16px;
background-position: -5px -5px;
}

.sprite-CandidateSet {
width: 16px;
height: 16px;
background-position: -31px -5px;
}

.sprite-Cell {
width: 16px;
height: 16px;
background-position: -57px -5px;
}

.sprite-CellDevelopmentStep {
width: 16px;
height: 16px;
background-position: -83px -5px;
}

.sprite-CellLineagePath {
width: 16px;
height: 16px;
background-position: -109px -5px;
}

.sprite-ChemicalDrug {
width: 16px;
height: 16px;
background-position: -135px -5px;
}

.sprite-Complex {
width: 16px;
height: 16px;
background-position: -161px -5px;
}

.sprite-ConceptualEvent {
width: 16px;
height: 16px;
background-position: -187px -5px;
}

.sprite-DefinedSet {
width: 16px;
height: 16px;
background-position: -213px -5px;
}

.sprite-Depolymerization {
width: 16px;
height: 16px;
background-position: -239px -5px;
}

.sprite-EntitySet {
width: 16px;
height: 16px;
background-position: -265px -5px;
}

.sprite-EntityWithAccessionedSequence {
width: 16px;
height: 16px;
background-position: -291px -5px;
}

.sprite-EquivalentEventSet {
width: 16px;
height: 16px;
background-position: -317px -5px;
}

.sprite-FailedReaction {
width: 16px;
height: 16px;
background-position: -343px -5px;
}

.sprite-GenomeEncodedEntity {
width: 16px;
height: 16px;
background-position: -369px -5px;
}

.sprite-Icon {
width: 16px;
height: 16px;
background-position: -395px -5px;
}

.sprite-Interactor {
width: 16px;
height: 16px;
background-position: -421px -5px;
}

.sprite-NegativeRegulation {
width: 16px;
height: 16px;
background-position: -447px -5px;
}

.sprite-OpenSet {
width: 16px;
height: 16px;
background-position: -473px -5px;
}

.sprite-OtherEntity {
width: 16px;
height: 16px;
background-position: -499px -5px;
}

.sprite-Pathway {
width: 16px;
height: 16px;
background-position: -525px -5px;
}

.sprite-Person {
width: 16px;
height: 16px;
background-position: -551px -5px;
}

.sprite-Polymer {
width: 16px;
height: 16px;
background-position: -577px -5px;
}

.sprite-Polymerisation {
width: 16px;
height: 16px;
background-position: -603px -5px;
}

.sprite-PositiveRegulation {
width: 16px;
height: 16px;
background-position: -629px -5px;
}

.sprite-ProteinDrug {
width: 16px;
height: 16px;
background-position: -655px -5px;
}

.sprite-Reaction {
width: 16px;
height: 16px;
background-position: -681px -5px;
}

.sprite-ReferenceDNASequence {
width: 16px;
height: 16px;
background-position: -707px -5px;
}

.sprite-ReferenceGeneProduct {
width: 16px;
height: 16px;
background-position: -733px -5px;
}

.sprite-ReferenceGroup {
width: 16px;
height: 16px;
background-position: -759px -5px;
}

.sprite-ReferenceIsoform {
width: 16px;
height: 16px;
background-position: -785px -5px;
}

.sprite-ReferenceMolecule {
width: 16px;
height: 16px;
background-position: -811px -5px;
}

.sprite-ReferenceRNASequence {
width: 16px;
height: 16px;
background-position: -837px -5px;
}

.sprite-Requirement {
width: 16px;
height: 16px;
background-position: -863px -5px;
}

.sprite-SimpleEntity {
width: 16px;
height: 16px;
background-position: -889px -5px;
}

.sprite-TopLevelPathway {
width: 16px;
height: 16px;
background-position: -915px -5px;
}

.sprite-deleted {
width: 20px;
height: 20px;
background-position: -941px -5px;
}

.sprite-isDisease {
width: 10px;
height: 16px;
background-position: -971px -5px;
}

.sprite-minus {
width: 21px;
height: 20px;
background-position: -991px -5px;
}

.sprite-plus {
width: 20px;
height: 20px;
background-position: -1022px -5px;
}


.search-entry {
display: flex;
flex-direction: row;
align-items: center;

padding: 12px 0;
border-top: 1px solid rgba(0, 0, 0, 0.08);

Expand All @@ -252,6 +527,10 @@ $border-radius: 8px;
}
}

.entry-info {
flex: 1;
}

.entry-header {
display: flex;
align-items: baseline;
Expand Down
Loading
Loading