kororaproject / website

All things website for the Korora Project
https://kororaproject.org
GNU Affero General Public License v3.0
7 stars 9 forks source link

For code, include line numbers #28

Closed csmart closed 4 years ago

csmart commented 10 years ago

To prevent issues on small screens where a single command inside a code tag wraps and looks like two separate commands, could we use something like line numbers to show that it's only one command, but when the user highlights it only copies the command?

Something like:

  1. sudo /usr/sbin/alternatives --install /usr/bin/javac javac /usr/java/latest/bin/javac 20000
  2. sudo /usr/sbin/alternatives --config javac
dyoungwd commented 7 years ago

Basically all is required is to add an ordered list tags between the pre and code tags, changing the html to

<pre> <ol> <li><code class="language-bash"> sudo /usr/sbin/alternatives --install /usr/bin/javac javac /usr/java/latest/bin/javac 20000 </code></li>

<li><code class="language-bash"> sudo /usr/sbin/alternatives --config javac</code></li> </ol> </pre>

`

  1. sudo /usr/sbin/alternatives --install /usr/bin/javac javac /usr/java/latest/bin/javac 20000
  2. sudo /usr/sbin/alternatives --config javac

`