Advertisement:

Author Topic: How to modify Bender theme?  (Read 5076 times)

exichlo

  • Jr. Member
  • **
  • Posts: 54
How to modify Bender theme?
« on: February 12, 2014, 11:12:50 pm »
Quote
How to modify Bender theme
Bender's css style is done with SASS (Syntactically Awesome Stylesheets). Sass is a scripting language that is interpreted into Cascading Style Sheets (CSS), it makes easier to work with styles in your website.


Requisites
SASS require to be compiled, this is done with a Grunt task, and Grunt runs on NodeJS


First install NodeJS form the official website


Later you need to install Grunt and all its dependencies, on your Osclass root folder user this command

npm install

Hoorray! You have Grunt installed and working (Once you have nodeJS and grunt install, you don't need to do this again)

Doing some CSS work
The main file (main.css) is located on bender/css folder and is minified (your page will load faster). Modifying main.css is possible, but could be really had to do. Instead, it's better to modify and work with the sass files (.scss) located in bender/sass.

Once you modify the files, you need to "compile" and minify them, we have set up a Grunt task to do it, go to your Osclass root folder and use the following command

grunt sass

Can anyone translate this into simple English?

I'm using cpanel and ftp.

design

  • Hero Member
  • *****
  • Posts: 2619
  • Osclass 3.5 MAC/PC w/ Modern Browsers
Re: How to modify Bender theme?
« Reply #1 on: February 12, 2014, 11:41:11 pm »
I believe that is what you use if you are working on a local server, before you launch a live site.
other wise, it depends on how much you want to change. simple notepadxx or other text editor will work, also using web developer tools.

exichlo

  • Jr. Member
  • **
  • Posts: 54
Re: How to modify Bender theme?
« Reply #2 on: February 13, 2014, 08:22:22 pm »
Thank you for your answer!

Do you happen to know how to fix the main.css file? The file I have is one looooong line. It's so pain in the ass to do modification.

design

  • Hero Member
  • *****
  • Posts: 2619
  • Osclass 3.5 MAC/PC w/ Modern Browsers
Re: How to modify Bender theme?
« Reply #3 on: February 13, 2014, 08:47:16 pm »
attach the file to a reply, I'll unminify it for you and attach it back. will need to zip it

exichlo

  • Jr. Member
  • **
  • Posts: 54
Re: How to modify Bender theme?
« Reply #4 on: February 13, 2014, 09:45:58 pm »
Thank you a lot! I search the net and was able to unminify the css file. :)

Can you help me with adding a word into header.php?

Basically I want to add the and word like this: Login and Register for your free account

design

  • Hero Member
  • *****
  • Posts: 2619
  • Osclass 3.5 MAC/PC w/ Modern Browsers
Re: How to modify Bender theme?
« Reply #5 on: February 13, 2014, 09:47:37 pm »
where do you want it added? - screen shots work for this

exichlo

  • Jr. Member
  • **
  • Posts: 54
Re: How to modify Bender theme?
« Reply #6 on: February 13, 2014, 10:02:30 pm »
The word "AND" in between the Login and Register for a free account.

design

  • Hero Member
  • *****
  • Posts: 2619
  • Osclass 3.5 MAC/PC w/ Modern Browsers
Re: How to modify Bender theme?
« Reply #7 on: February 13, 2014, 10:24:23 pm »
anywhere you see this - you can change what is in the red and it will appear on the site. *disclaimer* this is only for a few scattered words, not as a language translator

<?php _e('E-mail', 'bender') ; ?>

exichlo

  • Jr. Member
  • **
  • Posts: 54
Re: How to modify Bender theme?
« Reply #8 on: February 14, 2014, 12:41:56 am »
Sorry, I was meaning adding the word "OR" like the image attached.

I have tried to add the word in the header.php file but it didn't came out right.
Code: [Select]
    <div class="wrapper">
        <div id="logo">
            <?php echo logo_header(); ?>
            <span id="description"><?php echo osc_page_description(); ?></span>
        </div>
        <ul class="nav">
            <?php if( osc_is_static_page() || osc_is_contact_page() ){ ?>
                <li class="search"><a class="ico-search icons" data-bclass-toggle="display-search"></a></li>
                <li class="cat"><a class="ico-menu icons" data-bclass-toggle="display-cat"></a></li>
            <?php ?>
            <?php if( osc_is_web_user_logged_in() ) { ?>
                <li class="first logged">
                    <span><?php echo sprintf(__('Hi %s''bender_red'), osc_logged_user_name() . '!'); ?>  &middot;</span>
                    <strong><a href="<?php echo osc_user_dashboard_url(); ?>"><?php _e('My account''bender_red'); ?></a></strong> &middot;
                    <a href="<?php echo osc_user_logout_url(); ?>"><?php _e('Logout''bender_red'); ?></a>
                </li>
            <?php } else { ?>
                <li><a id="login_open" href="<?php echo osc_user_login_url(); ?>"><?php _e('Login''bender_red') ; ?></a></li>
                <?php if(osc_user_registration_enabled()) { ?>
                <li><a href="<?php echo osc_register_account_url() ; ?>"><?php _e('Register for a free account''bender_red'); ?></a></li>
                <?php }; ?>
            <?php ?>
            <li class="publish"><a href="<?php echo osc_item_post_url_in_category() ; ?>"><?php _e("Publish your ad for free"'bender_red');?></a></li>
        </ul>
    </div>

design

  • Hero Member
  • *****
  • Posts: 2619
  • Osclass 3.5 MAC/PC w/ Modern Browsers
Re: How to modify Bender theme?
« Reply #9 on: February 14, 2014, 02:10:40 am »
 <li><a id="login_open" href="<?php echo osc_user_login_url(); ?>"><?php _e('Login', 'bender_red') ; ?></a> or </li> make sure you add a space after the </a> and before the the </li> so you words don't run in together

exichlo

  • Jr. Member
  • **
  • Posts: 54
Re: How to modify Bender theme?
« Reply #10 on: February 14, 2014, 12:51:15 pm »
Works like charm! Thank you very much!