extends layout

block content
  .container
    include ./includes/searchbar.jade
  #query_info
    #result_head
      h3 Results
    #query_head
      p
       | Your query: 
       em= query

  if results.length == 0
    .container
      p No results. Please try again!
  else 
    each result in results
      .container
        .result
          .excerpt
            ul.default
              each highlighted in result.highlight.content
                li!= highlighted.replace(/(\r\n|\n|\r)/gm,"")
          .source 
            strong= result.fields.title
            br
            a(href=result.fields.original_source_url) Source
  #pagination_container
    .pagination
      ul
        if currentPage > 1
          li.page-prev
            a(href='/search?q=' + query + '&page=' + (currentPage - 1)) Prev
        li
          ul
            - var i = 1
            while i <= pages + 1
              li
                if i == currentPage
                  a.current-page(href='/search?q=' + query + '&page=' + i)= i++
                else
                  a(href='/search?q=' + query + '&page=' + i)= i++
        if currentPage < pages
          li.page-next
            a(href='/search?q=' + query + '&page=' + (currentPage + 1)) Next


extends layout

block content
  .container
    include ./includes/searchbar.jade
  #query_info
    #result_head
      h3 Results
    #query_head
      p
       | Your query: 
       em= query

  if results.length == 0
    .container
      p No results. Please try again!
  else 
    each result in results
      .container
        .result
          .excerpt
            ul.default
              each highlighted in result.highlight.content
                li!= highlighted.replace(/(\r\n|\n|\r)/gm,"")
          .source 
            strong= result.fields.title
            br
            a(href='#') View Full Text
            br
            a(href=result.fields.original_source_url) Source
  #pagination_container
    .pagination
      ul
        if currentPage > 1
          li.page-prev
            a(href='/search?q=' + query + '&page=' + (currentPage - 1)) Prev
        li
          ul
            - var i = 1
            while i <= pages + 1
              li
                if i == currentPage
                  a.current-page(href='/search?q=' + query + '&page=' + i)= i++
                else
                  a(href='/search?q=' + query + '&page=' + i)= i++
        if currentPage < pages
          li.page-next
            a(href='/search?q=' + query + '&page=' + (currentPage + 1)) Next


Add empty 'View Full Text' link.
Add empty 'View Full Text' link.
