File tree Expand file tree Collapse file tree 3 files changed +50
-3
lines changed Expand file tree Collapse file tree 3 files changed +50
-3
lines changed Original file line number Diff line number Diff line change @@ -132,7 +132,7 @@ Most common block types are supported. We happily accept pull requests to add su
132132| Divider | ✅ Yes | |
133133| Link | ✅ Yes | |
134134| Code | ✅ Partially | Highlighting coming soon |
135- | Web Bookmark | ✅ Soon | |
135+ | Web Bookmark | ✅ Yes | |
136136| Toggle List | ✅ Yes | |
137137| Page Links | ✅ Yes | |
138138| Header | ✅ Yes | Enable with ` fullPage ` |
Original file line number Diff line number Diff line change 1+ <template >
2+ <div class =" notion-row" >
3+ <a
4+ target =" _blank"
5+ rel =" noopener noreferrer"
6+ :class =" ['notion-bookmark', f.block_color && `notion-${f.block_color}`]"
7+ :href =" properties.link"
8+ >
9+ <div >
10+ <div class =" notion-bookmark-title" >
11+ <NotionTextRenderer :text =" title || properties.link" />
12+ </div >
13+ <div v-if =" description" class =" notion-bookmark-description" >
14+ <NotionTextRenderer :text =" description" />
15+ </div >
16+ <div class =" notion-bookmark-link" >
17+ <img
18+ v-if =" f.bookmark_icon"
19+ :alt =" getTextContent(title || properties.link)"
20+ :src =" f.bookmark_icon"
21+ />
22+ <div ><NotionTextRenderer :text =" properties.link" /></div >
23+ </div >
24+ </div >
25+ <div v-if =" f.bookmark_cover" class =" notion-bookmark-image" >
26+ <img
27+ :alt =" getTextContent(title || properties.link)"
28+ :src =" f.bookmark_cover"
29+ />
30+ </div >
31+ </a >
32+ </div >
33+ </template >
34+
35+ <script >
36+ import Blockable from " @/lib/blockable" ;
37+ import NotionTextRenderer from " @/blocks/helpers/text-renderer" ;
38+
39+ export default {
40+ extends: Blockable,
41+ name: " NotionBookmark" ,
42+ components: { NotionTextRenderer },
43+ };
44+ </script >
Original file line number Diff line number Diff line change 66 v-else-if =" isType(['header', 'sub_header', 'sub_sub_header'])"
77 v-bind =" pass"
88 />
9- <NotionText v-else-if =" isType('text')" v-bind =" pass" />
10- <NotionQuote v-else-if =" isType('quote')" v-bind =" pass" />
9+ <NotionBookmark v-else-if =" isType('bookmark')" v-bind =" pass" />
1110 <NotionCallout v-else-if =" isType('callout')" v-bind =" pass" />
1211 <NotionCode v-else-if =" isType('code')" v-bind =" pass" />
12+ <NotionText v-else-if =" isType('text')" v-bind =" pass" />
13+ <NotionQuote v-else-if =" isType('quote')" v-bind =" pass" />
1314 <NotionToggle v-else-if =" isType('toggle')" v-bind =" pass" >
1415 <slot />
1516 </NotionToggle >
3738
3839<script >
3940import Blockable , { blockComputed } from " @/lib/blockable" ;
41+ import NotionBookmark from " @/blocks/bookmark" ;
4042import NotionCallout from " @/blocks/callout" ;
4143import NotionCode from " @/blocks/code" ;
4244import NotionColumn from " @/blocks/column" ;
@@ -52,6 +54,7 @@ export default {
5254 extends: Blockable,
5355 name: " NotionBlock" ,
5456 components: {
57+ NotionBookmark,
5558 NotionCallout,
5659 NotionCode,
5760 NotionColumn,
You can’t perform that action at this time.
0 commit comments