commit c01ea42f08f44777f2a403a6e8fe0ecefa8508dc Author: david-swift Date: Sat Sep 14 16:08:06 2024 +0200 Initial commit diff --git a/.gitea/workflows/publish.yml b/.gitea/workflows/publish.yml new file mode 100644 index 0000000..80e5d81 --- /dev/null +++ b/.gitea/workflows/publish.yml @@ -0,0 +1,19 @@ +name: Gitea Actions Demo +run-name: ${{ gitea.actor }} is testing out Gitea Actions 🚀 +on: [push] + +jobs: + Explore-Gitea-Actions: + runs-on: volans + steps: + - run: echo "🎉 The job was automatically triggered by a ${{ gitea.event_name }} event." + - run: echo "🐧 This job is now running on a ${{ runner.os }} server hosted by Gitea!" + - run: echo "🔎 The name of your branch is ${{ gitea.ref }} and your repository is ${{ gitea.repository }}." + - name: Check out repository code + uses: actions/checkout@v4 + - run: echo "💡 The ${{ gitea.repository }} repository has been cloned to the runner." + - run: echo "🖥️ The workflow is now ready to test your code on the runner." + - name: List files in the repository + run: | + ls ${{ gitea.workspace }} + - run: echo "🍏 This job's status is ${{ job.status }}." \ No newline at end of file diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..29893dc --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +.DS_Store +/static/processed_images diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000..ee15423 --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,53 @@ +stages: + - deploy + +default: + image: debian:stable-slim + +variables: + # The runner will be able to pull your Zola theme when the strategy is + # set to "recursive". + GIT_SUBMODULE_STRATEGY: "recursive" + + # If you don't set a version here, your site will be built with the latest + # version of Zola available in GitHub releases. + # Use the semver (x.y.z) format to specify a version. For example: "0.17.2" or "0.18.0". + ZOLA_VERSION: + description: "The version of Zola used to build the site." + value: "" + +pages: + stage: deploy + script: + - | + apt-get update --assume-yes && apt-get install --assume-yes --no-install-recommends wget ca-certificates + if [ $ZOLA_VERSION ]; then + zola_url="https://github.com/getzola/zola/releases/download/v$ZOLA_VERSION/zola-v$ZOLA_VERSION-x86_64-unknown-linux-gnu.tar.gz" + if ! wget --quiet --spider $zola_url; then + echo "A Zola release with the specified version could not be found."; + exit 1; + fi + else + github_api_url="https://api.github.com/repos/getzola/zola/releases/latest" + zola_url=$( + wget --output-document - $github_api_url | + grep "browser_download_url.*linux-gnu.tar.gz" | + cut --delimiter : --fields 2,3 | + tr --delete "\" " + ) + fi + wget $zola_url + tar -xzf *.tar.gz + ./zola build + + artifacts: + paths: + # This is the directory whose contents will be deployed to the GitLab Pages + # server. + # GitLab Pages expects a directory with this name by default. + - public + + rules: + # This rule makes it so that your website is published and updated only when + # you push to the default branch of your repository (e.g. "master" or "main"). + - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH \ No newline at end of file diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..9e98ea4 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "themes/duckquill"] + path = themes/duckquill + url = https://codeberg.org/daudix/duckquill.git diff --git a/config.toml b/config.toml new file mode 100644 index 0000000..3d39023 --- /dev/null +++ b/config.toml @@ -0,0 +1,56 @@ +# Zola config + +title = "Aparoksha" +base_url = "https://www.aparoksha.dev/" +description = "One app, fully native on every platform" +theme = "duckquill" + +minify_html = true +default_language = "en" +compile_sass = true +author = "david-swift" + +build_search_index = true +taxonomies = [{ name = "tags" }] + +[markdown] +highlight_code = true +highlight_theme = "css" +smart_punctuation = true + +[extra] +stylesheets = [ + "custom.css" +] +primary_color = "#FF2D75" +primary_color_alpha = "#FF005020" +primary_color_dark = "#FF2D75" +primary_color_dark_alpha = "#FF2D7520" +issues_url = "https://git.aparoksha.dev/david-swift/aparoksha.dev/issues" +source_url = "https://git.aparoksha.dev/david-swift/aparoksha.dev" +show_copy_button = true + +[extra.footer] +show_copyright = true +show_powered_by = true +show_source = true + +[extra.nav] +links = [ + { name = "Guides" , sublinks = [ + { url = "@/backends/_index.md", name = "Backends" }, + { url = "/tutorials", name = "Tutorials" }, + { url = "/hig", name = "Human Interface Guidelines" }, + { url = "/docs", name = "Documentation" }, + ]}, + { url = "https://forums.aparoksha.dev/", name = "Community" }, + { url = "https://git.aparoksha.dev/aparoksha", name = "Code" }, +] + +[search] +index_format = "elasticlunr_json" + +[extra.comments] +host = "mastodon.de" +user = "david_swift" +show_qr = true diff --git a/content/_index.md b/content/_index.md new file mode 100644 index 0000000..c57496e --- /dev/null +++ b/content/_index.md @@ -0,0 +1,90 @@ ++++ ++++ + + + +# Native. Cross-platform. + +
+Create your next cross-platform app with Aparoksha to give it a native look on each platform. +Aparoksha is easy-to-use, safe, and aparoksha, meaning that its reactive and declarative approach as well as the clean syntax significantly enhance the readability. +
+ +Get Started + +
+ + + +## 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. + + + +{% crt() %} +``` +struct Timeline: View { + + var posts: Posts + + var view: Body { + ForEach(posts) { post in + Avatar(user: post.user) + Post(post: post) + } + } + +} +``` +{% end %} + +## 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: + + + +{% crt() %} +``` +struct SearchView: View { + + @State private var count = 0 + + var view: Body { + Button(icon: .minus) { + count -= 1 + } + Text("\(count)") + Button(icon: .plus) { + count += 1 + } + } + +} +``` +{% end %} + +## Supported Platforms + +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! + +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 the three major desktop platforms [GNOME](@/backends/Adwaita/index.md), [Windows](@/backends/WinUI/index.md), and [macOS](@/backends/AppKit/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. diff --git a/content/backends/Adwaita/Adwaita.png b/content/backends/Adwaita/Adwaita.png new file mode 100644 index 0000000..eba0d2c Binary files /dev/null and b/content/backends/Adwaita/Adwaita.png differ diff --git a/content/backends/Adwaita/App.png b/content/backends/Adwaita/App.png new file mode 100644 index 0000000..48a6f82 Binary files /dev/null and b/content/backends/Adwaita/App.png differ diff --git a/content/backends/Adwaita/Environment.png b/content/backends/Adwaita/Environment.png new file mode 100644 index 0000000..cd26e3c Binary files /dev/null and b/content/backends/Adwaita/Environment.png differ diff --git a/content/backends/Adwaita/index.md b/content/backends/Adwaita/index.md new file mode 100644 index 0000000..9c73b89 --- /dev/null +++ b/content/backends/Adwaita/index.md @@ -0,0 +1,52 @@ ++++ +title = "Adwaita" +description = "Develop beautiful apps following the design guidelines of the GNOME desktop." +date = 2023-09-12 +[taxonomies] +tags = ["Linux", "Aparoksha"] +[extra] +featured = true +banner = "Adwaita.png" ++++ + +Develop beautiful apps following the design guidelines of the GNOME desktop. + +Read the documentation to get started or browse the code on GitHub. + +## The Backend + +The Adwaita backend is based on the _libadwaita_ C API. +libadwaita is used for developing native GNOME apps. + +## The Development Environment + +It is recommended to develop Libadwaita apps on a Linux system. +Linux is probably available for your device and can be installed alongside Windows or macOS. +I recommend picking a Linux distribution offering a vanilla GNOME experience, such as Fedora or VanillaOS. + +Now, install GNOME Builder via the GNOME Software application. + +### Flatpak + +Flatpak facilitates the distribution of apps on Linux. +If you decide to use Flatpak already when developing the app, you do not have to install any dependencies on your system. +Simply clone the template repository, open in GNOME Builder, and run the template app. +Follow the instructions in the readme file to create your own app. + +{{ image(url="Environment.png", alt="A native GNOME app called Tuba") }} + +## The Design + +This backend allows the creation of apps following the GNOME Human Interface Guidelines. +The following screenshot serves as an example for GNOME's design language. + +{{ image(url="App.png", alt="A native GNOME app called Tuba" transparent=true) }} + +## Distribution + +The apps can be distributed using Flatpak. The most popular app store is Flathub. +Read the instructions in the official docs. + +## Aparoksha Interoperability +This backend is part of the Aparoksha package. If you use default Aparoksha elements, they will render correctly on GNOME. +You can call platform-specific widgets for GNOME as well. diff --git a/content/backends/AppKit/index.md b/content/backends/AppKit/index.md new file mode 100644 index 0000000..8fe179b --- /dev/null +++ b/content/backends/AppKit/index.md @@ -0,0 +1,11 @@ ++++ +title = "AppKit" +description = "Build fully native macOS apps." +date = 2024-09-13 +[taxonomies] +tags = ["macOS", "Aparoksha"] +[extra] +featured = true ++++ + +Hello diff --git a/content/backends/TermKit/index.md b/content/backends/TermKit/index.md new file mode 100644 index 0000000..8775d8c --- /dev/null +++ b/content/backends/TermKit/index.md @@ -0,0 +1,12 @@ ++++ +title = "TermKit" +description = "Create simple user interfaces for terminal applications." +date = 2024-07-10 +authors = ["david-swift"] +[taxonomies] +tags = ["Linux", "macOS"] +[extra] +hot = false ++++ + +Hello diff --git a/content/backends/WinUI/index.md b/content/backends/WinUI/index.md new file mode 100644 index 0000000..7625098 --- /dev/null +++ b/content/backends/WinUI/index.md @@ -0,0 +1,11 @@ ++++ +title = "WinUI" +description = "Create apps for Microsoft Windows." +date = 2024-09-13 +[taxonomies] +tags = ["Windows", "Aparoksha"] +[extra] +featured = true ++++ + +Hello diff --git a/content/backends/_index.md b/content/backends/_index.md new file mode 100644 index 0000000..1493f97 --- /dev/null +++ b/content/backends/_index.md @@ -0,0 +1,12 @@ ++++ +title = "Available Backends" +sort_by = "date" +template = "article_list.html" +page_template = "article.html" ++++ + +The backends listed here are based on the Meta package. +They can be used in combination with the Aparoksha package. + +The backends marked with a star are part of the Aparoksha package. +This means that all the user interface elements included in the Aparoksha package will automatically render correctly with these backends. diff --git a/content/david/index.md b/content/david/index.md new file mode 100644 index 0000000..b957720 --- /dev/null +++ b/content/david/index.md @@ -0,0 +1,14 @@ ++++ +title = "Hi!" +template = "article.html" ++++ + +I'm David, the maintainer of the Aparoksha project. +You can find me on Mastodon, +this project's Gitea instance, +and on GitHub. + +If you benefit from this project and have enough money, donations are appreciated to compensate the server costs. +Thank you! + +Don't forget to share your projects on the Fediverse and in the Aparoksha forums :) diff --git a/content/docs/index.md b/content/docs/index.md new file mode 100644 index 0000000..9e619e0 --- /dev/null +++ b/content/docs/index.md @@ -0,0 +1,7 @@ ++++ +title = "Documentation" +template = "article.html" +featured = true +[taxonomies] +tags = ["Linux", "macOS", "Windows", "Aparoksha"] ++++ diff --git a/content/hig/index.md b/content/hig/index.md new file mode 100644 index 0000000..0b1dcd5 --- /dev/null +++ b/content/hig/index.md @@ -0,0 +1,7 @@ ++++ +title = "Human Interface Guidelines" +template = "article.html" +featured = true +[taxonomies] +tags = ["Linux", "macOS", "Windows", "Aparoksha"] ++++ diff --git a/content/trailer.gif b/content/trailer.gif new file mode 100644 index 0000000..160e8b5 Binary files /dev/null and b/content/trailer.gif differ diff --git a/content/tutorials/GettingStarted/index.md b/content/tutorials/GettingStarted/index.md new file mode 100644 index 0000000..b0845ad --- /dev/null +++ b/content/tutorials/GettingStarted/index.md @@ -0,0 +1,7 @@ ++++ +title = "Getting Started" +description = "Learn Aparoksha following a simple path." +date = 2023-09-12 +[taxonomies] +tags = ["Linux", "macOS", "Windows", "Aparoksha"] ++++ diff --git a/content/tutorials/_index.md b/content/tutorials/_index.md new file mode 100644 index 0000000..830ae23 --- /dev/null +++ b/content/tutorials/_index.md @@ -0,0 +1,6 @@ ++++ +title = "Tutorials" +sort_by = "date" +template = "article_list.html" +page_template = "article.html" ++++ diff --git a/sass/custom.scss b/sass/custom.scss new file mode 100644 index 0000000..3bc4d26 --- /dev/null +++ b/sass/custom.scss @@ -0,0 +1,38 @@ +h1, +h2, +h3, +h4, +h5, +h6 { + font-weight: bold; + font-family: var(--font-system-ui) +} + +h1 { + font-weight: 900; + font-size: 3rem; +} + +h2 { + font-size: 2rem; +} + +h3 { + font-size: 1.5rem; +} + +h4 { + font-size: 1rem; +} + +h5 { + font-size: 0.75rem; +} + +h6 { + font-size: 0.5rem; +} + +.logo { + color: #EE2D75; +} \ No newline at end of file diff --git a/static/favicon.png b/static/favicon.png new file mode 100644 index 0000000..66edf05 Binary files /dev/null and b/static/favicon.png differ diff --git a/themes/duckquill b/themes/duckquill new file mode 160000 index 0000000..c821824 --- /dev/null +++ b/themes/duckquill @@ -0,0 +1 @@ +Subproject commit c8218246359680c124661ef905e04313a97ea703