1 (edited by RMed 28-01-2014 19:38:03)

Topic: [v0.3/nb3.7.x] Ao theme

Hello! I'm writing a blue-ish clear theme based on Simpler.
It's still in an early work in progress state, but I thought about posting it here. It's my first attempt at creating a theme for Nibbleblog, so please bear with me roll

Version: 0.3 (pre-release, but stable enough for daily use)
Compatible with Nibbleblog 3.7.x

Screenshots and code available in GitHub.

Download v0.3


Changelog:

v0.3

  • Improved social buttons

  • Social buttons can now be hidden through config.bit (see below)

  • Improved and simplified how navigation bar works

  • Added a dropdown box for showing the tags

v0.2.1

  • Fixed syntax error that prevented javascript files from loading correctly

  • Corrected minor typo in the template


Features:
  • Syntax highlighting

  • Configurable navigation bar

  • Simple social sharing for posts

  • Old browser detection

  • Content license placeholder at the footer


Configuration Settings

Navigation bar

To add a link to the navigation bar, simply add the following inside the nav_links parameter

'<a href="LINK">TEXT OF THE LINK</a>',

Where LINK would be the url of the page you want to link (i.e. http://www.nibbleblog.com), and TEXT OF THE LINK would be the text you want to appear in the bar (i.e. Nibbleblog)

The above example would result in:

'nav_links'=>array (
    '<a href="http://www.nibbleblog.com">Nibbleblog</a>',
)

If you wanted the link to open in a new window, you would simply write this instead:

'nav_links'=>array (
    '<a href="http://www.nibbleblog.com" target="_blank">Nibbleblog</a>',
)

Note that the links of the bar will appear in the order you write them here, for instance:

'nav_links'=>array (
    '<a href="http://www.nibbleblog.com" target="_blank">Nibbleblog</a>',
    '<a href="http://www.forum.nibbleblog.com" target="_blank">Forum</a>',
    '<a href="http://www.docs.nibbleblog.com" target="_blank">Docs</a>',
)

Would result in the links appearing in the order:
Nibbleblog | Forum | Docs


Social buttons

To show the social buttons, simply change the share_buttons parameter to:

'share_buttons'=>True,

Or if you want to hide them:

'share_buttons'=>False,

Content license

This setting was implemented to have a place to show the content's license, but can be used for any other thing. What you write in the content_license parameter will appear in the bottom left part of the blog. A practical example would be choosing a Creative Commons License (which directly gives you the html code for your page) :

'content_license'=>'<a rel="license" href="http://creativecommons.org/licenses/by-sa/4.0/"><img alt="Creative Commons License" style="border-width:0" src="http://i.creativecommons.org/l/by-sa/4.0/88x31.png" /></a><br />This work is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by-sa/4.0/">Creative Commons Attribution-ShareAlike 4.0 International License</a>.',

Regards

Re: [v0.3/nb3.7.x] Ao theme

I like very much!

If you want can upload the theme on the demo!

regards

Re: [v0.3/nb3.7.x] Ao theme

Hi Diego, I'm glad you liked it!

Having it in the demo would be awesome, thanks! big_smile

Regards

Re: [v0.3/nb3.7.x] Ao theme

Done! I am made some change for the next version v3.7, some Helpers for themes.

Re: [v0.3/nb3.7.x] Ao theme

Great, thanks! Will you post some documentation for those new changes?

Regards

Re: [v0.3/nb3.7.x] Ao theme

I am making a new "wiki" here:

http://docs.nibbleblog.com/post/variabl … or-themes/

I hope finished before launch Nb v3.7.

You can see the changes on Simpler theme here in github https://github.com/dignajar/nibbleblog/ … es/simpler

Re: [v0.3/nb3.7.x] Ao theme

I upload your theme on my github account, I made some change on the comment form for the last version of Nb. I hope you do not mind.

regards

8 (edited by RMed 03-11-2013 19:56:25)

Re: [v0.3/nb3.7.x] Ao theme

That's fine Diego big_smile However, I think you have not uploaded the version from the nb_3.7 branch of my repository, which is the one that I have updated with the changes you made in 3.7 .

If you want, and to make things easier for you, I can fork your Nb repository and make pull requests whenever I make major changes in the theme.

I've also seen that I have missed some changes, I will add them ASAP.

Regards

Re: [v0.3/nb3.7.x] Ao theme

I've just published a new pre-release 0.2. It should be fully compatible with Nb 3.7.1, I'll update the first post with details.

Regards

Re: [v0.3/nb3.7.x] Ao theme

Updated on the demo!

Re: [v0.3/nb3.7.x] Ao theme

Hi, Can some tell me how to add Nav Link for the new pages in the theme.

Re: [v0.3/nb3.7.x] Ao theme

Hi, are you referring to adding a link for the pages created through the admin dashboard or for a generic case?

Regards

Re: [v0.3/nb3.7.x] Ao theme

Is it possible to add the menu item from dashboard?

I have seen your Navigation bar config.bit but lack of php knowledge i don't know how to add there.
Can you please tell me how to write the code to add a page link on the Menu bar as you did for the "Home".

Thanks

14 (edited by RMed 30-11-2013 08:44:42)

Re: [v0.3/nb3.7.x] Ao theme

imhawk619 wrote:

Is it possible to add the menu item from dashboard?

Not for now, at least. If I learn how to do it, I might try writing a plugin for Nibbleblog.

imhawk619 wrote:

I have seen your Navigation bar config.bit but lack of php knowledge i don't know how to add there.
Can you please tell me how to write the code to add a page link on the Menu bar as you did for the "Home".

I'm sorry, I know it is somewhat confusing hmm I'm going to release a version 0.3 later today which simplifies this and haves some other improvements. What I wrote for the "Home" link was so that it could be used on any blog regardless the language it is using, so it is not a good example, I'll try to clarify it in the first post as well.

Regards

Re: [v0.3/nb3.7.x] Ao theme

Thanks RMed for the clarification.

Re: [v0.3/nb3.7.x] Ao theme

Just published version 0.3. You can also find the explanations for the custom settings implemented in the theme so that they are easier to understand.

Regards

Re: [v0.3/nb3.7.x] Ao theme

Thanks for the new version, every thing is working fine.

One doubt how to write to code for specific page in config.bit.
Below is your example:
'<a href="'.HTML_PATH_ROOT.'">'.$Language->get('HOME').'</a>',

for page how to write it suppose page named "TEST" i am write this but i am not getting the page.

'<a href="'.$page[1].'">TEST</a>',

Can you please tell me how to fix this.

Re: [v0.3/nb3.7.x] Ao theme

Hi, glad it's working fine.

Regarding what you ask, I think this would do what you want:

'<a href="'.$pages[1]['permalink'].'">'.$pages[1]['title'].'</a>',

Although you will have to figure out the index for the specific page (remember that the list starts from 0).

Regards

Re: [v0.3/nb3.7.x] Ao theme

Thanks RMed for your help.
its working smile