Skip to content

Commit e9661b7

Browse files
fix: Don't hide content on some pages
1 parent bb10545 commit e9661b7

File tree

6 files changed

+133
-12
lines changed

6 files changed

+133
-12
lines changed

.devcontainer/devcontainer.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"image": "mcr.microsoft.com/devcontainers/dotnet",
3+
"features": {
4+
"ghcr.io/devcontainers/features/dotnet:2": {
5+
"version": "latest"
6+
}
7+
},
8+
"postCreateCommand": "dotnet --list-sdks"
9+
}

.vscode/launch.json

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
{
2+
"version": "0.2.0",
3+
"configurations": [
4+
{
5+
// Use IntelliSense to find out which attributes exist for C# debugging
6+
// Use hover for the description of the existing attributes
7+
// For further information visit https://github.com/dotnet/vscode-csharp/blob/main/debugger-launchjson.md.
8+
"name": ".NET Core Launch (web)",
9+
"type": "coreclr",
10+
"request": "launch",
11+
"preLaunchTask": "build",
12+
// If you have changed target frameworks, make sure to update the program path.
13+
"program": "${workspaceFolder}/EssentialCSharp.Web/bin/Debug/net9.0/EssentialCSharp.Web.dll",
14+
"args": [],
15+
"cwd": "${workspaceFolder}/EssentialCSharp.Web",
16+
"stopAtEntry": false,
17+
// Enable launching a web browser when ASP.NET Core starts. For more information: https://aka.ms/VSCode-CS-LaunchJson-WebBrowser
18+
"serverReadyAction": {
19+
"action": "openExternally",
20+
"pattern": "\\bNow listening on:\\s+(https?://\\S+)"
21+
},
22+
"env": {
23+
"ASPNETCORE_ENVIRONMENT": "Development"
24+
},
25+
"sourceFileMap": {
26+
"/Views": "${workspaceFolder}/Views"
27+
}
28+
},
29+
{
30+
"name": ".NET Core Attach",
31+
"type": "coreclr",
32+
"request": "attach"
33+
}
34+
]
35+
}

.vscode/tasks.json

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
{
2+
"version": "2.0.0",
3+
"tasks": [
4+
{
5+
"label": "build",
6+
"command": "dotnet",
7+
"type": "process",
8+
"args": [
9+
"build",
10+
"${workspaceFolder}/EssentialCSharp.Web.sln",
11+
"/property:GenerateFullPaths=true",
12+
"/consoleloggerparameters:NoSummary;ForceNoAlign"
13+
],
14+
"problemMatcher": "$msCompile"
15+
},
16+
{
17+
"label": "publish",
18+
"command": "dotnet",
19+
"type": "process",
20+
"args": [
21+
"publish",
22+
"${workspaceFolder}/EssentialCSharp.Web.sln",
23+
"/property:GenerateFullPaths=true",
24+
"/consoleloggerparameters:NoSummary;ForceNoAlign"
25+
],
26+
"problemMatcher": "$msCompile"
27+
},
28+
{
29+
"label": "watch",
30+
"command": "dotnet",
31+
"type": "process",
32+
"args": [
33+
"watch",
34+
"run",
35+
"--project",
36+
"${workspaceFolder}/EssentialCSharp.Web.sln"
37+
],
38+
"problemMatcher": "$msCompile"
39+
}
40+
]
41+
}

EssentialCSharp.Web/Views/Shared/_Layout.cshtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@
144144
</div>
145145
</header>
146146

147-
<main class="layout">
147+
<main :class="{ layout: true, 'has-sidebar': sidebarShown && !smallScreen }">
148148
<div id="sidebarContainer" class="background-grey-lighten-2">
149149
<Transition name="slide-fade">
150150
<div v-cloak v-if="sidebarShown" :class="{sidebarSmall: smallScreen}" class="sidebar toc-padding" id="sidebar">

EssentialCSharp.Web/appsettings.Development.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,6 @@
77
}
88
},
99
"ConnectionStrings": {
10-
"EssentialCSharpWebContextConnection": "Server=(localdb)\\mssqllocaldb;Database=EssentialCSharp.Web;Trusted_Connection=True;MultipleActiveResultSets=true"
10+
"EssentialCSharpWebContextConnection": "Server=localhost;Database=EssentialCSharp.Web;Trusted_Connection=True;MultipleActiveResultSets=true;TrustServerCertificate=true;"
1111
}
1212
}

EssentialCSharp.Web/wwwroot/css/styles.css

Lines changed: 46 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,23 @@ a:hover {
166166
margin-top: var(--toolbar-height);
167167
}
168168

169+
/* Prevent horizontal overflow on main content */
170+
.container {
171+
max-width: 100vw;
172+
overflow-x: hidden;
173+
position: relative;
174+
}
175+
176+
/* Ensure code blocks, tables, and pre elements wrap or scroll within themselves */
177+
.container pre,
178+
.container code,
179+
.container table {
180+
max-width: 100%;
181+
overflow-x: auto;
182+
word-break: break-word;
183+
white-space: pre-wrap;
184+
}
185+
169186
/* Search Bar Styles */
170187

171188
@media (max-width: 768px) {
@@ -320,22 +337,41 @@ a:hover {
320337
/* Page Navigation Arrow Buttons */
321338

322339
.turn-page {
323-
top: calc(100vh - 9rem);
324-
top: calc(100dvh - 9rem);
340+
position: fixed !important;
341+
left: 0;
342+
right: 0;
343+
bottom: 2rem;
344+
top: auto !important;
345+
transform: none !important;
346+
z-index: 1000;
325347
display: flex;
326-
z-index: 99999;
327348
justify-content: space-between;
328-
position: -webkit-sticky; /* Safari */
329-
position: sticky;
330-
padding: 0 0.5rem 0 0.5rem;
331-
transform: translate(0, 3rem);
332-
height: 0;
349+
padding: 0 0.5rem;
350+
height: auto;
351+
pointer-events: none; /* allow buttons to be clickable only */
352+
margin-left: 0;
333353
}
334354

355+
.turn-page .arrow-btn {
356+
pointer-events: auto;
357+
}
358+
359+
/* Hide turn-page buttons on mobile when sidebar is open */
335360
@media only screen and (max-width: 768px) {
361+
.layout.has-sidebar .turn-page {
362+
display: none;
363+
}
364+
336365
.turn-page {
337-
top: calc(100vh - 13rem);
338-
top: calc(100dvh - 9rem);
366+
bottom: 4rem;
367+
margin-left: 0;
368+
}
369+
}
370+
371+
/* Adjust turn-page positioning when sidebar is visible on larger screens */
372+
@media only screen and (min-width: 769px) {
373+
.layout.has-sidebar .turn-page {
374+
margin-left: 375px; /* Same as sidebar width */
339375
}
340376
}
341377

0 commit comments

Comments
 (0)