|
@@ -1,3 +1,5 @@
|
|
|
|
+import theme from '../styles/theme'
|
|
|
|
+
|
|
function calculateRating(ratings) {
|
|
function calculateRating(ratings) {
|
|
const numberOfRatings = ratings.length
|
|
const numberOfRatings = ratings.length
|
|
const sumOfRatings = ratings.reduce(
|
|
const sumOfRatings = ratings.reduce(
|
|
@@ -45,9 +47,7 @@ const Training = props => (
|
|
</div>
|
|
</div>
|
|
<div id='trainingRegistrations'>
|
|
<div id='trainingRegistrations'>
|
|
<span className='caption'>Registrations: </span>
|
|
<span className='caption'>Registrations: </span>
|
|
- <span className='data'>
|
|
|
|
- {props.registration.length} <a href=''>Register!</a>
|
|
|
|
- </span>
|
|
|
|
|
|
+ <span className='data'> {props.registration.length} </span>
|
|
</div>
|
|
</div>
|
|
<div id='trainingAttendance'>
|
|
<div id='trainingAttendance'>
|
|
<span className='caption'>Attendance: </span>
|
|
<span className='caption'>Attendance: </span>
|
|
@@ -65,6 +65,7 @@ const Training = props => (
|
|
<a href=''>*</a>
|
|
<a href=''>*</a>
|
|
</span>
|
|
</span>
|
|
</div>
|
|
</div>
|
|
|
|
+ <button>Register now!</button>
|
|
</aside>
|
|
</aside>
|
|
<section>
|
|
<section>
|
|
<h3>Content</h3>
|
|
<h3>Content</h3>
|
|
@@ -81,24 +82,44 @@ const Training = props => (
|
|
{`
|
|
{`
|
|
article {
|
|
article {
|
|
display: grid;
|
|
display: grid;
|
|
- grid-template-columns: 1fr 3fr;
|
|
|
|
|
|
+ grid-template-areas:
|
|
|
|
+ "title"
|
|
|
|
+ "information"
|
|
|
|
+ "content";
|
|
background-color: rgba(127, 127, 127, 0.5);
|
|
background-color: rgba(127, 127, 127, 0.5);
|
|
|
|
+ background-image: url('media/man_working_out.jpg');
|
|
|
|
+ background-size: auto 400px;
|
|
|
|
+ background-repeat: no-repeat;
|
|
|
|
+ margin: 2em 0;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ article > * {
|
|
|
|
+ padding: 0.2em 1em;
|
|
}
|
|
}
|
|
|
|
|
|
article > h2 {
|
|
article > h2 {
|
|
|
|
+ grid-area: title;
|
|
font-weight: 900;
|
|
font-weight: 900;
|
|
font-size: 120%;
|
|
font-size: 120%;
|
|
|
|
+ background: ${theme.colors.darkerblue};
|
|
|
|
+ color: ${theme.colors.offWhite};
|
|
}
|
|
}
|
|
|
|
|
|
aside {
|
|
aside {
|
|
|
|
+ grid-area: information;
|
|
padding: 1em 2em;
|
|
padding: 1em 2em;
|
|
- background: rgba(0,127,0,0.5);
|
|
|
|
|
|
+ height: 400px;
|
|
}
|
|
}
|
|
|
|
|
|
section {
|
|
section {
|
|
|
|
+ grid-area: content;
|
|
padding: 1em 2em;
|
|
padding: 1em 2em;
|
|
background: rgba(127, 0, 0, 0.5);
|
|
background: rgba(127, 0, 0, 0.5);
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ span.caption {
|
|
|
|
+ display: none;
|
|
|
|
+ }
|
|
`}
|
|
`}
|
|
</style>
|
|
</style>
|
|
</article>
|
|
</article>
|