Commit 2cb4ef5e authored by Pedro Eduardo Trujillo's avatar Pedro Eduardo Trujillo
Browse files

Merge branch 'dev' into 'master'

Recupera definición de variables

See merge request redmic-project/docker/index-pages!4
parents ac373f62 23320b13
Loading
Loading
Loading
Loading
+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
+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"

+0 −0

File moved.

+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);
@@ -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');
@@ -70,7 +70,7 @@ function createTitle(config) {
	parentNode.appendChild(titleNode);
}

function createContent(config) {
function createContent(path, config) {

	createTitle(config);

@@ -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);
	}
+4 −3
Original line number Diff line number Diff line
@@ -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