diff --git a/static/index.css b/static/index.css index 62b9abd..5fa4635 100644 --- a/static/index.css +++ b/static/index.css @@ -4,6 +4,17 @@ p { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; + margin: 3px; +} + +div { + margin-top: 30px; + margin-bottom: 30px; +} + +.url { + margin-top: 0px; + font-size: 20px; } #container { diff --git a/static/index.js b/static/index.js index 4d78247..99c162f 100644 --- a/static/index.js +++ b/static/index.js @@ -33,23 +33,32 @@ function clearResults() { function addResult(title, extract, url) { const par = document.createElement("p"); - const link = document.createElement("a"); const titleText = createBoldedSpan(title); titleText.classList.add('title'); const extractText = createBoldedSpan(extract); extractText.classList.add('extract'); - link.appendChild(titleText); + par.appendChild(titleText); separator = document.createTextNode(' - ') - link.appendChild(separator); + par.appendChild(separator); - link.appendChild(extractText); + par.appendChild(extractText); + + const div = document.createElement("div"); + + const urlPar = document.createElement("p"); + const urlText = document.createTextNode(url); + urlPar.appendChild(urlText); + urlPar.classList.add('url'); + div.appendChild(urlPar); + div.appendChild(par); + + const link = document.createElement("a"); + link.appendChild(div); link.href = url; - par.appendChild(link); - const results = document.getElementById('results'); - results.appendChild(par); + results.appendChild(link); } function createBoldedSpan(title) {