Moving metadata image handling to MiniDocs.
This commit is contained in:
parent
5d5299e84e
commit
4bb79f6de0
@ -13,36 +13,3 @@ LePictureSnippet >> centeredFigure [
|
|||||||
</figure>
|
</figure>
|
||||||
</center>'
|
</center>'
|
||||||
]
|
]
|
||||||
|
|
||||||
{ #category : #'*Grafoscopio-Utils-Core' }
|
|
||||||
LePictureSnippet >> contentFrom: markdeepDiv [
|
|
||||||
| caption width |
|
|
||||||
caption := markdeepDiv contentString.
|
|
||||||
width := (markdeepDiv // 'img' @ 'width') stringValue.
|
|
||||||
self
|
|
||||||
optionAt: 'caption' put: caption;
|
|
||||||
optionAt: 'width' put: width.
|
|
||||||
self urlString: (markdeepDiv // 'img' @ 'src') stringValue.
|
|
||||||
]
|
|
||||||
|
|
||||||
{ #category : #'*Grafoscopio-Utils-Core' }
|
|
||||||
LePictureSnippet >> metadata [
|
|
||||||
^ self optionAt: 'metadata' ifAbsentPut: [ self metadataInit ]
|
|
||||||
]
|
|
||||||
|
|
||||||
{ #category : #'*Grafoscopio-Utils-Core' }
|
|
||||||
LePictureSnippet >> metadataInit [
|
|
||||||
| surrogate |
|
|
||||||
self parent
|
|
||||||
ifNil: [ surrogate := nil]
|
|
||||||
ifNotNil: [ surrogate := self parent uidString ].
|
|
||||||
^ OrderedDictionary new
|
|
||||||
at: 'id' put: self uidString;
|
|
||||||
at: 'parent' put: surrogate;
|
|
||||||
at: 'url' put: self contentAsString;
|
|
||||||
at: 'created' put: self createTime asString;
|
|
||||||
at: 'modified' put: self latestEditTime asString;
|
|
||||||
at: 'creator' put: self createEmail asString;
|
|
||||||
at: 'modifier' put: self editEmail asString;
|
|
||||||
yourself
|
|
||||||
]
|
|
||||||
|
Loading…
Reference in New Issue
Block a user