diff --git a/src/main.imba b/src/main.imba index 833b577..7bdbec1 100644 --- a/src/main.imba +++ b/src/main.imba @@ -1,6 +1,6 @@ global css html, body m:0 p:0 - body ff:mono bgc:gray9 + body ff:mono bgc:gray9 mt:80px mt@portrait: 0 a c:violet6 td:none td@hover:underline .active filter:brightness(130%) .activated bgc:violet3 @@ -19,7 +19,7 @@ global css tag App css - d:bbox mx:auto my:50px bgc:white p:40px rd:5px maw:1024px of:auto + d:vcc mx:auto my:50px bgc:white p:40px pb:60px rd:5px maw:1024px of:auto @lt-xs m:0 px:0 rd:0 @@ -51,7 +51,7 @@ tag imba-code < pre &.content c:gray3 &.url bgc:gray3 .url bgc:white c:gray7 rd:full p:4px - + file if file <.url> url if url @@ -101,11 +101,6 @@ tag pro-tip import './views/home.imba' import './views/installation.imba' import './views/usage.imba' - -tag view-use-cases - "Examples:" - -tag view-why-to-use-it - "Why?" +import './views/abstract.imba' imba.mount if import.meta.env.MODE is 'development' \ No newline at end of file diff --git a/src/views.json b/src/views.json index 3d0d18e..a89f9cd 100644 --- a/src/views.json +++ b/src/views.json @@ -1 +1 @@ -["home","use-cases","why-to-use-it","installation","usage"] \ No newline at end of file +["home","installation","usage","abstract"] \ No newline at end of file diff --git a/src/views/abstract.imba b/src/views/abstract.imba new file mode 100644 index 0000000..07364ab --- /dev/null +++ b/src/views/abstract.imba @@ -0,0 +1,2 @@ +tag view-abstract + 11 \ No newline at end of file diff --git a/src/views/usage.imba b/src/views/usage.imba index de4d474..9a4008e 100644 --- a/src/views/usage.imba +++ b/src/views/usage.imba @@ -1,5 +1,31 @@ +def goto(target) + R.go(location.href) + target.scrollIntoView! + +global css + .c-list + bgc:yellow1 py:30px mb:60px w:fit-content + li pr: 35px + li@hover cursor:pointer + ul fw:bold + li li fw:normal c:blue6 + li li@hover c:blue4 + +tag content-list < ul + + tag view-usage + +
    • 'Components' +
    • 'ref' +
    • 'toggle' +
    • 'router' +
      • 'Pro-router tips' +
      • 'R.param' +
      • 'R.write' +
      • 'Setters and getters' + "Components" "This integration provides " 3 " components:" @@ -11,7 +37,7 @@ tag view-usage "."

        - <.bordered> "" + <$ref.bordered> "" " generates a link with a proper address hooked to the router."

        @@ -73,7 +99,7 @@ tag view-usage "Pro-router treats underscore prefixed values as local and never pass it further."

        - <.bordered> "" + <$toggle.bordered> "" " generates switch on/off element writing to url flag with a given name."

        @@ -93,7 +119,7 @@ tag view-usage 'Switch disabled'

        - <.bordered> "" + <$router.bordered> "" " displays current view."

        @@ -129,11 +155,11 @@ tag view-usage "pro-router{ ' view'}{ '='}{ 'R'}{ '.'}param{<.c-br> '('}{ 'subview'}{<.c-br> ')'}"
        - "Pro-router tips" + "Pro-router tips" "Further reading is not about functionalities provided by this package itself but the ones you will be using straight from pro-router."

        - <.example> + <$param.example> "{ 'R'}{ '.'}param{<.c-br> '('}{ 'key'}{<.c-br> ')'}"

        "Use it to receive param value for given { 'key' }." @@ -148,7 +174,7 @@ tag view-usage

        "You can ommit getter by going straight for the parameter."

        - <.example> + <$write.example> "{ 'R'}{ '.'}write{<.c-br> '('}{ 'key'}{ ','} value{<.c-br> ')'}"

        "Use it to store the { 'value' } under given param { 'key' }." @@ -162,7 +188,7 @@ tag view-usage "input{ '$v'} type{ '='}{ 'text'} value{ '='}{ 'R'}{ '.'}param{<.c-br> '('}{ 'user-input'}{<.c-br> ')'} { '@keyup='}{ 'R'}{ '.'}write{<.c-br> '('}{ 'user-input'}{ ', '}{ '$v'}{ '.'}value{<.c-br> ')'}" - "Using getters and setters" + "Using getters and setters" "This is very simple yet powerful feature which can fullfil many different functions."

        diff --git a/vite.config.js b/vite.config.js index b8c311a..ee2d83d 100644 --- a/vite.config.js +++ b/vite.config.js @@ -52,7 +52,6 @@ function proRouterViews() { missingDeclarations.forEach(function(view){ let paths = viewPaths[view] ||= [] if(!((paths[0] == id) && (paths.length > 1))){ - console.log(2) paths = without(id, paths) views = without(view, views) viewsList = without(view, viewsList)