basic styling

This commit is contained in:
Benedikt Rötsch
2017-09-26 17:07:58 +02:00
parent 200a8ae2f1
commit c650dd3f1c
23 changed files with 1380 additions and 188 deletions

View File

@@ -0,0 +1,46 @@
.course-card {
display: flex;
flex-direction: column;
min-height: 30vh;
padding: var(--grid-gutter);
border-radius: 7px;
box-shadow: var(--card-box-shadow);
& > * + * {
margin-top: var(--grid-gutter);
}
}
.course-card__categories {
flex: 0 0 var(--line-height);
color: var(--color-text-grey);
}
.course-card__title {
flex: 1 1 auto;
& h2 {
margin: 0;
}
}
.course-card__description {
flex: 1 1 auto;
& p {
margin: 0;
}
}
.course-card__link {
flex: 0 0 auto;
& a {
display: inline-block;
padding-bottom: 0.3em;
border-bottom: 1px solid var(--color-link-content);
text-transform: uppercase;
color: var(--color-link-content);
}
}

View File

@@ -0,0 +1,135 @@
body {
background-color: var(--color-bg-default);
color: var(--color-text-default);
font-family: Helvetica Neue, Helvetica, Arial, sans-serif;
font-size: 1rem;
line-height: var(--line-height);
}
.wrapper {
max-width: 1024px;
margin: 0 auto;
padding: 0 2vw;
@media (--breakpoint-desktop) {
padding: 0;
}
}
.wrapper-with-sidebar {
@media (--breakpoint-desktop) {
display: flex;
}
}
.wrapper__sidebar {
@media (--breakpoint-desktop) {
flex: 0 0 220px;
padding: var(--grid-gutter);
border-radius: 7px;
box-shadow: var(--card-box-shadow);
& > h2 {
margin-bottom: calc(var(--grid-gutter) * 3);
}
}
}
.wrapper__content {
padding: var(--grid-gutter) 0;
@media (--breakpoint-desktop) {
flex: 1 1 auto;
margin-left: var(--grid-gutter);
}
}
.grid-list {
display: flex;
flex-wrap: wrap;
justify-content: space-between;
margin: 0 calc(var(--grid-gutter) / 2 * -1);
& > * {
box-sizing: border-box;
margin: 0 calc(var(--grid-gutter) / 2) var(--grid-gutter);
flex: 0 0 calc(50% - var(--grid-gutter));
@media (--breakpoint-desktop) {
flex: 0 0 calc(33% - var(--grid-gutter));
}
}
}
.grid-list-small {
display: flex;
flex-wrap: wrap;
justify-content: space-between;
margin: 0 calc(var(--grid-gutter) / 2 * -1);
& > * {
box-sizing: border-box;
margin: 0 calc(var(--grid-gutter) / 2) var(--grid-gutter);
flex: 0 0 calc(50% - var(--grid-gutter));
}
}
.table-of-contents {
& ul {
list-style: none;
margin: var(--grid-gutter) 0;
padding: 0;
padding-left: calc(var(--grid-gutter) * 2);
& li {
margin: 0 0 var(--grid-gutter);
padding: 0;
}
& a {
display: block;
&.active {
position: relative;
font-weight: bold;
&:before,
&:after {
position: absolute;
top: 0;
}
&:before {
content: '';
left: calc(var(--grid-gutter) * 3 * -1);
bottom: 0;
width: 3px;
background: var(--color-course-active);
}
&:after {
content: '👁';
left: calc(var(--grid-gutter) * 2 * -1);
}
}
}
}
}
.sidebar-menu {
& ul {
list-style: none;
margin: var(--grid-gutter) 0;
padding: 0;
& li {
margin: 0 0 var(--grid-gutter);
padding: 0;
}
& a {
display: block;
&.active {
font-weight: bold;
}
}
}
}

View File

@@ -0,0 +1,113 @@
.header {
display: flex;
flex-wrap: wrap;
margin-top: var(--grid-gutter);
padding-bottom: var(--grid-gutter);
margin-bottom: var(--grid-gutter);
border-bottom: 2px solid var(--color-bg-separator);
@media (--breakpoint-desktop) {
flex-wrap: nowrap;
}
& .header__logo,
& .header__navarea {
display: flex;
flex: 0 0 100%;
}
& .header__logo {
align-items: center;
@media (--breakpoint-desktop) {
flex: 0 0 200px;
}
}
& .header__navarea {
flex-direction: column;
justify-content: space-around;
@media (--breakpoint-desktop) {
flex: 1 0 auto;
}
}
}
.header__navarea {
& form {
display: flex;
flex-wrap: wrap;
@media (--breakpoint-desktop) {
justify-content: flex-end;
}
& > * {
flex: 0 0 auto;
}
& fieldset {
padding: 0.2em 1em;
margin: 0;
border: none;
background: var(--color-bg-grey);
color: var(--color-text-grey);
border-radius: var(--border-radius);
font-size: 0.8em;
& + fieldset {
margin-left: var(--grid-gutter)
}
& label + select {
margin-left: 0.5em;
}
}
}
}
.navigation {
& nav {
& ul {
display: flex;
list-style: none;
flex-wrap: wrap;
margin: 0;
padding: 0;
@media (--breakpoint-desktop) {
justify-content: flex-end;
}
& li {
margin: 0;
& + li {
margin-left: calc(var(--grid-gutter) / 4);
}
& a {
display: block;
text-transform: uppercase;
font-weight: bold;
padding: 0.7em 1em;
color: var(--color-text-grey);
border-radius: var(--border-radius);
&.active,
&:hover {
background: var(--color-bg-grey);
}
&.active {
color: var(--color-text-default);
}
}
}
}
}
}

View File

@@ -0,0 +1,25 @@
.hero {
display: flex;
justify-content: space-between;
}
.hero__image {
background-color: #20B5B6;
width: 65%;
height: 600px;
border-radius: .375rem;
box-shadow: var(--card-box-shadow);
}
.featured-cards-list {
width: 30%;
height: 600px;
display:flex;
flex-direction: column;
justify-content: space-between;
}
.featured-cards__list {
background-color: #00AAE0;
height: 150px;
border-radius: .375rem;
box-shadow: var(--card-box-shadow);
}

View File

@@ -0,0 +1,19 @@
.module {
max-width: 1024px;
margin: 0 auto;
padding: 0 2vw;
@media (--breakpoint-desktop) {
padding: 0;
}
& img {
width: 100%;
height: auto;
}
& + .module {
margin-top: var(--grid-gutter);
}
}

View File

@@ -0,0 +1,11 @@
@import 'normalize.css';
@import './variables';
@import './typography';
@import './global';
@import './header';
@import './homepage';
@import './course';
@import './module';

View File

@@ -0,0 +1,10 @@
h1, h2, h3, h4, h5, h6 {
&:first-child {
margin-top: 0;
}
}
a {
color: inherit;
text-decoration: none;
}

View File

@@ -0,0 +1,23 @@
@custom-media --breakpoint-desktop (min-width: 700px);
:root {
--grid-gutter: 1rem;
--border-radius: 3px;
--line-height: 1.5em;
--color-text-default: #2a303a;
--color-text-grey: #8091a5;
--color-link-content: #5c9fef;
--color-bg-default: #fff;
--color-bg-grey: #f7f9fa;
--color-bg-separator: #f2f5f7;
--color-sidebar-bg: #f7f9fa;
--color-course-active: #536171;
--card-box-shadow: 0px 1px 3px 0px rgba(0, 0, 0, .45);
}