Optimized shared layout, fixed navbar position, fixed footer for MS Edge, added dynamic copyright year
This commit is contained in:
@@ -22,7 +22,7 @@
|
||||
<span class="t1"></span>}<br />
|
||||
}<br />
|
||||
<br />
|
||||
<a class="comment">// Copyright ©2019 Michael "XFox" Gordeev</a>
|
||||
<a class="comment">// Copyright ©@(DateTime.Today.Year) Michael "XFox" Gordeev</a>
|
||||
</code>
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="~/css/ContactsBlock.css" />
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
<nav class="navbar">
|
||||
<a asp-controller="Home" asp-action="Index">XFox111.NET</a>
|
||||
|
||||
<menu type="toolbar" class="main-menu">
|
||||
<menu type="toolbar" class="main-menu" style="display:none">
|
||||
<li><a asp-controller="About" asp-action="Index">AboutMe();</a></li>
|
||||
<li><a asp-controller="CV" asp-action="Index">CV();</a></li>
|
||||
<li><a asp-controller="Projects" asp-action="Index">Projects();</a></li>
|
||||
@@ -43,14 +43,6 @@
|
||||
|
||||
<a class="language-switch" asp-controller="Home" asp-action="SwitchLanguage" lang="ru">РУС </a>
|
||||
<a class="menu-toggle" onclick="ToggleMenu();"></a>
|
||||
|
||||
<menu type="toolbar" id="compact-menu" style="display:none">
|
||||
<li><a asp-controller="About" asp-action="Index">AboutMe();</a></li>
|
||||
<li><a asp-controller="CV" asp-action="Index">CV();</a></li>
|
||||
<li><a asp-controller="Projects" asp-action="Index">Projects();</a></li>
|
||||
<li><a asp-controller="Gallery" asp-action="Index">Arts();</a></li>
|
||||
<li><a asp-controller="Contacts" asp-action="Index">Contacts();</a></li>
|
||||
</menu>
|
||||
</nav>
|
||||
|
||||
<main>
|
||||
@@ -58,7 +50,7 @@
|
||||
</main>
|
||||
|
||||
<footer>
|
||||
<span class="comment">// Copyright ©2019 <b>Michael "XFox" Gordeev</b></span>
|
||||
<span class="comment">// Copyright ©@(DateTime.Today.Year) <b>Michael "XFox" Gordeev</b></span>
|
||||
|
||||
@{
|
||||
foreach (Link link in new List<Link> { links["email"], links["linkedin"], links["github"] })
|
||||
|
||||
@@ -17,9 +17,13 @@
|
||||
grid-column-gap: 10px;
|
||||
grid-template-rows: auto auto;
|
||||
background-color: #343434;
|
||||
position: sticky;
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
z-index: 10;
|
||||
padding: 10px;
|
||||
min-height: 33px;
|
||||
font-size: 26px;
|
||||
}
|
||||
|
||||
@@ -31,32 +35,25 @@
|
||||
color: gray;
|
||||
}
|
||||
|
||||
.main-menu { margin: 0px; }
|
||||
.main-menu {
|
||||
margin: 26px auto 26px auto;
|
||||
grid-row: 2;
|
||||
list-style: none;
|
||||
}
|
||||
.main-menu li {
|
||||
display: inline-block;
|
||||
font-size: 20px;
|
||||
margin-right: 20px;
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
.language-switch {
|
||||
grid-column: 3;
|
||||
display: none;
|
||||
user-select: none
|
||||
}
|
||||
.menu-toggle {
|
||||
grid-column: 4;
|
||||
display: none;
|
||||
cursor: pointer;
|
||||
user-select: none;
|
||||
}
|
||||
#compact-menu {
|
||||
grid-row: 2;
|
||||
list-style: none;
|
||||
}
|
||||
#compact-menu li {
|
||||
font-size: 20px;
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
/*Footer styles*/
|
||||
footer {
|
||||
@@ -77,10 +74,13 @@ footer a:hover {
|
||||
/*Body styles*/
|
||||
body {
|
||||
margin: 0px;
|
||||
margin-top: 53px;
|
||||
font-family: Consolas, 'Segoe MDL2 Assets';
|
||||
}
|
||||
main {
|
||||
min-height: calc(100vh - 115px); /*Page height minus footer requred space*/
|
||||
|
||||
/*This stuff is necessary for sticky footer*/
|
||||
display: grid;
|
||||
grid-template-rows: 1fr auto;
|
||||
height: calc(100vh - 53px);
|
||||
}
|
||||
|
||||
header a {
|
||||
@@ -104,11 +104,19 @@ article a:visited, article a:link {
|
||||
}
|
||||
|
||||
/*Adaptive code*/
|
||||
@media only screen and (max-width: 1000px) {
|
||||
@media only screen and (min-width: 1000px) {
|
||||
.main-menu {
|
||||
display: none;
|
||||
display: initial !important;
|
||||
grid-row: 1;
|
||||
grid-column: 2;
|
||||
margin: 0px;
|
||||
}
|
||||
.main-menu li {
|
||||
display: inline-block;
|
||||
margin-right: 10px;
|
||||
margin-top: 0px;
|
||||
}
|
||||
.menu-toggle {
|
||||
display: initial;
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
function ToggleMenu()
|
||||
{
|
||||
var menu = document.getElementById("compact-menu");
|
||||
var menu = document.getElementsByClassName("main-menu")[0];
|
||||
|
||||
if (menu.style.display == "none")
|
||||
menu.style.display = "initial";
|
||||
|
||||
Reference in New Issue
Block a user