code: def _draw_banner(self):
          
          n_rows, n_cols = self.term.stdscr.getmaxyx()
          window = self.term.stdscr.derwin(1, n_cols, self._row, 0)
          window.erase()
          window.bkgd(str(' '), self.term.attr('OrderBar'))
  
          banner = docs.BANNER_SEARCH if self.content.query else self.BANNER
          items = banner.strip().split(' ')
  
          distance = (n_cols - sum(len(t) for t in items) - 1) / (len(items) - 1)
          spacing = max(1, int(distance)) * ' '
          text = spacing.join(items)
          self.term.add_line(window, text, 0, 0)
          if self.content.order is not None:
              order = self.content.order.split('-')[0]
              col = text.find(order) - 3
              attr = self.term.attr('OrderBarHighlight')
              window.chgat(0, col, 3, attr)
  
          self._row += 1
docs: Draw the banner with sorting options at the top of the page