Skip to content

Commit 3e6c270

Browse files
author
Uditi Mehta
committed
formatting changes
1 parent df7bde5 commit 3e6c270

File tree

7 files changed

+81
-154
lines changed

7 files changed

+81
-154
lines changed

app/preprints/-components/preprint-card/component.ts

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ import Toast from 'ember-toastr/services/toast';
1313

1414
import RouterService from '@ember/routing/router-service';
1515
import Intl from 'ember-intl/services/intl';
16-
import Media from 'ember-responsive';
1716
import template from './template';
1817
import styles from './styles';
1918

@@ -27,7 +26,6 @@ export default class PreprintCard extends Component {
2726
@service store!: Store;
2827
@service toast!: Toast;
2928
@service intl!: Intl;
30-
@service media!: Media;
3129

3230
preprint?: Preprint;
3331
delete?: (preprint: Preprint) => void;
@@ -36,10 +34,6 @@ export default class PreprintCard extends Component {
3634

3735
searchUrl = pathJoin(baseURL, 'search');
3836

39-
get isMobile() {
40-
return this.media.isMobile;
41-
}
42-
4337
get shouldShowUpdateButton() {
4438
return this.preprint && this.preprint.currentUserPermissions.includes(Permission.Admin);
4539
}

app/preprints/-components/preprint-card/styles.scss

Lines changed: 42 additions & 80 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,37 @@
1-
.preprint-card {
2-
width: 100%;
3-
margin: 10px 0;
4-
}
1+
// stylelint-disable max-nesting-depth, selector-max-compound-selectors
52

6-
.card-contents {
7-
display: block;
8-
flex-direction: row;
9-
}
10-
11-
.heading {
12-
display: flex;
13-
flex-direction: column;
14-
flex-wrap: wrap;
15-
justify-content: flex-start;
16-
align-items: flex-start;
3+
.preprint-card {
174
width: 100%;
18-
}
19-
20-
.ember-content-placeholders-heading__title {
21-
height: 1em;
22-
margin-top: 5px;
23-
margin-bottom: 5px;
24-
25-
&:first-child {
26-
width: 100%;
5+
margin: 1px 0;
6+
7+
.card-contents {
8+
display: block;
9+
flex-direction: row;
10+
position: relative;
11+
display: block;
12+
padding: 10px 15px;
13+
margin-bottom: -1px;
14+
background-color: #fff;
15+
border: 1px solid #ddd;
16+
17+
.heading {
18+
display: flex;
19+
flex-direction: column;
20+
flex-wrap: wrap;
21+
justify-content: flex-start;
22+
align-items: flex-start;
23+
width: 100%;
24+
25+
:global .ember-content-placeholders-heading__title {
26+
height: 1em;
27+
margin-top: 5px;
28+
margin-bottom: 5px;
29+
30+
&:first-child {
31+
width: 100%;
32+
}
33+
}
34+
}
2735
}
2836
}
2937

@@ -85,32 +93,25 @@
8593

8694
dl {
8795
margin-bottom: 10px;
88-
}
8996

90-
dl div {
91-
display: flex;
92-
}
97+
div {
98+
display: flex;
9399

94-
dl dt {
95-
width: 100px;
96-
margin-right: 5px;
97-
}
100+
dt {
101+
width: 110px; // Preserved as originally
102+
margin-right: 5px;
103+
}
98104

99-
dl dd {
100-
flex: 1;
105+
dd {
106+
flex: 1;
107+
}
108+
}
101109
}
102110

103111
.tags {
104112
margin-top: 2px;
105113
}
106114

107-
.description {
108-
text-overflow: ellipsis;
109-
overflow: hidden;
110-
white-space: nowrap;
111-
width: calc(100% - 100px);
112-
}
113-
114115
.link {
115116
composes: Button from 'osf-components/components/button/styles.scss';
116117
composes: SecondaryButton from 'osf-components/components/button/styles.scss';
@@ -134,45 +135,6 @@ dl dd {
134135
padding-left: 0;
135136
}
136137

137-
.dropdown {
138-
padding-left: 5px;
139-
}
140-
141-
.dropdown-button {
142-
padding: 4px 12px;
143-
line-height: 0;
144-
}
145-
146-
.dropdown-list {
147-
background-color: $color-bg-gray-light;
148-
min-width: 180px;
149-
}
150-
151-
.dropdown-list ul {
152-
list-style: none;
153-
padding-inline-start: 0;
154-
}
155-
156-
.dropdown-list li {
157-
margin: 10px 0;
158-
}
159-
160-
.dropdown-link {
161-
color: $color-link-black;
162-
border-color: transparent;
163-
background-color: $color-bg-gray-light;
164-
min-width: 180px;
165-
text-align: left;
166-
padding: 3px 20px;
167-
}
168-
169-
.dropdown-link:hover,
170-
.dropdown-link:focus {
171-
cursor: pointer;
172-
background-image: none;
173-
background-color: $color-bg-gray-dark;
174-
}
175-
176138
.list-group-item-heading {
177139
margin-top: 0;
178140
margin-bottom: 5px;

app/preprints/-components/preprint-card/template.hbs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
>
66
<div local-class='card-contents'>
77
<div
8-
local-class='card-body {{if this.isMobile 'mobile'}}'
8+
local-class='card-body {{if (is-mobile) 'mobile'}}'
99
>
1010
<h4 local-class='list-group-item-heading heading' data-test-preprint-card-heading>
1111
{{#if @preprint}}
@@ -18,7 +18,7 @@
1818
</span> |
1919
{{/unless}}
2020
<OsfLink
21-
local-class='osf-link {{if this.isMobile 'mobile'}}'
21+
local-class='osf-link {{if (is-mobile) 'mobile'}}'
2222
data-analytics-name='Title'
2323
data-test-preprint-title='{{@preprint.id}}'
2424
@route='resolve-guid'

app/preprints/my-preprints/styles.scss

Lines changed: 24 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
left: 0;
1616
width: 100%;
1717
height: 100%;
18-
background-image: url('img/bg-light.jpg');
18+
background-image: url('images/preprints/bg-light.jpg');
1919
background-repeat: no-repeat;
2020
background-size: cover;
2121
filter: grayscale(1);
@@ -30,63 +30,34 @@
3030
:global(.media-mobile) {
3131
margin-top: -38px;
3232
}
33-
}
3433

35-
.Title {
36-
min-height: 150px;
3734
}
3835

39-
.NavTabs {
40-
ul {
41-
margin-left: 15px;
42-
margin-bottom: 10px;
43-
line-height: 20px;
44-
list-style-image: none;
45-
list-style-position: outside;
46-
list-style-type: none;
47-
padding: 0 0 41px;
48-
box-sizing: border-box;
49-
}
50-
51-
.NavItem {
52-
border: none;
53-
color: #fff;
54-
background: none;
55-
padding: 10px 15px;
56-
float: left;
57-
58-
&:hover {
59-
border: none;
60-
color: #333;
61-
background-color: #e4e4e4;
62-
}
63-
}
64-
65-
:global(.ember-tabs__tab--selected) {
66-
border: none;
67-
color: #333;
68-
background-color: #e4e4e4;
69-
70-
&:focus {
71-
border: none;
72-
background-color: #e4e4e4;
73-
}
74-
75-
&:hover {
76-
border: none;
77-
background-color: #e4e4e4;
78-
}
79-
}
80-
81-
.TabPane {
82-
&:global(.active) {
83-
display: block;
36+
.Hero {
37+
display: flex;
38+
flex-direction: column;
39+
width: 100%;
40+
height: 100%;
41+
min-width: 100%;
42+
min-height: 100%;
43+
position: relative;
44+
background: url('images/default-brand/bg-dark.jpg');
45+
background-size: cover;
46+
47+
.Title {
48+
min-height: 150px;
49+
50+
h1 {
51+
color: $color-text-white;
52+
font-weight: 400;
53+
margin-top: 0;
54+
margin-bottom: 0;
55+
padding: 1em 2em;
8456
}
8557
}
8658
}
8759

88-
.SortDescription {
89-
text-align: right;
90-
margin-top: 10px;
91-
margin-right: 15px;
60+
.GutterBody {
61+
padding-top: 85px;
62+
padding-bottom: 85px;
9263
}
Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,20 @@
11
{{page-title (t 'preprints.my_preprints.header')}}
22

3-
<OsfLayout @backgroundClass={{local-class 'ContentBackground'}} as |layout|>
4-
<layout.heading>
3+
<OsfLayout @backgroundClass='{{local-class 'ContentBackground'}}' as |layout|>
4+
<layout.heading local-class = 'Hero'>
55
<div local-class='Title'>
66
<h1>
77
{{t 'preprints.my_preprints.header'}}
88
</h1>
99
</div>
1010
</layout.heading>
1111
<layout.main>
12-
{{#if this.preprints.length}}
13-
{{#each this.preprints as |preprint|}}
14-
<Preprints::-Components::PreprintCard @preprint={{preprint}} />
15-
{{/each}}
16-
{{/if}}
12+
<div local-class='GutterBody'>
13+
{{#if this.preprints.length}}
14+
{{#each this.preprints as |preprint|}}
15+
<Preprints::-Components::PreprintCard @preprint={{preprint}} />
16+
{{/each}}
17+
{{/if}}
18+
</div>
1719
</layout.main>
1820
</OsfLayout>
26.2 KB
Loading

translations/en-us.yml

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1439,9 +1439,7 @@ preprints:
14391439
pending: 'Pending'
14401440
accepted: 'Accepted'
14411441
rejected: 'Rejected'
1442-
timestamp_label: 'Date Created'
1443-
last_updated: 'Last Updated'
1444-
contributors: 'Contributors'
1442+
contributors: 'Contributors:'
14451443
description: 'Description'
14461444
private_tooltip: 'This preprint is private'
14471445
options: 'Options'
@@ -1450,9 +1448,9 @@ preprints:
14501448
update_button: 'Edit'
14511449
settings: 'Settings'
14521450
delete: 'Delete'
1453-
provider: 'Provider'
1454-
date_created: 'Date Created'
1455-
date_modified: 'Date Modified'
1451+
provider: 'Provider:'
1452+
date_created: 'Date Created:'
1453+
date_modified: 'Date Modified:'
14561454
registries:
14571455
header:
14581456
osf_registrations: 'OSF Registrations'

0 commit comments

Comments
 (0)