Implementing components. #defaultView needs to be debugged.
This commit is contained in:
parent
c609595272
commit
a8d12ec46f
@ -5,7 +5,7 @@ Class {
|
|||||||
'name',
|
'name',
|
||||||
'folder',
|
'folder',
|
||||||
'server',
|
'server',
|
||||||
'body'
|
'componets'
|
||||||
],
|
],
|
||||||
#category : #Brea
|
#category : #Brea
|
||||||
}
|
}
|
||||||
@ -23,8 +23,26 @@ BreaApp >> appName [
|
|||||||
]
|
]
|
||||||
|
|
||||||
{ #category : #accessing }
|
{ #category : #accessing }
|
||||||
BreaApp >> body [
|
BreaApp >> at: key put: anObject [
|
||||||
^ body ifNil: [ body := '' writeStream ]
|
self components at: key put: anObject.
|
||||||
|
]
|
||||||
|
|
||||||
|
{ #category : #accessing }
|
||||||
|
BreaApp >> components [
|
||||||
|
^ componets ifNil: [ componets := OrderedDictionary new]
|
||||||
|
]
|
||||||
|
|
||||||
|
{ #category : #accessing }
|
||||||
|
BreaApp >> componentsWebView [
|
||||||
|
| response |
|
||||||
|
response := '' writeStream.
|
||||||
|
self components ifEmpty: [ ^ response contents ].
|
||||||
|
self components valuesDo: [ :component |
|
||||||
|
response
|
||||||
|
nextPutAll: component webView; cr
|
||||||
|
].
|
||||||
|
^ response contents
|
||||||
|
|
||||||
]
|
]
|
||||||
|
|
||||||
{ #category : #accessing }
|
{ #category : #accessing }
|
||||||
@ -40,7 +58,7 @@ BreaApp >> defaultView [
|
|||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<main class="container">
|
<main class="container">
|
||||||
', self body contents, '
|
', self componentsWebView,'
|
||||||
</main>
|
</main>
|
||||||
</body>
|
</body>
|
||||||
</html>'
|
</html>'
|
||||||
|
6
repository/Brea/String.extension.st
Normal file
6
repository/Brea/String.extension.st
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
Extension { #name : #String }
|
||||||
|
|
||||||
|
{ #category : #'*Brea' }
|
||||||
|
String >> webView [
|
||||||
|
^ Pandoc htmlStringToMarkdown: self
|
||||||
|
]
|
Loading…
Reference in New Issue
Block a user