Vendor TailwindCSS
This commit is contained in:
@@ -1,3 +1,5 @@
|
|||||||
|
Build TailwindCSS: `tailwindcss build -i assets/css/styles.css -o assets/static/styles.css -m`
|
||||||
|
|
||||||
# Welcome to Loco :train:
|
# Welcome to Loco :train:
|
||||||
|
|
||||||
[Loco](https://loco.rs) is a web and API framework running on Rust.
|
[Loco](https://loco.rs) is a web and API framework running on Rust.
|
||||||
@@ -5,7 +7,6 @@
|
|||||||
This is the **SaaS starter** which includes a `User` model and authentication based on JWT.
|
This is the **SaaS starter** which includes a `User` model and authentication based on JWT.
|
||||||
It also include configuration sections that help you pick either a frontend or a server-side template set up for your fullstack server.
|
It also include configuration sections that help you pick either a frontend or a server-side template set up for your fullstack server.
|
||||||
|
|
||||||
|
|
||||||
## Quick Start
|
## Quick Start
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
@@ -52,7 +53,6 @@ listening on http://localhost:5150
|
|||||||
|
|
||||||
You can check your [configuration](config/development.yaml) to pick either frontend setup or server-side rendered template, and activate the relevant configuration sections.
|
You can check your [configuration](config/development.yaml) to pick either frontend setup or server-side rendered template, and activate the relevant configuration sections.
|
||||||
|
|
||||||
|
|
||||||
## Getting help
|
## Getting help
|
||||||
|
|
||||||
Check out [a quick tour](https://loco.rs/docs/getting-started/tour/) or [the complete guide](https://loco.rs/docs/getting-started/guide/).
|
Check out [a quick tour](https://loco.rs/docs/getting-started/tour/) or [the complete guide](https://loco.rs/docs/getting-started/guide/).
|
||||||
|
|||||||
@@ -0,0 +1 @@
|
|||||||
|
@import "tailwindcss" source("..");
|
||||||
File diff suppressed because one or more lines are too long
@@ -8,7 +8,7 @@
|
|||||||
<title>{% block title %}{% endblock title %}</title>
|
<title>{% block title %}{% endblock title %}</title>
|
||||||
|
|
||||||
<script src="https://unpkg.com/htmx.org@2.0.0/dist/htmx.min.js"></script>
|
<script src="https://unpkg.com/htmx.org@2.0.0/dist/htmx.min.js"></script>
|
||||||
<script src="https://cdn.tailwindcss.com?plugins=forms,typography,aspect-ratio,line-clamp"></script>
|
<link href="/static/styles.css" rel="stylesheet">
|
||||||
{% block head %}
|
{% block head %}
|
||||||
|
|
||||||
{% endblock head %}
|
{% endblock head %}
|
||||||
@@ -105,4 +105,4 @@
|
|||||||
</script>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
@@ -46,6 +46,7 @@ workers:
|
|||||||
# Mailer Configuration.
|
# Mailer Configuration.
|
||||||
mailer:
|
mailer:
|
||||||
# SMTP mailer configuration.
|
# SMTP mailer configuration.
|
||||||
|
stub: true
|
||||||
smtp:
|
smtp:
|
||||||
# Enable/Disable smtp mailer.
|
# Enable/Disable smtp mailer.
|
||||||
enable: true
|
enable: true
|
||||||
@@ -93,6 +94,9 @@ database:
|
|||||||
auth:
|
auth:
|
||||||
# JWT authentication
|
# JWT authentication
|
||||||
jwt:
|
jwt:
|
||||||
|
location:
|
||||||
|
from: Cookie
|
||||||
|
name: auth_token
|
||||||
# Secret key for token generation and verification
|
# Secret key for token generation and verification
|
||||||
secret: DChMx15k52Z2YwTrT8tG
|
secret: DChMx15k52Z2YwTrT8tG
|
||||||
# Token expiration time in seconds
|
# Token expiration time in seconds
|
||||||
|
|||||||
@@ -51,7 +51,7 @@ pub async fn init_user_login(request: &TestServer, ctx: &AppContext) -> LoggedIn
|
|||||||
}
|
}
|
||||||
|
|
||||||
pub fn auth_header(token: &str) -> (HeaderName, HeaderValue) {
|
pub fn auth_header(token: &str) -> (HeaderName, HeaderValue) {
|
||||||
let auth_header_value = HeaderValue::from_str(&format!("Bearer {}", &token)).unwrap();
|
let auth_header_value = HeaderValue::from_str(&format!("Bearer {}", token)).unwrap();
|
||||||
|
|
||||||
(HeaderName::from_static("authorization"), auth_header_value)
|
(HeaderName::from_static("authorization"), auth_header_value)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user