Make social links adaptable

This commit is contained in:
ChronosX88 2022-12-04 01:19:47 +03:00
parent 169dc4ce03
commit 5e63796897
Signed by: ChronosXYZ
GPG Key ID: 52A90DE5862D8321
3 changed files with 46 additions and 7 deletions

View File

@ -28,7 +28,6 @@ body {
} }
aside { aside {
margin-right: 2em;
border: 1px solid; border: 1px solid;
border-radius: 3mm; border-radius: 3mm;
padding: 16px; padding: 16px;
@ -66,6 +65,17 @@ aside {
margin: 0; margin: 0;
} }
#nav-wrapper {
display: flex;
align-items: center;
flex-direction: column;
margin-right: 2em;
}
#social-widescreen {
margin-top: 10px;
}
.menu-item { .menu-item {
margin-block-start: 1em; margin-block-start: 1em;
margin-block-end: 1em; margin-block-end: 1em;
@ -128,23 +138,34 @@ article {
text-shadow: 0px 0px 18px white; text-shadow: 0px 0px 18px white;
} }
#social-mobile {
display: none;
visibility: hidden;
}
@media only screen and (max-width: 768px) { @media only screen and (max-width: 768px) {
#wrapper { #wrapper {
flex-direction: column; flex-direction: column;
align-items: center; align-items: center;
width: 85vw; width: 85vw;
padding-bottom: 0;
} }
aside { aside {
width: 100%; width: 100%;
margin: 0; margin: 0;
display: flex; display: flex;
margin-bottom: 16px;
flex-direction: column; flex-direction: column;
align-items: center; align-items: center;
align-self: unset; align-self: unset;
} }
#nav-wrapper {
margin: 0;
width: 100%;
margin-bottom: 16px;
}
#content{ #content{
// max-width: 100%; // max-width: 100%;
width: 100%; width: 100%;
@ -174,4 +195,16 @@ article {
display: flex; display: flex;
justify-content: center; justify-content: center;
} }
#social-widescreen {
display: none;
visibility: hidden;
}
#social-mobile {
display: block;
visibility: visible;
margin-top: 10px;
// margin-bottom: 7px;
}
} }

View File

@ -5,7 +5,13 @@
<div id="container"> <div id="container">
{{- partial "header.html" . -}} {{- partial "header.html" . -}}
<div id="wrapper"> <div id="wrapper">
{{- partial "nav.html" . -}} <div id="nav-wrapper">
{{- partial "nav.html" . -}}
<div id="social-widescreen">
<a href="https://t.me/southwestradio" style="filter: unset;"><img class="social-link" src="/telegram.svg" onload="SVGInject(this)" /></a>
<a href="https://vk.com/southwest_radio" style="filter: unset;"><img class="social-link" src="/vk.svg" onload="SVGInject(this)" /></a>
</div>
</div>
<div id="content"> <div id="content">
{{- block "main" . }}{{- end }} {{- block "main" . }}{{- end }}
</div> </div>
@ -18,6 +24,10 @@
iframe.addEventListener('load', () => iframe.removeAttribute('srcdoc')); iframe.addEventListener('load', () => iframe.removeAttribute('srcdoc'));
</script> </script>
</div> </div>
<div id="social-mobile">
<a href="https://t.me/southwestradio" style="filter: unset;"><img class="social-link" src="/telegram.svg" onload="SVGInject(this)" /></a>
<a href="https://vk.com/southwest_radio" style="filter: unset;"><img class="social-link" src="/vk.svg" onload="SVGInject(this)" /></a>
</div>
</div> </div>
{{- partial "footer.html" . -}} {{- partial "footer.html" . -}}
</div> </div>

View File

@ -1,4 +0,0 @@
<div id="social">
<a href="https://t.me/southwestradio" style="filter: unset;"><img class="social-link" src="/telegram.svg" onload="SVGInject(this)" /></a>
<a href="https://vk.com/southwest_radio" style="filter: unset;"><img class="social-link" src="/vk.svg" onload="SVGInject(this)" /></a>
</div>