eleventy-homepage/_src/theming.md

2.8 KiB

eleventyNavigation title layout
key order
Theming 99999999
Theming base

The backend for this site is 11ty (Eleventy)

The layout of this site is a basic 2 column layout, adapted from W3Schools.

The color scheme for both the site and code blocks is Dracula. Since there is only one Cyan and one Purple, I decided to make unvisited links Green, visited links Orange and Links that are being hovered on Yellow.

For fonts, I use Fira Sans for everything except headings, which use Open Sans. Both are available on Google Fonts.

The navigation I stole from this blog and adapted it to my needs. I am working on making the current page expanded if there are subpages but it doesn't want to work.

Also, the footer not being at the bottom for short pages is annoying but I don't know how to fix it.


See all elements below:


Bold Text, Italics text (asterisks), italics text (underscores), strikethrough text


Unordered list

  • unordered list item 1
    • list item 1.1
    • list item 1.2
    • list item 1.3
  • unordered list item 2
  • unordered list item 3
    • list item 3.1
  • unordered list item 4

Ordered list

  1. first item
  2. second item

Mixed list

  1. First
    • Bullet 1
    • Bullet 2
  2. Second
  3. Third
    • Bullet 1
    • Bullet 2
      • Bullet 2.1
      • Bullet 2.2
  4. Fourth

Heading 1

Heading 2

Heading 3

Heading 4

Heading 5
Heading 6

Quotes

quote level 1

Nested quotes

quote level 1 next line

quote level 2 next line

quote level 3 next line next next line


PowerShell code

Connect-VIServer
$vms = Get-VM
ForEach ($vm in $vms) {
  Write-Output $vm.Name
}

Bash code

function log() {

  # logs strings to both the terminal and a file
  # usage: log { 1 | 2 | 3 } 'String'
  #   1 => INFORMATION
  #   2 => ERROR
  #   3 => DEBUG

  if [ "$LOGFILE" = "" ]; then
    LOGFILE=/dev/null
  fi
  if [ "$NORMAL" = "" ]; then
    NORMAL='\e[0m'
  fi
  if [ "$PURPLE" = "" ]; then
    PURPLE='\e[35m'
  fi
  if [ "$CYAN" = "" ]; then
    CYAN='\e[36m'
  fi

  case $1 in
    1)
      msg_type="INFORMATION"
      ;;
    
    2)
      msg_type="ERROR"
      ;;

    3)
      msg_type="DEBUG"
      ;;
    
    *)
      echo "Wrong input; exiting"
      exit 1
  esac

  msg="[${PURPLE}$(date -Ins)${NORMAL}] [${CYAN}${msg_type}${NORMAL}]:  $2"
  # tee command from <https://unix.stackexchange.com/questions/694671/leave-color-in-stdout-but-remove-from-tee>
  # (omits coloring in logfile)
  echo -e "${msg}" | tee >(sed $'s/\033[[][^A-Za-z]*[A-Za-z]//g' >> ${LOGFILE})
}

inline code