diff --git a/site/assets/files/1030/fondo-mantenimiento-4.0x260.jpg b/site/assets/files/1030/fondo-mantenimiento-4.0x260.jpg new file mode 100644 index 0000000..32f65d4 Binary files /dev/null and b/site/assets/files/1030/fondo-mantenimiento-4.0x260.jpg differ diff --git a/site/assets/files/1030/fondo-mantenimiento-4.jpg b/site/assets/files/1030/fondo-mantenimiento-4.jpg new file mode 100644 index 0000000..200ffd8 Binary files /dev/null and b/site/assets/files/1030/fondo-mantenimiento-4.jpg differ diff --git a/site/config.php b/site/config.php index 15ce30b..d49fe33 100644 --- a/site/config.php +++ b/site/config.php @@ -82,7 +82,7 @@ $config->tableSalt = '2a93d08392e7e35dc8063cd620e3bcca2e5413a3'; * Installer: File Permission Configuration * */ -$config->chmodDir = '0775'; // permission for directories created by ProcessWire +$config->chmodDir = '2775'; // permission for directories created by ProcessWire $config->chmodFile = '0664'; // permission for files created by ProcessWire /** @@ -124,3 +124,37 @@ $config->httpHosts = array('php.artabro.localhost'); */ $config->debug = false; +/** + * Session name + * + * Default session name as used in session cookie. You may wish to change this if running + * multiple ProcessWire installations on the same server. By giving each installation a unique + * session name, you can stay logged into multiple installations at once. + * + * #notes Note that changing this will automatically logout any current sessions. + * @var string + * + */ +$config->sessionName = 'praiadeseselle'; + +/** + * Prepend template file + * + * PHP file in /site/templates/ that will be loaded before each page's template file. + * + * #notes Example: _init.php + * @var string + * + */ +$config->prependTemplateFile = '_init.php'; + +/** + * Append template file + * + * PHP file in /site/templates/ that will be loaded after each page's template file. + * + * #notes Example: _main.php + * @var string + * + */ +$config->appendTemplateFile = '_main.php'; diff --git a/site/templates/_foot.php b/site/templates/_foot.php new file mode 100644 index 0000000..b317cc2 --- /dev/null +++ b/site/templates/_foot.php @@ -0,0 +1,2 @@ + + \ No newline at end of file diff --git a/site/templates/_func.php b/site/templates/_func.php new file mode 100644 index 0000000..bd56db8 --- /dev/null +++ b/site/templates/_func.php @@ -0,0 +1,115 @@ +configuracion as $config) + { + $configuracion[$config->nome_parametro] = $config->valor_parametro; + } + + return $configuracion; +} + +function getSeccions($seccions, $mantemento = false) +{ + $saida = ''; + + foreach($seccions as $seccion) + { + switch($seccion->template) + { + case 'repeater_seccions': + switch ($seccion->tipo_seccion->value) + { + case 'texto': + $saida .= renderTexto($seccion->artigo); + break; + case 'galeria': + $saida .= renderGaleria($seccion->galeria); + break; + case 'texto_imaxe_lateral': + $saida .= renderTextoImaxe($seccion->artigo, $seccion->imaxe, $seccion->posicion_imaxe->value); + break; + case 'texto_imaxe_superior': + $saida .= getSeccions($seccion->seccion_destacada); + break; + } + break; + + case 'repeater_seccion_destacada': + if($mantemento) + { + $saida .= renderTextoImaxe($seccion->artigo, $seccion->imaxe, 'mantemento'); + } + else + { + $saida .= renderTextoImaxe($seccion->artigo, $seccion->imaxe, 'superior'); + } + break; + } + } + return $saida; +} + +function renderTexto($artigo) +{ + $saida = ''; + + $saida .= '
'; + $saida .= $artigo; + $saida .= '
'; + + return $saida; +} + +function renderGaleria($galeria) +{ + $saida = ''; + + $saida .= '
'; + $saida .= '
'; + foreach($galeria as $imaxen) + { + $saida .= ''; + } + $saida .= '
'; + + return $saida; +} + +function renderTextoImaxe($texto, $imaxe, $posicion) +{ + $saida = ''; + + switch ($posicion) + { + case 'esquerda': + $saida .= '
'; + $saida .= ''; + $saida .= '
' . $texto . '
'; + $saida .= '
'; + break; + case 'dereita': + $saida .= '
'; + $saida .= '
' . $texto . '
'; + $saida .= ''; + $saida .= '
'; + break; + case 'superior': + $saida .= '
'; + $saida .= ''; + $saida .= '
' . $texto . '
'; + $saida .= '
'; + break; + case 'mantemento': + $saida .= '
'; + $saida .= ''; + $saida .= '
' . $texto . '
'; + $saida .= '
'; + break; + } + + return $saida; +} \ No newline at end of file diff --git a/site/templates/_head.php b/site/templates/_head.php new file mode 100644 index 0000000..7144bd3 --- /dev/null +++ b/site/templates/_head.php @@ -0,0 +1,11 @@ + + + + <?php echo $titulo; ?> + + + + + +

+

\ No newline at end of file diff --git a/site/templates/_init.php b/site/templates/_init.php new file mode 100644 index 0000000..62b6bd5 --- /dev/null +++ b/site/templates/_init.php @@ -0,0 +1,7 @@ +get('/'); +$configuracion = getConfig($inicio); +$titulo = $page->title . ' - ' . $configuracion['nome_sitio']; \ No newline at end of file diff --git a/site/templates/_main.php b/site/templates/_main.php new file mode 100644 index 0000000..34f40a8 --- /dev/null +++ b/site/templates/_main.php @@ -0,0 +1,15 @@ + +
+ +editable()): ?> +

Edit

+ +
+ \ No newline at end of file diff --git a/site/templates/css/style.css b/site/templates/css/style.css new file mode 100644 index 0000000..c32c4f8 --- /dev/null +++ b/site/templates/css/style.css @@ -0,0 +1,23 @@ +*, *::before, *::after +{ + box-sizing: border-box; +} + +:root +{ + font-size: 16px; +} + +body +{ + min-height: 100vh; + + margin: 0; + + background-color: #f2f0f1; +} + +img +{ + width: 100%; +} \ No newline at end of file diff --git a/site/templates/home.php b/site/templates/home.php deleted file mode 100644 index 6535e9f..0000000 --- a/site/templates/home.php +++ /dev/null @@ -1,3 +0,0 @@ -mantemento; + +if($mantemento && !$user->isLoggedin()) +{ + $menu = ''; + $contido = ''; + + if(count($inicio->seccion_destacada)) + { + $contido .= getSeccions($inicio->seccion_destacada, true); + } +} +else +{ + $contido = ''; +} \ No newline at end of file diff --git a/site/templates/styles/main.css b/site/templates/styles/main.css deleted file mode 100644 index cda2b07..0000000 --- a/site/templates/styles/main.css +++ /dev/null @@ -1 +0,0 @@ -/* blank */