Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main'
Browse files Browse the repository at this point in the history
  • Loading branch information
kikipoulet committed Jun 12, 2024
2 parents b4d67aa + 97343fc commit 7bb5125
Show file tree
Hide file tree
Showing 9 changed files with 156 additions and 18 deletions.
20 changes: 4 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,28 +18,16 @@
</span>
<br/>


#### Small side-project using SukiUI : [LlamaChat](https://github.com/kikipoulet/LlamaChat)

<br/>

## 🚀 Getting Started

### Install via Nuget (Recommended)

Visit [SukiUI on Nuget.org](https://www.nuget.org/packages/SukiUI)

### Add `.dll` reference via Github Action
## 📄 Documentation

[![SukiUI Continuous Integration](https://github.com/kikipoulet/SukiUI/actions/workflows/build.yml/badge.svg)](https://github.com/kikipoulet/SukiUI/actions/workflows/build.yml)
[Wiki](https://github.com/kikipoulet/SukiUI/wiki)

Download `SukiUI-dev` in artifacts
[SukiUI Documentation](https://kikipoulet.github.io/SukiUI/) *Work in Progress* 🚀
<br/><br/>

## 📄 Documentation

[SukiUI Documentation](https://kikipoulet.github.io/SukiUI/) *WIP*

[Wiki](https://github.com/kikipoulet/SukiUI/wiki)

## 📱 UI Theme

Expand Down
9 changes: 7 additions & 2 deletions SukiUI/Controls/SukiSideMenu.axaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,10 @@
<SplitView.Pane>
<Border>
<Grid Background="Transparent">
<suki:GlassCard Name="Glass" IsAnimated="False"
<suki:GlassCard Name="Glass"
BorderThickness="0"
CornerRadius="0" />
CornerRadius="0"
IsAnimated="False" />
<DockPanel>
<Button Name="PART_SidebarToggleButton"
Margin="7"
Expand Down Expand Up @@ -80,6 +81,10 @@
</SplitView>
</ControlTemplate>
</Setter>
<Style Selector="^[IsToggleButtonVisible=False] /template/ Button#PART_SidebarToggleButton">
<Setter Property="Opacity" Value="0" />
<Setter Property="IsHitTestVisible" Value="False" />
</Style>
<Style Selector="^[IsMenuExpanded=False] /template/ PathIcon#PART_ExpandIcon">
<Setter Property="RenderTransform" Value="rotate(-180deg)" />
</Style>
Expand Down
9 changes: 9 additions & 0 deletions SukiUI/Controls/SukiSideMenu.axaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,15 @@ namespace SukiUI.Controls;

public class SukiSideMenu : SelectingItemsControl
{
public static readonly StyledProperty<bool> IsToggleButtonVisibleProperty =
AvaloniaProperty.Register<SukiSideMenu, bool>(nameof(IsToggleButtonVisible), defaultValue: true);

public bool IsToggleButtonVisible
{
get => GetValue(IsToggleButtonVisibleProperty);
set => SetValue(IsToggleButtonVisibleProperty, value);
}

public static readonly StyledProperty<bool> IsMenuExpandedProperty =
AvaloniaProperty.Register<SukiSideMenu, bool>(nameof(IsMenuExpanded), defaultValue: true);

Expand Down
41 changes: 41 additions & 0 deletions docs/docs/documentation/controls/layout/settingslayout.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# Settings Layout

You can present `settings` through a `SettingsLayout`, which will update with the width of the window.

## Show

<img src="/controls/layout/settingslayout.gif" />

## Example

```xml
<suki:SettingsLayout>
<suki:SettingsLayout.Items>
<objectModel:ObservableCollection x:TypeArguments="suki:SettingsLayoutItem">
<suki:SettingsLayoutItem Header="Settings Part1">
<suki:SettingsLayoutItem.Content>
<Border Background="LightGray" Height="300" />
</suki:SettingsLayoutItem.Content>
</suki:SettingsLayoutItem>

<suki:SettingsLayoutItem Header="Settings Part 2">
<suki:SettingsLayoutItem.Content>
<Border Background="LightGray" Height="300" />
</suki:SettingsLayoutItem.Content>
</suki:SettingsLayoutItem>

<suki:SettingsLayoutItem Header="Settings Part 3">
<suki:SettingsLayoutItem.Content>
<Border Background="LightGray" Height="300" />
</suki:SettingsLayoutItem.Content>
</suki:SettingsLayoutItem>
</objectModel:ObservableCollection>
</suki:SettingsLayout.Items>
</suki:SettingsLayout>
```

## See Also

[Demo: SukiUI.Demo/Features/Theming/ThemingView.axaml](https://github.com/kikipoulet/SukiUI/blob/main/SukiUI.Demo/Features/Theming/ThemingView.axaml)

[API: Controls/SettingsLayout.axaml.cs](https://github.com/kikipoulet/SukiUI/blob/main/SukiUI/Controls/SettingsLayout.axaml.cs)
27 changes: 27 additions & 0 deletions docs/docs/documentation/controls/layout/sukiwindow.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# SukiWindow

In SukiUI, `SukiWindow` replaces `Window` as the basis for building apps.

## Show

<img src="/controls/layout/sukiwindow.webp" />

## Example

```xml
<suki:SukiWindow>
<suki:SukiWindow.LogoContent>
<!-- Logo -->
</suki:SukiWindow.LogoContent>

<suki:SukiWindow.MenuItems>
<!-- Menu -->
</suki:SukiWindow.MenuItems>
</suki:SukiWindow>
```

## See Also

[Demo: SukiUI.Demo/SukiUIDemoView.axaml](https://github.com/kikipoulet/SukiUI/blob/main/SukiUI.Demo/SukiUIDemoView.axaml)

[API: Controls/SukiWindow.axaml.cs](https://github.com/kikipoulet/SukiUI/blob/main/SukiUI/Controls/SukiWindow.axaml.cs)
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
41 changes: 41 additions & 0 deletions docs/docs/zh/documentation/controls/layout/settingslayout.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# Settings Layout

可以通过 `SettingsLayout` 方便地呈现 App 的设置页。同时,它也会随着窗口宽度的变化而更新。

## 展示

<img src="/controls/layout/settingslayout.gif" />

## 示例

```xml
<suki:SettingsLayout>
<suki:SettingsLayout.Items>
<objectModel:ObservableCollection x:TypeArguments="suki:SettingsLayoutItem">
<suki:SettingsLayoutItem Header="Settings Part1">
<suki:SettingsLayoutItem.Content>
<Border Background="LightGray" Height="300" />
</suki:SettingsLayoutItem.Content>
</suki:SettingsLayoutItem>

<suki:SettingsLayoutItem Header="Settings Part 2">
<suki:SettingsLayoutItem.Content>
<Border Background="LightGray" Height="300" />
</suki:SettingsLayoutItem.Content>
</suki:SettingsLayoutItem>

<suki:SettingsLayoutItem Header="Settings Part 3">
<suki:SettingsLayoutItem.Content>
<Border Background="LightGray" Height="300" />
</suki:SettingsLayoutItem.Content>
</suki:SettingsLayoutItem>
</objectModel:ObservableCollection>
</suki:SettingsLayout.Items>
</suki:SettingsLayout>
```

## 参阅

[Demo: SukiUI.Demo/Features/Theming/ThemingView.axaml](https://github.com/kikipoulet/SukiUI/blob/main/SukiUI.Demo/Features/Theming/ThemingView.axaml)

[API: Controls/SettingsLayout.axaml.cs](https://github.com/kikipoulet/SukiUI/blob/main/SukiUI/Controls/SettingsLayout.axaml.cs)
27 changes: 27 additions & 0 deletions docs/docs/zh/documentation/controls/layout/sukiwindow.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# SukiWindow

在 SukiUI 中, `SukiWindow` 代替 `Window` 成为构建 App 的基础

## 展示

<img src="/controls/layout/sukiwindow.webp" />

## 示例

```xml
<suki:SukiWindow>
<suki:SukiWindow.LogoContent>
<!-- Logo -->
</suki:SukiWindow.LogoContent>

<suki:SukiWindow.MenuItems>
<!-- Menu -->
</suki:SukiWindow.MenuItems>
</suki:SukiWindow>
```

## 参阅

[Demo: SukiUI.Demo/SukiUIDemoView.axaml](https://github.com/kikipoulet/SukiUI/blob/main/SukiUI.Demo/SukiUIDemoView.axaml)

[API: Controls/SukiWindow.axaml.cs](https://github.com/kikipoulet/SukiUI/blob/main/SukiUI/Controls/SukiWindow.axaml.cs)

0 comments on commit 7bb5125

Please sign in to comment.