Один мой знакомый попросил меня портировать стиль, что я собственно и сделал. Думаю, пришло время показать свою недавнюю наработку и сообществу. Многие хотели обновлений, надеюсь это как раз то, что чуток освежит движок MyBB, работающий на уже стареньком PunBB 1.2.
Этот стиль был взят с дефолтного стиля PunBB 1.4.2. Немного увлекшись процессом, решил полностью преобразовать структуру таблиц и объектов, полностью копирующих новый стиль. Возникло несколько нюансов при портировании стиля, без скриптов которые было никак не решить.
Что же в нем такого отличительного?
При первом взгляде на форум вы могли заметить в шапке новый элемент - Описание форума. Описание форума редактируется через стиль.
С помощью скрипта был добавлен класс isactive, который определяет активный пункт в навигационном меню.
Что интересно, в профиле на активном пункте присутствует класс isactive, но не многие знают о нем, и толком им никто не пользуется. Меню в профиле выпрямил в горизонталь.
С главной страницы форума (и некоторых вложенных страницах) были убраны "хлебные крошки" (breadcrumbs) - на скриншоте обозначены красной стрелкой:
Там же на скриншоте можно увидеть ссылки "Новая тема" и "Новый опрос" были компактно укомплектованы (аналогичное проделано на странице темы с ссылкой "Ответить").
Информационный блок, отображающий имя пользователя и дату его последнего визита был перенесен к ссылкам (опять же для компактности). Однако из-за большого объема ссылок, которые показываются только зарегистрированным, для незарегистрированных пришлось скрыть его за ненадобностью.
На странице регистрации специально уделил внимание на стилизацию сообщения "Важная информация".
Обновлённая форма быстрого ответа:
Что мне всегда нравилось в стиле, так это кнопки. Ну и остальное по мелочи.
Администрирование - Свой стиль
Код:/************************************************************* - SETUP **************************************************************/ /* A1 Import the colour scheme -------------------------------------------------------------*/ /* A1.1 */ @import url(style_cs.css); /* A2 Deal with browser defaults and wonkiness -------------------------------------------------------------*/ /* A2.0 - Описание форума */ .title-logo:after { content: "Здесь может быть описание форума"; display: block; } /* A2.1 */ html, body, div, p, dl, dt, dd, ul, ol, li, h1, h2, h3, h4, h5, h6, pre, form, fieldset, legend, blockquote, table, th, td, input, textarea, button, select { margin: 0; padding: 0; text-align: left; } body { background: #fff; color: #222; } h1, h2, h3, h4, h5, h6 { font-size: 1em; font-weight: normal; } samp,code,pre,option,optgroup,input,select,textarea,td,th{ font-size: 1em; font-family: Verdana, Helvetica, Arial, sans-serif; font-style: normal; font-weight: normal; } samp, code, pre { font-family: monospace, sans-serif; white-space: pre-wrap; word-wrap: break-word; } /* A2.2 */ .punbb * { margin: 0 } /* A2.3 */ .punbb ul, .punbb dl, .punbb li, .punbb dd, .punbb dt { padding: 0; list-style: none; } /* A2.4 */ .punbb img { border:none } /* A2.5 */ .punbb .main table { table-layout: fixed; width: 100%; } /* A2.6 */ .checkfield input[type="checkbox"], .radiofield input[type="radio"] {margin: 0 0.3em;} /* A2.7 */ p[class="checkfield"] *, div[class="checkfield"] *, fieldset[class="radiofield"] * { height: 1.8em; vertical-align: middle } /* A3 Text setup -------------------------------------------------------------*/ /* A3.1 */ body { font-size: 100%; } /* A3.2 */ .punbb { font: 75%/1.5em Verdana,Helvetica,Arial,sans-serif; } /* 3.3 */ select { height: 25px; * height: auto; line-height: 25px; padding-left: 3px; -moz-border-radius: 2px; -webkit-border-radius: 2px; -khtml-border-radius: 2px; border-radius: 2px; border-style: solid; border-width: 1px; text-shadow: 0 1px 1px #ddd; } .formsubmit .submit { margin-right: .75em; } .formsubmit { margin-right: 2em; } .submit input, .cancel input { overflow: visible; padding-left: .5em; padding-right: .5em; font-size: 1.084em; } .button-set .submit { padding-left: 1em; } button { width: auto; overflow: visible; } label, input[type="button"], input[type="submit"], button, select { cursor: pointer; } input[type="text"], input[type="password"], input[type="email"], input[type="url"], input[type="search"], input[type="number"], textarea { border-width: 1px; border-style: solid; padding: .25em } input[type="submit"], input[type="button"], input[type="reset"], button { display: inline-block; vertical-align: baseline; text-align: center; text-decoration: none; padding: .5em .6em; -moz-border-radius: 2px; -webkit-border-radius: 2px; -khtml-border-radius: 2px; border-radius: 2px; border-style: solid; border-width: 1px; -webkit-appearance: button; line-height: normal; } input[type="submit"]::-moz-focus-inner, input[type="button"]::-moz-focus-inner, input[type="file"]::-moz-focus-inner, input[type="reset"]::-moz-focus-inner, button::-moz-focus-inner { border: 0; padding: 0; } input[type="submit"]:active, input[type="button"]:active, input[type="reset"]:active, button:active { position: relative; top: 1px; } input[type="submit"][disabled]:active, input[type="button"][disabled]:active, input[type="reset"][disabled]:active, button[disabled]:active { position: relative; top: 0; } .primary input[type="submit"], .primary input[type="button"], .primary input[type="reset"], .primary button { padding-left: 1.2em; padding-right: 1.2em; } input[type="text"], input[type="password"], input[type="email"], input[type="url"], input[type="number"], input[type="search"], textarea { border-color: #d3dae1; } input[type="text"]:active, input[type="text"]:focus, input[type="password"]:active, input[type="password"]:focus, input[type="email"]:active, input[type="email"]:focus, input[type="url"]:active, input[type="url"]:focus, input[type="search"]:active, input[type="search"]:focus, input[type="number"]:active, input[type="number"]:focus, textarea:active, textarea:focus { border-color: #c8d3dc #d3dae1 #d3dae1 #c8d3dc; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1) inset; background: #fffff3; background-image: -moz-linear-gradient(top, #fffee8, #fff); background-image: -ms-linear-gradient(top, #fffee8, #fff); background-image: -o-linear-gradient(top, #fffee8, #fff); background-image: -webkit-gradient(linear,0 0,0 100%, from(#fffee8), to(#fff)); background-image: -webkit-linear-gradient(top, #fffee8, #fff); background-image: linear-gradient(top, #fffee8, #fff); } input[type="submit"], input[type="button"], input[type="reset"], button { color: #404040; border-color: #ccc; background: #f6f6f6; background-image: -moz-linear-gradient(top, #fff, #eee); background-image: -ms-linear-gradient(top, #fff, #eee); background-image: -o-linear-gradient(top, #fff, #eee); background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#fff), to(#eee)); background-image: -webkit-linear-gradient(top, #fff, #eee); background-image: linear-gradient(top, #fff, #eee); text-shadow: 0 1px 1px #ddd; } /* A3.4 */ .punbb h1, .punbb h2, .punbb h3, .punbb h4, .punbb table, .punbb th { font-size: 1em; font-weight: normal; } /* A3.5 */ .punbb h1 span, .punbb h2 span, .punbb legend span { font-size: 1.1em; } /* A3.6 */ .punbb pre { font: 1.1em/140% monaco, "bitstream vera sans mono", "courier new", courier, monospace } /* A3.7 */ .punbb address, .punbb em { font-style: normal } /* A3.8 */ .punbb .post-content em { font-style: italic } /* A3.9 */ .punbb .post-content em.bbuline { font-style: normal; text-decoration: underline; } /* A3.10 */ .punbb a { text-decoration: underline } /* A3.11 */ .punbb optgroup { font-weight: bold; } /* A3.12 */ .punbb .post-content .lastedit { color: #999; } /* A4 Float clearing and hidden items -------------------------------------------------------------*/ /* A4.1 */ #pun:after, .punbb .container:after, .punbb .post-links ul:after, .punbb .main div.inline:after, .punbb .post-box:after, .punbb .linksb:after { clear: both; content: "."; display: block; height: 0; visibility: hidden; overflow:hidden; line-height: 0.0; font-size: 0; } /* A4.2 */ .acchide, #pun-index #pun-main h1, #pun-viewforum #pun-main h1 span, #pun-viewtopic #pun-main h1 span, #pun-navlinks h2, #pun-pagelinks h2, #pun-status h2, #pun-stats h2, #pun-ulinks h2, #pun-profile .main h1 span, #viewprofile h2, #pun-profile #profilenav h2, .punbb .forum h2, .punbb .multipage .topic h2, .punbb dl.post-sig dt span, .punbb p.crumbs strong, .punbb .divider hr, .punbb .required label em, .punbb .formsubmit label, .punbb .submitfield label, .punbb .modmenu label, #pun-userlist .main h2 { font-size: 0; height: 0; width: 0; line-height: 0.0; position:absolute; left: -9999px; overflow: hidden } /* A4.3 */ #pun-viewforum .main h1, #pun-viewtopic .main h1, #pun-profile .main h1 { height: 17px; } /* A5 Basic page layout and borders -------------------------------------------------------------*/ /* A5.1 */ #pun { padding: 1em 2em 0; margin: 0 auto; max-width: 1100px; min-width: 700px; width: 90%; } /* A5.2 */ .punbb { float: left; width: 100%; position: relative; } /* A5.3 */ #pun-redirect, #pun-maint { margin: 50px 20% 12px 20%; width: auto; float: none; } /* A5.4 */ .punbb .section, .punbb .main { margin-bottom: 1em; } /* A5.5 */ .punbb .category, .punbb .post { margin-top: 0.4em; } /* A5.6 */ .punbb #pun-category1, .punbb .toppost, .punbb .topicpost { margin-top: 0; } /* 5.7 */ #pun-post .topic { margin-top: 1em; } /* A5.8 */ .punbb .section, .punbb .forum, .punbb .formal, .punbb .modmenu, .punbb .info, .punbb .category, .punbb .post { } /* A5.9 */ .punbb .container { border-style: solid; border-width: 1px; } /* A5.10 */ .punbb .section h2, #pun-main h1, #pun-main h2, #pun-stats h2, #pun-debug h2 { padding: 0.5em 1em; border-style: solid; border-bottom: none; border-width:1px; color: #fff; text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.15); } /************************************************************* B - MAIN CONTENT - GENERAL **************************************************************/ /* B1 Parsed Content, Signatures and Scroll Boxes -------------------------------------------------------------*/ /* B1.1 */ .punbb .post-content { padding: 1em; margin: 0; overflow: hidden; } .punbb .post-box .post-rating { margin-right: 1em; } .punbb .post-box .post-vote .container { font-style: italic; font-size: 90%; border-radius: 3px; -moz-border-radius: 3px; -webkit-border-radius: 3px; background-color: #f3f3f3; padding: 2px 6px !important; } .punbb .post-box .post-rating .container { display: block; padding: 1px 6px !important; display: inline-block; -moz-border-radius: 3px; -webkit-border-radius: 3px; border-radius: 3px; } .punbb .post-box .post-rating .container a { font-weight: bold; text-decoration: none; font-style: italic; font-size: 90% !important; } /* B1.2 */ .punbb .post-sig dt { display: block; width: 200px; border-top-style: solid; border-top-width: 1px; padding-bottom: .5em; border-color: #dde4eb; } .punbb .post-sig dd p { font-size: .95em; color: #999; margin: 0; padding: 0; } .punbb .post-sig dd a, .punbb .post-sig dd:visited { color: #999; border-color: #ddd; text-decoration: underline; } .punbb .post-sig dd a:hover, .punbb .post-sig dd a:active, .punbb .post-sig dd a:focus, .punbb .post-sig dd a:visited:hover { color: #333; border-color: #999; text-decoration: underline; } /* B1.3 */ .punbb .post-content p { margin: 0; padding: .35em 0; line-height: 150%; } /* B1.4 */ .punbb .post-content img { vertical-align: text-bottom } /* B1.5 */ .punbb .post-content img.postimg { vertical-align: middle; } /* B1.6 */ .punbb .post-content .blockcode, .punbb .post-content blockquote { width: 100%; overflow: hidden; } /* B1.7 */ .punbb .post-content .scrollbox { width: 100%; overflow: auto; } /* B1.8 */ .punbb .post-content .quote-box, .punbb .post-content .code-box { margin: 0.4em 1.8em 1.4em 1.8em; padding: 1em; border-style: solid; border-width: 1px; } /* B1.9 */ .punbb .quote-box cite, .punbb .code-box strong.legend { display: block; padding-bottom: 0.7em; font-size: 1.1em; font-weight: bold; font-style: normal; margin: 0; } /* B2 Information boxes -------------------------------------------------------------*/ /* B2.1 */ .punbb .info-box { border-color: #dbe0e4; border-style: solid; border-width: 1px; -moz-border-radius: .35em; -webkit-border-radius: .35em; -khtml-border-radius: .35em; border-radius: .35em; margin: 1.417em; padding: .5em 1em; position: relative; background: #ffffe1; } .punbb .legend strong { color: #b42000; } /* B2.2 */ .punbb .info-box * { padding: 0 0 0.7em 0; } /* B2.3 */ .punbb #pun-main .info-box .legend { font-size: 1.1em; font-weight: bold; } /* B2.4 */ .required label:after { content: "*"; position: relative; top: -2px; left: 2px; color: red; font-size: 90%; } /* B3 Pagination and posting links -------------------------------------------------------------*/ /* B3.1 */ .punbb .linkst { float: left; position: relative; width: 100%; font-size: 1.1em; height: 0; color: #fff; text-shadow: 0 -1px 0 #205394; } /* B3.2 */ .multipage { margin-top: 0; } /* B3.3 */ .linkst .pagelink { position: absolute; top: -1.8em; left: 1em; width: 24em; color: #fff; text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); } /* B3.4 */ .linkst .postlink { position: absolute; top: -1.8em; right: 1em; width: 16em; text-align: right; font-weight: bold; } .linkst .postlink a { color: #fff; text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); text-decoration: underline; } .linkst .postlink a:hover, .linkst .postlink a:active { color: #eee; text-decoration: none; } /* B3.5 */ .punbb .linksb, #profilenav { color: #fff; border-color: #4a86c1; text-shadow: 0 -1px 0 #205394; margin-bottom: 0.5em; padding: 0 1em; font-size: 1.1em; background-color: #0066B9; background-image: -moz-linear-gradient(bottom,#2A6AB8 0,#4795CC 100%); background-image: -ms-linear-gradient(bottom,#2A6AB8 0,#4795CC 100%); background-image: -o-linear-gradient(bottom,#2A6AB8 0,#4795CC 100%); background-image: -webkit-gradient(linear,0 100%,0 0,from(#2A6AB8),to(#4795CC)); background-image: -webkit-linear-gradient(bottom,#2A6AB8 0,#4795CC 100%); background-image: linear-gradient(bottom,#2A6AB8 0,#4795CC 100%); line-height: 32px; } .punbb .linkst a, .punbb .linksb a { color: #fff; text-shadow: 0 -1px 0 #205394; text-decoration: underline; } .punbb .linkst a:hover, .punbb .linkst a:active, .punbb .linksb a:hover, .punbb .linksb a:active { color: #eee; text-decoration: none; } /* B3.6 */ .linksb .pagelink { float: left; width: 24em; text-align: left; } /* B3.7 */ .linksb .postlink { display: none; float: right; font-weight: bold; } /* B3.8 */ .punbb .subscribelink { text-align: right; } /************************************************************* C - MAIN CONTENT - SPECIFIC **************************************************************/ /* C1 Form layout -------------------------------------------------------------*/ /* C1.1 */ .punbb .formal .container { padding: 1.7em 2.3em 1.1em 2.3em; } /* C1.2 */ .punbb .formsubmit { margin: 1em 0 0 0; } /* C1.3 */ .punbb .formsubmit input, .punbb .formsubmit a, .punbb .formsubmit span { margin: 0 0.6em 0 0 } /* C1.4 */ .punbb fieldset { border-style: solid; border-width: 1px; padding: 0 18px 0 18px; margin: 0 0 1em 0 } /* C1.5 */ .punbb fieldset legend { padding: 0; margin: 0 0 0 11px; font-size: 1.1em } /* C1.6 */ .punbb fieldset legend span { padding: 0 5px; margin: 0 0 0 -15px; } /* C1.7 */ .punbb fieldset fieldset { border-style: none; margin: 0; padding: 0 0 8px 0 } /* C1.8 */ .punbb .fs-box { padding: 1em 0 0.8em 0; } /* C1.9 */ .punbb .fs-box p, .punbb .fs-box fieldset, .inputfield { padding: 0.8em; } /* C1.10 */ .punbb .inline .inputfield, .punbb .inline .selectfield, .punbb .inline .passfield { float: left; margin-right: 1em; } /* C1.11 */ .punbb .inline .infofield { clear:both } /* C1.12 */ .punbb .datafield br { display: none } /* C1.13 */ .punbb .required label, .punbb .datafield span.input { font-weight: bold } /* C1.14 */ .punbb .datafield span.input a { font-weight: normal; } /* C1.15 */ .punbb .areafield span.input, .punbb p.longinput span.input { display: block; padding: 0 12em 0 0; height: 100%; /* For IE */ } /* C1.16 */ .punbb textarea, .punbb .longinput input { width: 64%; margin: 0; } /* C1.17 */ .punbb .hashelp { position: relative; } /* C1.18 */ .punbb .helplinks { display: block; position: absolute; top: 1em; right: 0; font-weight: normal; width: 36%; } /* c1.19 */ .punbb #profile .helplinks { top: 1.5em; } /* C1.20 */ .punbb .helplinks span { display: block; padding-bottom: 0.2em; } /* C1.21 */ #pun-post .formal .info-box li { padding-left: 4px; list-style-type: square; list-style-position: inside; line-height: 1.5; margin: 0; } /* C2.22 */ .formal select { vertical-align: middle; height: 33.3px; -moz-border-radius: 2px; -webkit-border-radius: 2px; -khtml-border-radius: 2px; border-radius: 2px; border-style: solid; border-width: 1px; line-height: normal; text-shadow: 0 1px 1px #ddd; } /* C2 Table layout -------------------------------------------------------------*/ /* C2.1 */ .punbb .main .tcl { overflow: hidden; text-align: left; width: 50%; } /* C2.2 */ .punbb .main .tc2, .punbb .main .tc3, .punbb .main .tcmod { text-align: center; width: 6.5em; } /* C2.3 */ .punbb .main .tcr { overflow: hidden; text-align: left; width: 30%; } /* C2.4 */ #pun-userlist .main .tcl, #pun-searchtopics .main .tcl, #pun-modviewforum .main .tcl { width: 40% } /* C2.5 */ #pun-userlist .main .tc2, #pun-searchtopics .main .tc2 { text-align: left; width: 20%; } /* C2.6 */ #pun-debug table .tcl { width: 15%; white-space:normal; } /* C2.7 */ #pun-debug .tcr { width: 90%; white-space: normal; } /* C2.8 */ #pun-index .tcl h3 { font-size: 1.084em; font-weight: bold; } #pun-index #pun-crumbs1, #pun-index #pun-crumbs2 { display: none; } /* C2.9 */ .punbb td span.youposted { font-weight: bold; margin-left: -1em; position: absolute; } /* C2.10 */ .punbb td .modlist { display: block; padding-top: 0.3em } /* C2.11 */ .punbb .main td { border-style: solid none none solid; border-width: 1px 0 0 1px; padding: 0 1em; } /* C2.12 */ .punbb .main th { padding: 0 1em 0 1em; height: 2.5em; position: relative; font-size: 1em; } /* C2.13 */ .punbb .main .tcl { border-left-style: none; border-left-width: 0; } /* C2.14 */ .punbb tbody.hasicon td.tcl { padding: .8em 0 .8em 3.2em; } .punbb .hasicon .intd { float: left; border-left-style: solid; border-left-width: 1px; margin: -1em -2px -10em 0; padding-top: 1em; padding-bottom: 10.4em; border-color: #dde4eb; } .punbb .hasicon .tclcon { margin: 0 0 0 1.5em; } /* C2.15 */ .punbb div.icon { border-style: solid; border-width: 0.6em 0.6em 0.6em 0.6em; height: 0; line-height: 0.0; margin-top: 0.1em; width: 0; } /* C2.16 */ .punbb table div.icon { font-size: 1.05em; position: absolute; margin-left: -2.2em; } /* C2.17 */ .punbb .hasicon tr.isticky td { background: #f2f4fa; } /* C3 Topics -------------------------------------------------------------*/ /* C3.1 */ .punbb .post .container { background: #edf1f5; border-style: none solid solid solid; border-width: 1px; margin-top: -1px; } /* C3.2 */ .punbb .post h3 { border-style: solid; border-width: 1px; } /* C3.3 */ .punbb .post h3 span { padding: 0.5em 1em; display: block; margin-left: 19em; border-left-style: solid; border-left-width: 1px; border-bottom-style: dashed; border-bottom-width: 1px; border-bottom-color: #dde4eb; } /* C3.4 */ .punbb .post h3 strong { float: right; width: 5em; text-align: right; font-weight: normal; color: #999; } /* C3.5 */ .punbb .post .post-author { float: left; width: 19em; margin-top: -2.5em; overflow: hidden; background: #edf1f5; } /* C3.6 */ .punbb .post .post-author ul, .punbb .post .post-author p { padding: 1em; } /* C3.7 */ .pa-author { font-size: 1.1em; font-weight: bold; } /* C3.8 */ .pa-author a { text-decoration: none } /* C3.9 */ li.pa-title { padding-bottom: 0.4em; font-weight: bold; } li.pa-online { line-height: 0.8em; border-left-style: solid; border-left-width: 0.7em; padding-left: 0.4em; margin-top: 0.7em; } /* C3.11 */ .punbb .post-body { margin-left: 19em; border-left-style: solid; border-left-width: 1px; padding: 0 0 1px 0; } /* C3.12 */ .punbb .post-box { padding: 0; } /*C3.13 */ .punbb fieldset .post-box { margin-bottom: 0.8em } /* C3.14 */ .punbb .post-links { margin-left: 19em; border-left-style: solid; border-left-width: 1px; } /* C3.15 */ .punbb .post-links ul { padding: 0 1em 0 0; height: 2em; line-height: 2em; margin-left: -19em; background: transparent; text-align: right; } /* C3.16 */ .punbb .post-links li { display: inline; padding-left: 1em; } /* C3.17 */ .pl-email, .pl-website { float: left; } /* C3.18 */ .punbb .clearer { clear: both; height: 0; font-size: 0; } /* C3.19 */ #topic-modmenu select { margin-top: -1px; } /* C4 Moderator menu -------------------------------------------------------------*/ /* C4.1 */ .punbb .modmenu .container { padding: 0.5em 1em; text-align: right; border-top: none; } /* C4.2 */ .punbb .modmenu strong, .punbb .modmenu a { height: 1.8em; line-height: 1.8em; } /* C4.3 */ .punbb .modmenu .container strong { float: left; } /* C4.4 */ .punbb .modmenu input { margin-left: 1em; } /* C5 Message boxes -------------------------------------------------------------*/ /* C5.1 */ .punbb .info .container { padding: 0.8em 1em } /* C5.2 */ .punbb .info .container .backlink { padding-top: 0.8em; } /* C6 Profile -------------------------------------------------------------*/ /* C6.1 */ #pun-profile #viewprofile .container ul { margin-bottom: 1em; background: #f4f9fd; } /* C6.2 */ #pun-profile #profilenav { margin: -3.9em -2.21em 1.8em -2.2em; } /* C6.3 */ #profilenav li { display: inline; } #profilenav li a { position: relative; padding: .55em .5em; color: #eee; text-decoration: none; text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); } #profilenav li a:hover { color: #fff; text-decoration: none; } #profilenav li.isactive a { color: #fff; background: #2a6ab8; } /* C6.4 */ #viewprofile h2, #profilenav h2 { background: transparent; border: none; padding: 0 0 0 0; margin: 0 14px -0.6em 14px; } /* C6.5 */ #viewprofile h2 span, #profilenav h2 span { padding: 0 5px; position: relative; } /* C6.6 */ #viewprofile li, #setmods dl { padding: 0 0 0 16em; margin-bottom: 0.2em; } /* C6.7 */ #viewprofile li span { float: left; width: 14em; margin-left: -16em; padding: 0.5em 1em; } /*C6.8 */ #setmods dt { float: left; width: 14em; margin-left: -16em; padding: 0.8em 1em; font-weight: bold; display: inline; } /* C6.9 */ #viewprofile li strong, #viewprofile li div, #setmods dd { display: block; padding: 0.5em 1em; font-weight: normal; } /* C6.10 */ .punbb img.avatardemo { float: right; margin: 0 0 0.8em 1.8em } /* C6.11 */ .input em { display: block; font-weight: normal; font-style: italic; font-size: .95em; color: #999; } /* C7 User list -------------------------------------------------------------*/ /* C7.1 */ #pun-userlist .formal, #pun-userlist .formal .container { border-bottom: none; margin-bottom: 0; } /* C7.2 */ #pun-userlist .usertable .container { padding: 0 2.3em 2.3em 2.3em; border-top: none; } /* C7.3 */ #pun-userlist .usertable table { border-style: solid; border-width: 1px; } /* C7.4 */ #pun-userlist .container td, #pun-online .container td, #pun-statistic .container td, #pun-respect .container td, #pun-positive .container td, #pun-invitation .container td, #poll-special .container td { padding: 0.7em 1em; } /************************************************************* D - PUNBB SECTIONS OTHER THAN MAIN CONTENT **************************************************************/ /* D1 Logo and description -------------------------------------------------------------*/ /* D1.1 */ #pun-title { margin: 0; background: #f5f5f5; border-style: solid solid none solid; border-width: 1px 1px 0 1px; border-radius: .4em .4em 0 0; } /* D1.2 */ #pun-title h1 { display: block; padding: 0.5em 1.5em 0 1.5em; } #pun-title .title-descr { padding: 0 1.5em; } /* D1.3 */ #pun-title .container { border-style: none solid none solid; } /* D1.4 */ #pun-title h1 span { font-size: 1.5em; } #pun-title table { border: none; height: 66px; width: 100%; } #pun-title td.title-logo-tdl { border: none; width: 100%; } #pun-title td.title-logo-tdr { border: none; width: 468px; vertical-align: top; padding-top: 2px; } /* D2 Page navigation -------------------------------------------------------------*/ /* D2.1 */ #pun-pagelinks { position: absolute; top: -15px; left: 0; margin: 0; border: none; padding: 0; width: 100%; } /* D2.2 */ #pun-pagelinks .container { background: transparent; border: none; padding: 0} /* D2.3 */ #pun-pagelinks .container li { display: inline } /* D2.4 */ #pun-pagelinks li a, #pun-pagelinks a:link, #pun-pagelinks a:hover { height: 2em; line-height: 2em; padding: 0; font-size: 1.2em; margin-left: -9999px; display: block; float:left; width: 100%; } /* D2.5 */ #pun-pagelinks a:active, #pun-pagelinks a:focus { position:relative; margin: 0; } #pun-pagelinks li a span { display:block; margin: 0 1em } /* D3 Forum navigation -------------------------------------------------------------*/ /* D3.1 */ #pun-navlinks, #pun-navlinks .container { margin-bottom: 0; border-color: #376DAA; background-color: #0066B9; background-image: -moz-linear-gradient(bottom,#2A6AB8 0,#4795CC 100%); background-image: -ms-linear-gradient(bottom,#2A6AB8 0,#4795CC 100%); background-image: -o-linear-gradient(bottom,#2A6AB8 0,#4795CC 100%); background-image: -webkit-gradient(linear,0 100%,0 0,from(#2A6AB8),to(#4795CC)); background-image: -webkit-linear-gradient(bottom,#2A6AB8 0,#4795CC 100%); background-image: linear-gradient(bottom,#2A6AB8 0,#4795CC 100%); } /* D3.2 */ #pun-navlinks .container { padding: .43em .7em; } /* D.3 */ #pun-navlinks li { display: inline; } /* D3.4 */ #pun-navlinks li a { } /* D4 User links -------------------------------------------------------------*/ /* D4.1 */ #pun-ulinks { margin-top: 0; } /* D4.2 */ #pun-ulinks .container { text-align: right; padding: 0.7em 1em; background: #FBFBFB; border-color: #D3DAE1; border-bottom-color: #CBD1D8; } /* D4.3 */ #pun-ulinks li, #pun-ulinks li a { display: inline; border-left-style: solid; border-left-width: 1px; white-space: nowrap; } /* D4.4 */ #pun-ulinks li a { padding: 0 0.3em 0 0.6em } /* D4.5 */ #pun-ulinks li.item1, #pun-ulinks li.item1 a { border-left-style: none; border-left-width: 0; padding-left: 0 } /* D5 Welcome box and Top Breadcrumbs -------------------------------------------------------------*/ /* D5.1 */ .isguest #pun-status { display: none; margin-bottom: 0; } /* D5.2 */ #pun-ulinks span.item1 { position: absolute; margin: -27px 0.5em 0 1em; padding: 0; white-space: nowrap; } /* D5.3 */ #pun-ulinks span.item2 { position: absolute; margin: -2.2em 0.5em 0 9.5em; white-space: nowrap; } /* D5.4 */ #pun-crumbs1 { overflow: hidden; margin-top: 0; margin-bottom: 0; } /* D5.5 */ #pun-crumbs1 p.container { border: none; margin: 0; padding: 0.8em 1em; font-size: 1.084em; } /* D5.6 */ #pun-break1 { margin: 0 1em; height: 0; margin: -2px 1em; position: relative; z-index: 1; } /* D6 Announcement -------------------------------------------------------------*/ /* D6.1 */ #pun-announcement h2 { padding: 0; margin: 0 1.5em -2.5em 1.5em; border-style: none none solid none; border-width: 0 0 1px 0; position: relative; font-size: 1em; font-weight: bold; color: #222; text-shadow: none; } /* D6.2 */ #pun-announcement h2 span { display: block; padding: 0em 0 0.2em 0; border-bottom-style: dashed; border-bottom-width: 1px; margin-top: 1.5em; } /* D6.3 */ #pun-announcement .container { background: #f4f9fd; padding: 3em 1.5em 0.7em 1.5em; } /* D7 Statistics -------------------------------------------------------------*/ /* D7.1 */ #pun-stats .container, #pun-status .container { padding: 0.8em 1em } /* D7.2 */ #pun-stats li.item1, #pun-stats li.item2 { float: left; clear: both; line-height: 150%; } /* D7.3 */ #pun-stats li.item3, #pun-stats li.item4 { text-align: right; line-height: 150%; } /* D7.4 */ li#onlinelist { margin-top: 1em; border-top-style: solid; border-top-width: 1px; float: left; width: 100%; line-height: 130%; } /* D7.5 */ li#onlinelist div { border-top-style: solid; border-top-width: 1px; padding: 0.7em 0 0 0; } /* D8 Quick Jump - About - Bottom Breadcrumbs -------------------------------------------------------------*/ /* D8.1 */ #pun-qjump { margin: 0; border: none; width: 50%; position: relative; float: left; } /* D8.2 */ #pun-qjump .container { border: none; background: transparent; padding: 0.8em 1em; } /* D8.3 */ #pun-about { margin-top: 0; } /* D8.4 */ #pun-about .container { border: none; text-align: right; line-height: 150%; } /* D8.5 */ #pun-about p span { display:block; padding-left: 50%; } /* D8.6 */ #pun-crumbs2 { overflow: hidden; margin-bottom: 0; border-bottom: none; } /* D8.7 */ #pun-crumbs2 .container { border: none; padding: 0.8em 1em; font-size: 1.1em; } /* D8.8 */ #pun-break4 { margin: -2px 1em; position: relative; height: 0; z-index: 1; } /* D9 Help file -------------------------------------------------------------*/ /* D9.1 */ #pun-help .formal .info-box h3.legend { border-bottom-style: solid; border-bottom-width: 1px; padding-bottom: 0; margin-bottom: 0.8em; } /* D9.2 */ #pun-help .formal .info-box h3.legend span { padding-bottom: 0.6em; display: block; border-bottom-style: solid; border-bottom-width: 1px; font-size: 1.1em; } /* D9.3 */ #pun-help .formal p, #pun-help .formal dd { margin-bottom: 1em } /* D9.4 */ #pun-help .formal ul, #pun-help .formal dl { padding: 0 0 0 1em } /* D9.5 */ #pun-help .formal li { padding: 0; line-height: 130% } /* D9.6 */ #pun-help .formal li * { vertical-align: text-top } /* D9.7 */ #pun-help .formal dt span { font: 1.4em/120% monaco, "bitstream vera sans mono", "courier new", courier, monospace } /* D9.8 */ #pun-help .formal .parsedmsg, #pun-help .formal .parsedmsg .incode { padding-bottom: 0; } /* D10.1 */ .tcl .byuser:before { content: "Автор:"; } /* D10.2 */ .tcl .byuser { display: block; } /* D10.3 */ .tcr .byuser:before { content: " от"; } /* D10.4 */ #post-form fieldset { border: 0; } /* D10.5 */ #post-form legend { display: none; } /* D10.6 */ #post-form form { padding: 0; } /* D10.7 */ #post-form .formsubmit { margin: -1em 0 2em; padding-left: 1.5em; } /* D10.8 */ #post-form p.areafield { padding: 0; } /* D10.9 */ #form-buttons { display: inline-block; width: 80%; border: 1px solid #c9d9e9; border-left-width: 0; background-color: #e3ecf3; background-image: url(https://forumupload.ru/uploads/0007/af/57/14152-4.png); background-repeat: repeat-x; } /* D10.10 */ #form-buttons table { width: 100% !important; } /* D10.11 */ #form-buttons td { border-left: 1px solid #c9d9e9 !important; border-right: 1px solid #f3f7fa !important; } /* D10.12 */ #form-buttons td:hover { background-color: #f5f8fb; } /* D10.13 */ #form-buttons td:active { background-color: #c9d9e9; -moz-box-shadow: inset 1px 1px 5px #92a9c1; -webkit-box-shadow: inset 1px 1px 5px #92a9c1; box-shadow: inset 1px 1px 5px #92a9c1; } /* D10.14 */ #addition-area div { white-space: nowrap; } /* D11.1 */ #pun-messages #profilenav ul { position: inherit; left: 100px; top: -33px; height: 0; } /* D11.2 */ #pun-messages #profilenav { position: relative; } /* D11.3 */ #pun-messages #profilenav h2 { display: block; margin: 0 .5em; } /* D11.4 */ #pun-messages #profilenav h2 span { background-color: transparent; color: inherit; font-weight: 700; padding: 0; } /* D11.5 */ #pun-messages #profilenav h2:after { content: ":"; font-weight: 700; } /* D11.6 */ #pun-messages #post-form > p input[type="submit"] { margin: 0 0 2em 1em; } /* Addons */ span#BookmCntToggle { background: url(https://forumstatic.ru/files/0012/e9/11/24318.png) no-repeat center; } .jGrowl-notification .jGrowl-close { background-image: none; border: none; box-shadow: none; } /* E1 Mobile Style -------------------------------------------------------------*/ /* E1.1 */ @media screen and (max-width: 540px) { body { font-size: 115%; } #pun { max-width: inherit; min-width: inherit; } #pun-title { display: none; } .punbb .hasicon .intd { border-color: transparent; } #pun-navlinks .container { margin-left: -48px; } #pun-navlinks .container li a { margin-left: -2px; } div#pun-ulinks { right: 0 !important; top: 13px !important; } }
Код:/* CS1 Background and text colours -------------------------------------------------------------*/ /* CS1.1 */ .punbb .section .container, .punbb .post-body, .punbb .post-links, .punbb td.tcl, .punbb td.tc2, .punbb td.tc3, .punbb td.tcr, .punbb .formal fieldset .post-box, #viewprofile li div, #setmods dd, .punbb .info-box, .punbb #pun-main .info-box .legend { background-color: #fff; } /* CS1.2 */ .punbb .main .container, .punbb .post .container, .punbb .post h3, .punbb-admin #pun-admain .adcontainer { background-color: #fff; color: #222; } /* CS1.3 */ #pun-stats h2, .punbb .main h1, .punbb .main h2, #pun-debug h2, .punbb-admin #pun-admain h2 { background-color: #0066B9; background-image: -moz-linear-gradient(bottom,#2A6AB8 0,#4795CC 100%); background-image: -ms-linear-gradient(bottom,#2A6AB8 0,#4795CC 100%); background-image: -o-linear-gradient(bottom,#2A6AB8 0,#4795CC 100%); background-image: -webkit-gradient(linear,0 100%,0 0,from(#2A6AB8),to(#4795CC)); background-image: -webkit-linear-gradient(bottom,#2A6AB8 0,#4795CC 100%); background-image: linear-gradient(bottom,#2A6AB8 0,#4795CC 100%); } /* CS1.4 */ #pun-title, #pun-title .container, .punbb .modmenu .container { background-color: #fff; color: #222; } /* CS1.5 */ .punbb legend span, #viewprofile h2 span, #profilenav h2 span, .punbb-admin #pun-admain legend span { background-color: #fff; color: #005eab; } /* CS1.6 */ .punbb .post h3 span, .punbb th, #setmods dl { background-color: #f1f1f1; color: #222 } /* CS1.7 */ .punbb .quote-box, .punbb .code-box { background: #fff; color: #222 } /* CS1.8 */ #pun-navlinks .container { background-color: #dedfdf; color: #f1f1f1; } .offline li.pa-online strong { font-weight: normal } /* CS2 Border colours -------------------------------------------------------------*/ /* CS2.1 */ .punbb .container, .punbb .post-body, .post h3, #pun-title { background: #fafafa; border-color: #D3DAE1; } /* CS2.2 */ .punbb .section, .punbb .forum, .punbb .formal, .punbb .modmenu, .punbb .info, .punbb .category, .punbb .post { border-color: #f5f5f5 } /* CS2.3 */ #pun-stats h2, .punbb .main h1, .punbb .main h2, #pun-debug h2, .punbb-admin #pun-admain h2 { border-color: #376daa; } /* CS2.4 */ .punbb td, .punbb fieldset, #viewprofile ul, #profilenav ul, .punbb .post .post-body, .punbb .post h3 span, .post-links ul, .post-links, .usertable table { border-color: #dde4eb; } /* CS2.5 */ .punbb th { border-color: #d3dae1 #d3dae1 #cbd1d8 #d3dae1; background: #f4f4f4; } /* CS2.6 */ .punbb .quote-box, .punbb .code-box { border-color: #dde4eb; } #pun-ulinks li, #pun-announcement h2 span, li#onlinelist, #pun-help .formal .info-box h3.legend span { border-color: #bbb; } #pun-ulinks li a, #pun-announcement h2, li#onlinelist div, #pun-help .formal .info-box h3.legend { border-color: #fff } .punbb .divider { border-color: #ccc #fff #fff #fff } .punbb .formal fieldset .post-box, .punbb .info-box { border: 1px solid #dedfdf } li.pa-online { border-left-color: #3f9439; } /* CS3 Links -------------------------------------------------------------*/ /* CS3.1 */ .punbb a, .punbb a:link, .punbb a:visited, .punbb-admin #pun-admain a, .punbb-admin #pun-admain a:link, .punbb-admin #punbb-admain a:visited { color: #00579c; text-decoration: none; } .punbb li.isactive a, .punbb li.isactive a:link, .punbb li.isactive a:visited { color: #222; } /* CS3.2 */ .punbb a:hover, .punbb a:focus, .punbb a:active, .punbb-admin #pun-admain .nodefault, .punbb-admin #punbb-admain a:hover, .punbb-admin #punbb-admain a:focus, .punbb-admin #punbb-admain a:active { color: #cd0021; text-decoration: underline; } /* CS3.3 */ #pun-navlinks a { position: relative; padding: .55em .7em; color: #eee; text-decoration: none; text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); } /* CS3.4 */ #pun-navlinks a:hover, #pun-navlinks a:focus, #pun-navlinks a:active { color: #fff; text-decoration: none } #pun-pagelinks a:active, #pun-pagelinks a:focus { background-color: #333; color: #fff; } #pun-navlinks a.isactive { color: #FFF; background: #2A6AB8; } /* CS4 Post status icons -------------------------------------------------------------*/ div.icon { border-color: #edf1f5 #dde0e4 #c6cbd3 #babfc6; } tr.iredirect div.icon { border-color: #f4f4f4 #f4f4f4 #f4f4f4 #f4f4f4; } div.inew { border-color:#0080d7 #0065c0 #0058b3 #0072ca; } #pun-main div.catleft, #pun-main div.catright { display: none; } /* CS5 Selection -------------------------------------------------------------*/ ::selection { background: #fff2a8; color: #000; text-shadow: none; } /* CS6 Other -------------------------------------------------------------*/ #html-footer .container { border: none; } #pun-viewforum .linksb .postlink { width: 15em !important; } #post-form h2 { border-color: #d3dae1 #d3dae1 #cbd1d8 #d3dae1; background: #f4f4f4; text-shadow: none !important; } #post-form h2 span { color: #222; } #pun-userlist .main h1, #pun-searchposts .main h1, #pun-searchtopics .main h1 { text-align: right; } /* CS7 Buttons -------------------------------------------------------------*/ input[type="submit"], input[type="button"], input[type="reset"], button { color: #fafafa; background: #4897d9; border-color: #2575ae; text-shadow: 0 -1px 1px rgba(0, 0, 0, 0.4); box-shadow: 0 1px 0 rgba(255, 255, 255, 0.2) inset,0 1px 2px rgba(0, 0, 0, 0.05); background-image: -moz-linear-gradient(top, #5cb7f7, #4897d9); background-image: -ms-linear-gradient(top,#5cb7f7,#4897d9); background-image: -o-linear-gradient(top, #5cb7f7, #4897d9); background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#5cb7f7), to(#4897d9)); background-image: -webkit-linear-gradient(top, #5cb7f7, #4897d9); background-image: linear-gradient(top, #5cb7f7, #4897d9); } .primary.caution input[type="submit"], .primary.caution input[type="button"], .primary.caution input[type="reset"], .primary.caution button { border-color: #c0372a; background: #d95548; background-image: -moz-linear-gradient(top,#f7655b,#d95548); background-image:-ms-linear-gradient(top,#f7655b,#d95548); background-image:-o-linear-gradient(top,#f7655b,#d95548); background-image:-webkit-gradient(linear,0 0,0 100%,from(#f7655b),to(#d95548)); background-image:-webkit-linear-gradient(top,#f7655b,#d95548); background-image:linear-gradient(top,#f7655b,#d95548); } input[type="submit"]:hover, input[type="submit"]:focus, input[type="reset"]:hover, input[type="reset"]:focus, input[type="button"]:hover, input[type="button"]:focus, button:hover,button:focus { color:#101010; background:#f3f3f3; background-image:-moz-linear-gradient(top,#fff,#ebebeb); background-image:-ms-linear-gradient(top,#fff,#ebebeb); background-image:-o-linear-gradient(top,#fff,#ebebeb); background-image:-webkit-gradient(linear,0 0,0 100%,from(#fff),to(#ebebeb)); background-image:-webkit-linear-gradient(top,#fff,#ebebeb); background-image:linear-gradient(top,#fff,#ebebeb); border-color:#84bce4; -webkit-box-shadow:0 1px 2px rgba(0,0,0,0.1); box-shadow:0 1px 2px rgba(0,0,0,0.1); } input[type="submit"]:hover, input[type="submit"]:focus, input[type="reset"]:hover, input[type="reset"]:focus, input[type="button"]:hover, input[type="button"]:focus, button:hover, button:focus { color:#fff; text-shadow:0 -1px 1px rgba(0,0,0,0.4); border-color:#2575ae; background:#2e8bd9; background-image:-moz-linear-gradient(top,#5cb7f7,#2e8bd9); background-image:-ms-linear-gradient(top,#5cb7f7,#2e8bd9); background-image:-o-linear-gradient(top,#5cb7f7,#2e8bd9); background-image:-webkit-gradient(linear,0 0,0 100%,from(#5cb7f7),to(#2e8bd9)); background-image:-webkit-linear-gradient(top,#5cb7f7,#2e8bd9); background-image:linear-gradient(top,#5cb7f7,#2e8bd9); -webkit-box-shadow:0 1px 0 rgba(255,255,255,0.2) inset,0 1px 2px rgba(0,0,0,.2); box-shadow:0 1px 0 rgba(255,255,255,0.2) inset,0 1px 2px rgba(0,0,0,.2); } .primary.caution input[type="submit"]:hover, .primary.caution input[type="submit"]:focus, .primary.caution input[type="button"]:hover, .primary.caution input[type="button"]:focus, .primary.caution input[type="reset"]:hover, .primary.caution input[type="reset"]:focus, .primary.caution button:hover, .primary.caution button:focus { border-color:#c0372a; background:#d93d2e; background-image:-moz-linear-gradient(top,#f7655b,#d93d2e); background-image:-ms-linear-gradient(top,#f7655b,#d93d2e); background-image:-o-linear-gradient(top,#f7655b,#d93d2e); background-image:-webkit-gradient(linear,0 0,0 100%,from(#f7655b),to(#d93d2e)); background-image:-webkit-linear-gradient(top,#f7655b,#d93d2e); background-image:linear-gradient(top,#f7655b,#d93d2e); } input[type="submit"][disabled], input[type="button"][disabled], input[type="reset"][disabled], button[disabled] { border-color:#ccc; color:#999; } input[type="submit"][disabled]:hover, input[type="submit"][disabled]:focus, input[type="reset"][disabled]:hover, input[type="reset"][disabled]:focus, input[type="button"][disabled]:hover, input[type="button"][disabled]:focus, button[disabled]:hover, button[disabled]:focus { color:#999; }
Администрирование - Настройки - Основные
<script type="text/javascript">
$(function(){
var url = window.location.pathname,
urlRegExp = new RegExp(url == '/' ? window.location.origin + '/?$' : url.replace(/\/$/,''));
$('#pun-navlinks a').each(function(){
if(urlRegExp.test(this.href.replace(/\/$/,''))){
$(this).addClass('isactive');
}
});
});
</script>
Изменение текста описания форума
В "Структура style.css" в самом начале найдите блок:
/* A2.0 - Описание форума */
.title-logo:after {
content: "Здесь может быть описание форума";
display: block;
}
Выделенное красным - описание форума, изменяете по своему усмотрению или вовсе убираете блок, если описание не нужно.
Последнее обновление 11.08.2016
- Все возможные скрипты были заменены на стили, в том числе текст описания форума.
- Немного доработаны личные сообщения.
- Исправлены стили под встроенные скрипты.
- Подправлен стиль оформления под мобильные устройства (теперь отображается корректно).
- Обновлена форма быстрого ответа.
- Добавлен значок, указывающий на обязательное поле.
- Исправлены многие известные баги.
Тема на форуме Единой технической поддержки