Skip to content

Commit

Permalink
新增全局函式 _Listener 與 Element 函式 _m 和 _p
Browse files Browse the repository at this point in the history
  • Loading branch information
pardnchiu committed Aug 2, 2024
1 parent 22d3215 commit cb26b22
Show file tree
Hide file tree
Showing 12 changed files with 290 additions and 385 deletions.
9 changes: 4 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -368,11 +368,10 @@ Improving code maintainability and readability while reducing development comple
])
);
// 添加 SVG Listener, 轉換 span.svg 至 svg 標籤
_SVGListener();
// 添加 Lazy Listener, Lazy Loading 圖片
_LazyListener();
_Listener({
svg: true, // 添加 SVGListener, 轉換 span.svg 至 svg 標籤
lazyload: true // 添加 Lazy Listener, Lazy Loading 圖片
});
```
- ### 獲取 / Get Element
Expand Down
2 changes: 1 addition & 1 deletion dist/PDRenderKit.js

Large diffs are not rendered by default.

12 changes: 10 additions & 2 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,17 @@
<!-- <span class="loader"></span> -->
<nav id="nav" style="max-width: 1024px;">
<a href="https://github.com/pardnchiu" target="_blank">
<i class="fa-brands fa-github"></i>
<!-- <i class="fa-brands fa-github"></i> -->
<!-- svg 插入範例 -->
<style>
nav>a>svg {
width: 1.5rem;
height: 1.5rem;
}
</style>
<span class="svg" src="static/image/github-brands-solid.svg"></span>
</a>
<img class="head" src="https://pardn.io/image/head-s.jpg" alt="邱敬幃 Pardn Chiu" onclick="window.open('https://linkedin.com/in/pardnchiu')">
<img class="head lazyload" data-src="https://pardn.io/image/head-s.jpg" alt="邱敬幃 Pardn Chiu" onclick="window.open('https://linkedin.com/in/pardnchiu')">
<a href="mailto:mail@pardn.ltd">
<i class="fa-regular fa-envelope"></i>
</a>
Expand Down
Binary file modified src/*.ts
Binary file not shown.
Binary file modified src/PDRenderKit.js
Binary file not shown.
Binary file modified src/dom.ts
Binary file not shown.
Binary file modified src/element.ts
Binary file not shown.
Loading

0 comments on commit cb26b22

Please sign in to comment.