{"size": 2317, "ext": "js", "max_stars_repo_path": "src/modules/home.js", "max_stars_repo_name": "eapenzacharias/Restaurant-Theme", "max_stars_repo_stars_event_min_datetime": "2020-02-20T02:31:19.000Z", "max_stars_repo_stars_event_max_datetime": "2021-11-25T20:58:50.000Z", "max_issues_repo_path": "src/modules/home.js", "max_issues_repo_name": "eapenzacharias/Restaurant-Theme", "max_issues_repo_issues_event_min_datetime": "2020-02-20T01:04:37.000Z", "max_issues_repo_issues_event_max_datetime": "2020-02-29T16:02:59.000Z", "max_forks_repo_path": "src/modules/home.js", "max_forks_repo_name": "eapenzacharias/Restaurant-Theme", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": 6, "max_issues_count": 3, "max_forks_count": null, "avg_line_length": 47.2857142857, "max_line_length": 564, "alphanum_fraction": 0.7246439361}
import setPage from './setpage';

function largeOne() {
  const colLargeOne = document.createElement('div');
  colLargeOne.setAttribute('class', 'col col-12 col-lg-6 large-box');
  colLargeOne.style.backgroundImage = "url('./img/about.jpg')";

  const head = document.createElement('h1');
  head.innerHTML = 'Forkful';
  const about = document.createElement('p');
  about.innerHTML = 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse lobortis leo eget risus ultrices, nec euismod dui dapibus. Pellentesque eu nisl at ipsum sollicitudin suscipit.</br>Nullam ante urna, luctus non urna dapibus, commodo laoreet urna.</br></br>Duis id nisi sed lectus tempor euismod non sed magna. Sed gravida est et nisi rutrum mollis. Donec sit amet nunc nunc. Praesent ut vestibulum justo, vitae rhoncus odio.  Pellentesque eu nisl at ipsum sollicitudin suscipit.</br></br>Maecenas vestibulum erat non dui vulputate auctor.';
  const image = new Image(236, 101);
  image.src = './img/sign.png';
  colLargeOne.appendChild(head);
  colLargeOne.appendChild(about);
  colLargeOne.appendChild(image);
  return colLargeOne;
}

function makeSmCol(bgUrl, hText, dHTML) {
  const colSm = document.createElement('div');
  colSm.setAttribute('class', 'col col-12 small-box');
  colSm.style.backgroundImage = `url('${bgUrl}')`;
  const head = document.createElement('h2');
  head.innerText = hText;
  const desc = document.createElement('p');
  desc.innerHTML = `${dHTML}`;
  colSm.appendChild(head);
  colSm.appendChild(desc);
  return colSm;
}

function home() {
  const container = setPage('home-link');
  container.setAttribute('class', 'container-fluid');
  const mainRow = document.createElement('div');
  mainRow.setAttribute('class', 'row home');

  const colLargeTwo = document.createElement('div');
  colLargeTwo.setAttribute('class', 'col col-12 col-lg-6');

  mainRow.appendChild(largeOne());
  colLargeTwo.appendChild(makeSmCol('./img/cusine.jpg', 'Cusine', '<ul><li>Italian</li><li>Chinese</li><li>French</li><li>Mexican</li></ul>'));
  colLargeTwo.appendChild(makeSmCol('./img/hours.jpg', 'Open Hours', '<ul><li>Mon - Fri  11.00AM to 11.00PM</li><li>Sat  3.00PM to 12.00PM</li><li>Sun  3.00PM to 10.00PM</li></ul>'));
  mainRow.appendChild(colLargeTwo);
  container.appendChild(mainRow);
}

export default home;