From 5d95bd3e943666544184de1b703719e2bd0f377a Mon Sep 17 00:00:00 2001 From: Marco Roth Date: Mon, 23 Oct 2023 04:50:56 +0200 Subject: [PATCH] Bootstrap Stimulus and Strada documentation pages --- .../pages/documentation/stimulus.html.erb | 28 ++++++++++++++++++- .../documentation/stimulus/guides.html.erb | 17 +++++++++++ .../guides/dont-use-inline-scripts.html.erb | 10 +++++++ ...porting-controllers-form-packages.html.erb | 10 +++++++ .../testing-stimulus-controllers.html.erb | 13 +++++++++ .../using-stimulus-with-typescript.html.erb | 10 +++++++ .../pages/documentation/strada.html.erb | 28 ++++++++++++++++++- .../documentation/strada/guides.html.erb | 17 +++++++++++ .../strada/guides/setup-strada.html.erb | 10 +++++++ .../pages/documentation/turbo.html.erb | 8 +++--- .../pages/documentation/turbo/guides.html.erb | 17 +++++++++++ 11 files changed, 162 insertions(+), 6 deletions(-) create mode 100644 app/content/pages/documentation/stimulus/guides.html.erb create mode 100644 app/content/pages/documentation/stimulus/guides/dont-use-inline-scripts.html.erb create mode 100644 app/content/pages/documentation/stimulus/guides/importing-controllers-form-packages.html.erb create mode 100644 app/content/pages/documentation/stimulus/guides/testing-stimulus-controllers.html.erb create mode 100644 app/content/pages/documentation/stimulus/guides/using-stimulus-with-typescript.html.erb create mode 100644 app/content/pages/documentation/strada/guides.html.erb create mode 100644 app/content/pages/documentation/strada/guides/setup-strada.html.erb create mode 100644 app/content/pages/documentation/turbo/guides.html.erb diff --git a/app/content/pages/documentation/stimulus.html.erb b/app/content/pages/documentation/stimulus.html.erb index 35c2f069..35d4cc7d 100644 --- a/app/content/pages/documentation/stimulus.html.erb +++ b/app/content/pages/documentation/stimulus.html.erb @@ -5,5 +5,31 @@ title: Stimulus <%= render Page::ContainerComponent.new(page: current_page) do |page| %> <% page.with_title(title: current_page.data.fetch("title")) %> - <%= render Page::ContributeComponent.new(file: current_page.asset.path.path) %> +
+
+

Handbook

+ +
  • + Handbook +
  • +
    + +
    +

    Reference

    + +
  • + Reference +
  • +
    + +
    +

    Guides

    + + <% site.resources.glob("documentation/stimulus/guides/*.html.*").sort_by(&:request_path).each do |page| %> +
  • + <%= page.data.fetch("title") %> +
  • + <% end %> +
    +
    <% end %> diff --git a/app/content/pages/documentation/stimulus/guides.html.erb b/app/content/pages/documentation/stimulus/guides.html.erb new file mode 100644 index 00000000..7e3de592 --- /dev/null +++ b/app/content/pages/documentation/stimulus/guides.html.erb @@ -0,0 +1,17 @@ +--- +title: Stimulus Guides +library: stimulus +breadcrumb: Guides +--- + +<%= render Page::ContainerComponent.new(page: current_page) do |page| %> + <% page.with_title(title: current_page.data.fetch("title")) %> + +

    Guides

    + + <% site.resources.glob("documentation/stimulus/guides/*.html.*").sort_by(&:request_path).each do |page| %> +
  • + <%= page.data.fetch("title") %> +
  • + <% end %> +<% end %> diff --git a/app/content/pages/documentation/stimulus/guides/dont-use-inline-scripts.html.erb b/app/content/pages/documentation/stimulus/guides/dont-use-inline-scripts.html.erb new file mode 100644 index 00000000..13c1ec1d --- /dev/null +++ b/app/content/pages/documentation/stimulus/guides/dont-use-inline-scripts.html.erb @@ -0,0 +1,10 @@ +--- +title: Don't use inline script tags +library: stimulus +--- + +<%= render Page::ContainerComponent.new(page: current_page) do |page| %> + <% page.with_title(title: current_page.data.fetch("title")) %> + + <%= render Page::ContributeComponent.new(file: current_page.asset.path.path) %> +<% end %> diff --git a/app/content/pages/documentation/stimulus/guides/importing-controllers-form-packages.html.erb b/app/content/pages/documentation/stimulus/guides/importing-controllers-form-packages.html.erb new file mode 100644 index 00000000..af091808 --- /dev/null +++ b/app/content/pages/documentation/stimulus/guides/importing-controllers-form-packages.html.erb @@ -0,0 +1,10 @@ +--- +title: Importing Stimulus controllers from NPM packages +library: stimulus +--- + +<%= render Page::ContainerComponent.new(page: current_page) do |page| %> + <% page.with_title(title: current_page.data.fetch("title")) %> + + <%= render Page::ContributeComponent.new(file: current_page.asset.path.path) %> +<% end %> diff --git a/app/content/pages/documentation/stimulus/guides/testing-stimulus-controllers.html.erb b/app/content/pages/documentation/stimulus/guides/testing-stimulus-controllers.html.erb new file mode 100644 index 00000000..de899e1c --- /dev/null +++ b/app/content/pages/documentation/stimulus/guides/testing-stimulus-controllers.html.erb @@ -0,0 +1,13 @@ +--- +title: Testing Stimulus Controllers +library: stimulus +--- + +<%= render Page::ContainerComponent.new(page: current_page) do |page| %> + <% page.with_title(title: current_page.data.fetch("title")) %> + + https://github.com/symfony/stimulus-testing + https://modern-web.dev/docs/test-runner/overview + + <%= render Page::ContributeComponent.new(file: current_page.asset.path.path) %> +<% end %> diff --git a/app/content/pages/documentation/stimulus/guides/using-stimulus-with-typescript.html.erb b/app/content/pages/documentation/stimulus/guides/using-stimulus-with-typescript.html.erb new file mode 100644 index 00000000..c6171427 --- /dev/null +++ b/app/content/pages/documentation/stimulus/guides/using-stimulus-with-typescript.html.erb @@ -0,0 +1,10 @@ +--- +title: Using Stimulus with TypeScript +library: stimulus +--- + +<%= render Page::ContainerComponent.new(page: current_page) do |page| %> + <% page.with_title(title: current_page.data.fetch("title")) %> + + <%= render Page::ContributeComponent.new(file: current_page.asset.path.path) %> +<% end %> diff --git a/app/content/pages/documentation/strada.html.erb b/app/content/pages/documentation/strada.html.erb index a0ccac0a..218b4fc0 100644 --- a/app/content/pages/documentation/strada.html.erb +++ b/app/content/pages/documentation/strada.html.erb @@ -5,5 +5,31 @@ title: Strada <%= render Page::ContainerComponent.new(page: current_page) do |page| %> <% page.with_title(title: current_page.data.fetch("title")) %> - <%= render Page::ContributeComponent.new(file: current_page.asset.path.path) %> +
    +
    +

    Handbook

    + +
  • + Handbook +
  • +
    + +
    +

    Reference

    + +
  • + Reference +
  • +
    + +
    +

    Guides

    + + <% site.resources.glob("documentation/strada/guides/*.html.*").sort_by(&:request_path).each do |page| %> +
  • + <%= page.data.fetch("title") %> +
  • + <% end %> +
    +
    <% end %> diff --git a/app/content/pages/documentation/strada/guides.html.erb b/app/content/pages/documentation/strada/guides.html.erb new file mode 100644 index 00000000..67623091 --- /dev/null +++ b/app/content/pages/documentation/strada/guides.html.erb @@ -0,0 +1,17 @@ +--- +title: Strada Guides +library: strada +breadcrumb: Guides +--- + +<%= render Page::ContainerComponent.new(page: current_page) do |page| %> + <% page.with_title(title: current_page.data.fetch("title")) %> + +

    Guides

    + + <% site.resources.glob("documentation/strada/guides/*.html.*").sort_by(&:request_path).each do |page| %> +
  • + <%= page.data.fetch("title") %> +
  • + <% end %> +<% end %> diff --git a/app/content/pages/documentation/strada/guides/setup-strada.html.erb b/app/content/pages/documentation/strada/guides/setup-strada.html.erb new file mode 100644 index 00000000..0218572f --- /dev/null +++ b/app/content/pages/documentation/strada/guides/setup-strada.html.erb @@ -0,0 +1,10 @@ +--- +title: Setup Strada +library: strada +--- + +<%= render Page::ContainerComponent.new(page: current_page) do |page| %> + <% page.with_title(title: current_page.data.fetch("title")) %> + + <%= render Page::ContributeComponent.new(file: current_page.asset.path.path) %> +<% end %> diff --git a/app/content/pages/documentation/turbo.html.erb b/app/content/pages/documentation/turbo.html.erb index 85c94ea3..9b03d104 100644 --- a/app/content/pages/documentation/turbo.html.erb +++ b/app/content/pages/documentation/turbo.html.erb @@ -5,9 +5,9 @@ title: Turbo <%= render Page::ContainerComponent.new(page: current_page) do |page| %> <% page.with_title(title: current_page.data.fetch("title")) %> -
    +
    -

    Handbook

    +

    Handbook

    <% TurboHandbookModel.all.sort_by(&:request_path).each do |page| %>
  • @@ -17,7 +17,7 @@ title: Turbo
  • -

    Reference

    +

    Reference

    <% TurboReferenceModel.all.sort_by(&:request_path).each do |page| %>
  • @@ -27,7 +27,7 @@ title: Turbo
  • -

    Guides

    +

    Guides

    <% site.resources.glob("documentation/turbo/guides/*.html.*").sort_by(&:request_path).each do |page| %>
  • diff --git a/app/content/pages/documentation/turbo/guides.html.erb b/app/content/pages/documentation/turbo/guides.html.erb new file mode 100644 index 00000000..adaed15d --- /dev/null +++ b/app/content/pages/documentation/turbo/guides.html.erb @@ -0,0 +1,17 @@ +--- +title: Turbo Guides +library: turbo +breadcrumb: Guides +--- + +<%= render Page::ContainerComponent.new(page: current_page) do |page| %> + <% page.with_title(title: current_page.data.fetch("title")) %> + +

    Guides

    + + <% site.resources.glob("documentation/turbo/guides/*.html.*").sort_by(&:request_path).each do |page| %> +
  • + <%= page.data.fetch("title") %> +
  • + <% end %> +<% end %>