Skip to content

Commit

Permalink
fix: icon button hover (#2291)
Browse files Browse the repository at this point in the history
* Add transcribe and add circle filled icons

* Update hover effect user buttons

* Increase size limit
  • Loading branch information
LeoniePeters authored Apr 24, 2024
1 parent 59fd970 commit 2c097a3
Show file tree
Hide file tree
Showing 12 changed files with 227 additions and 102 deletions.
15 changes: 15 additions & 0 deletions packages/portal/docs/style/FontIcons.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,11 @@ Example:
<td><code>icon-add</code></td>
<td><span class="icon icon-add" /></td>
</tr>
<tr>
<td>Add circle outlined</td>
<td><code>icon-add-circle-outlined</code></td>
<td><span class="icon icon-add-circle-outlined" /></td>
</tr>
<tr>
<td>Add circle</td>
<td><code>icon-add-circle</code></td>
Expand Down Expand Up @@ -259,6 +264,16 @@ Example:
<td><code>icon-temporary-tag</code></td>
<td><span class="icon icon-temporary-tag" /></td>
</tr>
<tr>
<td>Transcribe outlined</td>
<td><code>icon-transcribe-outlined</code></td>
<td><span class="icon icon-transcribe-outlined" /></td>
</tr>
<tr>
<td>Transcribe</td>
<td><code>icon-transcribe</code></td>
<td><span class="icon icon-transcribe" /></td>
</tr>
<tr>
<td>Translate</td>
<td><code>icon-translate</code></td>
Expand Down
12 changes: 11 additions & 1 deletion packages/portal/src/components/item/ItemAddButton.vue
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
:title="$t('set.actions.addToGallery')"
@click="addToSet"
>
<span class="icon-add-circle" />
<span class="icon-add-circle-outlined" />
{{ buttonText ? $t('actions.save') : '' }}
</b-button>
<template
Expand Down Expand Up @@ -113,3 +113,13 @@
}
};
</script>
<style lang="scss" scoped>
@import '@europeana/style/scss/variables';
.add-button:hover {
.icon-add-circle-outlined::before {
content: '\e907';
}
}
</style>
13 changes: 13 additions & 0 deletions packages/portal/src/components/item/ItemLikeButton.vue
Original file line number Diff line number Diff line change
Expand Up @@ -121,3 +121,16 @@
}
};
</script>
<style lang="scss" scoped>
@import '@europeana/style/scss/variables';
.like-button:hover {
.icon-heart-outlined::before {
content: '\e918';
}
.icon-heart::before {
content: '\e9da';
}
}
</style>
13 changes: 13 additions & 0 deletions packages/portal/src/components/item/ItemPinButton.vue
Original file line number Diff line number Diff line change
Expand Up @@ -155,3 +155,16 @@
}
};
</script>
<style lang="scss" scoped>
@import '@europeana/style/scss/variables';
.pin-button:hover {
.icon-pin-outlined::before {
content: '\e91e';
}
.icon-pin::before {
content: '\e936';
}
}
</style>
6 changes: 5 additions & 1 deletion packages/portal/src/components/item/ItemTranscribeButton.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<template>
<div>
<b-button
class="transcribe-button icon-transcribe button-icon-only"
class="transcribe-button icon-transcribe-outlined button-icon-only"
data-qa="transcribe button"
:aria-label="$t('actions.transcribe')"
@click="$bvModal.show(modalId)"
Expand Down Expand Up @@ -82,6 +82,10 @@
&:hover {
color: $mediumgrey;
&.icon-transcribe-outlined::before {
content: '\e916';
}
}
&::after {
Expand Down
12 changes: 11 additions & 1 deletion packages/portal/src/components/user/UserCreateSetButton.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
@click="clickCreateSet"
>
<div class="card-inner d-flex justify-content-center align-items-center">
<span class="icon-add-circle" />
<span class="icon-add-circle-outlined" />
<b-card-body data-qa="card body">
<b-card-title title-tag="div">
{{ $t('set.actions.createNew') }}
Expand Down Expand Up @@ -65,6 +65,16 @@
};
</script>

<style lang="scss" scoped>
@import '@europeana/style/scss/variables';
.create-card:hover {
.icon-add-circle-outlined::before {
content: '\e907';
}
}
</style>

<docs lang="md">
```jsx
<UserCreateSetButton />
Expand Down
2 changes: 1 addition & 1 deletion packages/portal/tests/size/.size-limit.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
{
"name": "portal.js server",
"running": false,
"limit": "1000 KB",
"limit": "1005 KB",
"path": [
".nuxt/dist/server/*.js"
]
Expand Down
Loading

0 comments on commit 2c097a3

Please sign in to comment.