Skip to content

Commit

Permalink
A series of small improvements to the docs and the docs site (#974)
Browse files Browse the repository at this point in the history
* change -k section to be accurate with new scaffolding options

* add bacon command since cargo watch suggests to use it

* fix links and code sections in the blog with dark mode enabled

* adjust the width of the page to always provide some padding and simplify
it a bit
  • Loading branch information
isaacdonaldson authored Nov 9, 2024
1 parent 9879c2c commit 2dc54b3
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 16 deletions.
6 changes: 3 additions & 3 deletions docs-site/content/docs/getting-started/tour/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ We have a base SaaS app with user authentication generated for us. Let's make it

<div class="infobox">

You can choose between generating an `api`, `html` or `htmx` scaffold using the required `-k` flag.
You can choose between generating an `api`, `html` or `htmx` scaffold using the respective `-api`, `--html`, and `--htmx` flags.
</div>

```sh
Expand Down Expand Up @@ -142,9 +142,9 @@ listening on port 5150

<div class="infobox">

Depending on which `-k` option you chose, the steps for creating a scaffolded resource will change. With the `api` flag or the `htmx` flag you can use the below example. But with the `html` flag, it is recommended you do the post creation steps in your browser.
Depending on which scaffold template option you chose (`-api`, `--html`, `--htmx`), the steps for creating a scaffolded resource will change. With the `--api` flag or the `--htmx` flag you can use the below example. But with the `--html` flag, it is recommended you do the post creation steps in your browser.

If you want to use `curl` to test the `html` scaffold, you will need to send your requests with the Content-Type `application/x-www-form-urlencoded` and the body as `title=Your+Title&content=Your+Content` by default. This can be changed to allow `application/json` as a `Content-Type` in the code if desired.
If you want to use `curl` to test the `--html` scaffold, you will need to send your requests with the Content-Type `application/x-www-form-urlencoded` and the body as `title=Your+Title&content=Your+Content` by default. This can be changed to allow `application/json` as a `Content-Type` in the code if desired.

</div>

Expand Down
6 changes: 6 additions & 0 deletions docs-site/content/docs/resources/faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,12 @@ Try [cargo watch](https://crates.io/crates/cargo-watch):
$ cargo-watch -x check -s 'cargo loco start'
```

Or [bacon](https://github.com/Canop/bacon)

```
$ bacon run
```

</details>
<br/>
<details>
Expand Down
17 changes: 6 additions & 11 deletions docs-site/static/styles/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -618,33 +618,28 @@ a.active {

@media (min-width: 640px) {
.container {
max-width: 640px;
max-width: calc(640px - 1rem);
}
}

@media (min-width: 768px) {
.container {
max-width: 768px;
max-width: calc(768px - 2rem);
}
}

@media (min-width: 1024px) {
.container {
max-width: 1024px;
max-width: calc(1024px - 6rem);
}
}

@media (min-width: 1280px) {
.container {
max-width: 1280px;
max-width: calc(1280px - 8rem);
}
}

@media (min-width: 1536px) {
.container {
max-width: 1536px;
}
}

.prose {
color: var(--tw-prose-body);
Expand Down Expand Up @@ -1005,7 +1000,7 @@ a.active {
--tw-prose-body: var(--foreground);
--tw-prose-headings: var(--foreground);
--tw-prose-lead: #4b5563;
--tw-prose-links: #111827;
--tw-prose-links: var(--foreground);
--tw-prose-bold: #111827;
--tw-prose-counters: #6b7280;
--tw-prose-bullets: #d1d5db;
Expand All @@ -1015,7 +1010,7 @@ a.active {
--tw-prose-captions: #6b7280;
--tw-prose-kbd: #111827;
--tw-prose-kbd-shadows: 17 24 39;
--tw-prose-code: #111827;
--tw-prose-code: var(--foreground);
--tw-prose-pre-code: #e5e7eb;
--tw-prose-pre-bg: #1f2937;
--tw-prose-th-borders: #d1d5db;
Expand Down
2 changes: 1 addition & 1 deletion docs-site/templates/docs/page.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
{% block content %}
<div role="document">
<div class="bg-redrust text-background dark:bg-zinc-900">
<div class="container xl:max-w-[80rem] xl:mx-auto">
<div class="container">
<aside class="w-full">
{{ macros_sidebar::docs_sidebar(current_section=current_section) }}
</aside>
Expand Down
2 changes: 1 addition & 1 deletion docs-site/templates/macros/header.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{% macro header(current_section) %}
<header
class=" sticky top-0 z-50 w-full border-border/40 backdrop-blur bg-background">
<div class="container relative flex h-14 md:grid md:grid-cols-[240px_minmax(0,1fr)] xl:max-w-[80rem] xl:mx-auto">
<div class="container relative flex h-14 md:grid md:grid-cols-[240px_minmax(0,1fr)]">
<div class="mr-4 hidden sm:flex">
<a class="flex mr-4 items-center space-x-2" href="/">
<img src="/icon.svg" width="30px" />
Expand Down

0 comments on commit 2dc54b3

Please sign in to comment.