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

Community guidelines

Please keep discussions civil and on-topic. Repeated violations may lead to a temporary ban.

Themes & Styling

How to add a banner image across all pages, and variables for custom.css?

Started by yami 9 years ago · 3 replies · 1304 views
9 years ago

Hello,

I am wondering how to add a banner image across all pages? I know that I have to edit all templates, but I am really lost here, I have no experience web developing.
Ideally, I would like to have the banner be a random image from a banner image folder.

Browsing the forum I found this, but its not working:

TWIG
{% extends 'partials/base.html.twig' %}

{% block content %}
        <div class="flush-top" style="background-image: url({{url('theme://images/header.jpg')}});">
        </div>

    <div class="content-wrapper">
        <p>
            {{ page.content }}
        </p>
    </div>

{% endblock %}

Also, im wondering where to find all possible variables to edit at custom.css ?
It seems to be the easier way for me to edit my theme but I m not sure what are all the possible variables.

Thanks

9 years ago

Hello Yami,

to create a theme or even to change a theme u have to deal with a lot different languages. html, css, probably sass or less, js, twig and php. there are lots of webpages where u can learn these things i mentioned before.

i think that is what ur looking for:
http://gantry.org

its a highly cutomizable theme and u are able to adjust the layout in the backend.

c u

9 years ago

hello, npetri.

Gantry looks really cool and will definitely help me make my site, thanks!
I am also going to look around and start learning some of these languages, I know some bash and python and thats about it for me.

👍 1
9 years ago

hello yami,

yea, then u r familiar with the basics like data - and control structures.

https://channel9.msdn.com/Series/HTML5-CSS3-Fundamentals-Development-for-Absolute-Beginners
https://www.codecademy.com/learn/web
https://css-tricks.com/
http://learn.shayhowe.com/

and all usal homepages for twig, php, sass....

useful site to checkout sass statements
https://www.sassmeister.com/

useful for testing code snippets
https://www.sassmeister.com/

ok, c u

👍 1

Suggested topics

Topic Participants Replies Views Activity
Themes & Styling · by Pedro M, 2 months ago
4 195 2 months ago
Themes & Styling · by Ian, 2 months ago
3 91 2 months ago
Themes & Styling · by Norbert, 2 years ago
11 451 3 months ago
Themes & Styling · by Lukáš Findeis, 3 months ago
0 45 3 months ago
Themes & Styling · by Sebadamus, 4 months ago
5 125 3 months ago