Source Code
When inserting source code in an article on Kompulsa, place it inside a standard pre tag.
For example, the following code
<pre> int main(void) { printf"Hello world" } </pre>
would yield this result:
int main(void) { printf"Hello world" }
Console
For console/terminal commands and any console output, use the “kmconsole” class in your ‘Pre’ tag as shown below.
<pre class="kmconsole"> gcc hello.c Hello world </pre>
That will yield the following result:
gcc hello.c Hello world
Swap out “kmconsole” for “kmconsole_orange” if you’d rather use an orange console:
gcc hello.c Hello world
Buttons
To create a button, you can use the button class “material”. For example:
<button class="material"> My Button </button>
Resulting in a flat button that somewhat resembles Material design button recommendations.
You must log in to post a comment.