Loading .dockerignore +5 −5 Original line number Diff line number Diff line .* node_modules Dockerfile package-lock.json README.md * !app !views !package.json !package-lock.json Dockerfile +2 −3 Original line number Diff line number Diff line FROM node:alpine FROM node:11-alpine LABEL maintainer="info@redmic.es" ENV \ DIRPATH="/opt/redmic" \ ENV DIRPATH="/index-pages" \ SITE_PORT="3000" \ SITE_PATH="content" Loading index.css→views/index.css +0 −0 File moved. View file index.js→views/index.js +6 −6 Original line number Diff line number Diff line function createItemTitle(config, item) { function createItemTitle(path, config, item) { var node = document.createElement('div'), img = document.createElement('img'), imgPath = config.resourcesPath + item.img; imgPath = path + '/' + config.resourcesPath + '/' + item.img; node.setAttribute('class', 'box-title'); img.setAttribute('src', imgPath); Loading Loading @@ -43,10 +43,10 @@ function getItemHref(config, item) { return href; } function createItemBox(config, item) { function createItemBox(path, config, item) { var boxNode = document.createElement('a'), titleNode = createItemTitle(config, item), titleNode = createItemTitle(path, config, item), contentNode = createItemContent(item); boxNode.setAttribute('class', 'box'); Loading @@ -70,7 +70,7 @@ function createTitle(config) { parentNode.appendChild(titleNode); } function createContent(config) { function createContent(path, config) { createTitle(config); Loading @@ -79,7 +79,7 @@ function createContent(config) { for (var i = 0; i < items.length; i++) { var item = items[i], itemBox = createItemBox(config, item); itemBox = createItemBox(path, config, item); boxContainerNode.appendChild(itemBox); } Loading views/index.pug +4 −3 Original line number Diff line number Diff line Loading @@ -5,14 +5,15 @@ html meta(charset = 'utf-8') meta(name = 'viewport' content = 'width = device-width, initial-scale = 1') link(rel='icon' href='/' + path + '/favicon.ico' sizes='16x16 32x32 48x48' type='image/x-icon') style include ../index.css include ./index.css script include ../index.js include ./index.js script(src='/' + path + '/config.js') body(onload='createContent(config)') body(onload='createContent("' + path + '", config)') .page-title#title .box-container#boxContainer Loading
.dockerignore +5 −5 Original line number Diff line number Diff line .* node_modules Dockerfile package-lock.json README.md * !app !views !package.json !package-lock.json
Dockerfile +2 −3 Original line number Diff line number Diff line FROM node:alpine FROM node:11-alpine LABEL maintainer="info@redmic.es" ENV \ DIRPATH="/opt/redmic" \ ENV DIRPATH="/index-pages" \ SITE_PORT="3000" \ SITE_PATH="content" Loading
index.js→views/index.js +6 −6 Original line number Diff line number Diff line function createItemTitle(config, item) { function createItemTitle(path, config, item) { var node = document.createElement('div'), img = document.createElement('img'), imgPath = config.resourcesPath + item.img; imgPath = path + '/' + config.resourcesPath + '/' + item.img; node.setAttribute('class', 'box-title'); img.setAttribute('src', imgPath); Loading Loading @@ -43,10 +43,10 @@ function getItemHref(config, item) { return href; } function createItemBox(config, item) { function createItemBox(path, config, item) { var boxNode = document.createElement('a'), titleNode = createItemTitle(config, item), titleNode = createItemTitle(path, config, item), contentNode = createItemContent(item); boxNode.setAttribute('class', 'box'); Loading @@ -70,7 +70,7 @@ function createTitle(config) { parentNode.appendChild(titleNode); } function createContent(config) { function createContent(path, config) { createTitle(config); Loading @@ -79,7 +79,7 @@ function createContent(config) { for (var i = 0; i < items.length; i++) { var item = items[i], itemBox = createItemBox(config, item); itemBox = createItemBox(path, config, item); boxContainerNode.appendChild(itemBox); } Loading
views/index.pug +4 −3 Original line number Diff line number Diff line Loading @@ -5,14 +5,15 @@ html meta(charset = 'utf-8') meta(name = 'viewport' content = 'width = device-width, initial-scale = 1') link(rel='icon' href='/' + path + '/favicon.ico' sizes='16x16 32x32 48x48' type='image/x-icon') style include ../index.css include ./index.css script include ../index.js include ./index.js script(src='/' + path + '/config.js') body(onload='createContent(config)') body(onload='createContent("' + path + '", config)') .page-title#title .box-container#boxContainer