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 { ...@@ -36,7 +36,7 @@ html,body {
font-size: 16px; font-size: 16px;
background-color: #fff; background-color: #fff;
@media @tablet, @mobile { @media @mobile {
font-size: 18px; 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 { .studydoc-header {
padding: 1em; padding: 1em;
...@@ -32,10 +70,20 @@ ...@@ -32,10 +70,20 @@
display: inline-block; display: inline-block;
padding-bottom: 1em; padding-bottom: 1em;
@media @mobile {
padding-bottom: .25em;
}
&:after { &:after {
content: '/'; content: '/';
color: @color-red; color: @color-red;
margin: 0 1em; margin: 0 1em;
@media @mobile {
content: ',';
color: #000;
margin: 0 .5em 0 0;
}
} }
.name:after { .name:after {
...@@ -49,30 +97,20 @@ ...@@ -49,30 +97,20 @@
} }
} }
.documents { .studydoc-documents {
a { @media @mobile, @tablet {
display: inline-block; display: none;
color: #000;
&:not(:last-child) {
margin-right: 1em;
}
}
span {
display: inline-block;
position: relative;
bottom: -2px;
} }
}
}
span.name { .studydoc-content .studydoc-documents {
margin-left: .25em; display: none;
} padding: 16px;
background-color: @color-grey;
span.size { @media @mobile, @tablet {
color: @color-dark-grey; display: block;
margin-left: 1em;
}
} }
} }
......
...@@ -273,8 +273,8 @@ export default class StudydocList extends FilteredListPage { ...@@ -273,8 +273,8 @@ export default class StudydocList extends FilteredListPage {
properties.push({ name: i18n('studydocs.author'), value: studydocument.author }); properties.push({ name: i18n('studydocs.author'), value: studydocument.author });
} }
if (studydocument.type) { if (studydocument.semester) {
properties.push({ value: i18n(`studydocs.name.${studydocument.type}`) }); properties.push({ value: i18n(`studydocs.semester${studydocument.semester}`) });
} }
const title = const title =
...@@ -308,9 +308,19 @@ export default class StudydocList extends FilteredListPage { ...@@ -308,9 +308,19 @@ export default class StudydocList extends FilteredListPage {
), ),
]), ]),
m('div.properties', properties.map(prop => this.constructor._renderProperty(prop))), 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