clean theme

Started by KahneFan, February 19, 2009, 07:07:40 PM

Previous topic - Next topic

KahneFan

#eric_on_twit| (video) Creating Themes for SMF | Reset Your Forum
NOTE: No PM's for support please.

Chandy


KahneFan

#eric_on_twit| (video) Creating Themes for SMF | Reset Your Forum
NOTE: No PM's for support please.

ɔɔɔɔɔɔuɥoɾ

Wow, im really interested in how you made the navigation buttons centered, thats cool.

Can you share this code with us please :)


SMF 2.0 RC5

   
Webhost to New Webhost file transfer service, PM me - Fast transfers

phpMyTony

I don't like it :( Well, I like how you made it, but it's not my type :P Good work tho ;)

KahneFan

#5
Quote from: johncccccc on February 20, 2009, 01:59:16 PM
Wow, im really interested in how you made the navigation buttons centered, thats cool.

Can you share this code with us please :)

It's all in the /{theme}/css/index.css and index.template.php files ;)

But I'll list it here as well.

For my css/index.css

/* The main menu. */
#main_menu
{
font-size: 90%;
width: 100%;
text-align: center;
background: url(images/topbarbg.gif);
padding: 4px 0 4px 0;
}
#main_menu span
{
}
#main_menu a
{
font-size: 80%;
font-family: tahoma, sans-serif;
text-transform: uppercase;
padding: 2px 5px 2px 5px;
border: thin outset #C8CCF1;
margin: 0 2px 0 2px;
}
#main_menu a:hover
{
font-size: 80%;
font-family: tahoma, sans-serif;
text-transform: uppercase;
padding: 2px 5px 2px 5px;
background: #CCCCCC;
padding: 2px 5px 2px 5px;
border: thin inset #C8CCF1;
margin: 0 2px 0 2px;
}


Index.template.php

// Show the menu up top. Something like [home] [help] [profile] [logout]...
function template_menu()
{
global $context, $settings, $options, $scripturl, $txt;

echo '
<div id="main_menu">';

foreach ($context['menu_buttons'] as $act => $button)
{
$classes = array();
if (!empty($button['active_button']))
$classes[] = 'active';
if (!empty($button['is_last']))
$classes[] = 'last';
$classes = implode(' ', $classes);

echo '
<a title="', $act, '" href="', $button['href'], '">
<span>', ($button['active_button'] ? '<strong>' : ''), $button['title'], ($button['active_button'] ? '</strong>' : ''), '</span>
</a>';
}

echo '</div>';
}

#eric_on_twit| (video) Creating Themes for SMF | Reset Your Forum
NOTE: No PM's for support please.

ɔɔɔɔɔɔuɥoɾ

#6
Sweet, Thanks, Im gonna try to apply this to my theme, if possible, im not a good coder though lol  :)

my forum software is 2.0 BETA 4 though, will this code work on my forum?


SMF 2.0 RC5

   
Webhost to New Webhost file transfer service, PM me - Fast transfers

KahneFan

It will should work as far as I'm aware. Nothing that I changed has been effected by b4 -> RC1.
#eric_on_twit| (video) Creating Themes for SMF | Reset Your Forum
NOTE: No PM's for support please.

Advertisement: