Skip to content

Commit

Permalink
update browse card layout to not hide the chips under the metrics cards
Browse files Browse the repository at this point in the history
  • Loading branch information
syphax-bouazzouni committed Oct 30, 2023
1 parent 170f62c commit 5b10676
Show file tree
Hide file tree
Showing 2 changed files with 75 additions and 75 deletions.
8 changes: 3 additions & 5 deletions app/assets/stylesheets/browse.scss
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,6 @@
border-radius: 5px;
padding: 15px 20px;
margin-bottom: 20px;
display: flex;
justify-content: space-between;
position: relative;
}

Expand Down Expand Up @@ -296,16 +294,16 @@

.browse-search-bar .browse-format-filter {
position: absolute;
margin-left: 557px;
margin-left: 545px;
z-index: 2;
width: 150px;
}

.browse-search-bar .browse-sort-by-filter {
position: absolute;
margin-left: 692px;
margin-left: 681px;
z-index: 2;
width: 135px;
width: 150px;
border-radius: 0 14px 14px 0;
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,79 +1,81 @@
- if ontology
.browse-ontology-container
.browse-ontology-description
.browse-ontology-title-bar
%a.browse-ontology-title{:href => "/ontologies/#{ontology[:acronym]}", data: {'turbo': 'false'}}
= ontology[:name]+" ("+ontology[:acronym]+")"
- if ontology[:private]
%i.fas.fa-key{title:"Private Ontology"}
.browse-desc-container{data:{controller:"text-truncate", 'text-truncate-more-text-value': '+ Show more ...' , 'text-truncate-less-text-value': '- Show less ...'}}
%p.browse-desc-text{'data-text-truncate-target': 'content'}
= ontology[:description]
.browse-show-more-button{data:{'text-truncate-target': 'button', 'action':"click->text-truncate#toggle"}}
+ Show more ...
%div.d-flex
.browse-ontology-description
.browse-ontology-title-bar
%a.browse-ontology-title{:href => "/ontologies/#{ontology[:acronym]}", data: {'turbo': 'false'}}
= ontology[:name]+" ("+ontology[:acronym]+")"
- if ontology[:private]
%i.fas.fa-key{title:"Private Ontology"}
.browse-desc-container{data:{controller:"text-truncate", 'text-truncate-more-text-value': '+ Show more ...' , 'text-truncate-less-text-value': '- Show less ...'}}
%p.browse-desc-text{'data-text-truncate-target': 'content'}
= ontology[:description]
.browse-show-more-button{data:{'text-truncate-target': 'button', 'action':"click->text-truncate#toggle"}}
+ Show more ...


- unless ontology[:fairScore].nil? || ontology[:acronym] == 'AGROVOC'
.browse-fair
%p.browse-fair-title
FAIR score
.browse-progress-bar
.browse-faire-progress{:style => "width: #{ontology[:normalizedFairScore].to_s+"%"}"}
%p.browse-fair-score
= ontology[:fairScore]
%a.browse-fair-details{:href => "/ontologies/#{ontology[:acronym]}#fair-details", 'data-turbo': 'false'} FAIR details ...
.d-flex.align-items-baseline
- if ontology[:creationDate]
.browse-uploaded
%p.mr-1 Uploaded
%p.browse-uploaded-date{data:{controller: 'timeago', 'timeago-datetime-value': ontology[:creationDate], 'timeago-add-suffix-value': 'true'}}
- if ontology[:contact]
%p.mx-1 by
%p.browse-uploaded-date.text-truncate
= ontology[:contact].humanize
- unless ontology[:fairScore].nil? || ontology[:acronym] == 'AGROVOC'
.browse-fair
%p.browse-fair-title
FAIR score
.browse-progress-bar
.browse-faire-progress{:style => "width: #{ontology[:normalizedFairScore].to_s+"%"}"}
%p.browse-fair-score
= ontology[:fairScore]
%a.browse-fair-details{:href => "/ontologies/#{ontology[:acronym]}#fair-details", 'data-turbo': 'false'} FAIR details ...

- if ontology[:released]
.browse-ontology-view{data:{controller:'tooltip'}, title: "Release date #{ontology[:released].split('/').last}"}
= DateTime.parse(ontology[:released]).year
.browse-ontology-cards
- if ontology[:format] != 'SKOS' && ontology[:class_count] > 0
%a.browse-onology-card{:href => "/ontologies/#{ontology[:acronym]}?p=classes", 'data-turbo': 'false'}
%p.browse-card-number
= ontology[:class_count_formatted]
%p.browse-card-text
classes
- if ontology[:individual_count] > 0
%a.browse-onology-card{:href => "/ontologies/#{ontology[:acronym]}?p=#{ontology[:format] == 'SKOS' ? "classes" : "instances"}", 'data-turbo': 'false'}
%p.browse-card-number
= ontology[:individual_count_formatted]
%p.browse-card-text
= ontology[:format] == 'SKOS' ? "concepts" : "instances"
- if ontology[:project_count] > 0
%a.browse-onology-card{:href => "/ontologies/#{ontology[:acronym]}#projects_section", 'data-turbo': 'false'}
%p.browse-card-number
= ontology[:project_count]
%p.browse-card-text
projects
- if ontology[:note_count] > 0
%a.browse-onology-card{:href => "/ontologies/#{ontology[:acronym]}?p=notes", 'data-turbo': 'false'}
%p.browse-card-number
= ontology[:note_count]
%p.browse-card-text
notes
.d-flex.align-items-baseline
- if ontology[:creationDate]
.browse-uploaded
%p.mr-1 Uploaded
%p.browse-uploaded-date{data:{controller: 'timeago', 'timeago-datetime-value': ontology[:creationDate], 'timeago-add-suffix-value': 'true'}}
- if ontology[:contact]
%p.mx-1 by
%p.browse-uploaded-date.text-truncate
= ontology[:contact].humanize

- if ontology[:format]
.browse-ontology-view
= ontology[:format]
- if ontology[:deprecated]
.browse-ontology-deprecated
deprecated
- if ontology[:viewOfOnt]
.browse-ontology-view{data:{controller:'tooltip'}, title: "View of the ontology #{ontology[:viewOfOnt].split('/').last}"}
view
- if session[:user]&.admin?
%div.admin-broder{title: content_tag(:div, debug(ontology), style: 'height: 300px; overflow: scroll'), data:{controller: 'tooltip', 'tooltip-interactive-value': 'true'}}
.browse-ontology-view.admin-background
Debug
.browse-ontology-cards
- if ontology[:format] != 'SKOS' && ontology[:class_count] > 0
%a.browse-onology-card{:href => "/ontologies/#{ontology[:acronym]}?p=classes", 'data-turbo': 'false'}
%p.browse-card-number
= ontology[:class_count_formatted]
%p.browse-card-text
classes
- if ontology[:individual_count] > 0
%a.browse-onology-card{:href => "/ontologies/#{ontology[:acronym]}?p=#{ontology[:format] == 'SKOS' ? "classes" : "instances"}", 'data-turbo': 'false'}
%p.browse-card-number
= ontology[:individual_count_formatted]
%p.browse-card-text
= ontology[:format] == 'SKOS' ? "concepts" : "instances"
- if ontology[:project_count] > 0
%a.browse-onology-card{:href => "/ontologies/#{ontology[:acronym]}#projects_content", 'data-turbo': 'false'}
%p.browse-card-number
= ontology[:project_count]
%p.browse-card-text
projects
- if ontology[:note_count] > 0
%a.browse-onology-card{:href => "/ontologies/#{ontology[:acronym]}?p=notes", 'data-turbo': 'false'}
%p.browse-card-number
= ontology[:note_count]
%p.browse-card-text
notes
- if ontology[:released]
.browse-ontology-view{data:{controller:'tooltip'}, title: "Release date #{ontology[:released].split('/').last}"}
= DateTime.parse(ontology[:released]).year

- if ontology[:format]
.browse-ontology-view
= ontology[:format]
- if ontology[:deprecated]
.browse-ontology-deprecated
deprecated
- if ontology[:viewOfOnt]
.browse-ontology-view{data:{controller:'tooltip'}, title: "View of the ontology #{ontology[:viewOfOnt].split('/').last}"}
view
- if session[:user]&.admin?
%div.admin-broder{title: content_tag(:div, debug(ontology), style: 'height: 300px; overflow: scroll'), data:{controller: 'tooltip', 'tooltip-interactive-value': 'true'}}
.browse-ontology-view.admin-background
Debug
- else
.browse-ontology-container
.browse-sket
Expand Down

0 comments on commit 5b10676

Please sign in to comment.