Need help with a portfolio

Hello !
Im using the Ceevee skeleton and I’d like to replace all the photo in the portfolio part with YouTube video. I clearly cant do it with some help and I tried with multiples plugin but nothing work…

Thank for your help

@saku, Have had a look at CeeVee skeleton and created a simple example for showing videos. The look and feel might not be what you want, but at least it shows videos… :wink:

Here are the steps needed:

  • Install plugin devtools if not already:
    $ bin/gpm install devtools
  • Create an inherited theme to prevent loosing changes after CeeVee gets updated:
    $ bin/plugin devtools newtheme
    Answer a few questions and choose ‘inheritance’ when asked for the type of theme and then choose ‘ceevee’
  • Tell Grav to use your theme (let say you named it ‘mytheme’) in ‘/user/config/system.yaml’:
    pages:
      theme: mytheme
    
  • Copy template ‘/user/themes/ceevee/templates/modular/_portfolio.html.twig’ into folder ‘/user/themes/mytheme/templates/modular/’
  • Comment out lines 9-18
    {# <a href="#modal-{{ loop.index }}" title="">
    ...
    </a> #}
    
  • Comment out lines 24-37:
    {# {% for item in page.header.portfolio %}
    ...
    {% endfor %} #}
    
  • Below line 8 insert the following:
    <video controls="" width="250">
       <source src="{{ page.media[item.video].url}}" type="video/webm">
       Sorry, your browser doesn't support embedded videos.
    </video>
    
    Note: type="video/webm" must match the extension of your videos
  • To file ‘/user/pages/01.home/_portfolio.md’ add the videos to the list inside portfolio.
    portfolio:
      - video: flower.webm
    
  • In the browser you should now see something similar to:
    image
1 Like