File tree Expand file tree Collapse file tree 2 files changed +48
-0
lines changed Expand file tree Collapse file tree 2 files changed +48
-0
lines changed Original file line number Diff line number Diff line change @@ -272,6 +272,13 @@ export const ObsidianFlavoredMarkdown: QuartzTransformerPlugin<Partial<Options>
272
272
type : "html" ,
273
273
value : `<iframe src="${ url } "></iframe>` ,
274
274
}
275
+ // MMW - assign custom styling to .zip embed download link
276
+ } else if ( [ ".zip" , ".7z" ] . includes ( ext ) ) {
277
+ const downloadText = alias ? alias : fp
278
+ return {
279
+ type : "html" ,
280
+ value : `<a href="${ url } " class="mmw-download-link" download>Download ${ downloadText } </a>` ,
281
+ }
275
282
} else {
276
283
const block = anchor
277
284
return {
Original file line number Diff line number Diff line change @@ -1088,3 +1088,44 @@ kbd:active kbd {
1088
1088
color : #db8942 ;
1089
1089
text-align : center ;
1090
1090
}
1091
+
1092
+ /* ===================== */
1093
+
1094
+ /* --- Download Link --- */
1095
+
1096
+ a .mmw-download-link :link , a .mmw-download-link :visited {
1097
+ background-color : #8f9fa926 ;
1098
+ border : none ;
1099
+ text-align : center ;
1100
+ text-decoration : none ;
1101
+ display : inline-block ;
1102
+ font-size : 1.2rem ;
1103
+ width : 100% ;
1104
+ transition : .4s ;
1105
+ padding : 6px ;
1106
+ }
1107
+
1108
+ a .mmw-download-link :hover , a .mmw-download-link :active {
1109
+ background-color : #8f9fa93d ;
1110
+ }
1111
+
1112
+ a .mmw-download-link ::before {
1113
+ /* display download icon before link text */
1114
+ display : inherit ;
1115
+ vertical-align : middle ;
1116
+ padding-right : 5px ;
1117
+ }
1118
+
1119
+ /* change svg stroke='' based on dark/light theme*/
1120
+ [saved-theme = " light" ]a .mmw-download-link ::before {
1121
+ content : url (" data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='1.2rem' height='1.2rem' viewBox='0 0 24 24' fill='none' stroke='%232b2b2b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' class='lucide lucide-download'%3E%3Cpath d='M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4'/%3E%3Cpolyline points='7 10 12 15 17 10'/%3E%3Cline x1='12' x2='12' y1='15' y2='3'/%3E%3C/svg%3E" );
1122
+ }
1123
+
1124
+ [saved-theme = " dark" ]a .mmw-download-link ::before {
1125
+ content : url (" data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='1.2rem' height='1.2rem' viewBox='0 0 24 24' fill='none' stroke='%23ebebec' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' class='lucide lucide-download'%3E%3Cpath d='M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4'/%3E%3Cpolyline points='7 10 12 15 17 10'/%3E%3Cline x1='12' x2='12' y1='15' y2='3'/%3E%3C/svg%3E" );
1126
+ }
1127
+
1128
+ a .mmw-download-link div .popover {
1129
+ display : none ;
1130
+ /* prevent link popover from appearing */
1131
+ }
You can’t perform that action at this time.
0 commit comments