Mastodon
Zuletzt aktualisiert am

Tinkering with Publii () Number 1: Terminal

Publii is an early project, but susceptable to creativity. Today we show how to cobble yourself a beautiful terminal box with promt, Enter key and scrollbar.

Who writes about Linux knows: every now and then you have to confront your readers with a terminal command. In order to beautifully illustrate it and differentiate it from other inputs, today we cobble ourselves a fancy terminal box. Ingredients: A table with border and background, an emoticon and some text.

Step 1: The table

We create a table with just one line and one column.
For this purpose, we click in the Wysiwyg editor on the arrow next to the table symbol, hover with the mouse over the entry Table und choose a single field in the appearing table matrix.

The created table looks like this:

 

Now we click in the table und choose Table Properties from the table popup. There we choose the following settings:
In the General tab:
Border with: 2
In the Advanced tab:
Border style: Solid
Border color: as you wish, we recommend usage of your accent color (here: blue).
Background color: as you wish, we recommend black as that's the typical terminal color. 

 

The table now looks like this.

Step 2: Text, Emoticon und Spaces

Now we add the text for the prompt (here: [s3n·net ~] $) and the command to show (here: yay -S bauh). For this purpose we choose Bold Dark Grey which nicely fits our black background. For the finish we add - seperated by a few spaces - an emoticon via the emoticon picker as an enter key: In the emoticon picker's search box type arrow and choose leftwards arrow with hook. After that, fill the line up with spaces until the box has two lines. That will add a scroll bar to our terminal box, which only appears in case the text is too long for a single line.

[s3n·net ~] $ yay -S bauh   ↩️                                                                                                                        

Done! Our terminal box now has two lines and appears in the browser as a single-line terminal box with a scroll bar.

 

Comments