项目作者: christianmendoza

项目描述 :
Port of Visualize template by TEMPLATED to Hugo
高级语言: CSS
项目地址: git://github.com/christianmendoza/hugo-visualize-theme.git
创建时间: 2017-12-27T17:53:38Z
项目社区:https://github.com/christianmendoza/hugo-visualize-theme

开源协议:Other

下载


Visualize

Visualize is a simple, one-page portfolio design with a fully functional lightbox. It is a port of Visualize by TEMPLATED.

Hugo Visualize Theme screenshot

Installation

Inside the folder of your Hugo site run:

  1. $ cd themes
  2. $ git clone https://github.com/christianmendoza/hugo-visualize-theme

For more information read the official setup guide of Hugo.

Getting started

After installing the Visualize theme successfully it requires a just a few more steps to get your site finally running.

The config file

Take a look inside the exampleSite folder of this theme. You’ll find a file called config.toml. To use it, copy the config.toml in the root folder of your Hugo site. Feel free to customize this theme as you like.

Example demo

In the exampleSite folder you can find an example data folder with a gallery.toml file and static folder with images. Copy both folders to the root folder of your Hugo site. Start/restart your local server to see an example site with a few test placeholder images.

Add background image

Name your background image with the filename bg.jpg and add it to your static/images folder, i.e. static/images/bg.jpg

Add avatar and intro text

Name your avatar image with the filename avatar.jpg and add it to your static/images folder, i.e. static/images/avatar.jpg. Or alternatively, you can change avatar in config.toml to its respective path and filename. Update intro to change the intro text. You can use markdown in intro.

  1. [params.header]
  2. avatar = "images/avatar.jpg"
  3. intro = "This is **Visualize**, a responsive site template designed by [TEMPLATED](//templated.co)<br>and released for free under the Creative Commons License."

Data for all gallery images is stored in data/gallery.toml. Upload full and thumbnail size images to your static folder in any folder structure you wish. Use the following snippet below to add new images.

  1. [[image]]
  2. full = "images/fulls/01.jpg"
  3. thumb = "images/thumbs/01.jpg"
  4. caption = "Lorem ipsum dolor sit amet 1"

Each image has a caption text. Update both full and thumb accordingly the image’s respective file path.

Additional settings

There are additional settings for the gallery lightbox functionality you can configure which are located in the static/assets/js/main.js file.

  1. $('.thumbnails').poptrox({
  2. onPopupClose: function() { $body.removeClass('is-covered'); },
  3. onPopupOpen: function() { $body.addClass('is-covered'); },
  4. baseZIndex: 10001,
  5. useBodyOverflow: false,
  6. usePopupEasyClose: true,
  7. overlayColor: '#000000',
  8. overlayOpacity: 0.75,
  9. popupLoaderText: '',
  10. fadeSpeed: 500,
  11. usePopupDefaultStyling: false,
  12. windowMargin: (skel.breakpoint('small').active ? 5 : 50)
  13. });

The above are all default. Refer to the jquery.poptrox documentation for more configuration options.

Add icons to your social media properties. Change label, icon, and icon accordingly. Follow the same snippet to add more icon links. Remove any of those you don’t want.

  1. [[params.social]]
  2. label = "Twitter"
  3. icon = "fa-twitter"
  4. url = "https://twitter.com"

Add Google Analytics

Enable Google Analytics by adding your tracking id to googleAnalytics. Leave empty or remove if you don’t want.

  1. googleAnalytics = "UA-XXXXXXXX-1"

Nearly finished

In order to see your site in action, run Hugo’s built-in local server.

  1. $ hugo server

Now enter localhost:1313 in the address bar of your browser.

Contributing

Did you found a bug or got an idea for a new feature? Feel free to use the issue tracker to let me know. Or make directly a pull request.

License

The original template is released under the Creative Commons Attribution 3.0 License. Please keep the original attribution link when using for your own project. If you’d like to use the template without the attribution, you can check out the license option via the template author’s website.

Annotations

Also thanks to Steve Francia for creating Hugo and the awesome community around the project.