Skip to content

Commit 5a27e30

Browse files
Merge pull request #67 from morrowind-modding/edit-button-css
Update: Improve edit button CSS
2 parents 6111a94 + a442945 commit 5a27e30

File tree

2 files changed

+21
-8
lines changed

2 files changed

+21
-8
lines changed

quartz/components/ContentMeta.tsx

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -48,14 +48,16 @@ export default ((opts?: Partial<ContentMetaOptions>) => {
4848
return (
4949
<p show-comma={options.showComma} class={classNames(displayClass, "content-meta")}>
5050
{segmentsElements} <br/>
51-
<a href={`https://github.com/morrowind-modding/wiki/edit/main/${fileRelativePath}`} class={classNames(displayClass, "external")} target={"_blank"} style={"font-weight:400"}>
52-
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-square-pen"><path d="M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7"/><path d="M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z"/></svg>
53-
Edit This Page!
54-
</a> &nbsp;
55-
<a href={`https://github.com/morrowind-modding/wiki/blame/main/${fileRelativePath}`} class={classNames(displayClass, "external")} target={"_blank"} style={"font-weight:400"}>
56-
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-folder-clock"><circle cx="16" cy="16" r="6"/><path d="M7 20H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H20a2 2 0 0 1 2 2"/><path d="M16 14v2l1 1"/></svg>
57-
History
58-
</a>
51+
<span id="edit-btn-container">
52+
<a href={`https://github.com/morrowind-modding/wiki/edit/main/${fileRelativePath}`} class={classNames(displayClass, "external", "edit-btn")} target={"_blank"}>
53+
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-square-pen"><path d="M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7"/><path d="M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z"/></svg>
54+
Edit page
55+
</a> &nbsp;
56+
<a href={`https://github.com/morrowind-modding/wiki/blame/main/${fileRelativePath}`} class={classNames(displayClass, "external", "edit-btn")} target={"_blank"}>
57+
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-folder-clock"><circle cx="16" cy="16" r="6"/><path d="M7 20H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H20a2 2 0 0 1 2 2"/><path d="M16 14v2l1 1"/></svg>
58+
View history
59+
</a>
60+
</span>
5961
</p>
6062
)
6163
} else {

quartz/components/styles/contentMeta.scss

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,14 @@
1212
}
1313
}
1414
}
15+
16+
#edit-btn-container .edit-btn {
17+
font-weight: 400;
18+
margin-right: 4px;
19+
}
20+
#edit-btn-container svg {
21+
height: 1.1em;
22+
margin: 0 0.1em 0 0;
23+
vertical-align: middle;
24+
}
25+

0 commit comments

Comments
 (0)