diff --git a/projects/arlas-components/src/lib/components/results/model/item.ts b/projects/arlas-components/src/lib/components/results/model/item.ts index 5dbe448b..ee6895fd 100644 --- a/projects/arlas-components/src/lib/components/results/model/item.ts +++ b/projects/arlas-components/src/lib/components/results/model/item.ts @@ -99,6 +99,7 @@ export class Item { public position: number; /** * @description The material grid icon. + * @deprecated */ public icon: string; /** diff --git a/projects/arlas-components/src/lib/components/results/result-grid-tile/result-grid-tile.component.html b/projects/arlas-components/src/lib/components/results/result-grid-tile/result-grid-tile.component.html index c0f993d4..841c2cf9 100644 --- a/projects/arlas-components/src/lib/components/results/result-grid-tile/result-grid-tile.component.html +++ b/projects/arlas-components/src/lib/components/results/result-grid-tile/result-grid-tile.component.html @@ -2,29 +2,21 @@
check_box check_box_outline_blank - indeterminate_check_box -
- -
- -
+ indeterminate_check_box +
+ +
+
-
- {{gridTile?.icon}} - - - {{gridTile?.icon}} - - +
+
+ {{gridTile?.title}}
-
diff --git a/projects/arlas-components/src/lib/components/results/result-grid-tile/result-grid-tile.component.css b/projects/arlas-components/src/lib/components/results/result-grid-tile/result-grid-tile.component.scss similarity index 89% rename from projects/arlas-components/src/lib/components/results/result-grid-tile/result-grid-tile.component.css rename to projects/arlas-components/src/lib/components/results/result-grid-tile/result-grid-tile.component.scss index 73399e38..34a5d951 100644 --- a/projects/arlas-components/src/lib/components/results/result-grid-tile/result-grid-tile.component.css +++ b/projects/arlas-components/src/lib/components/results/result-grid-tile/result-grid-tile.component.scss @@ -17,6 +17,8 @@ * under the License. */ +$img-proportion: 85%; + .resultgrid { width:100%; height:100%; @@ -92,8 +94,9 @@ .resultgrid__img /* @doc Sets the image style.*/ { + box-sizing: border-box; display: flex; - height: 80%; + height: $img-proportion; width: 100%; padding: 2px; background-position: center center; @@ -104,38 +107,40 @@ background-color: #000; } -.resultgrid__title-highlight- /* @doc Sets the grid title style.*/ -{ +.resultgrid__title-highlight- /* @doc Sets the grid title style.*/, +.resultgrid__title-highlight-false, +.resultgrid__title-highlight-true { + height: calc(100% - $img-proportion); color: #000; font-family: "Roboto", "Helvetica Neue", sans-serif; - font-size: 0.65em; + font-size: 12px; display: flex; justify-content: space-between; align-items: center; - padding: 0 5px; + padding: 5px; + box-sizing: border-box; + + .tablet { + height: 100%; + max-height: 20px; + aspect-ratio: 1; + // Very high value to have a round result + border-radius: 100px; + margin-right: 2px; + } + + .resultgrid__title { + text-overflow: ellipsis; + white-space: nowrap; + overflow: hidden; + } } .resultgrid__title-highlight-false /* @doc Sets the grid title style.*/ { - color: #000; - font-family: "Roboto", "Helvetica Neue", sans-serif; - font-size: 0.65em; - display: flex; - justify-content: space-between; - align-items: center; - padding: 0 5px; opacity: 0.3; } -.resultgrid__title-highlight-true { - font-family: "Roboto", "Helvetica Neue", sans-serif; - font-size: 0.65em; - display: flex; - justify-content: space-between; - align-items: center; - padding: 0 5px; -} - .fill-images{ object-fit: cover; width: 100%; diff --git a/projects/arlas-components/src/lib/components/results/result-grid-tile/result-grid-tile.component.ts b/projects/arlas-components/src/lib/components/results/result-grid-tile/result-grid-tile.component.ts index 1f19c807..977be540 100644 --- a/projects/arlas-components/src/lib/components/results/result-grid-tile/result-grid-tile.component.ts +++ b/projects/arlas-components/src/lib/components/results/result-grid-tile/result-grid-tile.component.ts @@ -29,7 +29,7 @@ import { Action, ElementIdentifier, ResultListOptions } from '../utils/results.u @Component({ selector: 'arlas-result-grid-tile', templateUrl: './result-grid-tile.component.html', - styleUrls: ['./result-grid-tile.component.css'] + styleUrls: ['./result-grid-tile.component.scss'] }) export class ResultGridTileComponent extends ItemComponent implements OnInit { public SHOW_IMAGE = 'Click to show details'; diff --git a/projects/arlas-components/src/lib/components/results/utils/results.utils.ts b/projects/arlas-components/src/lib/components/results/utils/results.utils.ts index a6cb7e6a..d3039199 100644 --- a/projects/arlas-components/src/lib/components/results/utils/results.utils.ts +++ b/projects/arlas-components/src/lib/components/results/utils/results.utils.ts @@ -52,6 +52,9 @@ export interface FieldsConfiguration { urlThumbnailTemplate?: string; titleFieldNames?: Array; tooltipFieldNames?: Array; + /** + * @deprecated + */ icon?: string; iconCssClass?: string; iconColorFieldName?: string;