Skip to content

Instantly share code, notes, and snippets.

@mohsenk
Last active October 2, 2018 17:33
Show Gist options
  • Save mohsenk/8781d6af450e81e89502571e1571aa51 to your computer and use it in GitHub Desktop.
Save mohsenk/8781d6af450e81e89502571e1571aa51 to your computer and use it in GitHub Desktop.

Revisions

  1. Mohsen revised this gist Sep 29, 2018. 1 changed file with 8 additions and 0 deletions.
    8 changes: 8 additions & 0 deletions BookatreatLandingPorposal.md
    Original file line number Diff line number Diff line change
    @@ -79,6 +79,14 @@ Every template is contains a `index.hbs` and `config.json`
    "type" : "file",
    "rules" : "min=10,max=100"
    },
    {
    "name" : "header_type" ,
    "title" : "Style of Header" ,
    "description" : "" ,
    "default" : "small",
    "type" : "enum=small,large,medium",
    "rules" : "min=10,max=100"
    },
    {
    "name" : "staff_list",
    "title" : "List of staff",
  2. Mohsen revised this gist Sep 29, 2018. 1 changed file with 3 additions and 3 deletions.
    6 changes: 3 additions & 3 deletions BookatreatLandingPorposal.md
    Original file line number Diff line number Diff line change
    @@ -35,13 +35,13 @@ Every template is contains a `index.hbs` and `config.json`
    {{/component}}
    </head>
    <body>
    {{#component header}}
    {{#component body.header}}
    <h1>Header</h1>
    {{/component}}
    {{#component body}}
    {{#component body.content}}
    <h1>Body</h1>
    {{/component}}
    {{#component footer}}
    {{#component body.footer}}
    <h1>Footer</h1>
    {{/component}}
  3. Mohsen revised this gist Sep 29, 2018. 1 changed file with 43 additions and 40 deletions.
    83 changes: 43 additions & 40 deletions BookatreatLandingPorposal.md
    Original file line number Diff line number Diff line change
    @@ -10,8 +10,48 @@
    - A Template is consis of components and every component has props


    ## Technical

    ## Configuration file
    Every template is contains a `index.hbs` and `config.json`

    ### Template sample

    ```handlebars
    <!DOCTYPE html>
    <html>
    <head>
    {{#component head}}
    <title>Kavenegar Call Backend Sample Node</title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    {{/component}}
    {{#component styles}}
    <style>
    body {
    background-color:{{color}};
    }
    </style>
    {{/component}}
    </head>
    <body>
    {{#component header}}
    <h1>Header</h1>
    {{/component}}
    {{#component body}}
    <h1>Body</h1>
    {{/component}}
    {{#component footer}}
    <h1>Footer</h1>
    {{/component}}
    {{render order="header,body,footer"}}
    </body>
    </html>
    ```

    ### Configuration sample

    ```json
    {
    @@ -69,47 +109,10 @@

    - Component design gives ability to use only some compoents that we need and maybe we can change order of components
    - We can bind variables to components and use that naming like componentname.propsname like `toolbar.name`
    - Page Editor use config.json file and show's the variable that organization must be fill.



    ## Page Editor

    Page editor get config file and show the form.

    ## Template Component Syntax

    ```handlebars
    <!DOCTYPE html>
    <html>
    <head>
    {{#component head}}
    <title>Kavenegar Call Backend Sample Node</title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    {{/component}}
    {{#component styles}}
    <style>
    body {
    background-color:{{color}};
    }
    </style>
    {{/component}}
    </head>
    <body>
    {{#component header}}
    <h1>Header</h1>
    {{/component}}
    {{#component body}}
    <h1>Body</h1>
    {{/component}}
    {{#component footer}}
    <h1>Footer</h1>
    {{/component}}

    {{render order="header,body,footer"}}
    </body>
    </html>
    ## Page Editor

    ```
    Page Editor use config.json file and show's the variable that organization must be fill.
  4. Mohsen revised this gist Sep 29, 2018. 1 changed file with 5 additions and 2 deletions.
    7 changes: 5 additions & 2 deletions BookatreatLandingPorposal.md
    Original file line number Diff line number Diff line change
    @@ -1,10 +1,13 @@
    # Landing Page Porposal

    ## Features

    - Ability to select diffrent templates
    - Ability to fill and change template variables ( like images and texts)
    - Ability to enable or disable any section or part of template
    - We can define templates that use handlebars syntax and save it to db or file system
    - Every template contains a config.json file and contains template configuration
    - Every landing page must use a template and fill it's variables

    - A Template is consis of components and every component has props



  5. Mohsen revised this gist Sep 29, 2018. 1 changed file with 22 additions and 15 deletions.
    37 changes: 22 additions & 15 deletions BookatreatLandingPorposal.md
    Original file line number Diff line number Diff line change
    @@ -81,24 +81,31 @@ Page editor get config file and show the form.
    <html>
    <head>
    {{#component head}}
    <title>Kavenegar Call Backend Sample Node</title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <title>Kavenegar Call Backend Sample Node</title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    {{/component}}
    {{#component styles}}
    <style>
    body {
    background-color:{{color}};
    }
    </style>
    {{/component}}
    </head>
    <body>
    {{#component header}}
    <h1>Header</h1>
    {{/component}}
    {{#component body}}
    <h1>Body</h1>
    {{/component}}
    {{#component footer}}
    <h1>Footer</h1>
    {{/component}}
    {{render order="header,body,footer"}}
    {{#component header}}
    <h1>Header</h1>
    {{/component}}
    {{#component body}}
    <h1>Body</h1>
    {{/component}}
    {{#component footer}}
    <h1>Footer</h1>
    {{/component}}
    {{render order="header,body,footer"}}
    </body>
    </html>
  6. Mohsen revised this gist Sep 29, 2018. 1 changed file with 5 additions and 3 deletions.
    8 changes: 5 additions & 3 deletions BookatreatLandingPorposal.md
    Original file line number Diff line number Diff line change
    @@ -80,21 +80,23 @@ Page editor get config file and show the form.
    <!DOCTYPE html>
    <html>
    <head>
    {{#component head}}
    <title>Kavenegar Call Backend Sample Node</title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    {{/component}}
    </head>
    <body>
    {{#component header}}
    <h1>Header</h1>
    {{/block}}
    {{/component}}
    {{#component body}}
    <h1>Body</h1>
    {{/block}}
    {{/component}}
    {{#component footer}}
    <h1>Footer</h1>
    {{/block}}
    {{/component}}
    {{render order="header,body,footer"}}
    </body>
  7. Mohsen revised this gist Sep 29, 2018. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion BookatreatLandingPorposal.md
    Original file line number Diff line number Diff line change
    @@ -96,7 +96,7 @@ Page editor get config file and show the form.
    <h1>Footer</h1>
    {{/block}}
    {{#render order="header,body,footer" /}}
    {{render order="header,body,footer"}}
    </body>
    </html>
  8. Mohsen revised this gist Sep 29, 2018. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion BookatreatLandingPorposal.md
    Original file line number Diff line number Diff line change
    @@ -96,7 +96,7 @@ Page editor get config file and show the form.
    <h1>Footer</h1>
    {{/block}}
    {{#render order=[header,body,footer] /}}
    {{#render order="header,body,footer" /}}
    </body>
    </html>
  9. Mohsen revised this gist Sep 29, 2018. 1 changed file with 2 additions and 0 deletions.
    2 changes: 2 additions & 0 deletions BookatreatLandingPorposal.md
    Original file line number Diff line number Diff line change
    @@ -95,6 +95,8 @@ Page editor get config file and show the form.
    {{#component footer}}
    <h1>Footer</h1>
    {{/block}}
    {{#render order=[header,body,footer] /}}
    </body>
    </html>
  10. Mohsen revised this gist Sep 29, 2018. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion BookatreatLandingPorposal.md
    Original file line number Diff line number Diff line change
    @@ -76,7 +76,7 @@ Page editor get config file and show the form.

    ## Template Component Syntax

    ```
    ```handlebars
    <!DOCTYPE html>
    <html>
    <head>
  11. Mohsen revised this gist Sep 29, 2018. 1 changed file with 27 additions and 1 deletion.
    28 changes: 27 additions & 1 deletion BookatreatLandingPorposal.md
    Original file line number Diff line number Diff line change
    @@ -72,4 +72,30 @@

    ## Page Editor

    Page editor get config file and show the form.
    Page editor get config file and show the form.

    ## Template Component Syntax

    ```
    <!DOCTYPE html>
    <html>
    <head>
    <title>Kavenegar Call Backend Sample Node</title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    </head>
    <body>
    {{#component header}}
    <h1>Header</h1>
    {{/block}}
    {{#component body}}
    <h1>Body</h1>
    {{/block}}
    {{#component footer}}
    <h1>Footer</h1>
    {{/block}}
    </body>
    </html>
    ```
  12. Mohsen created this gist Sep 29, 2018.
    75 changes: 75 additions & 0 deletions BookatreatLandingPorposal.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,75 @@
    # Landing Page Porposal


    - We can define templates that use handlebars syntax and save it to db or file system
    - Every template contains a config.json file and contains template configuration
    - Every landing page must use a template and fill it's variables




    ## Configuration file

    ```json
    {
    "name" : "Default Template",
    "description" : "A simple template contains heading and gallery and staff and contact",
    "components" : [
    {
    "name" : "toolbar",
    "description" : "",
    "defaultStatus" : "enabled",
    "props" : [
    {
    "name" : "website_title" ,
    "title" : "Website Title" ,
    "description" : "Browser title of website ( head's title) " ,
    "default" : "Bookatreat Website",
    "type" : "string",
    "rules" : ""
    },
    {
    "name" : "website_logo" ,
    "title" : "Toolbar Logo" ,
    "description" : "Image that shown in toolbar" ,
    "default" : "http://google.com/logo.png",
    "type" : "file",
    "rules" : "min=10,max=100"
    },
    {
    "name" : "staff_list",
    "title" : "List of staff",
    "description" : "array of staff list",
    "default" : [{
    "name" : "Mohsen Kairmi",
    "image" : "https://google.com/imag1.png",
    "job_title" : "Makeup Artist"
    }],
    "type" : {
    "name" : "string",
    "image" : "url",
    "job_title" : "string"
    },
    "rules" : {
    "name" : "len=10",
    "image" : "regexp=^[a-zA-Z]*$",
    "job_title" : "min=3,max=40"
    }
    }
    ]
    }
    ]
    }
    ```

    #### Notes :

    - Component design gives ability to use only some compoents that we need and maybe we can change order of components
    - We can bind variables to components and use that naming like componentname.propsname like `toolbar.name`
    - Page Editor use config.json file and show's the variable that organization must be fill.



    ## Page Editor

    Page editor get config file and show the form.