test
Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • fdussaussoy Friend
    #202772

    Hi, I’m working on a classified website. this is my PC and full screen layout : placedevillejuif.wytaa.fr

    I’m satisifed with this and I want to keep this layout but I also want to have a second layout for mobiles.

    I draw what I want on Photoshop, this is the template I would like :
    fotoforum.fr/photos/2014/11/13.4.png

    Can you please explain how to create and manage 2 versions of layout with puresite template for tjis kind of component ?
    thanks and regards,
    Franco

    Adam M Moderator
    #555407

    Hi Franco,

    I checked your site here in mobile device but didn’t see any problem as it looks good, could you please confirm your status or clarify a little bit so I can assist you better ?

    fdussaussoy Friend
    #555429

    Hi Adam,

    You’re right there’is no problem but I want to change mobile layout and keep full screen layout as like it is actually. look at my explanation :

    I want to do this for mobile layout (resize image, change column order and fields order), like this :

    thank you for your help !
    🙂


    1. 17.0
    2. 13.4
    3. Sans-titre
    Adam M Moderator
    #555510

    Hi,

    In this case, please temporary disable CSS compression (in Extensions >>> Template Manager >>> choose your template >>> switch to tab T3 Options) then let me know. I need to take a closer look at the code in order to provide your CSS style for this part.

    fdussaussoy Friend
    #555543

    Hi Adam, it’s done. I’ve disabled CSS compression.

    Please find below more details of structure :

    I’m using “jom classifieds” component and a file called “default_list.php” to retrieve datas and load them into a html table.
    I’ve made an override of this file in “/templates/ja_puresite/html/com_jomclassifieds/adverts” directory, so that I can modify order of content.

    This component is using “jomClassifieds.css”. This path’s file is “hard coded” in “/components/com_jomclassifieds/jomclassifieds.php” like this :

    [PHP]// Load CSS & JavaScript
    $document = JFactory::getDocument();
    $document->addStyleSheet(JURI::root().”components/com_jomclassifieds/css/jomClassifieds.css”, ‘text/css’, “screen”);[/PHP]

    So administrator of this component told me it wasn’t possible to override css.

    I also see that in “default_list.php”, there is a “addStyleDeclaration” block :

    $style = '@media (max-width: 760px) {

    div#jomclassifieds tbody .imgcol:before, div#jomclassifieds tbody .titlecol:before {
    content: "";
    }
    div#jomclassifieds tbody .pricecol:before {
    content: " '. JText::_('PRICE').' ";
    font-weight:bold;
    }
    div#jomclassifieds tbody .datecol:before {
    content: " '. JText::_('DATE_ADDED').' ";
    font-weight:bold;
    }

    }';
    $document->addStyleDeclaration( $style );

    ?>

    I hope this will help you ? Do you think we can transfer jomclassifieds.css code in template css code ?

    Thank you again for your help

    Adam M Moderator
    #555753

    Hi,

    There’s no need to extract code from jomclassifieds.css to the template, just open file root_folder/templates/ja_puresite/css/template.css and add this code at the end of file :

    @media (max-width: 760px) {
    #ja-content #jomclassifieds .listview tr:after {
    content: "";
    display: block;
    clear: both;
    }
    #ja-content #jomclassifieds .listview td {
    border: none;
    width: auto !important;
    }
    #ja-content #jomclassifieds .listview td.date,
    #ja-content #jomclassifieds .listview td:before {
    display: none;
    }
    #ja-content #jomclassifieds .listview td.imgcol {
    float: left;
    }
    #ja-content #jomclassifieds .listview td.imgcol img {
    position: static;
    max-height: none;
    }
    #ja-content #jomclassifieds .listview .imgblock {
    height: auto;
    padding: 0 !important;
    }
    }
    @media (max-width: 480px) {
    #ja-content #jomclassifieds .listview td.imgcol {
    max-width: 40%;
    }
    }

    Save your file and recheck.

    fdussaussoy Friend
    #555773

    Quite perfect !

    I’ve just lost “date column” (the first one before image) and I would like to change size font of listview H2…
    Is it possible ? How to do this ?
    Last thing, can you explain to me what is ” @media (max-width: 480px) ” ?

    Thanks a lot
    🙂

    Adam M Moderator
    #556028

    Hi,

    So you need to look for this part in previous code :

    #ja-content #jomclassifieds .listview td.date,
    #ja-content #jomclassifieds .listview td:before {
    display: none;
    }

    then update a little bit as below :

    #ja-content #jomclassifieds .listview td.date {
    float: left;
    }
    #ja-content #jomclassifieds .listview td:before {
    display: none;
    }

    The code to change product title (h2) is as below :

    div#jomclassifieds .listview h2,
    div#jomclassifieds h2 {
    font-size: 20px; /* you can use this property or remove it if you don't want to change the font-size */
    font-family: "Helvetica Neue",Helvetica,Arial,sans-serif; /* you can use this property or remove it if you don't want to change the font-family*/
    }

    Last thing is the @media query, the max-width indicate that custom CSS code inside will be used only when the viewport of device is smaller than 480px.

Viewing 8 posts - 1 through 8 (of 8 total)

This topic contains 8 replies, has 2 voices, and was last updated by  Adam M 10 years, 1 month ago.

We moved to new unified forum. Please post all new support queries in our New Forum