Skip to content

Commit

Permalink
Merge pull request #613 from geonetwork/use-material-symbols
Browse files Browse the repository at this point in the history
Migrate icons from Google Material Icons to Material Symbols
  • Loading branch information
jahow authored Sep 18, 2023
2 parents bfd28df + 7ea17c9 commit f9f9064
Show file tree
Hide file tree
Showing 55 changed files with 150 additions and 107 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
mat-icon {
font-variation-settings: 'FILL' 1;
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
[class.active]="toggled"
(click)="toggle()"
>
<mat-icon *ngIf="icon" class="align-middle mr-2">{{ icon }}</mat-icon>
<mat-icon *ngIf="icon" class="material-symbols-outlined align-middle mr-2">{{
icon
}}</mat-icon>
<span>{{ label | translate }}</span>
</button>
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
type="button"
class="h-12 inline-flex items-center justify-center align-middle pl-6 rounded-md shrink-0"
>
<mat-icon class="align-middle">menu</mat-icon>
<mat-icon class="material-symbols-outlined align-middle">menu</mat-icon>
</button>
<div class="shrink truncate" [class]="displayMobileMenu ? 'block' : 'hidden'">
<div *ngFor="let l of tabLinks">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,10 @@ <h2 class="text-xl mr-4 font-title" translate>
(click)="close()"
>
<span class="text-sm" translate>search.filters.minimize</span>
<mat-icon class="ml-1 align-middle leading-none">remove</mat-icon>
<mat-icon
class="material-symbols-outlined ml-1 align-middle leading-none"
>remove</mat-icon
>
</button>
</span>
</div>
Expand Down Expand Up @@ -81,7 +84,7 @@ <h2 class="text-xl mr-4 font-title" translate>
extraClass="!px-[8px]"
data-cy="filters-expand"
>
<mat-icon>more_horiz</mat-icon>
<mat-icon class="material-symbols-outlined">more_horiz</mat-icon>
</gn-ui-button>
<button
type="button"
Expand All @@ -91,7 +94,10 @@ <h2 class="text-xl mr-4 font-title" translate>
data-cy="filters-expand"
>
<span class="text-sm" translate>search.filters.maximize</span>
<mat-icon class="ml-1 align-middle leading-none">add</mat-icon>
<mat-icon
class="material-symbols-outlined ml-1 align-middle leading-none"
>add</mat-icon
>
</button>
<gn-ui-sort-by
[ngClass]="isOpen ? 'block text-white mb-1' : 'hidden sm:block'"
Expand All @@ -106,7 +112,10 @@ <h2 class="text-xl mr-4 font-title" translate>
data-cy="filters-collapse"
>
<span class="text-sm" translate>search.filters.minimize</span>
<mat-icon class="ml-1 align-middle leading-none">remove</mat-icon>
<mat-icon
class="material-symbols-outlined ml-1 align-middle leading-none"
>remove</mat-icon
>
</button>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,9 @@
type="button"
class="h-10 inline-flex items-center justify-center p-2 rounded-md shrink-0 sm:hidden"
>
<mat-icon class="align-middle">expand_more</mat-icon>
<mat-icon class="material-symbols-outlined align-middle"
>expand_more</mat-icon
>
</button>
</div>
</nav>
2 changes: 1 addition & 1 deletion apps/datahub/src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
<link
href="https://fonts.googleapis.com/icon?family=Material+Icons|Material+Icons+Outlined"
rel="stylesheet"
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,[email protected],100..700,0..1,-50..200"
/>
<link
rel="preload"
Expand Down
2 changes: 1 addition & 1 deletion apps/demo/.storybook/preview-head.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<link
href="https://fonts.googleapis.com/icon?family=Material+Icons"
rel="stylesheet"
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,[email protected],100..700,0..1,-50..200"
/>
2 changes: 1 addition & 1 deletion apps/demo/src/app/app.component.css
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ summary {
border-color: rgba(27, 31, 35, 0.35);
background-position: -0.5em;
}
.github-star-badge .material-icons {
.github-star-badge .material-symbols {
height: 16px;
width: 16px;
margin-right: 4px;
Expand Down
2 changes: 1 addition & 1 deletion apps/map-viewer/src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
<link
href="https://fonts.googleapis.com/icon?family=Material+Icons|Material+Icons+Outlined"
rel="stylesheet"
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,[email protected],100..700,0..1,-50..200"
/>
</head>
<body>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@
extraClass="!p-[0.5em]"
title="Delete this item"
>
<mat-icon class="material-icons-outlined text-[1.6em] !w-[1em] !h-[1em]"
<mat-icon
class="material-symbols-outlined text-[1.6em] !w-[1em] !h-[1em]"
>delete_forever</mat-icon
>
</gn-ui-button>
Expand Down
2 changes: 1 addition & 1 deletion apps/metadata-converter/src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="icon" type="image/x-icon" href="favicon.ico" />
<link
href="https://fonts.googleapis.com/icon?family=Material+Icons|Material+Icons+Outlined"
rel="stylesheet"
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,[email protected],100..700,0..1,-50..200"
/>
<link
rel="stylesheet"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
routerLinkActive="btn-active"
#rlaMyOrg="routerLinkActive"
>
<mat-icon class="material-icons-outlined">home</mat-icon>
<mat-icon class="material-symbols-outlined">home</mat-icon>
<span translate="">dashboard.records.myOrg</span>
</a>

Expand All @@ -15,7 +15,7 @@
routerLinkActive="btn-active"
#rlaAll="routerLinkActive"
>
<mat-icon class="material-icons-outlined">work_outline</mat-icon>
<mat-icon class="material-symbols-outlined">work_outline</mat-icon>
<span translate="">dashboard.records.all</span>
</a>

Expand All @@ -26,7 +26,7 @@
routerLinkActive="btn-active"
#rlaMyRecords="routerLinkActive"
>
<mat-icon class="material-icons-outlined">post_add</mat-icon>
<mat-icon class="material-symbols-outlined">post_add</mat-icon>
<span translate="">dashboard.records.myRecords</span>
</a>
<a
Expand All @@ -35,7 +35,7 @@
routerLinkActive="btn-active"
#rlaMyDraft="routerLinkActive"
>
<mat-icon class="material-icons-outlined">edit_note</mat-icon>
<mat-icon class="material-symbols-outlined">edit_note</mat-icon>
<span translate="">dashboard.records.myDraft</span>
</a>
<a
Expand All @@ -44,7 +44,7 @@
routerLinkActive="btn-active"
#rlaMyLibrary="routerLinkActive"
>
<mat-icon class="material-icons-outlined">bookmark_border</mat-icon>
<mat-icon class="material-symbols-outlined">bookmark_border</mat-icon>
<span translate="">dashboard.records.myLibrary</span>
</a>
</div>
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,17 @@
</div>
<div class="flex gap-5 items-center">
<button>
<mat-icon class="icon-btn material-icons-outlined"
<mat-icon class="icon-btn material-symbols-outlined"
>notifications</mat-icon
>
</button>
<button>
<mat-icon class="icon-btn material-icons-outlined"
<mat-icon class="icon-btn material-symbols-outlined"
>speaker_notes</mat-icon
>
</button>
<button>
<mat-icon class="icon-btn material-icons-outlined">settings</mat-icon>
<mat-icon class="icon-btn material-symbols-outlined">settings</mat-icon>
</button>
<ng-container *ngrxLet="authService.user$ as user">
<gn-ui-user-preview
Expand Down
2 changes: 1 addition & 1 deletion apps/metadata-editor/src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
<link
href="https://fonts.googleapis.com/icon?family=Material+Icons|Material+Icons+Outlined"
rel="stylesheet"
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,[email protected],100..700,0..1,-50..200"
/>
<link
rel="preload"
Expand Down
2 changes: 1 addition & 1 deletion apps/search/src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
rel="stylesheet"
/>
<link
href="https://fonts.googleapis.com/icon?family=Material+Icons"
rel="stylesheet"
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,[email protected],100..700,0..1,-50..200"
/>
</head>
<body>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
<link
href="https://fonts.googleapis.com/icon?family=Material+Icons|Material+Icons+Outlined"
rel="stylesheet"
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,[email protected],100..700,0..1,-50..200"
/>
<link
href="https://fonts.googleapis.com/css2?family=DM+Serif+Display&amp;family=Inter:wght@200;300;400;500;600;700&amp;display=swap"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
<link
href="https://fonts.googleapis.com/icon?family=Material+Icons|Material+Icons+Outlined"
rel="stylesheet"
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,[email protected],100..700,0..1,-50..200"
/>
<link
href="https://fonts.googleapis.com/css2?family=DM+Serif+Display&amp;family=Inter:wght@200;300;400;500;600;700&amp;display=swap"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
<link
href="https://fonts.googleapis.com/icon?family=Material+Icons|Material+Icons+Outlined"
rel="stylesheet"
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,[email protected],100..700,0..1,-50..200"
/>
<link
href="https://fonts.googleapis.com/css2?family=DM+Serif+Display&amp;family=Inter:wght@200;300;400;500;600;700&amp;display=swap"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
<link
href="https://fonts.googleapis.com/icon?family=Material+Icons|Material+Icons+Outlined"
rel="stylesheet"
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,[email protected],100..700,0..1,-50..200"
/>
<link
href="https://fonts.googleapis.com/css2?family=DM+Serif+Display&amp;family=Inter:wght@200;300;400;500;600;700&amp;display=swap"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
<link
href="https://fonts.googleapis.com/icon?family=Material+Icons|Material+Icons+Outlined"
rel="stylesheet"
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,[email protected],100..700,0..1,-50..200"
/>
<link
href="https://fonts.googleapis.com/css2?family=Roboto:wght@200;300;400;500;600;700&amp;display=swap"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
<link
href="https://fonts.googleapis.com/icon?family=Material+Icons|Material+Icons+Outlined"
rel="stylesheet"
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,[email protected],100..700,0..1,-50..200"
/>
<link
href="https://fonts.googleapis.com/css2?family=DM+Serif+Display&amp;family=Inter:wght@200;300;400;500;600;700&amp;display=swap"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
<link
href="https://fonts.googleapis.com/icon?family=Material+Icons|Material+Icons+Outlined"
rel="stylesheet"
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,[email protected],100..700,0..1,-50..200"
/>
<link
href="https://fonts.googleapis.com/css2?family=DM+Serif+Display&amp;family=Inter:wght@200;300;400;500;600;700&amp;display=swap"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
<link
href="https://fonts.googleapis.com/icon?family=Material+Icons|Material+Icons+Outlined"
rel="stylesheet"
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,[email protected],100..700,0..1,-50..200"
/>
<link
href="https://fonts.googleapis.com/css2?family=DM+Serif+Display&amp;family=Inter:wght@200;300;400;500;600;700&amp;display=swap"
Expand Down
29 changes: 3 additions & 26 deletions apps/webcomponents/src/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -10,37 +10,14 @@

/* CSS coming from host goog:material import, must be injected in shadowDOM styles */
@font-face {
font-family: 'Material Icons';
font-style: normal;
font-weight: 400;
src: url(https://fonts.gstatic.com/s/materialicons/v139/flUhRq6tzZclQEJ-Vdg-IuiaDsNc.woff2)
format('woff2');
}
@font-face {
font-family: 'Material Icons Outlined';
font-family: 'Material Symbols Outlined';
font-style: normal;
font-weight: 400;
src: url(https://fonts.gstatic.com/s/materialiconsoutlined/v108/gok-H7zzDkdnRel8-DQ6KAXJ69wP1tGnf4ZGhUce.woff2)
format('woff2');
}
.material-icons {
font-family: 'Material Icons';
font-weight: normal;
font-style: normal;
font-size: 24px;
line-height: 1;
letter-spacing: normal;
text-transform: none;
display: inline-block;
white-space: nowrap;
word-wrap: normal;
direction: ltr;
-webkit-font-feature-settings: 'liga';
-webkit-font-smoothing: antialiased;
}

.material-icons-outlined {
font-family: 'Material Icons Outlined';
.material-symbols-outlined {
font-family: 'Material Symbols Outlined';
font-weight: normal;
font-style: normal;
font-size: 24px;
Expand Down
2 changes: 1 addition & 1 deletion demo/eea/datacatalogue.html
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
<link
href="https://fonts.googleapis.com/icon?family=Material+Icons|Material+Icons+Outlined"
rel="stylesheet"
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,[email protected],100..700,0..1,-50..200"
/>
<link
href="https://fonts.googleapis.com/css2?family=Roboto&amp;family=Inter:wght@200;300;400;500;600;700&amp;display=swap"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,17 @@
class="bg-white rounded shadow shadow-lg relative h-full w-[400px] overflow-hidden"
>
<div class="p-3 border-b border-gray-300 flex items-center">
<mat-icon class="mr-2">layers</mat-icon>
<mat-icon class="material-symbols-outlined mr-2">layers</mat-icon>
<span translate>map.layers.list</span>
</div>
<div class="flex flex-col px-4 divide-y divide-y-gray-50">
<div
*ngFor="let layer of layers$ | async; let index = index"
class="flex flex-row py-3"
>
<mat-icon class="-ml-2 mr-2 shrink-0">chevron_right</mat-icon>
<mat-icon class="material-symbols-outlined -ml-2 mr-2 shrink-0"
>chevron_right</mat-icon
>
<span class="mr-2 grow">{{ layer.title }}</span>
<a
href
Expand Down Expand Up @@ -42,6 +44,6 @@
</div>

<ng-template #addLayerTitle>
<mat-icon class="mr-4">add_circle</mat-icon>
<mat-icon class="material-symbols-outlined mr-4">add_circle</mat-icon>
<span translate>map.add.layer</span>
</ng-template>
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@
[title]="'record.externalViewer.open' | translate"
extraClass="!p-[0.6em] !rounded-lg"
>
<mat-icon>open_in_new</mat-icon>
<mat-icon class="material-symbols-outlined">open_in_new</mat-icon>
</gn-ui-button>
4 changes: 3 additions & 1 deletion libs/feature/record/src/lib/map-view/map-view.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,9 @@
(click)="resetSelection()"
class="rounded bg-primary-opacity-25 text-white absolute right-[0.5em]"
>
<mat-icon class="align-middle text-sm" style="height: 21px"
<mat-icon
class="material-symbols-outlined align-middle text-sm"
style="height: 21px"
>close</mat-icon
>
</button>
Expand Down
Loading

0 comments on commit f9f9064

Please sign in to comment.