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

New Hybrid Theme

Started by Muut Archive 9 years ago · 5 replies · 481 views
9 years ago

Take a look at my new site restyle, where I've opted to switch from Wordpress to Grav.
For the occasion, I've decided to create a custom Theme that is a mix between the Agency Theme and the Big Picture one (that still has many issues on mobile, no menu above all).
The result is a nimble one page Theme, with an amazing selection of fixed/masked backgrounds, that works perfectly on iOS and Android mobiles as well.
I've also added the feature to link directly to a modal ;)
I can share the Theme if people like it.

http://riccardosallusti.it

9 years ago

I've finally put the theme on github for convenience. Take a look at the portfolio template: in the <script> tag there's a small function, that is called on document ready, taking care of the modal linking:

JS
$(document).ready(function(){
        if (window.location.hash) {
            setTimeout(showpanel, 500)
        }
        function showpanel() {
            $(window.location.hash).modal()
        }
        $('.close-modal, .cl').click(function(){
            window.location.hash = " "
        });
});

It takes advantage of the very useful window.location.hash property, included in Grav framework, that returns any hash anchor on the URI. ;)
The only issue was that in the original Agency theme, when you close a modal, its hash stays in the URI, so I needed to remove it everytime a modal is closed (check the last click function).
Cheer ;)

Suggested topics

Topic Participants Replies Views Activity
Archive · by Deleted User, 9 years ago
0 1329 9 years ago
Archive · by Muut Archive, 9 years ago
2 922 9 years ago
Archive · by Muut Archive, 9 years ago
2 4051 9 years ago
Archive · by Muut Archive, 9 years ago
1 2930 9 years ago
Archive · by Muut Archive, 9 years ago
3 1108 9 years ago