-
AuthorPosts
-
fdussaussoy Friend
fdussaussoy
- Join date:
- January 2014
- Posts:
- 23
- Downloads:
- 0
- Uploads:
- 3
- Thanks:
- 7
- Thanked:
- 2 times in 1 posts
November 16, 2014 at 1:04 pm #202772Hi, 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.pngCan you please explain how to create and manage 2 versions of layout with puresite template for tjis kind of component ?
thanks and regards,
FrancoAdam M ModeratorAdam M
- Join date:
- May 2014
- Posts:
- 5159
- Downloads:
- 33
- Uploads:
- 66
- Thanks:
- 95
- Thanked:
- 1271 times in 1235 posts
fdussaussoy Friendfdussaussoy
- Join date:
- January 2014
- Posts:
- 23
- Downloads:
- 0
- Uploads:
- 3
- Thanks:
- 7
- Thanked:
- 2 times in 1 posts
November 17, 2014 at 10:57 am #555429Hi 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 !
🙂- Adam M Moderator
Adam M
- Join date:
- May 2014
- Posts:
- 5159
- Downloads:
- 33
- Uploads:
- 66
- Thanks:
- 95
- Thanked:
- 1271 times in 1235 posts
November 18, 2014 at 3:42 am #555510Hi,
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 Friendfdussaussoy
- Join date:
- January 2014
- Posts:
- 23
- Downloads:
- 0
- Uploads:
- 3
- Thanks:
- 7
- Thanked:
- 2 times in 1 posts
November 18, 2014 at 6:58 am #555543Hi 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 ModeratorAdam M
- Join date:
- May 2014
- Posts:
- 5159
- Downloads:
- 33
- Uploads:
- 66
- Thanks:
- 95
- Thanked:
- 1271 times in 1235 posts
November 19, 2014 at 9:14 am #555753Hi,
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 Friendfdussaussoy
- Join date:
- January 2014
- Posts:
- 23
- Downloads:
- 0
- Uploads:
- 3
- Thanks:
- 7
- Thanked:
- 2 times in 1 posts
Adam M ModeratorAdam M
- Join date:
- May 2014
- Posts:
- 5159
- Downloads:
- 33
- Uploads:
- 66
- Thanks:
- 95
- Thanked:
- 1271 times in 1235 posts
November 21, 2014 at 3:06 am #556028Hi,
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.
1 user says Thank You to Adam M for this useful post
AuthorPostsViewing 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 ago.
We moved to new unified forum. Please post all new support queries in our New Forum
Jump to forum