项目作者: navcoin

项目描述 :
NAV community site
高级语言: CSS
项目地址: git://github.com/navcoin/NavHub.git
创建时间: 2018-03-11T22:16:26Z
项目社区:https://github.com/navcoin/NavHub

开源协议:MIT License

下载


NAV community site

Maintained by the global NAV community

Netlify Status

Contributing to the site

Anyone can contribute to the site by making a pull request with the changes you’d like to see included.

Bounty Program

There is a bounty program which you can get paid in NAV for contributing to this websites.

https://www.reddit.com/r/NavCoin/comments/bttld6/websites_bounty_program

To make sure you are eligible to claim a bounty please follow these simple steps;

  1. Check the issues list for issues tagged with bounty or make your own issue and tag it with bounty-review to have it reviewed and assigned a bounty.
  2. Comment on the bounty issue you’d like to work on to claim it and ensure no one else is working on it.
  3. Fork the repository and do the work outlined in the bounty issue.
  4. Make a pull request to the main repository and fill out the pull request template in full.
  5. Once the pull request is reviewed, approved and merged to master the bounty will be paid.

Geting started

The NAV community site is built with the static site generator Hugo.

This website is built using Hugo Version 0.46.

Install Hugo

You will need Hugo installed on your system to preview any changes. Follow the install instructions for your OS here:
https://gohugo.io/getting-started/installing/

Clone the project

You will need to fork and clone the project on github if you wish to make any changes to the site

Running the site

After cloning the site, cd into the project directory and run it up:
cd nav-community-site
hugo server

This will serve the site on http://localhost:1313

Please note that Hugo is a hot loading site and that changing and saving files will auto rebuild the site for you.

Editing Content

All content for the site is held in markdown files in the content folder. The content sections match the sections of the site.

Adding news item

News items are now loaded in from the NavCoin Collective publication on Medium. To get an article featured on the site, publish it to your own Medium account then contact the publication editors who can help you get it included.

Adding projects

When adding a project it is recommend you use the Hugo commandline tool as this will use the right archetype and populate the properties

  1. hugo new projects/project-name/index.md

Project page front-meta control:

  1. title: "Project name" - Project Name
  2. date: 2018-03-07T10:27:21+13:00 - The date and time published - defaults to date created
  3. lastmod: 2018-03-19T10:27:21+13:00 - The date md was last changed
  4. draft: true - Is the item a draft - if true it is not incuded in the site
  5. author: "" - Who is the project lead
  6. description: "" - currently unused
  7. resources: [] - currently unused
  8. categories: [] - currently unused
  9. slug: "" - currently unused
  10. type: "projects" - Defines this is a project - DO NOT CHANGE
  11. feature_image: "" - currently unused
  12. show_title_text: false - currently unused
  13. in_progress: false - Signal that the project has been started
  14. completed: false - Signal project is complete
  15. percent_complete: 0 - How much of the project has been completed
  16. github_url: "" - Github repo of the project - Optional
  17. project_url: "" - The project URL - Optional
  18. reddit_url: "" - Reddit thread / URL - Optional
  19. twitter_url: "" - Project twitter url - Optional
  20. card_color: "" - Change the card color - Optional
  21. font_color: "" - Change the card font color - Optional
  22. weight: 0 - Allows the default postion on the roadmap to be overridden

Editing Layouts

The layouts are held in the theme folder currently nav-community-v1. Please review the Hugo documentation for layout template information

Editing Styles

CSS styles can be added/edited in the static/css directory. Most of the main styles are in style.css

Styles are built using sass. To compile the sass run npm run sass

Editing React Components

Some content is loaded dynamically as React Components. If you need to change these, you can watch for changes and build for development by running npm run watch:react.

Before you commit your PR with the changes, you’ll need to run npm run build which will compile the React components for production.

To add a new component simply add the js file to the /react/components/ directory. All files in this directory are considred entry points and are bundled by webpack. If you write sub components which aren’t entry points, add them to the /react/components/lib directory instead. Webpack will put all the dependencies into a common file called vendor.bundle.js. To add your components to the html, just make sure the vendor.bundle.js file is included into the page before your component followed by your component which should both be just before the closing body tag. eg.

  1. ...
  2. {{ partial "footer.html" . }}
  3. <!-- React components. -->
  4. <script src="/js/react/vendor.bundle.js"></script>
  5. <script src="/js/react/news-article.js"></script>
  6. </body>
  7. </html>