Announcement

  •  » Themes
  •  » Theme creation in 2.1

#1 2010-05-27 23:07:05

lcavalie
Member
1970-01-01
15

Theme creation in 2.1

Ok so let's imagine that I want to create my own theme. I have version 2.1 and I will use 'clear' has my starting point and modify it to get what I want.

2 questions:

- how do I duplicate the clear theme and make it appear inside the application under a new name?
I assume that I duplicate the folder in the theme directory, give it a new name and... do something to make it appear in the administration theme panel.

- once I have that new theme that look exactly like 'clear' (let's name it 'mytheme') what files do I need to edit?

Thanks for the help

Offline

 

#2 2010-05-28 00:18:21

plg
Piwigo Team
Nantes, France, Europe
2002-04-05
13180

Re: Theme creation in 2.1

Hi lcavalie,

lcavalie wrote:

- how do I duplicate the clear theme and make it appear inside the application under a new name?

1) copy the "themes/clear" directory as "themes/mytheme"
2) edit themes/mytheme/themeconf.inc.php
3) in the header comment, change the line

Code:

Theme Name: clear

into

Code:

Theme Name: My Nice Theme

4) in the PHP code, change the line

Code:

  'name'  => 'clear',

into

Code:

  'name'  => 'mytheme',

5) go to admin>configuration>themes and "My Nice Theme" is available in the Inactive themes block


Latest blog post (November 9th 2018) Why Flickr could not remain free for ever

Offline

 

#3 2010-05-28 00:29:35

lcavalie
Member
1970-01-01
15

Re: Theme creation in 2.1

so much easier when you know what to do!

Offline

 

#4 2010-05-28 23:37:19

lcavalie
Member
1970-01-01
15

Re: Theme creation in 2.1

Now I'm running into a little problem that turn out to be quite complicated

I want to have a design where in the menu bar on the left the background of the top titles is black and the text is white. but the test of the links below is black on a white background. That's simple but hard to describe so I attach a little screen copy below.

I managed to do that through modifying the theme.css of my theme.

When I try to do the same thing for the categories menu (mbCategories) I run into a problem
the title is a link "Categories" and every option below is also a link.
If I change the link color to black than the title becomes black on black, if I change the link color to white than the menu options are white on white... problem!
And I cannot find something that would identify the Title as opposed to the menu options, a class would do that but there are none.

Any help or suggestion?

Thanks


Uploaded Images

Offline

 

#5 2010-05-29 00:01:44

tosca
Former Piwigo Team
Cévennes (France)
2006-09-23
567

Re: Theme creation in 2.1

If you use Firefox, try the Firebug add-on. It will give every class/id you'll need to know to fix your CSS rules accurately.

Last edited by tosca (2010-05-29 00:02:16)


My galleries : Photos, Watercolours, Recipes

Offline

 

#6 2010-05-29 00:23:00

P@t
Piwigo Team
Nice
2007-06-13
4098

Re: Theme creation in 2.1

#mbCategories dt a { color:white; }
#mbCategories dd a { color:black; }


P@t

Offline

 

#7 2010-05-29 00:56:11

lcavalie
Member
1970-01-01
15

Re: Theme creation in 2.1

That works.

Thanks a lot

Offline

 

#8 2010-06-28 01:02:10

plg
Piwigo Team
Nantes, France, Europe
2002-04-05
13180

Re: Theme creation in 2.1

basic documentation to [wiki] Create a Theme


Latest blog post (November 9th 2018) Why Flickr could not remain free for ever

Offline

 
  •  » Themes
  •  » Theme creation in 2.1

Board footer

Powered by FluxBB

github twitter facebook google+ newsletter Donate Piwigo.org © 2002-2019 · Contact