david-swift 9e622101aa
All checks were successful
Gitea Actions Demo / publish (push) Successful in 23s
Update website based on feedback
2024-10-18 23:04:45 +02:00

98 lines
2.5 KiB
Markdown

+++
+++
<!---
{{ image(url="trailer.gif" full_bleed=true) }}
--->
{% alert(warning=true) %}
This project is currently under development and not yet ready for production.
Follow the project [on the Fediverse](@aparoksha@mastodon.de) to stay up to date.
{% end %}
# Native. Cross-platform. <div class="logo"> Aparoksha. </div>
<div style="margin-bottom: 2em;">
Create your next cross-platform app with Aparoksha to give it a native look on each platform.
Aparoksha is easy-to-use, safe, and <i>aparoksha</i>, meaning that its reactive and declarative approach as well as the clean syntax significantly enhance the readability.
</div>
<a class="inline-button" href="/tutorials/gettingstarted/">Get Started</a>
<br>
## Start with Simple Views
A view is a piece of the user interface.
Create your own views, such as `Avatar`, `Post`, and `Timeline`.
Combine them into pages, windows, and apps.
<!---
<aside>
{{ image(url="trailer.gif" transparent=true) }}
</aside>
--->
```swift
struct Timeline: View {
var posts: Posts
var view: Body {
ForEach(posts) { post in
Avatar(user: post.user)
Post(post: post)
}
}
}
```
## The Magic of the State
Each of your views has the ability to store state throughout view updates.
Let's create a simple counter view:
<!---
<aside>
{{ image(url="trailer.gif" transparent=true) }}
</aside>
--->
```swift
struct SearchView: View {
@State private var count = 0
var view: Body {
Button(icon: .minus) {
count -= 1
}
Text("\(count)")
Button(icon: .plus) {
count += 1
}
}
}
```
## Supported Platforms
<div style="margin-bottom: 2em;">
Aparoksha's goal is to enable you to bring your app to as many users as possible on completely different platforms.
Therefore, it is built in an open and extensible way.
Creating a backend for a new platform is almost as simple as creating an app!
</div>
<a class="inline-button" href="https://meta.aparoksha.dev/documentation/meta/createbackend">Create a Backend</a>
<br>
A list of some backends is available [here](@/backends/_index.md). They can be combined with Aparoksha in a simple way.
Aparoksha itself currently supports [GNOME](@/backends/Adwaita/index.md) and [Windows](@/backends/WinUI/index.md).
What makes the Aparoksha project unique is that each backend is a fully independent project, optimized for its platform.
In a cross-platform app, you can leverage the full potential of the individual backends by writing platform-specific bits of code.