diff --git a/Iceshrimp.Frontend/Components/TimelineComponent.razor b/Iceshrimp.Frontend/Components/TimelineComponent.razor new file mode 100644 index 00000000..5bab42a5 --- /dev/null +++ b/Iceshrimp.Frontend/Components/TimelineComponent.razor @@ -0,0 +1,29 @@ +@using Iceshrimp.Frontend.Core.Miscellaneous +@using Iceshrimp.Frontend.Core.Services +@using Iceshrimp.Shared.Schemas +@inject ApiService ApiService +@if (_init) +{ + @foreach (var note in Timeline) + { + + } +} + +@code { + private List Timeline { get; set; } = []; + private bool _init = false; + + public async Task Initialize() + { + var res = await ApiService.Timelines.GetHomeTimeline(new PaginationQuery() { Limit = 50 }); + Timeline = res; + } + + protected override async Task OnInitializedAsync() + { + await Initialize(); + _init = true; + } + +} diff --git a/Iceshrimp.Frontend/Components/TimelineComponent.razor.css b/Iceshrimp.Frontend/Components/TimelineComponent.razor.css new file mode 100644 index 00000000..e69de29b diff --git a/Iceshrimp.Frontend/Layout/MainLayout.razor b/Iceshrimp.Frontend/Layout/MainLayout.razor index 2da56391..49846ad9 100644 --- a/Iceshrimp.Frontend/Layout/MainLayout.razor +++ b/Iceshrimp.Frontend/Layout/MainLayout.razor @@ -4,9 +4,9 @@ -
+
@Body -
+
diff --git a/Iceshrimp.Frontend/Layout/MainLayout.razor.css b/Iceshrimp.Frontend/Layout/MainLayout.razor.css index 5a57dcdd..43282560 100644 --- a/Iceshrimp.Frontend/Layout/MainLayout.razor.css +++ b/Iceshrimp.Frontend/Layout/MainLayout.razor.css @@ -3,4 +3,7 @@ flex-direction: row; justify-content: space-between; background-color: var(--background-color) +} +.main { + width: 100%; } \ No newline at end of file diff --git a/Iceshrimp.Frontend/Pages/TimelinePage.razor b/Iceshrimp.Frontend/Pages/TimelinePage.razor new file mode 100644 index 00000000..8f66ef65 --- /dev/null +++ b/Iceshrimp.Frontend/Pages/TimelinePage.razor @@ -0,0 +1,9 @@ +@page "/" +@using Iceshrimp.Frontend.Components +
+ +
+ +@code { + +} \ No newline at end of file diff --git a/Iceshrimp.Frontend/Pages/TimelinePage.razor.css b/Iceshrimp.Frontend/Pages/TimelinePage.razor.css new file mode 100644 index 00000000..86f4ac4e --- /dev/null +++ b/Iceshrimp.Frontend/Pages/TimelinePage.razor.css @@ -0,0 +1,8 @@ +.scroller { + display: flex; + flex-direction: column; + overflow: scroll; + max-height: 100vh; + width: 100%; + align-items: center; +} \ No newline at end of file