Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions public/js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,9 @@ function renderMatches(matches) {
const list = document.getElementById('result-list');
list.innerHTML = '';

// For every match found, render the objects to the DOM in JSON format
if (matches.length > 0) {
// If matches exist, render each match to the DOM
if(matches.length) {
// For every match found, render the objects to the DOM in JSON format
matches.forEach(match => {
const li = document.createElement('li');

Expand All @@ -68,8 +69,9 @@ function renderMatches(matches) {
list.appendChild(li);
});
} else {
// Display "No matches were found" in result-list <ul> in the DOM
const li = document.createElement('li');
li.innerText = 'No matches were found.';
list.appendChild(li);
}
}
}
10 changes: 10 additions & 0 deletions resources.js
Original file line number Diff line number Diff line change
Expand Up @@ -285,6 +285,16 @@ const resources = [
url: 'https://htmlcheatsheet.com/seo/',
keywords: ['SEO', 'cheat sheet']
},
{
name: 'SEO Guide to Lighthouse Performance Metrics',
url: 'https://www.searchenginejournal.com/core-web-vitals/technical-seo-lighthouse/',
keywords: ['SEO', 'lighthouse', 'performance', 'metrics']
},
{
name: 'Centering in CSS',
url: 'https://ishadeed.com/article/learn-css-centering/#:~:text=To%20center%20an%20inline%20element,is%20text%2Dalign%3A%20center%20.&text=For%20multiple%20inline%20elements%2C%20the,using%20text%2Dalign%3A%20center%20',
keywords: ['CSS', 'center', 'align']
},
// Resource Format - please follow the styling below.
// {
// name: '',
Expand Down