Files
marechai/Marechai/Pages/Home/Index.razor

70 lines
2.2 KiB
Plaintext
Raw Normal View History

2018-04-11 05:55:27 +01:00
@{
2020-05-21 18:55:56 +01:00
/******************************************************************************
2020-02-10 01:52:56 +00:00
// MARECHAI: Master repository of computing history artifacts information
2018-04-11 05:55:27 +01:00
// ----------------------------------------------------------------------------
//
2020-05-21 18:55:56 +01:00
// Filename : Index.razor
2018-04-11 05:55:27 +01:00
// Author(s) : Natalia Portillo <claunia@claunia.com>
//
// --[ Description ] ----------------------------------------------------------
//
// Index page (and news)
//
// --[ License ] --------------------------------------------------------------
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
// ----------------------------------------------------------------------------
2020-02-10 03:05:39 +00:00
// Copyright © 2003-2020 Natalia Portillo
2018-04-11 05:55:27 +01:00
*******************************************************************************/
}
2020-05-21 18:55:56 +01:00
@page "/"
@inherits OwningComponentBase<NewsService>
@inject IStringLocalizer<NewsService> L
<h2>@L["News"]</h2>
@foreach (var news in _news)
2018-04-13 02:42:27 +01:00
{
2020-02-10 22:44:18 +00:00
<table border="0" width="100%">
2018-04-13 02:42:27 +01:00
<tr>
<td colspan="2">
2019-05-19 16:53:18 +01:00
<b>@news.Timestamp</b>
2018-04-13 02:42:27 +01:00
</td>
</tr>
<tr>
<td colspan="2">
2019-05-19 16:53:18 +01:00
@news.Text
2018-04-13 02:42:27 +01:00
</td>
</tr>
2020-02-10 22:44:18 +00:00
<tr>
<td>@* TODO: Image *@</td>
<td>
2020-05-21 18:55:56 +01:00
<a href="/@news.Controller/@news.AffectedId">
2020-02-10 22:44:18 +00:00
@news.ItemName
</a>
</td>
</tr>
2018-04-13 02:42:27 +01:00
</table>
<br />
2020-05-21 18:55:56 +01:00
}
@code
{
List<NewsViewModel> _news;
protected override void OnInitialized()
{
_news = @Service.GetNews();
}
2018-04-13 02:42:27 +01:00
}