Urmariti pasii de mai jos:
Panou t> Afisare > Template-uri > General > Index_box
HTML :
- Cod:
<div class="panel introduction"> <div class="inner"> <span class="corners-top"><span></span></span> <div class="mes-txt">
<img id="hideHomepageMessage" src="http://2img.net/i/fa/m/tabs_less1.gif"> <div id="hiddenTitle" class="homepageTitle" style="display:none;">Titlu 2</span> </div> <div id="homepageMessage"> <img id="homepageLogo" src="http://i18.servimg.com/u/f18/18/45/41/65/fdf-f11.png" alt=""> <div class="homepageTitle">Titlu </div> <div style="text-align:justify">Text</div>
<br class="clear"> <div id="faInfoNav"> <a id="_faInfoAnn" class="infoActif" href="#">Text</a><a id="_faInfoSearch" href="#">Text</a><a id="_faInfoExplain" href="#">Text</a><a id="_faInfoSuggestion" href="#">Text</a><a style="border:none" id="_faInfoStaff" href="#">Text</a> </div> <div id="faInfo"> <div id="faInfoAnn" class="infoBlock">Titlu text <div id="faNewsBox">
</div>
</div>
<div id="faInfoSearch" class="infoBlock" style="display:none;> Text </div>
<div id=" faInfoExplain " class="infoBlock " style="display:none; "> Text </div>
<div id="faInfoSuggestion " class="infoBlock " style="display:none; "> Text </div>
<div id="faInfoStaff " class="infoBlock " style="display:none; "> Text </div> </div> </div> </div><span class="corners-bottom "><span></span></span> </div> </div>
Panou > Module > HTML & JAVASCRIPT > Gestiunea codurilor JavaScript > Creati un nou cod javascript
Titlu : HOME MESSAGE Amplasare : Toate paginile Cod javascript :
*
- Cod:
// <![CDATA[ (function(J, U, L) { var main = document.getElementById('main-content'), // main container
// news nodes and data news = document.getElementById('faNewsBox'), newsTopics = news.getElementsByTagName('DIV'), storage = window.localStorage, rss = document.getElementById('faNewsRSS'),
homepage = J('.introduction', main)[0], // homepage message
// google search cx = '008194303819542842039:281od8kue6w', gcse = document.createElement('script'), s = document.getElementsByTagName('script')[0],
// info box infoLinks = document.getElementById('faInfoNav').getElementsByTagName('A'),
// hide button hide = document.getElementById('hideHomepageMessage'),
// profile variables profil, login;
document.getElementById('fa_google_search').style.display = 'block'; // show google search for JS user document.getElementById('searchNoJS').style.display = 'none'; // hide normal search for JS users
// hide homepage if (my_getcookie('faHomepage') == 'hidden') { hide.src = 'http://2img.net/i/fa/m/tabs_more1.gif'; document.getElementById('homepageMessage').style.display = 'none'; document.getElementById('hiddenTitle').style.display = 'block'; }
// create profile panel when logged in if (U.session_logged_in) { profil = document.createElement('DIV'); profil.id = 'userProfile'; profil.className = 'panel introduction'; profil.innerHTML = '<div class="inner "><span class="corners-top "><span></span></span><div id="userName "><span>Logged in as </span>' + U.username + '</div><div class="leftCol "><span id="userAvatar ">' + U.avatar + '</span></div><div class="rightCol "><div class="title ">General</div><div><span class="statLabel ">Rank : </span>' + L.rank_title + '</div><div><span class="statLabel ">' + L.Posts + ' : </span>' + U.user_posts + '</div><div><span class="statLabel ">' + L.PMs + ' : </span>' + U.user_nb_privmsg + '</div><div><span class="statLabel ">' + L.Reputation + ' : </span>' + U.point_reputation + '</div></div><div class="rightCol "><div class="title ">Profile</div><div><a href="/u ' + U.user_id + ' ">' + L.See_my_profile + '</a></div><div><a href="/profile?mode=editprofile ">' + L.Edit_profile + '</a></div><div><a href="/t141148-request-a-username-change#961343 ">Change username</a></div><div><a href="/t133532-warning-bar-reversals#898562 ">Appeal warning</a></div></div><div class="rightCol "><div class="title ">Search</div><div><a href="/sta/ ' + U.username + ' ">' + L.All_Topics + '</a></div><div><a href="/spa/ ' + U.username + ' ">' + L.All_Messages + '</a></div><div><a href="/search?search_id=watchsearch ">' + L.js_topics_followed + '</a></div><div><a href="/search?search_id=newposts ">View new posts</a></div></div><div class="clear "></div><span class="corners-bottom "><span></span></span></div>'; main.insertBefore(profil, homepage); } else { // adjust login style login = J('.panel', main)[0]; login.className += ' introduction'; login.style.marginBottom = '10px'; }
// get news topics if (storage && storage.faNewsTopics && storage.faNewsTopicsExp > +new Date - 1 * 60 * 60 * 1000) news.innerHTML = storage.faNewsTopics; else { J(rss).load('/feed/?f=1 item', function() { for (var i = 0, item = rss.childNodes, j = newsTopics.length, t; i < j; i++) { t = J('title', item[i])[0].innerHTML; newsTopics[i].innerHTML = '<a href=" ' + J('guid ', item[i])[0].innerHTML + ' " title=" ' + t + ' ">' + (t.length > 69 ? t.slice(0, 69) + '...' : t) + '</a> <span class="faNewsDate ">' + J('pubDate', item[i])[0].innerHTML.replace(/.*?, (\d+ \w+).*/, function(M, S1) { return S1.charAt(0) == '0' ? S1.slice(1) : S1 }) + '</span>'; } if (storage) { storage.faNewsTopics = news.innerHTML; storage.faNewsTopicsExp = +new Date; } }); }
// create google search bar gcse.type = 'text/javascript'; gcse.async = true; gcse.src = (document.location.protocol == 'https:' ? 'https:' : 'http:') + '//www.google.com/cse/cse.js?cx=' + cx; s.parentNode.insertBefore(gcse, s);
// apply general logic to info box tabs for (var i = 0, j = infoLinks.length; i < j; i++) { infoLinks[i].onclick = function() { var a = document.getElementById('faInfoNav').getElementsByTagName('A'), b = document.getElementById('faInfo').getElementsByTagName('DIV'), i, j;
for (i = 0, j = b.length; i < j; i++) if (/infoBlock/.test(b[i].className)) b[i].style.display = 'none'; document.getElementById(this.id.slice(1)).style.display = 'block';
for (i = 0, j = a.length; i < j; i++) if (/infoActif/.test(a[i].className)) a[i].className = ''; this.className = 'infoActif';
return false; } }
// hide the homepage message hide.onclick = function() { var message = document.getElementById('homepageMessage'), title = document.getElementById('hiddenTitle');
if (this.src == 'http://2img.net/i/fa/m/tabs_less1.gif') { this.src = 'http://2img.net/i/fa/m/tabs_more1.gif'; message.style.display = 'none'; title.style.display = 'block'; my_setcookie('faHomepage', 'hidden'); } else { this.src = 'http://2img.net/i/fa/m/tabs_less1.gif'; message.style.display = 'block'; title.style.display = 'none'; my_setcookie('faHomepage', 'shown'); } };
// par ange tuteur })(jQuery, _userdata, _lang); //]]>
feed/?f=1 - de unde să fie extrase informașiile 1 este pagina informativă
Panou > Afisare > Imagini si culori > Culori > Foaie de stil CSS
- Cod:
/* GENERAL HOMEPAGE MESSAGE */ .homepageTitle { color:#39C; font-size:21px; font-style:italic; font-family:"Trebuchet MS", Verdana, Arial, Sans-serif; background:url(http://2img.net/i/fa/optimisation_fdf/fr/puce10.png) no-repeat 0 0; height:40px; padding:5px 0px 0px 25px; } #homepageLogo { float:right; margin-left:20px; faInfoNav } #hideHomepageMessage { float:right; cursor:pointer; } /* INFO BOX */ #faInfo { color:#666; background:#FFF; border:1px solid #39C; border-bottom-width:3px; border-radius:0 3px 3px 3px; padding:6px; } #faInfoNav { background:#FFF; border:1px solid #39C; border-bottom:none; border-radius:3px 3px 0 0; overflow:hidden; display:inline-block; } #faInfoNav a { color:#333; background:#FFF; border-right:1px solid #39C; font-size:11px; font-weight:bold; display:inline-block; padding:6px 9px; } #faInfoNav a:hover, #faInfoNav .infoActif { color:#FFF; background:#39C; } #faInfoAnn { background-image:url('http://i18.servimg.com/u/f18/18/21/60/73/fdf_bu10.png') } #faInfoSearch { background-image:url('http://i18.servimg.com/u/f18/18/21/41/30/fdf_se10.png') } #faInfoExplain { background-image:url('http://i18.servimg.com/u/f18/18/21/41/30/fdf_ex10.png') } #faInfoSuggestion { background-image:url('http://i18.servimg.com/u/f18/18/21/41/30/fdf_su10.png') } #faInfoStaff { background-image:url('http://i18.servimg.com/u/f18/18/21/41/30/fdf_st10.png') } .module, .panel { background: #FAFAFA; border: 1px solid #DDD; border-bottom-width: 2px; border-radius: 3px; } .infoBlock { text-align:justify; background-repeat:no-repeat; background-position:0 50%; padding-left:75px; min-height:100px; } /* INFO NEWS */ .faNewsRow { background:#F0F6F8; border-radius:3px; margin:3px 0; padding:5px 10px; } .faNewsRow a { font-weight:bold } .faNewsDate { font-size:11px; font-style:italic; background:url(http://2img.net/i/fa/subsilver/icon_miniposted.gif) no-repeat 0 center; padding-left:12px; float:right; } /* PROFILE STYLE */ #userProfile { font-size:11px; position:relative; margin-top:30px; margin-bottom:10px; } #userProfile .leftCol { float:left; text-align:center; width:20%; } #userProfile .rightCol { float:left; width:25%; } #userName { background:#FAFAFA; border:1px solid #DDD; color:#39C; font-weight:bold; font-family:"Trebuchet MS", Verdana, Arial, Sans-serif; border-radius:3px 3px 0 0; position:absolute; left:3px; top:-20px; padding:0 12px; line-height:18px; } #userName span { font-weight:normal } #userAvatar img { max-width:100px } #userAvatar { display:inline-block; overflow:hidden; min-height:100px; min-width:100px; } #userProfile .title { color:#39C; font-weight:bold; border-bottom:1px solid #39C; padding-bottom:3px; margin-bottom:3px; width:90%; } #userProfile .statLabel { display:inline-block; width:85px; font-weight:bold; text-align:right; margin-right:6px; } /* SEARCH BAR */ #fa_google_search form.gsc-search-box { width:80% } .gsc-input-box { height:auto } .gsc-search-box-tools .gsc-search-box .gsc-input, .gsib_a, .cse .gsc-control-cse, .gsc-control-cse { padding:0 } .gsc-control-cse, .gsc-input-box, input.gsc-search-button, input.gsc-search-button:hover, input.gsc-search-button:focus { background:none; border:none; } input.gsc-search-button, input.gsc-search-button:hover, input.gsc-search-button:focus { height:12px; background-color:#369FCF; border-radius:0 3px 3px 0; margin:0; margin-left:21px; padding:10px; box-shadow:none; } #gsc-i-id1 { height:18px !important; padding:6px 12px !important; border:1px solid #369FCF !important; box-shadow:none !important; cursor:text; } #gsc-i-id1, .gsc-input-box-focus { border-radius:3px 0 0 3px } .gsib_b { position:relative } .gsst_a { position:absolute; top:6px; }
|