mirror of
https://github.com/maradotwebp/obsidian-avatar.git
synced 2026-07-22 07:30:24 +00:00
Compare commits
No commits in common. "master" and "1.0.7" have entirely different histories.
5 changed files with 3 additions and 18 deletions
|
|
@ -40,8 +40,6 @@ The following options are available through the YAML codeblock:
|
|||
- The side on which the avatar will be displayed. Optional, defaults to `"left"`.
|
||||
- `size?: "small" | "medium" | "large" | number`
|
||||
- The size of the avatar. May be either `small` (180x180px), `medium` (240x240px), `large` (320x320px), or any custom width as a number. Optional, defaults to `medium`.
|
||||
- `objectPosition?: string`
|
||||
- How to position the image within the square container surrounding it. For example, `"left"` would show the left side of a landscape picture, `"right"` the right side. <small>Refer to https://developer.mozilla.org/en-US/docs/Web/CSS/object-position for more information.</small>
|
||||
|
||||
## Installation
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"id": "avatar",
|
||||
"name": "Avatar",
|
||||
"version": "1.1.0",
|
||||
"version": "1.0.7",
|
||||
"minAppVersion": "0.15.0",
|
||||
"description": "Display an avatar image in your notes.",
|
||||
"author": "froehlichA",
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "obsidian-avatar",
|
||||
"version": "1.1.0",
|
||||
"version": "1.0.7",
|
||||
"description": "An obsidian plugin for displaying an avatar image in front of your notes. ",
|
||||
"main": "main.js",
|
||||
"scripts": {
|
||||
|
|
|
|||
|
|
@ -31,16 +31,6 @@
|
|||
* @default "medium"
|
||||
*/
|
||||
size?: "small" | "medium" | "large" | number;
|
||||
/**
|
||||
* Alignment of the avatar image within the container.
|
||||
*
|
||||
* Corresponds to the `object-position` CSS property.
|
||||
*
|
||||
* @see https://developer.mozilla.org/en-US/docs/Web/CSS/object-position
|
||||
*
|
||||
* @default "50% 50%"
|
||||
*/
|
||||
objectPosition?: string;
|
||||
description: string;
|
||||
}
|
||||
|
||||
|
|
@ -67,7 +57,6 @@
|
|||
}[state.size]
|
||||
: state.size
|
||||
: 240;
|
||||
$: objectPosition = state.objectPosition;
|
||||
|
||||
onMount(() => {
|
||||
inSourceMode = isSourceMode();
|
||||
|
|
@ -141,7 +130,6 @@
|
|||
alt="Avatar"
|
||||
style:width={`${avatarSize}px`}
|
||||
style:height={`${avatarSize}px`}
|
||||
style:object-position={objectPosition}
|
||||
src={state.image ? normalizeImgPath(state?.image) : fallbackImage}
|
||||
/>
|
||||
{#if inSourceMode && hoverOnImage}
|
||||
|
|
|
|||
|
|
@ -6,6 +6,5 @@
|
|||
"1.0.4": "0.15.0",
|
||||
"1.0.5": "0.15.0",
|
||||
"1.0.6": "0.15.0",
|
||||
"1.0.7": "0.15.0",
|
||||
"1.1.0": "0.15.0"
|
||||
"1.0.7": "0.15.0"
|
||||
}
|
||||
Loading…
Reference in a new issue