Skip to content

Commit bdaa42a

Browse files
committed
(#83) Get rid of logs on the main page
1 parent 4887f00 commit bdaa42a

File tree

15 files changed

+63
-185
lines changed

15 files changed

+63
-185
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ Versioning](https://semver.org/spec/v2.0.0.html).
77
This file only documents changes in the site engine, not any changes in the
88
hosting infrastructure.
99

10+
## [Unversioned] (1.1.0)
11+
### Removed
12+
- There's no longer a **Resources** page; all the resources are now listed on the main page.
13+
1014
## [1.0.2] - 2021-02-22
1115
### Fixed
1216
- Pages now have proper titles

Codingteam.Site.Tests/Codingteam.Site.Tests.fsproj

Lines changed: 0 additions & 24 deletions
This file was deleted.

Codingteam.Site.Tests/Tests.fs

Lines changed: 0 additions & 24 deletions
This file was deleted.

Codingteam.Site/Clock.fs

Lines changed: 0 additions & 7 deletions
This file was deleted.

Codingteam.Site/Codingteam.Site.fsproj

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,6 @@
1919
</Target>
2020

2121
<ItemGroup>
22-
<Compile Include="CtorSettings.fs" />
23-
<Compile Include="Clock.fs" />
2422
<Compile Include="Controllers\HomeController.fs" />
2523
<Compile Include="Startup.fs" />
2624
<Compile Include="Program.fs" />
Lines changed: 2 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,10 @@
11
namespace Codingteam.Site.Controllers
22

3-
open System
4-
open System.Globalization
5-
63
open Microsoft.AspNetCore.Mvc
7-
open Microsoft.Extensions.Options
8-
9-
open Codingteam.Site
104

11-
type HomeController(options: IOptions<CtorSettings>, clock: Clock) =
5+
type HomeController() =
126
inherit Controller()
137

14-
let config = options.Value
15-
let getLogUrl (date : DateTime) =
16-
let dateString = date.ToString("yyyy/MM/dd", CultureInfo.InvariantCulture)
17-
sprintf "%s/%s.html" config.LogUrlPrefix dateString
18-
let logTimezone = TimeSpan.FromHours <| double config.LogTimeZoneOffset
19-
let getTodayLogUrl () = getLogUrl <| clock.GetUtcDateTime() + logTimezone
20-
218
member this.Index() =
22-
this.ViewData.["LogUrl"] <- getTodayLogUrl ()
23-
this.ViewData.["Title"] <- "Logs — Codingteam"
24-
this.View()
25-
26-
[<Route("resources")>]
27-
member this.Resources() =
28-
this.ViewData.["Title"] <- "Resources — Codingteam"
9+
this.ViewData.["Title"] <- "Codingteam"
2910
this.View()

Codingteam.Site/CtorSettings.fs

Lines changed: 0 additions & 5 deletions
This file was deleted.

Codingteam.Site/Startup.fs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,7 @@ type Startup(env: IWebHostEnvironment) =
2323
member __.ConfigureServices(services : IServiceCollection) : unit =
2424
services
2525
.AddOptions()
26-
.Configure<CtorSettings>(configuration.GetSection "CtorSettings")
27-
.AddSingleton(Clock.Default)
26+
.Configure(configuration)
2827
.AddMvc(fun options -> options.EnableEndpointRouting <- false)
2928
|> ignore
3029
services.AddControllersWithViews().AddRazorRuntimeCompilation()

Codingteam.Site/Views/Home/Index.cshtml

Lines changed: 52 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,55 @@
11
<p>Welcome! Codingteam is an open community of engineers and programmers.</p>
2-
<p>And here're today's conference logs:</p>
32

4-
<iframe class="logs" src="@ViewData["LogUrl"]"></iframe>
3+
<p>Here is a list of codingteam affiliated online resources:</p>
4+
5+
<ul class="fa-ul">
6+
<li>
7+
<a href="https://github.com/codingteam/">
8+
<i class="fa-li fa fa-github"></i> GitHub organization
9+
</a>
10+
</li>
11+
<li>
12+
<a href="xmpp:[email protected]?join">
13+
<i class="fa-li fa fa-lightbulb-o"></i> XMPP conference
14+
</a>
15+
</li>
16+
<li>
17+
<a href="xmpp:[email protected]?join">
18+
<i class="fa-li fa fa-lightbulb-o"></i> XMPP conference (backup channel)
19+
</a>
20+
</li>
21+
<li>
22+
<a href="https://gitter.im/codingteam">
23+
<i class="fa-li fa fa-users"></i> Gitter room
24+
</a>
25+
</li>
26+
<li>
27+
<a href="https://bitbucket.org/codingteam">
28+
<i class="fa-li fa fa-bitbucket"></i> Bitbucket team
29+
</a>
30+
</li>
31+
<li>
32+
<a href="https://gitlab.com/groups/codingteam">
33+
<i class="fa-li fa fa-code-fork"></i> GitLab team
34+
</a>
35+
</li>
36+
<li>
37+
<a href="https://loglist.xyz/">
38+
<i class="fa-li fa fa-ambulance"></i> LogList
39+
</a>
40+
</li>
41+
<li>
42+
<a href="https://t.me/codingteam">
43+
<i class="fa-li fa fa-envelope-o"></i> Telegram group
44+
</a>
45+
</li>
46+
<li>
47+
<a href="https://matrix.to/#/#codingteam:matrix.org">
48+
<i class="fa-li fa fa-compress"></i> Matrix room
49+
</a>
50+
</li>
51+
<li class="old-logs"><a href="/old-logs/[email protected]/">Old conference logs (mostly actual in period 2009-08-22 — 2016-12-09)</a></li>
52+
</ul>
53+
54+
555

6-
<a href="/old-logs/[email protected]/">Older logs (mostly actual in period 2009-08-22 — 2016-12-09)</a>

Codingteam.Site/Views/Home/Resources.cshtml

Lines changed: 0 additions & 51 deletions
This file was deleted.

0 commit comments

Comments
 (0)