From 9af476f6ab5290b5956443ca1618401893d4c1f9 Mon Sep 17 00:00:00 2001 From: Offray Luna Date: Tue, 30 Aug 2022 20:11:03 -0500 Subject: [PATCH] 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. +] -- 2.30.2