mirror of
https://github.com/markqvist/NomadNet.git
synced 2026-11-30 20:06:34 -05:00
Images guide entry stub
This commit is contained in:
parent
7bd3a3a888
commit
ff73e32502
1 changed files with 27 additions and 0 deletions
|
|
@ -91,6 +91,7 @@ class GuideColumns(urwid.Columns):
|
||||||
class GuideLinkDelegate:
|
class GuideLinkDelegate:
|
||||||
def __init__(self, app, reader=None):
|
def __init__(self, app, reader=None):
|
||||||
self.app = app
|
self.app = app
|
||||||
|
self.g = app.ui.glyphs
|
||||||
self.reader = reader
|
self.reader = reader
|
||||||
self.last_keypress = 0
|
self.last_keypress = 0
|
||||||
|
|
||||||
|
|
@ -100,6 +101,17 @@ class GuideLinkDelegate:
|
||||||
def micron_released_focus(self):
|
def micron_released_focus(self):
|
||||||
self.reader.focus_topics()
|
self.reader.focus_topics()
|
||||||
|
|
||||||
|
def resolve_image(self, url):
|
||||||
|
RNS.log(f"RESOLVE {url}")
|
||||||
|
if url.endswith("demo.webp"):
|
||||||
|
import os
|
||||||
|
import nomadnet.ui.textui.images as images_module
|
||||||
|
path = f"{os.path.dirname(images_module.__file__)}/demo.webp"
|
||||||
|
RNS.log(path)
|
||||||
|
return path
|
||||||
|
|
||||||
|
return None
|
||||||
|
|
||||||
def handle_link(self, target, fields=None):
|
def handle_link(self, target, fields=None):
|
||||||
if not target:
|
if not target:
|
||||||
return
|
return
|
||||||
|
|
@ -1450,6 +1462,7 @@ With micron you can easily create structured documents and pages with formatting
|
||||||
`F79d`_`[Links`#links]`_`f
|
`F79d`_`[Links`#links]`_`f
|
||||||
`F79d`_`[Anchors`#anchors]`_`f
|
`F79d`_`[Anchors`#anchors]`_`f
|
||||||
`F79d`_`[Tables`#tables]`_`f
|
`F79d`_`[Tables`#tables]`_`f
|
||||||
|
`F79d`_`[Images`#images]`_`f
|
||||||
`F79d`_`[Fields & Requests`#fields-requests]`_`f
|
`F79d`_`[Fields & Requests`#fields-requests]`_`f
|
||||||
`F79d`_`[Comments`#comments]`_`f
|
`F79d`_`[Comments`#comments]`_`f
|
||||||
`F79d`_`[Partials`#partials]`_`f
|
`F79d`_`[Partials`#partials]`_`f
|
||||||
|
|
@ -1776,6 +1789,20 @@ The above markup produces the following table:
|
||||||
| Orange | Ask, nicely | 3 |
|
| Orange | Ask, nicely | 3 |
|
||||||
`t
|
`t
|
||||||
|
|
||||||
|
>Images
|
||||||
|
|
||||||
|
You can include images.
|
||||||
|
|
||||||
|
`Faaa
|
||||||
|
`=
|
||||||
|
`(The RNS logo`w=60%`a=center`:/media/demo.webp)
|
||||||
|
`=
|
||||||
|
``
|
||||||
|
|
||||||
|
If your terminal supports image rendering, the image will be displayed as specified. If not, a text placeholder is shown instead:
|
||||||
|
|
||||||
|
`(The RNS logo`w=60%`a=center`:/media/demo.webp)
|
||||||
|
|
||||||
>Fields & Requests
|
>Fields & Requests
|
||||||
|
|
||||||
Nomad Network lets you use simple input fields for submitting data to node-side applications. Submitted data, along with other session variables will be available to the node-side script / program as environment variables.
|
Nomad Network lets you use simple input fields for submitting data to node-side applications. Submitted data, along with other session variables will be available to the node-side script / program as environment variables.
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue