Merge pull request 'Starting customized buttons.' (#1) from detached into master

Reviewed-on: https://code.tupale.co/Offray/MiniDocs/pulls/1
This commit is contained in:
Offray Vladimir Luna Cárdenas 2022-08-30 20:08:14 -05:00
commit 1d62b028ed
2 changed files with 15 additions and 1 deletions

View File

@ -153,7 +153,7 @@ LePage >> metadataInit [
{ #category : #'*MiniDocs' } { #category : #'*MiniDocs' }
LePage >> navTop [ LePage >> navTop [
| topNavFile | | topNavFile |
topNavFile := ((self optionAt: 'storage') / '_navtop.html'). topNavFile := ((self optionAt: 'storage' ifAbsentPut: [ FileLocator temp ]) / '_navtop.html').
topNavFile exists topNavFile exists
ifFalse: [ ^ '' ] ifFalse: [ ^ '' ]
ifTrue: [ ^ topNavFile contents ] ifTrue: [ ^ topNavFile contents ]

View File

@ -0,0 +1,14 @@
Extension { #name : #LePageHeaderBuilder }
{ #category : #'*MiniDocs' }
LePageHeaderBuilder >> addExportPageButton [
<leHeaderAction>
| newButton |
newButton := BrButton new
aptitude: BrGlamorousButtonWithIconAptitude;
label: 'Export Page';
icon: BrGlamorousVectorIcons down;
action: [ :aButton | Clipboard clipboardText: self page asMarkdeepFile ].
self toolbarElement addItem: newButton.
]