Показать сообщение отдельно

  #7  
Старый 25.01.2008, 23:22
Дикс
Познавший АНТИЧАТ
Регистрация: 16.04.2006
Сообщений: 1,488
Провел на форуме:
2209675

Репутация: 537


Отправить сообщение для Дикс с помощью ICQ
По умолчанию

к часу ночи энтузиазм проснулся )) давно хотел попробовать посты яваскриптом генерить ))

+ css в тело файла внёс, думаю и в движке надо это сделать.
сохраните этот код в простую хтмльку:

Код:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
  <title>deex & H4Ck blog</title>
  <meta http-equiv="content-type" content="text/html; charset=windows-1251">
  <style type="text/css">

   /* STANDART TAGS --- */

  BODY{
    font-family: Verdana, Arial, sans-serif;
    color: #00003E;
    background-color: #fEfEfE;
  }

  *{
    margin: 0;
    padding: 0;
  }

  A:visited{
   color: #0996FF;
  }

/* fonts ---- */

  .small {
    font-size: 70%;
    color: #777;
  }

  .red_error{
    font-weight: bold;
    font-size: 70%;
    padding-left: 30px;
    color: #CC0000;
  }
  .green_ok{
    color: green;
    font-weight: bold;
    font-size: 70%;
    padding-left: 30px;
  }

  .code {
    color: blue;
    font-family: tahoma;
    font-size: 100%;
  }



/* HEADER ------ */

 .header_links{
    font-size: 90%;
    color: #FFF;
    font-weight: bold;
    width: 97%;
    margin-top: 10px;
    text-align: center;
    background-color: #666;
    padding: 2px;
  }

 .header_links A {
   padding-left: 10px;
    color: #FFF;
    font-weight: bold;
 }

 .header_links A:visited{
   color: #FFF;
  }


  .header_title {
    font-size: 100%;
    color: #EEE;
    float: right;
    margin-left: 5px;
    margin-right: -5px;
    margin-top: -5px;
    padding: 5px;
    padding-right: 10px;
    text-align: center;
    font-weight: bold;
    background-color: #444;
    width: 300px;
  }

  .quake {
    border: 1px solid black;
    width: 700px;
    margin: 0 auto;
    height: 100px;
    margin-bottom: 20px;
    background-color: #828282;
    border-right: 15px solid #535353;
    border-left: 15px solid #535353;
  }

  .quake2 {
    border: 1px solid black;
    width: 700px;
    margin: 0 auto;
    height: 50px;
    margin-top: 20px;
    margin-top: 10px;
    background-color: #828282;
    border-right: 15px solid #535353;
    border-left: 15px solid #535353;
  }

  .head {
    border: 2px solid black;
    width: 600px;
    background-color: #EEE;
    margin: 0 auto;
    margin-top: 15px;
    padding: 10px;
    font-size: 80%;
  }

  .head A {
    color: white;
    font-weight: bold;
    text-decoration: none;
  }

  .head A:hover {
    text-decoration: underline;
  }

  .head A:visited {
    color: #EEE;
  }

  .header_text{
  padding-top: 10px;
  }
/* FOOTER ---- */

   .footer {
    border: 2px solid black;
    width: 600px;
    background-color: #EEE;
    margin: 0 auto;
    margin-top: 15px;
    margin-bottom: 20px;
    padding: 1px;
    text-align: center;
    font-size: 70%;
  }

  .designfooter{
    color: #AAA;
    padding-left: 20px;
  }

/* other ---- */

  .paging {
   border: 0px solid black;
   width: 180px;
   margin: 0 auto;
   margin-top: 5px;
   margin-bottom: -5px;
   font-size: 70%;
  }

  .paging A{
  text-decoration: none;
  }

/* POST ------ */
  .main_body{
    width: 610px;
    margin: 0 auto;
  }

  .post {
    border: 1px solid #777;
    width: 600px;
    background-color: #eee;
    margin: 0 auto;
    margin-top: 15px;
    padding: 5px;
  }

  .post_category {
    font-size: 100%;
    color: #BBB;
    float: right;
    margin-right: -5px;
    margin-top: -5px;
    padding-left: 10px;
    font-weight: bold;
    background-color: #fff;
    border-bottom: 1px solid #777;
    border-left: 1px solid #777;
    width: 200px;
  }


  .post_title {
    font-size: 100%;
    color: #444;
    float: left;
    margin-left: -5px;
    margin-top: -5px;
    padding: 5px;
    font-weight: bold;
    background-color: #fff;
    width: 300px;
    border-bottom: 1px solid #777;
    border-right: 3px solid #777;
  }

  .post_body {
    margin-top: 35px;
    margin-bottom: 10px;
    font-size: 80%;
    background-color: #eee;
  }

  .post_foot{
    font-size: 60%;
    color: #666;
    width: 300px;
    border-right: 3px solid #777;
    border-top: 1px solid #777;
    margin-left: -5px;
    margin-bottom: -5px;
    margin-top: 3px;
    text-align: center;
    background-color: #fff;
    padding: 2px;
    text-align: left;
  }

  .post_date{
   margin-left: 15px;
  }
  .post_comms{
   margin-left: 10px;
  }

 .form{
   width: 590px;
   margin: 0 auto;
   padding: 10px;
   font-size: 80%;
 }

  .textinput{
    border: 1px solid black;
    padding: 2px;
    width: 200px;
  }


/* COMMENTS -- */

    .comm_date {
      color: #666;
      background-color: #ccc;
      padding: 5px;
      width: 100px;
      font-size: 70%;
    }

   .comm_body {
    margin-top: 5px;
    font-size: 80%;
    background-color: #fff;
    padding: 10px;
    overflow: auto;
    }

   .comm_counter{
      color: #666;
      background-color: #ccc;
      padding: 5px;
      font-size: 70%;
   }

   .comment_form{
     margin-top: 25px;
     height: 200px;
     padding: 3px;

   }

   .comment_form TEXTAREA {
   border: 1px solid black;
   width: 600px;
   height: 150px;
   font-family: 'Arial';
   font-size: 100%;
   padding: 2px;
   color: #666;
   }

   .comment_form INPUT {
   border: 1px solid black;
   border-top: 0px;
   margin-left: 10px;
   width: 580px;
   background-color: #eee;
   cursor:pointer;
   }

   .login{
     width: 600px;
     text-align: center;
     padding-top: 30px;
   }

   .login INPUT {
   border: 1px solid black;
   }
  </style>
</head>
<body>


<div class="quake">
<div class="head">
<div class="header_title"

><span style='color: #00CC33'>deex</span> & <span >H4Ck</span> blog</div>
<div class="header_text">
Be good, fucker!<br />
Now you has been come to the resident evil.<br />
Welcome to the deex & H4Ck blog.</div>
<div class="header_links">
<a href="index.php">главная</a>
<a href="?page=add" style="color: #D7D700">добавить новость</a>
<a href="?page=backup">backup</a>  
<a href="?page=logout" style='color: #00CC33'>логАут</a>
<a href="?page=info">HowTo</a>
<a href="?page=about">инфа</a>

<a href='?img_off' title='отключить показ изображений. все изображения станут ссылками'>img/<b>Off</b></a></div>
</div>
</div>
<!-- body -->
<div class="main_body">

<div class="paging">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</div>


<script type="text/javascript">
function buildPost(title, cat, body, author, date, comms_url, comms_num){
document.write('<div class="post"><div class="post_title">'+title+'</div><div class="post_category">'+cat+'</div><div class="post_body">'+body+'</div><div class="post_foot">Author: <b>'+author+'</b><span class="post_date">['+date+']</span><a class="post_comms" href="?page=comment&n='+comms_url+'">comments:0</a></div></div>');
}

buildPost('о блоге на Античате<br />', 'Other', 'О блоге на forum.antichat.ru:<br /><a href="http://forum.antichat.ru/showthread.php?p=573997">http://forum.antichat.ru/showthread.php?p=573997</a>','deex', '12:57&nbsp;25-01-08', '12-57.25-01-08', 0);
buildPost('о блоге на Античате<br />', 'Other', 'О блоге на forum.antichat.ru:<br /><a href="http://forum.antichat.ru/showthread.php?p=573997">http://forum.antichat.ru/showthread.php?p=573997</a>','deex', '12:57&nbsp;25-01-08', '12-57.25-01-08', 0);
buildPost('о блоге на Античате<br />', 'Other', 'О блоге на forum.antichat.ru:<br /><a href="http://forum.antichat.ru/showthread.php?p=573997">http://forum.antichat.ru/showthread.php?p=573997</a>','deex', '12:57&nbsp;25-01-08', '12-57.25-01-08', 0);
buildPost('о блоге на Античате<br />', 'Other', 'О блоге на forum.antichat.ru:<br /><a href="http://forum.antichat.ru/showthread.php?p=573997">http://forum.antichat.ru/showthread.php?p=573997</a>','deex', '12:57&nbsp;25-01-08', '12-57.25-01-08', 0);
</script>

<div class="paging">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</div>
</div>
<div class="quake2"><div class="footer">deex & H4Ck blog &copy; 2007</div></div>
</body>
</html>
 
Ответить с цитированием