Reorganizacion de arquivos.
This commit is contained in:
parent
c819c43bce
commit
3c6b5cdd16
8 changed files with 158 additions and 67 deletions
128
site/config-dev.php
Normal file
128
site/config-dev.php
Normal file
|
@ -0,0 +1,128 @@
|
|||
<?php namespace ProcessWire;
|
||||
|
||||
/**
|
||||
* ProcessWire Configuration File
|
||||
*
|
||||
* Site-specific configuration for ProcessWire
|
||||
*
|
||||
* Please see the file /wire/config.php which contains all configuration options you may
|
||||
* specify here. Simply copy any of the configuration options from that file and paste
|
||||
* them into this file in order to modify them.
|
||||
*
|
||||
* SECURITY NOTICE
|
||||
* In non-dedicated environments, you should lock down the permissions of this file so
|
||||
* that it cannot be seen by other users on the system. For more information, please
|
||||
* see the config.php section at: https://processwire.com/docs/security/file-permissions/
|
||||
*
|
||||
* This file is licensed under the MIT license
|
||||
* https://processwire.com/about/license/mit/
|
||||
*
|
||||
* ProcessWire 3.x, Copyright 2023 by Ryan Cramer
|
||||
* https://processwire.com
|
||||
*
|
||||
*/
|
||||
|
||||
if(!defined("PROCESSWIRE")) die();
|
||||
|
||||
/** @var Config $config */
|
||||
|
||||
/*** SITE CONFIG *************************************************************************/
|
||||
|
||||
// Let core API vars also be functions? So you can use $page or page(), for example.
|
||||
$config->useFunctionsAPI = true;
|
||||
|
||||
// Use custom Page classes in /site/classes/ ? (i.e. template "home" => HomePage.php)
|
||||
$config->usePageClasses = true;
|
||||
|
||||
// Use Markup Regions? (https://processwire.com/docs/front-end/output/markup-regions/)
|
||||
$config->useMarkupRegions = true;
|
||||
|
||||
// Prepend this file in /site/templates/ to any rendered template files
|
||||
$config->prependTemplateFile = 'layout/init.php';
|
||||
|
||||
// Append this file in /site/templates/ to any rendered template files
|
||||
$config->appendTemplateFile = 'layout/main.php';
|
||||
|
||||
// Allow template files to be compiled for backwards compatibility?
|
||||
$config->templateCompile = false;
|
||||
|
||||
/*** INSTALLER CONFIG ********************************************************************/
|
||||
/**
|
||||
* Installer: Database Configuration
|
||||
*
|
||||
*/
|
||||
$config->dbHost = 'localhost';
|
||||
$config->dbName = 'db_dev_artabro';
|
||||
$config->dbUser = 'admin_laegnur';
|
||||
$config->dbPass = '3Ru34T3NN010';
|
||||
$config->dbPort = '3306';
|
||||
$config->dbCharset = 'utf8mb4';
|
||||
$config->dbEngine = 'InnoDB';
|
||||
|
||||
/**
|
||||
* Installer: User Authentication Salt
|
||||
*
|
||||
* This value was randomly generated for your system on 2024/08/27.
|
||||
* This should be kept as private as a password and never stored in the database.
|
||||
* Must be retained if you migrate your site from one server to another.
|
||||
* Do not change this value, or user passwords will no longer work.
|
||||
*
|
||||
*/
|
||||
$config->userAuthSalt = 'b9a3d034ad1cb8ec63da2aa0bf1943f16ca13a86';
|
||||
|
||||
/**
|
||||
* Installer: Table Salt (General Purpose)
|
||||
*
|
||||
* Use this rather than userAuthSalt when a hashing salt is needed for non user
|
||||
* authentication purposes. Like with userAuthSalt, you should never change
|
||||
* this value or it may break internal system comparisons that use it.
|
||||
*
|
||||
*/
|
||||
$config->tableSalt = '56b10609254338feaeb627452cc95a2a08cfcded';
|
||||
|
||||
/**
|
||||
* Installer: File Permission Configuration
|
||||
*
|
||||
*/
|
||||
$config->chmodDir = '2770'; // permission for directories created by ProcessWire
|
||||
$config->chmodFile = '0660'; // permission for files created by ProcessWire
|
||||
|
||||
/**
|
||||
* Installer: Time zone setting
|
||||
*
|
||||
*/
|
||||
$config->timezone = 'Europe/Madrid';
|
||||
|
||||
/**
|
||||
* Installer: Admin theme
|
||||
*
|
||||
*/
|
||||
$config->defaultAdminTheme = 'AdminThemeUikit';
|
||||
|
||||
/**
|
||||
* Installer: Unix timestamp of date/time installed
|
||||
*
|
||||
* This is used to detect which when certain behaviors must be backwards compatible.
|
||||
* Please leave this value as-is.
|
||||
*
|
||||
*/
|
||||
$config->installed = 1724750493;
|
||||
|
||||
|
||||
/**
|
||||
* Installer: HTTP Hosts Whitelist
|
||||
*
|
||||
*/
|
||||
$config->httpHosts = array('artabro.localhost', 'www.artabro.localhost');
|
||||
|
||||
|
||||
/**
|
||||
* Installer: Debug mode?
|
||||
*
|
||||
* When debug mode is true, errors and exceptions are visible.
|
||||
* When false, they are not visible except to superuser and in logs.
|
||||
* Should be true for development sites and false for live/production sites.
|
||||
*
|
||||
*/
|
||||
$config->debug = true;
|
||||
|
|
@ -52,9 +52,9 @@ $config->templateCompile = false;
|
|||
*
|
||||
*/
|
||||
$config->dbHost = 'localhost';
|
||||
$config->dbName = 'db_dev_artabro';
|
||||
$config->dbUser = 'admin_laegnur';
|
||||
$config->dbPass = '3Ru34T3NN010';
|
||||
$config->dbName = '';
|
||||
$config->dbUser = '';
|
||||
$config->dbPass = '';
|
||||
$config->dbPort = '3306';
|
||||
$config->dbCharset = 'utf8mb4';
|
||||
$config->dbEngine = 'InnoDB';
|
||||
|
@ -84,7 +84,7 @@ $config->tableSalt = '56b10609254338feaeb627452cc95a2a08cfcded';
|
|||
* Installer: File Permission Configuration
|
||||
*
|
||||
*/
|
||||
$config->chmodDir = '0770'; // permission for directories created by ProcessWire
|
||||
$config->chmodDir = '2770'; // permission for directories created by ProcessWire
|
||||
$config->chmodFile = '0660'; // permission for files created by ProcessWire
|
||||
|
||||
/**
|
||||
|
@ -113,7 +113,7 @@ $config->installed = 1724750493;
|
|||
* Installer: HTTP Hosts Whitelist
|
||||
*
|
||||
*/
|
||||
$config->httpHosts = array('artabro.localhost', 'www.artabro.localhost');
|
||||
$config->httpHosts = array('artabro.org', 'www.artabro.org');
|
||||
|
||||
|
||||
/**
|
||||
|
@ -124,5 +124,5 @@ $config->httpHosts = array('artabro.localhost', 'www.artabro.localhost');
|
|||
* Should be true for development sites and false for live/production sites.
|
||||
*
|
||||
*/
|
||||
$config->debug = true;
|
||||
$config->debug = false;
|
||||
|
||||
|
|
|
@ -1,6 +0,0 @@
|
|||
<?php namespace ProcessWire;
|
||||
|
||||
// Optional initialization file, called before rendering any template file.
|
||||
// This is defined by $config->prependTemplateFile in /site/config.php.
|
||||
// Use this to define shared variables, functions, classes, includes, etc.
|
||||
|
|
@ -1,55 +0,0 @@
|
|||
<?php namespace ProcessWire;
|
||||
|
||||
// Optional main output file, called after rendering page’s template file.
|
||||
// This is defined by $config->appendTemplateFile in /site/config.php, and
|
||||
// is typically used to define and output markup common among most pages.
|
||||
//
|
||||
// When the Markup Regions feature is used, template files can prepend, append,
|
||||
// replace or delete any element defined here that has an "id" attribute.
|
||||
// https://processwire.com/docs/front-end/output/markup-regions/
|
||||
|
||||
/** @var Page $page */
|
||||
/** @var Pages $pages */
|
||||
/** @var Config $config */
|
||||
|
||||
$home = $pages->get('/'); /** @var HomePage $home */
|
||||
|
||||
?><!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head id="html-head">
|
||||
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
|
||||
<title><?php echo $page->title; ?></title>
|
||||
<link rel="stylesheet" type="text/css" href="<?php echo $config->urls->templates; ?>styles/main.css" />
|
||||
<script src="<?php echo $config->urls->templates; ?>scripts/main.js"></script>
|
||||
</head>
|
||||
<body id="html-body">
|
||||
|
||||
<p id="topnav">
|
||||
<?php echo $home->and($home->children)->implode(" / ", "<a href='{url}'>{title}</a>"); ?>
|
||||
</p>
|
||||
|
||||
<hr />
|
||||
|
||||
<h1 id="headline">
|
||||
<?php if($page->parents->count()): // breadcrumbs ?>
|
||||
<?php echo $page->parents->implode(" > ", "<a href='{url}'>{title}</a>"); ?> >
|
||||
<?php endif; ?>
|
||||
<?php echo $page->title; // headline ?>
|
||||
</h1>
|
||||
|
||||
<div id="content">
|
||||
Default content
|
||||
</div>
|
||||
|
||||
<?php if($page->hasChildren): ?>
|
||||
<ul>
|
||||
<?php echo $page->children->each("<li><a href='{url}'>{title}</a></li>"); // subnav ?>
|
||||
</ul>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if($page->editable()): ?>
|
||||
<p><a href='<?php echo $page->editUrl(); ?>'>Edit this page</a></p>
|
||||
<?php endif; ?>
|
||||
|
||||
</body>
|
||||
</html>
|
3
site/templates/layout/init.php
Normal file
3
site/templates/layout/init.php
Normal file
|
@ -0,0 +1,3 @@
|
|||
<?php namespace ProcessWire;
|
||||
|
||||
$inicio = $pages->get('/'); /** @var HomePage $inicio */
|
21
site/templates/layout/main.php
Normal file
21
site/templates/layout/main.php
Normal file
|
@ -0,0 +1,21 @@
|
|||
<?php namespace ProcessWire;
|
||||
|
||||
/** @var Page $page */
|
||||
/** @var Pages $pages */
|
||||
/** @var Config $config */
|
||||
|
||||
?><!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title><?php echo $page->title; ?></title>
|
||||
<link rel="stylesheet" type="text/css" href="<?php echo $config->urls->templates; ?>css/main.css" />
|
||||
</head>
|
||||
<body>
|
||||
<?php if($page->editable()): ?>
|
||||
<p><a href='<?php echo $page->editUrl(); ?>'>Edit this page</a></p>
|
||||
<?php endif; ?>
|
||||
<script src="<?php echo $config->urls->templates; ?>js/main.js"></script>
|
||||
</body>
|
||||
</html>
|
Loading…
Reference in a new issue