Skip to content

Commit ab67851

Browse files
authored
Merge pull request #781 from OpenKnowledgeMaps/refactoring/typescript-images-importing-error
refactoring: typescript images importing error
2 parents fc4f264 + 0cc2e74 commit ab67851

File tree

6 files changed

+62
-6
lines changed

6 files changed

+62
-6
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ dist/
1010
/config.js
1111
.cache
1212
coverage/
13+
.vscode/
1314

1415
# local deployment files
1516
/deploy.sh

vis/js/templates/Paper.tsx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -550,10 +550,13 @@ const getEnlargeFactor = (offsetWidth, scrollHeight) => {
550550
};
551551

552552
const getMetadataHeight = (realHeight, numOfLabels, isZoomed) => {
553-
let readersHeight = 12;
553+
let readersHeight = 0;
554554

555555
if (numOfLabels && isZoomed) {
556-
readersHeight += numOfLabels * 12;
556+
readersHeight += numOfLabels * 12 + 12;
557+
}
558+
if (numOfLabels && !isZoomed) {
559+
readersHeight += 12;
557560
}
558561

559562
const height = realHeight - readersHeight;

vis/js/templates/modals/infomodal/OrcidInfo.tsx

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,15 @@ const OrcidInfo = ({
7777
</a>, and
7878
the information supplied by the researcher on their ORCID profile.
7979
Results may be impacted by accuracy and completeness of this data.
80+
Please note that the data provided by Altmetric ("social media
81+
mentions" and "references outside of academia") are protected by
82+
copyright and other proprietary rights, as outlined in their <a
83+
target="_blank"
84+
rel="noreferrer"
85+
href="https://www.altmetric.com/terms-of-use/"
86+
>
87+
Terms of Use
88+
</a>.
8089
</p>
8190

8291
<AboutSoftware />

vis/stylesheets/modules/map/_header.scss

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
#title_context {
22
display: flex;
33
align-items: flex-start;
4-
padding-top: 15px;
54
padding-left: 50px;
65
}
76

87
#subdiscipline_title {
98
position: relative;
109
margin: 0px;
10+
padding-top: 15px;
1111
flex-grow: 1;
1212
min-height: 54px;
1313
font-family: $base-font-family;
@@ -195,6 +195,7 @@
195195
vertical-align: middle;
196196
margin: 0px; /*former margin-right*/
197197
padding-right: 8px;
198+
padding-top: 15px;
198199
}
199200

200201
#author_bio a {
@@ -207,6 +208,10 @@
207208
}
208209

209210
@media screen and (max-width: 640px) {
211+
#title_context {
212+
padding-left: 0px;
213+
}
214+
210215
#subdiscipline_title {
211216
padding-left: 20px;
212217
font-size: 14px;
@@ -216,6 +221,10 @@
216221
}
217222
}
218223

224+
#title_image {
225+
padding-left: 50px;
226+
}
227+
219228
#context {
220229
font-size: 11px;
221230
}

vis/stylesheets/modules/map/_papers.scss

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -121,9 +121,9 @@
121121
.stat {
122122
font-size: 9px;
123123
line-height: 100%;
124-
margin-bottom: 2px;
125-
padding-left: 2px;
126-
padding-right: 2px;
124+
// margin-bottom: 2px;
125+
// padding-left: 2px;
126+
// padding-right: 2px;
127127
text-align: left;
128128
vertical-align: text-bottom;
129129
font-family: $special-font-family;

vis/types/declarations/images.d.ts

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
declare module "*.png" {
2+
const value: string;
3+
export default value;
4+
}
5+
6+
declare module "*.jpg" {
7+
const value: string;
8+
export default value;
9+
}
10+
11+
declare module "*.jpeg" {
12+
const value: string;
13+
export default value;
14+
}
15+
16+
declare module "*.gif" {
17+
const value: string;
18+
export default value;
19+
}
20+
21+
declare module "*.svg" {
22+
const content: any;
23+
export default content;
24+
}
25+
26+
declare module "*.webp" {
27+
const value: string;
28+
export default value;
29+
}
30+
31+
declare module "*.avif" {
32+
const value: string;
33+
export default value;
34+
}

0 commit comments

Comments
 (0)