Skip to content

refactoring: typescript images importing error #781

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ dist/
/config.js
.cache
coverage/
.vscode/

# local deployment files
/deploy.sh
Expand Down
7 changes: 5 additions & 2 deletions vis/js/templates/Paper.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -550,10 +550,13 @@ const getEnlargeFactor = (offsetWidth, scrollHeight) => {
};

const getMetadataHeight = (realHeight, numOfLabels, isZoomed) => {
let readersHeight = 12;
let readersHeight = 0;

if (numOfLabels && isZoomed) {
readersHeight += numOfLabels * 12;
readersHeight += numOfLabels * 12 + 12;
}
if (numOfLabels && !isZoomed) {
readersHeight += 12;
}

const height = realHeight - readersHeight;
Expand Down
9 changes: 9 additions & 0 deletions vis/js/templates/modals/infomodal/OrcidInfo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,15 @@ const OrcidInfo = ({
</a>, and
the information supplied by the researcher on their ORCID profile.
Results may be impacted by accuracy and completeness of this data.
Please note that the data provided by Altmetric ("social media
mentions" and "references outside of academia") are protected by
copyright and other proprietary rights, as outlined in their <a
target="_blank"
rel="noreferrer"
href="https://www.altmetric.com/terms-of-use/"
>
Terms of Use
</a>.
</p>

<AboutSoftware />
Expand Down
11 changes: 10 additions & 1 deletion vis/stylesheets/modules/map/_header.scss
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
#title_context {
display: flex;
align-items: flex-start;
padding-top: 15px;
padding-left: 50px;
}

#subdiscipline_title {
position: relative;
margin: 0px;
padding-top: 15px;
flex-grow: 1;
min-height: 54px;
font-family: $base-font-family;
Expand Down Expand Up @@ -195,6 +195,7 @@
vertical-align: middle;
margin: 0px; /*former margin-right*/
padding-right: 8px;
padding-top: 15px;
}

#author_bio a {
Expand All @@ -207,6 +208,10 @@
}

@media screen and (max-width: 640px) {
#title_context {
padding-left: 0px;
}

#subdiscipline_title {
padding-left: 20px;
font-size: 14px;
Expand All @@ -216,6 +221,10 @@
}
}

#title_image {
padding-left: 50px;
}

#context {
font-size: 11px;
}
Expand Down
6 changes: 3 additions & 3 deletions vis/stylesheets/modules/map/_papers.scss
Original file line number Diff line number Diff line change
Expand Up @@ -121,9 +121,9 @@
.stat {
font-size: 9px;
line-height: 100%;
margin-bottom: 2px;
padding-left: 2px;
padding-right: 2px;
// margin-bottom: 2px;
// padding-left: 2px;
// padding-right: 2px;
text-align: left;
vertical-align: text-bottom;
font-family: $special-font-family;
Expand Down
34 changes: 34 additions & 0 deletions vis/types/declarations/images.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
declare module "*.png" {
const value: string;
export default value;
}

declare module "*.jpg" {
const value: string;
export default value;
}

declare module "*.jpeg" {
const value: string;
export default value;
}

declare module "*.gif" {
const value: string;
export default value;
}

declare module "*.svg" {
const content: any;
export default content;
}

declare module "*.webp" {
const value: string;
export default value;
}

declare module "*.avif" {
const value: string;
export default value;
}
Loading