New HTML5UP theme: Phantom


#1

Hi,

before I submit this theme to themes.gohugo.io I would like to get some feedback.

I ported Phantom from HTMLUP5 to Hugo.

It is my very first theme.

I use it in my tech blog. http://www.hasecke.eu

I would be more than happy to get tips for improving.

Ciao!
juh


#2

Since you are creating a brand new theme, I would consider using the new block/base syntax in Hugo 0.16. With som few templates it would not make too much difference, but it will clean it up a little.


#3

Thanks for this hint. I’ll look at the documentation.

But a quick look at https://gohugo.io/templates/blocks/ gives me no idea what is the advantage of this approach.


#4

It may be in the eye of the beholder, but to me the advantage is obvious, and it becomes even more so when the complexity grows – it removes the partial include spaghetti and enables fairly well formed HTML templates.


#5

Nice, I like it.

Two ideas (non-tech perspective) :

  1. Have you thought about making your header/logo stick to the top when scrolling? Especially when browsing with a smartphone, I like that. You always have the main page just one tap away (instead of pressing the sandwich menu first), plus people will find it easier to remember your page name when they keep seeing it reading your articles.
  2. In my opinion, the blow view could use some (small) images. You might use the same banners that you use for the article preview on the homepage, but maybe a bit smaller / icon-like

Hope that inspires you somehow!


#7

I refactored the theme to make use of block templates.


#8

Good job. It’s great to see all this ports of high-quality themes coming to Hugo.

For a blog I would miss a feature: a way to let users comment on a post. Hugo ships with a template for Disqus. This could be added easily with a oneliner.


#9

Yes integrating Disqus is easy. I don’t use Disqus, Google Analytics or any other us-based service, because this is a privacy issue in Europe since Safe Harbour was cancelled.


#10

If a user doesn’t set his disqus shortname of a tracking id in the config file none of the templates will be included. Therefore, nobody will be tracked or treated as “digital cash cow” unless the site owner decides so.


#11

@bep Is the ‘block’ template system a replacement for ‘partials’ system?

I am confused because the Go Template Primer still shows the ‘partials’ based examples: http://gohugo.io/templates/go-templates/

The only official guide I found on Blocks is this: http://gohugo.io/templates/blocks/

Can you please point to more sources?

Thanks.


#12

No. Partials have been used as “poor mans blocks” in the past. Think of blocks as site structure, partials as … reusable snippets?


#13

No. Partials have been used as “poor mans blocks” in the past.

So it should be possible to have layouts completely devoid of Partials if Blocks are planned correctly?


#14

Yes, but partials still have usage.

See https://github.com/spf13/hugo/commit/c2bf748ec5ca662384953ec3fe4345218afb71b1

I left the partials in there – if we add more baseof.html templates in the future, we get less copy-and-paste.

The above is a pretty bad example – but it gets golden with more complex latyouts with default values in the blocks.


#15

OMG, I hadn’t seen the block thing. This is amazing. I’m glad I read this thread!

runs off to refactor all his themes


#16

Hello, very nice template.

i wanted to remove that white cross lines on the tiles, only maintain the opacity without the white cross lines.

How can i do that ?

Thks on advance


#17

What cross lines do you mean?

I am not a css expert, but I think you have to adjust the css files according to your needs.


#18

The cross lines you are asking about are rendered by the following CSS rule .tiles article > .image:after

To get rid of them simply remove the background-image property from the above rule in your theme’s CSS.


#19

Thk you onedrawinggperday.

solved.


#20

Hello,

i use an background-image on the body to cover all website.
How i make the image to have the same opacity (0.25), when menu is visible ?
i tried to put the image inside the wrapper, but only show half the image.

and also, how i stick the footer on the bottow ?

Thks in advance.


#21

@juh2 who ported this theme to Hugo has answered to you above.

In my previous reply I helped you with your other request.

But this is a Hugo forum for CSS stackoverflow.com is a better place.