Hello Chris,

Thank you for your hint!

Since I'm new to  Nikola, please forgive me this follow-up:

How can I use the pagekind? I've set this in my base.tmpl:

% if 'index' in pagekind:
  <div class="jumbotron" style="background-image: 
url('images/Bild_Schule.jpg'); background-position: 50% 25%; 
background-repeat: no-repeat; background-size: cover; height: 500px;">
  <h1 class="font-weight-bold text-center" style="color: white; 
text-shadow: black 0.3em 0.3em 0.3em;">Herzlich willkommen auf der Seite 
des Freundeskreises der Orientierungsstufe München-Neuperlach!</h1>
  </div>
%endif

and in my home.rst I've added this:

.. pagekind: index

Unfortunately now the  jumbotron is not shown on the index/home-page.

Can you give me a hint, explanation?

Thank you very much.
Best regards
Axel

Am Dienstag, 16. Oktober 2018 18:54:16 UTC+2 schrieb Chris Warrick:
>
> On Tue, 16 Oct 2018 at 01:04, Axel Klein <[email protected] 
> <javascript:>> wrote: 
> > 
> > Hello, 
> > 
> > I want to have a jumbotron over the whole width of the vieport in the 
> landing page. 
> > 
> > To get that I cannot put the jumbotron inside the base.rst (with slug: 
> index) or more precisely inside a container, because it would not extend 
> beyond a certain width. 
> > 
> > My solution is now to put the jumbotron above the 
> > 
> > <div class="container" id="content" role="main"> 
> > ... 
> > </div> 
> > 
> > in the base.tmpl. 
> > 
> > It looks like this in 'base.tmpl': 
> > 
> > ... 
> > <!-- End of Menubar --> 
> > 
> > <div class="jumbotron" style="background-image: url('../some_jpg.jpg'); 
> background-position: 50% 25%; background-repeat: no-repeat; 
> background-size: cover; height: 500px;"> 
> >   <h1 class="font-weight-bold" style="color: white; text-shadow: black 
> 0.3em 0.3em 0.3em;">Some text</h1> 
> > </div> 
> > 
> > <div class="container" id="content" role="main"> 
> >     <div class="body-content"> 
> >         <!--Body content--> 
> >         ${template_hooks['page_header']()} 
> >         <%block name="content"></%block> 
> >         <!--End of body content--> 
> > 
> >         <footer id="footer"> 
> >             ${content_footer} 
> >             ${template_hooks['page_footer']()} 
> >         </footer> 
> >     </div> 
> > </div> 
> > ... 
> > 
> > 
> > Now I would like to have that jumbotron only in if the slug of the page 
> is 'index', so only in the landing page. 
> > 
> > Is there an 'if'-statement or similar with which I can achieve that? 
> > 
> > Thank you in advance and best regards 
> > Axel 
>
> Use the `pagekind` template variable: 
>
> https://getnikola.com/theming.html#identifying-and-customizing-different-kinds-of-pages-with-a-shared-template
>  
>
>
> -- 
> Chris Warrick <https://chriswarrick.com/> 
> PGP: 5EAAEA16 
>

-- 
You received this message because you are subscribed to the Google Groups 
"nikola-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to