Added support for generic screen sizes through scrolling

main
Kenneth Jao 2 years ago
parent 1945116317
commit ece56f340a
  1. 6
      _includes/navigation.html
  2. 14
      _layouts/banner.html
  3. 191
      _sass/main.scss
  4. 4
      index.md

@ -1,12 +1,16 @@
<nav>
<div class="separator orange"></div>
<ul>
<a id="logo" href="/" alt="Advanced Computational Electromagnetics (ACEM) Research Group">ACEM Research</a>
<div id="logo">
<a href="/" alt="Advanced Computational Electromagnetics (ACEM) Research Group">ACEM Research</a>
</div>
<div id="navItems">
{%- for item in site.data.navigation -%}
{%- assign slashArr = page.url | split: "/" -%}
{%- assign linkName = item.link | remove: "/" | strip -%}
{%- assign mainSubdir = slashArr[1] | strip -%}
<li {% if mainSubdir == linkName %}class="current"{% endif %}><a href="{{ item.link }}">{{ item.name }}</a></li>
{%- endfor -%}
</div>
</ul>
</nav>

@ -80,11 +80,15 @@
<path d="M 0 0 V 0.2 C 1 0.5 4 0.5 5 0.2 V 0">
</svg>
{%- endif -%}
<div class="description">
{{ pair[0] }}
</div>
<div class="image">
{{ pair[1] | prepend: "<img" | remove: "</p>" }}
<div class="itemScroll">
<div class="itemInner">
<div class="description">
{{ pair[0] }}
</div>
<div class="image">
{{ pair[1] | prepend: "<img" | remove: "</p>" }}
</div>
</div>
</div>
</div>
{%- endif -%}

@ -18,6 +18,10 @@ $font-lighter-color: #525252;
/** Element Setup **/
html {
overflow-x: hidden;
}
html, body {
width: 100%;
height: 100%;
@ -94,18 +98,21 @@ nav {
width: 100%;
height: 4em;
z-index: 100;
z-index: 10;
background-color: $neutral1;
box-shadow: 0 0.25rem 0.25rem rgba(0,0,0,0.5);
ul {
max-width: 70%;
width: 98%;
margin: 0 auto 0 auto;
padding: 0;
height: 3.5em;
text-align: right;
align-items: center;
display: flex;
justify-content: space-between;
overflow-x: auto;
white-space: nowrap;
#logo {
font-family: $font;
@ -117,6 +124,10 @@ nav {
float: left;
}
#navItems {
margin-left: 3em;
}
li {
width: 10em;
height: 100%;
@ -215,7 +226,7 @@ nav {
margin: 0 auto 0 auto;
text-align: center;
z-index: 10;
z-index: 5;
animation: slideUp 0.5s;
filter: drop-shadow(0.25em 0.3em 0.4em rgba(0,0,0,0.8));
@ -285,6 +296,11 @@ nav {
}
#bannerContent > h1 {
padding: 1em 2em 0 2em;
text-align: center;
}
#bannerContent {
padding-top: 6em !important;
background-color: rgba($blue1, 0.1);
@ -295,87 +311,101 @@ nav {
left: 0;
}
h1 {
padding-left: 2em;
}
.item {
width: 100%;
height: 20em;
display: flex;
padding-top: 7em;
padding-bottom: 7em;
min-height: 25em;
padding-top: 5em;
padding-bottom: 5em;
position: relative;
flex-direction: row;
justify-content: space-evenly;
align-items: center;
.description {
width: 40%;
height: 100%;
display: flex;
flex-direction: column;
justify-content: center;
text-align: left;
.itemScroll {
overflow-x: scroll;
h2 {
width: 100%;
margin: 0;
font-size: 2em;
}
p {
width: 100%;
font-size: 1.2em;
}
position: relative;
z-index: 2;
}
p:last-child {
position: relative;
z-index: 50;
text-align:right;
}
a {
margin-right: 1em;
padding: 0.8em;
background-color: lighten($blue2, 20%);
color: $neutral1;
border-radius: 13px;
transition: background-color ease-in-out 0.1s;
}
.itemScroll .itemInner {
width: 100%;
min-width: 60em;
padding: 2em 0 2em 0;
a:hover {
background-color: darken(lighten($blue2, 20%), 10%);
display: flex;
flex-direction: row;
justify-content: space-evenly;
align-items: center;
.description {
width: 40%;
height: 100%;
display: flex;
flex-direction: column;
justify-content: center;
text-align: left;
white-space: normal;
h2 {
width: 100%;
margin: 0;
font-size: 2em;
}
p {
width: 100%;
font-size: 1.2em;
margin: 0.5em 0 0.5em 0;
}
p:last-child {
text-align:right;
}
a {
margin-right: 1em;
padding: 0.8em;
font-size: 0.8em;
background-color: lighten($blue2, 20%);
color: $neutral1;
border-radius: 13px;
transition: background-color ease-in-out 0.1s;
}
a:hover {
background-color: darken(lighten($blue2, 20%), 10%);
}
a:active {
background-color: darken(lighten($blue2, 20%), 15%);
}
}
a:active {
background-color: darken(lighten($blue2, 20%), 15%);
.image {
width: 20em;
padding-bottom: 20em;
position: relative;
z-index: 20;
}
}
img {
position: absolute;
width: 100%;
height: 100%;
top: 0;
bottom: 0;
left: 0;
right: 0;
object-fit: cover;
border-radius: 50%;
border: 5px solid rgba($blue2, 30%);
}
.image {
width: 20em;
padding-bottom: 20em;
position: relative;
z-index: 20;
}
img {
position: absolute;
width: 100%;
height: 100%;
top: 0;
bottom: 0;
left: 0;
right: 0;
object-fit: cover;
border-radius: 50%;
border: 5px solid rgba($blue2, 30%);
}
}
.item:nth-child(2) .upAccent {
@ -389,13 +419,9 @@ nav {
.item:nth-child(odd) {
padding-bottom: 2em;
padding-top: 2em;
.description {
order: 1;
}
.image {
order: 0;
.itemScroll {
direction: rtl;
}
}
}
@ -416,6 +442,11 @@ nav {
padding: 2em 4em 4em 4em;
z-index: 1;
}
img {
width: 100%;
}
}
#afterItems {
@ -430,6 +461,10 @@ nav {
padding: 0;
}
img {
width: 100%;
}
}

@ -26,7 +26,9 @@ Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor i
## Sample 2
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
[Read More](/research/sample1)

Loading…
Cancel
Save