-
-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
To keep the compatible with mobile version when we use image as icon #18
base: main
Are you sure you want to change the base?
Conversation
snakewa
commented
Oct 22, 2022
- To keep the compatible with mobile version, add "icon-url::" page property for icon image
- add support for "icon2::" and "icon-url2::" page properties for one extra icon or icon image (only be effective when "icon::" or "icon-url::" is provided)
- add dev dependency "vite-plugin-logseq" to use logseqDevPlugin() for for 'npm run dev'
…property for icon image - add support for "icon2::" and "icon-url2::" page properties for one extra icon or icon image (only be effective when "icon::" or "icon-url::" is provided) - add dev dependency "vite-plugin-logseq" to use logseqDevPlugin() for for 'npm run dev'
- add dev dependency "vite-plugin-logseq"
@@ -32,7 +32,8 @@ | |||
"eslint": "^8.25.0", | |||
"semantic-release": "^19.0.5", | |||
"typescript": "^4.8.4", | |||
"vite": "3.1.8" | |||
"vite": "3.1.8", | |||
"vite-plugin-logseq": "^1.1.2" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i think this not needed )
dev mode never works ok with hot reload. only simple css... so i deleted if from everywhere
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems to work for me to generate dist/index.html which source localhost's server tor translate TS. I wonder what is the alternative way to test the code without npm run build every time code changes?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i do every time npm run build
and copy dist
to plugins folder ((
@@ -136,15 +136,22 @@ export const processLinkItem = async (linkItem: HTMLElement) => { | |||
export const setStyleToLinkItem = async (linkItem: HTMLElement, pageProps: propsObject) => { | |||
linkItem.classList.remove('awLi-stroke'); | |||
// icon | |||
const pageIcon = pageProps['icon']; | |||
const pageIcon = pageProps['icon-url'] ? `<img src="${pageProps['icon-url']}">` : pageProps['icon']; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
there is solution for local files - https://github.com/yoyurec/logseq-banners-plugin/blob/main/src/banners.ts#L549-L552
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cool that should work for image in asset. I will try it