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