Commit f3818afd authored by Sandro Lutz's avatar Sandro Lutz Committed by Sandro Lutz
Browse files

Update styles for study document item

parent c032b3a3
......@@ -36,7 +36,7 @@ html,body {
font-size: 16px;
background-color: #fff;
@media @tablet, @mobile {
@media @mobile {
font-size: 18px;
}
......
@import './colors.less';
.studydoc-documents {
width: calc(100% + 8px);
position: relative;
left: -4px;
a {
display: inline-block;
color: #000;
border-radius: 4px;
padding: 4px;
&:not(:last-child) {
margin-right: 1em;
}
&:hover {
background-color: @color-grey;
}
}
span {
display: inline-block;
position: relative;
bottom: -2px;
}
span.name {
margin-left: .25em;
}
span.size {
color: @color-dark-grey;
margin-left: 1em;
}
}
.studydoc-header {
padding: 1em;
......@@ -32,10 +70,20 @@
display: inline-block;
padding-bottom: 1em;
@media @mobile {
padding-bottom: .25em;
}
&:after {
content: '/';
color: @color-red;
margin: 0 1em;
@media @mobile {
content: ',';
color: #000;
margin: 0 .5em 0 0;
}
}
.name:after {
......@@ -49,30 +97,20 @@
}
}
.documents {
a {
display: inline-block;
color: #000;
&:not(:last-child) {
margin-right: 1em;
}
.studydoc-documents {
@media @mobile, @tablet {
display: none;
}
span {
display: inline-block;
position: relative;
bottom: -2px;
}
}
span.name {
margin-left: .25em;
}
.studydoc-content .studydoc-documents {
display: none;
padding: 16px;
background-color: @color-grey;
span.size {
color: @color-dark-grey;
margin-left: 1em;
}
@media @mobile, @tablet {
display: block;
}
}
......
......@@ -273,8 +273,8 @@ export default class StudydocList extends FilteredListPage {
properties.push({ name: i18n('studydocs.author'), value: studydocument.author });
}
if (studydocument.type) {
properties.push({ value: i18n(`studydocs.name.${studydocument.type}`) });
if (studydocument.semester) {
properties.push({ value: i18n(`studydocs.semester${studydocument.semester}`) });
}
const title =
......@@ -308,8 +308,18 @@ export default class StudydocList extends FilteredListPage {
),
]),
m('div.properties', properties.map(prop => this.constructor._renderProperty(prop))),
m('div.documents', studydocument.files.map(file => this.constructor._renderFile(file))),
m(
'div.studydoc-documents',
studydocument.files.map(file => this.constructor._renderFile(file))
),
]),
]),
content: () =>
m('div.studydoc-content', [
m(
'div.studydoc-documents',
studydocument.files.map(file => this.constructor._renderFile(file))
),
]),
});
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment