Giter VIP home page Giter VIP logo

online-business-card's Introduction

Online Business Card application

Build

  • Get Stack, make
  • stack setup to get GHCJS etc
  • make all

View locally

  • make serve

    This command makes use of sws - a simple Haskell web server - to serve static content from the dist directory. If you have no sws installed feel free to use any other preferred web server serving files from the same directory.

Use for yourself (no programming needed)

  • Copy the contents of the dist directory to your web server path.

  • Create a Github Gist containing a json representation of the Data.Tree site tree (or edit the json example below.).

  • Create a gist containing a json representation of the blog index.

  • Replace the root gist id and the blog gist id in the index.html file with the ids of your gists:

    <script>window.RootG=JSON.stringify({"rootGist":"...", "blogGist":"..."})</script>

  • Open the page in a browser.

Example root gist

dataSource is a gist id. Gist is expected to contain a string with valid json.

blogSlug specifies the blog slug (blog part is processed in a different way).

collapsedMenuPaths is a list of slug prefixes for which the menu will be collapsed.

titleRoot specifies the root label in the title bar.

titleSep specifies a separator for title parts.

forest contains a list of trees representing hierarchical structure of the content.

Each element in the trees has the same properties:

dataSource is an id of a gist containg the html content of the page.

title is menu item title as shown in the menu.

path is slug.

{ "blogSlug": "blog"
, "collapsedMenuPaths": [ "blog", "photos" ]
, "titleRoot": "<♥>"
, "titleSep": " <> "
, "forest": 
    [
        [
            {
                "dataSource": "<gist-id>",
                "title": "Menu item 1",
                "path": "item1"
            },
            [
                [
                    {
                        "dataSource": "<gist-id>",
                        "title": "Submenu level 1 item 1",
                        "path": "subitem1"
                    },
                    []
                ],
                [
                    {
                        "dataSource": "<gist-id>",
                        "title": "Submenu level 1 item 2",
                        "path": "subitem2"
                    },
                    [
                        [
                            {
                                "dataSource": "<gist-id>",
                                "title": "Submenu level 2 item 1",
                                "path": "subsubitem1"
                            },
                            []
                        ],
                        ...
                    ]
                ],
                ...
            ]
        ],
        [
            {
                "dataSource": "<gist-id>",
                "title": "Menu item s",
                "path": "item2"
            },
            []
        ],
        ...
    ]
}

Example blog index gist

{
    "unblog": [
        {
            "day": 25,
            "month": 2,
            "year": 2019,
            "hash": "<gist-id>",
            "slug": "a-slug",
            "humanTitle": "An article"
        },
        {
            "day": 22,
            "month": 2,
            "year": 2019,
            "hash": "<gist-id>",
            "slug": "b-slug",
            "humanTitle": "Another article"
        },
        ...
    ]
}

online-business-card's People

Contributors

eugenen avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

hritikk527

online-business-card's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.