News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

Curve2 Color Changer

Started by SMF Customization Team, April 16, 2019, 06:00:27 PM

Previous topic - Next topic

Diego Andrés

It's not part of the palettes, you'll have to edit the index.css file of the theme.
h3.catbg, h3.catbg a, h3.catbg a:hover {
color: #fff;
}

SMF Tricks - Free & Premium Responsive Themes for SMF.

Steffi2006

Hi!

Will there be a new version for sms 2.1.4.?

Thanks,
Steffi

Diego Andrés

Current version works with 2.1.4

SMF Tricks - Free & Premium Responsive Themes for SMF.

Steffi2006

Hm okay... my fresh installed SMF 2.1.4. broke after using the modification. I installed it with the packet manager and after that I have an totally white site.

Diego Andrés

I can't reproduce your issue.
Could you check you server error log? Likely you'll find information about what went wrong.

SMF Tricks - Free & Premium Responsive Themes for SMF.

samozin

#145
Quote from: shawnb61 on May 23, 2022, 09:48:10 PMI have been playing around with this mod also - working on a dark theme for our site. 

I see folks have asked how to use this in multiple copies of curve2.  I've been able to do this by following these 2 steps:

  • Make a copy of curve2 in the acp via "Install a new theme", "Create a copy of Default ".
  • Add the following code to the bottom of template_init() in index.template.php in your new copy:


    $settings['color_changes'] = array(
        'background' => array(
            array(
                'elements' => 'body',
                'properties' => array('background')
            )
        ),
        'foreground' => array(
            array(
                'elements' => 'body, strong, .strong, h1, h2, h3, h4, h5, h6, h3.titlebg, h4.titlebg, .titlebg, h3.subbg, h4.subbg, .subbg,
                #detailedinfo dt, #tracking dt, .approvebg',
                'properties' => array('color')
            )
        ),
        'primary_color' => array(
            array(
                'elements' => 'div.cat_bar, .amt, .dropmenu li a:hover, .dropmenu li:hover a, .dropmenu li a:focus,
                #top_info > li > a:hover, #top_info > li:hover > a, #top_info > li > a.open, .button.active, .button.active:hover',
                'properties' => array('background', 'border-color')
            ),
            array(
                'elements' => '#footer',
                'properties' => array('background')
            ),
            array(
                'elements' => '.button.active, .button.active:hover',
                'properties' => array('color' => '#fff')
            )
        ),
        'secondary_color' => array(
            array(
                'elements' => '.title_bar',
                'properties' => array('border-top-color', 'border-bottom-color')
            ),
            array(
                'elements' => '.dropmenu li a.active, #top_info li a.active, .dropmenu li a.active:hover, .dropmenu li:hover a.active, a.moderation_link,
                a.moderation_link:visited, .new_posts, .generic_bar .bar, .progress_bar .bar',
                'properties' => array('background', 'border-color')
            )
        ),
        'links' => array(
            array(
                'elements' => 'a, a:visited, .dropmenu li:hover li a, .dropmenu li li a, .button, .quickbuttons li, .quickbuttons li a,
                .quickbuttons li:hover a, .titlebg a, .subbg a, .quickbuttons li ul li a:hover',
                'properties' => array('color')
            )
        ),
        'gradient_end' => array(
            array(
                'elements' => '#wrapper, .dropmenu li ul, .top_menu, .dropmenu li li:hover, .button, .dropmenu li li:hover > a, .dropmenu li li a:focus,
                .dropmenu li li a:hover, #top_section, #search_form .button, .quickbuttons li, .quickbuttons li ul, .quickbuttons li ul li:hover,
                .quickbuttons ul li a:focus, .popup_window, #inner_section, .button:hover, .quickbuttons li:hover, .navigate_section ul, .popup_content, .up_contain,
                .button:focus, #search_form .button:hover, .quickbuttons li:hover',
                'properties' => array('background')
            )
        ),
        'gradient_start' => array(
            array(
                'elements' => '.dropmenu li ul, .top_menu, .dropmenu li li:hover, .button, .dropmenu li li:hover > a, .dropmenu li li a:focus,
                .dropmenu li li a:hover, #top_section, #search_form .button, .quickbuttons li, .quickbuttons li ul, .quickbuttons li ul li:hover,
                .quickbuttons ul li a:focus, .popup_window, #inner_section',
                'properties' => array('background-image' => 'linear-gradient(to bottom, {color} 0%, transparent 70%)')
            ),
            array(
                'elements' => '.button:hover, .button:focus, .quickbuttons li:hover, .navigate_section ul, .popup_content, .up_contain,
                #search_form .button:hover, .quickbuttons li:hover',
                'properties' => array('background-image' => 'linear-gradient(to bottom, transparent 0%, {color} 70%)')
            )
        ),
        'blocks_color' => array(
            array(
                'elements' => '.windowbg:nth-of-type(even), .bg.even, .information, .roundframe, .generic_list_wrapper, .approvebg,
                .windowbg:nth-of-type(odd) blockquote, .windowbg:nth-of-type(even) .bbc_alternate_quote',
                'properties' => array('background')
            )
        ),
        'blocks_alternate_color' => array(
            array(
                'elements' => '.windowbg:nth-of-type(odd), .bg.odd, .unread_notify:hover, .title_bar, tr.windowbg:hover,
                .windowbg:nth-of-type(even) blockquote, .windowbg:nth-of-type(odd) .bbc_alternate_quote, .bbc_code',
                'properties' => array('background')
            )
        ),
        'content_target_bg' => array(
            array(
                'elements' => '.windowbg:target',
                'properties' => array('background')
            ),
        ),
        'borders_color' => array(
            array(
                'elements' => '#wrapper, .button, .button:hover, .button:focus, .windowbg, .roundframe, .information, #top_section, .navigate_section ul, .dropmenu li ul, .top_menu,
                .unread_notify, .pm_unread, .alerts_unread, .dropmenu li li:hover > a, .dropmenu li li a:focus, .dropmenu li li a:hover, .up_contain,
                .boardindex_table .board_stats p, .children, #ic_recentposts td, .sub_bar, #info_center .sub_bar, .generic_bar, .progress_bar,
                #detailedinfo dl, #tracking dl, .inner, .signature, .attachments, .under_message, .custom_fields_above_signature, .custom_fields_below_signature,
                .quickbuttons li, .quickbuttons li:hover, .quickbuttons li ul, .quickbuttons li ul li:hover, .action_admin .table_grid td, .generic_list_wrapper,
                #topic_container .windowbg, #topic_icons .information, #messageindex .information, .approvebg, .popup_content, fieldset, #alerts tr.windowbg td,
                blockquote, #manage_boards li.windowbg, #manage_boards li.windowbg:last-child, #footer, .bbc_code, #inner_wrap',
                'properties' => array('border-color')
            ),
            array(
                'elements' => '.title_bar',
                'properties' => array('border-left-color', 'border-right-color')
            ),
            array(
                'elements' => 'hr',
                'properties' => array('background', 'border-color')
            )
        ),
        'top_section' => array(
            array(
                'elements' => '#top_section',
                'properties' => array('background')
            )
        ),
        'footer' => array(
            array(
                'elements' => '#footer',
                'properties' => array('background')
            )
        ),
        'buttons_text_color' => array(
            array(
                'elements' => 'a.button, .button, .quickbuttons li a, .button:hover, .button:focus, .quickbuttons li:hover>a, .quickbuttons li:hover li a',
                'properties' => array('color')
            ),
        ),
        'buttons_bg' => array(
            array(
                'elements' => '.button, .quickbuttons li, .button:hover, .button:focus, .quickbuttons li:hover, #search_form .button, #search_form .button:hover',
                'properties' => array('background')
            )
        ),
        'buttons_border' => array(
            array(
                'elements' => '.button, .quickbuttons li, .button:hover, .button:focus, .quickbuttons li:hover, #search_form .button, #search_form .button:hover',
                'properties' => array('border-color')
            )
        ),
        'special_titles_color' => array(
            array(
                'elements' => '.info .subject, h1.forumtitle a, .poster h4, .poster h4 a, .poster li:hover h4 a, .poster h4 a:hover .poster li h4 a,
                .poster h4 a:focus, #smfAnnouncements dt a, .keyinfo h5 a, .keyinfo h5 a strong, .current_page',
                'properties' => array('color')
            ),
            array(
                'elements' => '#smfAnnouncements dt',
                'properties' => array('border-color')
            )
        ),
        'sticky_topic' => array(
            array(
                'elements' => '.windowbg.sticky',
                'properties' => array('background')
            ),
        ),
        'sticky_locked_topic' => array(
            array(
                'elements' => '.windowbg.sticky.locked',
                'properties' => array('background')
            )
        ),
        'unapproved_topic' => array(
            array(
                'elements' => '.windowbg.approvetopic, .windowbg.approvepost, .approvebg',
                'properties' => array('background')
            )
        ),
        'locked_topic' => array(
            array(
                'elements' => '.windowbg.locked',
                'properties' => array('background')
            )
        ),
        'remove_shadows' => array(
            array(
                'elements' => '*',
                'properties' => array('box-shadow' => 'none !important', 'text-shadow' => 'none !important')
            )
        )
    );

This is basically creating a custom theme with the same controls as this mod.  The code above is a slightly modified version of code in buildCss(), following the instructions provided in the mod description.  If buildCss ever changes, what is copied here would need to change, too. 


yes that worked nicely with me with lit change  ... yes lets share colors ...

Senkusha

Has anybody else created their own color palettes?  I'm curious to see what other people have created (since I'm slightly colorblind) I don't feel too confident creating my own.  However, I would like more options.
--Senkusha
The Anime Brigade
Anime-style Role Playing Games and Discussion.
(SMF v. 2.1.4, PHP v. 8.0)

Advertisement: