Skip to content
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

fixed other work card layout; problem solution backdrop #37

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
20 changes: 16 additions & 4 deletions src/templates/ProjectDetails.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from 'react';
import React, { useEffect } from 'react';
import { AllClientsDataType, ProjectCateoryType, SingleAssetFluidType } from '../utils/types';
import Layout from '../layouts/Layout';
import { useStaticQuery, graphql, Link } from 'gatsby';
import { useStaticQuery, graphql, Link, useScrollRestoration } from 'gatsby';
import BackgroundImage from 'gatsby-background-image';
import './project-details.scss';
import LocationIcon from '../images/svgAssets/location.svg';
Expand Down Expand Up @@ -65,6 +65,15 @@ const defaultSliderConfig = {

// FC
const ProjectDetails: React.FC<ProjectDetailsProps> = ({ location, pageContext }) => {
//
const scrollRestore = useScrollRestoration('page-component-ui-list');

useEffect(() => {
if (history.scrollRestoration) {
history.scrollRestoration = 'manual';
}
});

// fetching background image for project details page
const {
file,
Expand Down Expand Up @@ -366,7 +375,7 @@ const ProjectDetails: React.FC<ProjectDetailsProps> = ({ location, pageContext }
)}
<div className="row d-flex align-items-start justify-content-md-start justify-content-lg-start justify-content-xl-start justify-content-xxl-start align-items-baseline justify-content-center">
{launchWebsite ? (
<div className="launch-website-badge-wrapper col d-flex justify-content-center justify-content-md-start">
<div className="launch-website-badge-wrapper text-nowrap col d-flex justify-content-center justify-content-md-start">
<a
target="_blank"
className="ms-md-1 py-2 pr-3 btn btn-primary launch-web-btn shadow-hover"
Expand All @@ -378,7 +387,10 @@ const ProjectDetails: React.FC<ProjectDetailsProps> = ({ location, pageContext }
</div>
) : null}
{googlePlayLink ? (
<div className="text-center col d-flex justify-content-center justify-content-md-start justify-content-xxl-start">
<div
style={{ marginLeft: -10 }}
className="text-center col d-flex justify-content-center justify-content-md-start justify-content-xxl-start"
>
<a href={googlePlayLink} target="_blank">
<GooglePlayBadge alt="Google Play badge" />
</a>
Expand Down
12 changes: 6 additions & 6 deletions src/templates/project-details.scss
Original file line number Diff line number Diff line change
Expand Up @@ -233,10 +233,10 @@ nav.project-details-nav {
height: calc(100vh + 14rem);
}
@include media-breakpoint-up(md) {
height: 75vh;
height: 76vh;
}
@media (min-width: 1367px) {
height: 56vh;
@media (min-width: 1600px) {
height: 60vh;
}
}

Expand Down Expand Up @@ -379,9 +379,9 @@ span.project-title {
@include media-breakpoint-up(md) {
height: 60vh !important;
}
height: 50vh !important;
@media (min-width: 1367px) {
height: 40vh !important;
height: 55vh !important;
@media (min-width: 1600px) {
height: 50vh !important;
}
}

Expand Down