Файл: Разработка структуры и функционала интернет-представительства компании АО IT-Технологии (Требования к дизайну сайта).pdf

ВУЗ: Не указан

Категория: Не указан

Дисциплина: Не указана

Добавлен: 12.02.2024

Просмотров: 49

Скачиваний: 0

ВНИМАНИЕ! Если данный файл нарушает Ваши авторские права, то обязательно сообщите нам.

}

a {

color: ' . $this->params->get('templateColor') . ';

}

.nav-list > .active > a,

.nav-list > .active > a:hover,

.dropdown-menu li > a:hover,

.dropdown-menu .active > a,

.dropdown-menu .active > a:hover,

.nav-pills > .active > a,

.nav-pills > .active > a:hover,

.btn-primary {

background: ' . $this->params->get('templateColor') . ';

}');

}

// Check for a custom CSS file

JHtml::_('stylesheet', 'user.css', array('version' => 'auto', 'relative' => true));

// Check for a custom js file

JHtml::_('script', 'user.js', array('version' => 'auto', 'relative' => true));

// Load optional RTL Bootstrap CSS

JHtml::_('bootstrap.loadCss', false, $this->direction);

// Adjusting content width

$position7ModuleCount = $this->countModules('position-7');

$position8ModuleCount = $this->countModules('position-8');

if ($position7ModuleCount && $position8ModuleCount)

{

$span = 'span6';

}

elseif ($position7ModuleCount && !$position8ModuleCount)

{

$span = 'span9';

}

elseif (!$position7ModuleCount && $position8ModuleCount)

{

$span = 'span9';

}

else

{

$span = 'span12';

}

// Logo file or site title param

if ($this->params->get('logoFile'))

{

$logo = '<img src="' . JUri::root() . $this->params->get('logoFile') . '" alt="' . $sitename . '" />';

}

elseif ($this->params->get('sitetitle'))

{

$logo = '<span class="site-title" title="' . $sitename . '">' . htmlspecialchars($this->params->get('sitetitle'), ENT_COMPAT, 'UTF-8') . '</span>';

}

else

{

$logo = '<span class="site-title" title="' . $sitename . '">' . $sitename . '</span>';

}

?>

<!DOCTYPE html>

<html lang="<?php echo $this->language; ?>" dir="<?php echo $this->direction; ?>">

<head>

<meta name="viewport" content="width=device-width, initial-scale=1.0" />

<jdoc:include type="head" />

</head>

<body class="site <?php echo $option

. ' view-' . $view

. ($layout ? ' layout-' . $layout : ' no-layout')

. ($task ? ' task-' . $task : ' no-task')

. ($itemid ? ' itemid-' . $itemid : '')

. ($params->get('fluidContainer') ? ' fluid' : '');

echo ($this->direction === 'rtl' ? ' rtl' : '');

?>">

<!-- Body -->

<div class="body" id="top">

<div class="container<?php echo ($params->get('fluidContainer') ? '-fluid' : ''); ?>">

<!-- Header -->

<header class="header" role="banner">

<div class="header-inner clearfix">

<a class="brand pull-left" href="<?php echo $this->baseurl; ?>/">

<?php echo $logo; ?>

<?php if ($this->params->get('sitedescription')) : ?>

<?php echo '<div class="site-description">' . htmlspecialchars($this->params->get('sitedescription'), ENT_COMPAT, 'UTF-8') . '</div>'; ?>

<?php endif; ?>

</a>

<div class="header-search pull-right">

<jdoc:include type="modules" name="position-0" style="none" />

</div>

</div>

</header>

<?php if ($this->countModules('position-1')) : ?>

<nav class="navigation" role="navigation">

<div class="navbar pull-left">

<a class="btn btn-navbar collapsed" data-toggle="collapse" data-target=".nav-collapse">

<span class="element-invisible"><?php echo JTEXT::_('TPL_PROTOSTAR_TOGGLE_MENU'); ?></span>

<span class="icon-bar"></span>

<span class="icon-bar"></span>

<span class="icon-bar"></span>

</a>

</div>

<div class="nav-collapse">

<jdoc:include type="modules" name="position-1" style="none" />

</div>

</nav>

<?php endif; ?>

<jdoc:include type="modules" name="banner" style="xhtml" />

<div class="row-fluid">


<?php if ($position8ModuleCount) : ?>

<!-- Begin Sidebar -->

<div id="sidebar" class="span3">

<div class="sidebar-nav">

<jdoc:include type="modules" name="position-8" style="xhtml" />

</div>

</div>

<!-- End Sidebar -->

<?php endif; ?>

<main id="content" role="main" class="<?php echo $span; ?>">

<!-- Begin Content -->

<jdoc:include type="modules" name="position-3" style="xhtml" />

<jdoc:include type="message" />

<jdoc:include type="component" />

<div class="clearfix"></div>

<jdoc:include type="modules" name="position-2" style="none" />

<!-- End Content -->

</main>

<?php if ($position7ModuleCount) : ?>

<div id="aside" class="span3">

<!-- Begin Right Sidebar -->

<jdoc:include type="modules" name="position-7" style="well" />

<!-- End Right Sidebar -->

</div>

<?php endif; ?>

</div>

</div>

</div>

<!-- Footer -->

<footer class="footer" role="contentinfo">

<div class="container<?php echo ($params->get('fluidContainer') ? '-fluid' : ''); ?>">

<hr />

<jdoc:include type="modules" name="footer" style="none" />

<p class="pull-right">

<a href="#top" id="back-top">

<?php echo JText::_('TPL_PROTOSTAR_BACKTOTOP'); ?>

</a>

</p>

<p>

&copy; <?php echo date('Y'); ?> <?php echo $sitename; ?>

</p>

</div>

</footer>

<jdoc:include type="modules" name="debug" style="none" />

</body>

</html>

Приложение 2

Код главной страницы сайта (index.php)

<?php

/**

* @package Joomla.Site

*

* @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved.

* @license GNU General Public License version 2 or later; see LICENSE.txt

*/

/**

* Define the application's minimum supported PHP version as a constant so it can be referenced within the application.

*/

define('JOOMLA_MINIMUM_PHP', '5.3.10');

if (version_compare(PHP_VERSION, JOOMLA_MINIMUM_PHP, '<'))

{

die('Your host needs to use PHP ' . JOOMLA_MINIMUM_PHP . ' or higher to run this version of Joomla!');

}

// Saves the start time and memory usage.

$startTime = microtime(1);

$startMem = memory_get_usage();

/**

* Constant that is checked in included files to prevent direct access.

* define() is used in the installation folder rather than "const" to not error for PHP 5.2 and lower

*/

define('_JEXEC', 1);

if (file_exists(__DIR__ . '/defines.php'))

{

include_once __DIR__ . '/defines.php';

}

if (!defined('_JDEFINES'))

{

define('JPATH_BASE', __DIR__);

require_once JPATH_BASE . '/includes/defines.php';

}

require_once JPATH_BASE . '/includes/framework.php';

// Set profiler start time and memory usage and mark afterLoad in the profiler.

JDEBUG ? JProfiler::getInstance('Application')->setStart($startTime, $startMem)->mark('afterLoad') : null;

// Instantiate the application.

$app = JFactory::getApplication('site');

// Execute the application.

$app->execute();