@brillout/docpress 0.15.13-commit-a35cb87 → 0.15.13-commit-6651c78

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/EditLink.tsx CHANGED
@@ -5,16 +5,20 @@ import { usePageContext } from './renderer/usePageContext'
5
5
  import { iconPencil } from './icons'
6
6
  import { getRepoHref } from './components'
7
7
 
8
- function EditLink({ className, style }: { className?: string; style: React.CSSProperties }) {
8
+ function EditLink({
9
+ className,
10
+ style,
11
+ verbose,
12
+ }: { className?: string; style: React.CSSProperties; verbose?: boolean }) {
9
13
  const pageContext = usePageContext()
10
- const iconSize = 17
14
+ const iconSize = 13
11
15
  const icon = (
12
16
  <img
13
17
  src={iconPencil}
14
18
  width={iconSize}
15
19
  height={iconSize}
16
20
  style={{
17
- marginRight: 9,
21
+ marginRight: 6,
18
22
  position: 'relative',
19
23
  top: -1,
20
24
  }}
@@ -25,8 +29,26 @@ function EditLink({ className, style }: { className?: string; style: React.CSSPr
25
29
  const docsDir = pageContext.globalContext.config.docpress.docsDir ?? 'docs'
26
30
  const editLink = getRepoHref(`/${docsDir}/pages${fsPath}`, true)
27
31
  return (
28
- <a href={editLink} className={className} style={{ display: 'flex', alignItems: 'center', ...style }}>
29
- {icon} Edit this page
32
+ <a
33
+ href={editLink}
34
+ className={className}
35
+ style={{
36
+ display: 'inline-flex',
37
+ alignItems: 'center',
38
+ paddingTop: 4,
39
+ paddingBottom: 1,
40
+ paddingLeft: 8,
41
+ paddingRight: 8,
42
+ border: '1px solid #e0e0e0',
43
+ borderRadius: 7,
44
+ fontSize: '0.91em',
45
+ color: '#6c6c6c',
46
+ background: '#f8f8f8',
47
+ letterSpacing: 0.4,
48
+ ...style,
49
+ }}
50
+ >
51
+ {icon} Edit{verbose ? ' this page' : ''}
30
52
  </a>
31
53
  )
32
54
  }
package/Layout.tsx CHANGED
@@ -161,7 +161,7 @@ function PageContent({ children }: { children: React.ReactNode }) {
161
161
  {/* globalNote */}
162
162
  {pageTitleParsed && !pageContext.resolved.pageDesign?.hideTitle && (
163
163
  <div>
164
- <EditLink className="show-only-on-desktop" style={{ float: 'right', marginTop: 6, padding: 10 }} />
164
+ <EditLink className="show-only-on-desktop" style={{ float: 'right', marginTop: 15 }} />
165
165
  <h1 id={`${pageContext.urlPathname.replace('/', '')}`}>{pageTitleParsed}</h1>
166
166
  </div>
167
167
  )}
package/MenuModal.tsx CHANGED
@@ -50,7 +50,9 @@ function MenuModal({ isTopNav }: { isTopNav: boolean }) {
50
50
  >
51
51
  <ExternalLinks style={{ height: 50 }} />
52
52
  </div>
53
- <EditLink style={{ justifyContent: 'center', padding: 10, marginTop: 0, marginBottom: 13 }} />
53
+ <Center>
54
+ <EditLink style={{ justifyContent: 'center', marginTop: 8, marginBottom: 20 }} verbose />
55
+ </Center>
54
56
  </div>
55
57
  </div>
56
58
  <CloseButton className="show-only-on-mobile" />
@@ -176,3 +178,17 @@ function CloseButton({ className }: { className: string }) {
176
178
  </div>
177
179
  )
178
180
  }
181
+
182
+ function Center({ style, ...props }: any) {
183
+ return (
184
+ <div
185
+ style={{
186
+ display: 'flex',
187
+ justifyContent: 'center',
188
+ alignItems: 'center',
189
+ ...style,
190
+ }}
191
+ {...props}
192
+ ></div>
193
+ )
194
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@brillout/docpress",
3
- "version": "0.15.13-commit-a35cb87",
3
+ "version": "0.15.13-commit-6651c78",
4
4
  "type": "module",
5
5
  "dependencies": {
6
6
  "@brillout/picocolors": "^1.0.10",