From 9af476f6ab5290b5956443ca1618401893d4c1f9 Mon Sep 17 00:00:00 2001 From: Offray Luna Date: Tue, 30 Aug 2022 20:11:03 -0500 Subject: [PATCH 1/2] Starting customized buttons. --- src/MiniDocs/LePage.extension.st | 2 +- src/MiniDocs/LePageHeaderBuilder.extension.st | 14 ++++++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) create mode 100644 src/MiniDocs/LePageHeaderBuilder.extension.st diff --git a/src/MiniDocs/LePage.extension.st b/src/MiniDocs/LePage.extension.st index 7eddb63..91c8536 100644 --- a/src/MiniDocs/LePage.extension.st +++ b/src/MiniDocs/LePage.extension.st @@ -153,7 +153,7 @@ LePage >> metadataInit [ { #category : #'*MiniDocs' } LePage >> navTop [ | topNavFile | - topNavFile := ((self optionAt: 'storage') / '_navtop.html'). + topNavFile := ((self optionAt: 'storage' ifAbsentPut: [ FileLocator temp ]) / '_navtop.html'). topNavFile exists ifFalse: [ ^ '' ] ifTrue: [ ^ topNavFile contents ] diff --git a/src/MiniDocs/LePageHeaderBuilder.extension.st b/src/MiniDocs/LePageHeaderBuilder.extension.st new file mode 100644 index 0000000..dc91675 --- /dev/null +++ b/src/MiniDocs/LePageHeaderBuilder.extension.st @@ -0,0 +1,14 @@ +Extension { #name : #LePageHeaderBuilder } + +{ #category : #'*MiniDocs' } +LePageHeaderBuilder >> addExportPageButton [ + + | newButton | + + newButton := BrButton new + aptitude: BrGlamorousButtonWithIconAptitude; + label: 'Export Page'; + icon: BrGlamorousVectorIcons down; + action: [ :aButton | Clipboard clipboardText: self page asMarkdeepFile ]. + self toolbarElement addItem: newButton. +] From 5af60513e9d92aa778b728054c42c9490848c171 Mon Sep 17 00:00:00 2001 From: Offray Luna Date: Tue, 30 Aug 2022 20:56:10 -0500 Subject: [PATCH 2/2] Fixing leftover from code example. --- src/MiniDocs/LePageHeaderBuilder.extension.st | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/MiniDocs/LePageHeaderBuilder.extension.st b/src/MiniDocs/LePageHeaderBuilder.extension.st index dc91675..8c0167c 100644 --- a/src/MiniDocs/LePageHeaderBuilder.extension.st +++ b/src/MiniDocs/LePageHeaderBuilder.extension.st @@ -9,6 +9,6 @@ LePageHeaderBuilder >> addExportPageButton [ aptitude: BrGlamorousButtonWithIconAptitude; label: 'Export Page'; icon: BrGlamorousVectorIcons down; - action: [ :aButton | Clipboard clipboardText: self page asMarkdeepFile ]. + action: [ :aButton | self page asMarkdeepFile ]. self toolbarElement addItem: newButton. ]