Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
ВКР.docx
Скачиваний:
8
Добавлен:
17.03.2016
Размер:
5.47 Mб
Скачать

Приложение 2. Код шаблона

<?php

/**

* @package WordPress

* @subpackage Default_Theme

*/

get_header(); ?>

<div id="content" class="narrowcolumn" role="main">

<?php if (have_posts()) : ?>

<?php while (have_posts()) : the_post(); ?>

<div <?php post_class() ?> id="post-<?php the_ID(); ?>">

<div class="post_date">

<span class="day"><?php the_time('d') ?></span><br />

<span class="month"><?php the_time('M') ?></span><br />

<span class="year"><?php the_time('Y') ?></span>

</div>

<div class="post_content">

<h2><a href="<?php the_permalink() ?>" rel="bookmark" title="Постоянная ссылка: <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h2>

<div class="comm"><?php comments_popup_link('Ваш отзыв', '1 отзыв', 'Отзывов (%)'); ?></div>

<div class="entry">

<?php the_content('Читать полностью »'); ?>

</div>

<p class="postmetadata"><?php the_tags('Метки: ', ', ', '<br />'); ?> Рубрика: <?php the_category(', ') ?> </p>

<div class="read_more"><a href="<?php the_permalink() ?>" rel="bookmark" title="Постоянная ссылка: <?php the_title_attribute(); ?>">далее</a></div>

</div>

</div>

<?php endwhile; ?>

<?php if(function_exists('wp_pagenavi')) { ?>

<div class="new_pagination">

<?php wp_pagenavi(); ?>

</div>

<?php

}

else {

?>

<div class="navigation">

<div class="alignleft"><?php next_posts_link('« Предыдущая страница') ?></div>

<div class="alignright"><?php previous_posts_link('Следующая страница »') ?></div>

</div>

<?php } ?>

<?php else : ?>

<h2 class="center">Не найдено</h2>

<p class="center">К сожалению, по вашему запросу ничего не найдено.</p>

<?php get_search_form(); ?>

<?php endif; ?>

</div>

<?php get_sidebar(); ?>

<?php get_footer(); ?>

Приложение 3. Таблица стилей

/* Begin Typography & Colors */

html{

background:url(images/html_bg.jpg) repeat;

}

body {

font-size:12px;

font-family:Georgia, "Times New Roman", Times, serif;

background:url(images/top_bg.jpg) no-repeat center top;

color: #825a2d;

padding:0px;

margin:0px auto auto auto;

}

/* Begin Headers */

h1 {

padding:0px;

margin:0;

}

h2 {

margin:0;

padding:0px;

color:#825a2d;

}

h2.pagetitle {

margin:0px;

text-align: left;

font-size:20px;

color:#FDB032;

padding:0 0 20px 90px;

}

h3 {

padding: 0;

margin:0px;

}

h3#comments {

padding: 0;

clear:both;

margin:20px 0 30px 0px ;

padding:0 0 5px 0;

border-bottom:1px #EFE7D1 solid;

}

/* End Headers */

a{

text-decoration:none;

color:#CF880C;

}

a:hover {

color: #876431;

text-decoration: underline;

}

small {

font-family: Arial, Helvetica, Sans-Serif;

font-size: 0.9em;

line-height: 1.5em;

}

.read_more{

width:97px;

height:33px;

float:right;

line-height:43px;

padding:0 0 0 7px;

background:url(images/pencil_bg.gif) no-repeat center;

}

.read_more a{

text-decoration:none;

}

#main_container{

width:960px;

margin:auto;

}

#header {

height:176px;

}

.logo{

padding:55px 0 0 20px;

}

.center_content{

width:960px;

height:auto;

background:url(images/content_center.gif) repeat-y center;

}

.center_content_top{

width:960px;

height:auto;

background:url(images/content_top.jpg) no-repeat center top;

}

.center_content_bottom{

width:960px;

height:auto;

background:url(images/content_bottom.jpg) no-repeat center bottom;

}

#content {

padding:30px 0 30px 0;

}

#content-page {

width:600px;

float:left;

padding:30px 0 30px 50px;

clear:both;

}

.narrowcolumn {

float:left;

padding:10px 0 20px 0px;

margin: 0px 0 0;

width:660px;

clear:both;

}

/*-----------------Begin Sidebar---------------------*/

#sidebar

{

width:260px;

float:right;

padding:0 15px 40px 0;

}

#sidebar h2{

width:237px;

height:28px;

text-transform:uppercase;

font-size:14px;

font-weight:bold;

color:#411a0a;

padding:42px 0 0 0;

margin:15px 0 0 0;

text-align:center;

background:url(images/sidebar_top.jpg) no-repeat center bottom;

}

#sidebar ul, #sidebar ul ol {

width:237px;

margin: 0;

padding:0;

list-style:none;

}

#sidebar ul li {

list-style:none;

margin:0;

padding:0;

}

#sidebar ul li ul{

padding:0px 0 25px 0;

margin:0px;

width:237px;

background:url(images/sidebar_bottom.jpg) no-repeat center bottom;

}

#sidebar ul li ul li div{

padding:0px;

margin:0px;

width:237px;

background:url(images/sidebar_bottom.jpg) no-repeat center bottom;

}

#sidebar ul li ul li{

list-style:none;

width:210px;

margin:0px 0 0 20px;

line-height:22px;

padding:4px 0 0px 0;

}

#sidebar ul li ul li a{

color:#695321;

background:url(images/checked.gif) no-repeat left;

padding:0 0 0 15px;

}

#sidebar ul li ul li.recentcomments a{

color:#695321;

background:none;

text-decoration:underline;

padding:0 0 0 15px;

color:#DF8D0D;

}

#sidebar ul li.widget_tag_cloud{

padding:0px 0 25px 0;

background:url(images/sidebar_bottom.jpg) no-repeat center bottom;

}

#sidebar ul li.widget_tag_cloud a{

color:#695321;

background:none;

text-decoration:underline;

padding:0 0 0 15px;

line-height:20px;

color:#DF8D0D;

}

a.sidebar_banner{

clear:both;

display:block;

padding:20px 0 10px 0;

}

/* Begin Form Elements */

.search_tab{

height:70px;

padding:23px 0 0 35px;

}

#searchform {

margin:0px;

padding:0px;

}

input.search_input{

width:153px;

height:22px;

background:none;

border:none;

color:#e5c246;

}

#sidebar #searchsubmit {

padding:3px 0 0 3px;

}

.st-tag-cloud{

padding:5px 0 0 15px;

line-height:22px;

}

/*-------------------------menu---------------------------------*/

.menu ul{

padding:0px 0 0 37px;

margin:0px;

display:block;

list-style:none;

}

.menu ul li{

float:left;

}

.menu ul li a{

color:#FFFFFF;

font-size:12px;

float:left;

height:23px;

line-height:23px;

padding:0 10px 0 10px;

margin:0 2px 0 2px;

display:block;

text-decoration:none;

font-weight:bold;

text-transform:uppercase;

}

.menu ul li.current_page_item a{

color:#64431e;

font-size:12px;

float:left;

height:23px;

line-height:23px;

padding:0 10px 0 10px;

margin:0 2px 0 2px;

display:block;

text-decoration:none;

font-weight:bold;

text-transform:uppercase;

background:url(images/menu_link_bg.gif) repeat-x center;

}

.menu ul li a:hover{

background:url(images/menu_link_bg.gif) repeat-x center;

color:#64431e;

}

/*--------------------------post style-----------------------*/

.post {

margin:0px;

float:left;

padding:0px 0 20px 0;

text-align: justify;

background:url(images/post_bg.gif) no-repeat left center;

}

.post-page{

margin:0px;

float:left;

padding:0px 0 20px 0;

text-align: justify;

line-height:20px;

}

.post_date{

width:74px;

height:65px;

float:left;

text-align:center;

padding:17px 0 0 0;

background:url(images/date_bg.png) no-repeat center;

}

.post h2 a{

color:#825a2d;

font-size:24px;

font-weight:bold;

width:440px;

float:left;

padding:10px 0 10px 0;

text-decoration:none;

}