Skip to content
Grav 2.0 is officially stable. Read the announcement →
Archive

Woo template

Started by Muut Archive 11 years ago · 2 replies · 317 views
11 years ago

Before I submit an issue on github I wanted to check I did everything fine.
I started from the Woo skeleton and customized the modular home page. Modifying the 'features' bit makes the layout sort of crumble.
Here is my test site: I brought back the original 'Features' part and let the modified one 'Expertises' be displayed at the end (layout was the same with modular page modified to display 'Expertises' a the top in lieu of 'Features'). http://776d699873.testurl.ws/woo/
Thank you

11 years ago

It's a correct behavior. Styling is applied to sections. So for example features section has a "features" id in css. To add the same styling to your "expertises" features section, open layout.css and find following code (around line 248).

CSS
/* ------------------------------------------------------------------ */
/* d. Features Section
/* ------------------------------------------------------------------ */

#features {
   background: #fff;
   padding-top: 96px;
   padding-bottom: 78px;
   overflow: hidden;
}
#features .feature {
   margin-top: 30px;
   margin-bottom: 54px;
}
#features .right {
   padding-left: 32px;
   float: right;   
}
#features .left {
   padding-right: 32px;
   float: left;    
}
#features h3 {
   font: 16px/24px 'montserrat-bold', sans-serif;
   text-transform: uppercase;
   letter-spacing: 1px;
   color: #222;
}

Now modify it like that:

CSS
/* ------------------------------------------------------------------ */
/* d. Features Section
/* ------------------------------------------------------------------ */

#features, #expertises {
   background: #fff;
   padding-top: 96px;
   padding-bottom: 78px;
   overflow: hidden;
}
#features .feature, #expertises .feature {
   margin-top: 30px;
   margin-bottom: 54px;
}
#features .right, #expertises .right  {
   padding-left: 32px;
   float: right;   
}
#features .left, #expertises .left  {
   padding-right: 32px;
   float: left;   
}
#features h3, #expertises h3 {
   font: 16px/24px 'montserrat-bold', sans-serif;
   text-transform: uppercase;
   letter-spacing: 1px;
   color: #222;
}

Of course that means that for any other non-standard layouts you have to redo above code but that can be fixed easily.

CSS
/* ------------------------------------------------------------------ */
/* d. Features Section
/* ------------------------------------------------------------------ */

#features, .generic_features {
   background: #fff;
   padding-top: 96px;
   padding-bottom: 78px;
   overflow: hidden;
}
#features .feature, .generic_features {
   margin-top: 30px;
   margin-bottom: 54px;
}
#features .right, .generic_features  {
   padding-left: 32px;
   float: right;   
}
#features .left, .generic_features {
   padding-right: 32px;
   float: left;   
}
#features h3, .generic_features {
   font: 16px/24px 'montserrat-bold', sans-serif;
   text-transform: uppercase;
   letter-spacing: 1px;
   color: #222;
}

And then in your twig template where it says

TWIG
<section id="expertises">

add

TWIG
<section id="expertises" class="generic_features">

Hope i explained it a little.

11 years ago

Great, that was precisely what I had been missing!
Thx a lot Karol)

Suggested topics

Topic Participants Replies Views Activity
Archive · by Deleted User, 9 years ago
0 1330 9 years ago
Archive · by Muut Archive, 9 years ago
2 922 9 years ago
Archive · by Muut Archive, 9 years ago
2 4052 9 years ago
Archive · by Muut Archive, 9 years ago
1 2930 9 years ago
Archive · by Muut Archive, 9 years ago
3 1109 9 years ago