Skip to content

Commit 5027d06

Browse files
authored
Merge pull request #1145 from isaacphysics/hotfix/about-us-horizontal
Fix About Us alignment and similar issues
2 parents 1e4e119 + 57955c0 commit 5027d06

11 files changed

+59
-1
lines changed

src/app/components/content/IsaacFeaturedProfile.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import {IsaacFeaturedProfileDTO} from "../../../IsaacApiTypes";
33
import {apiHelper, isDefined} from "../../services";
44
import {IsaacContent} from "./IsaacContent";
55
import {Col, Row} from "reactstrap";
6+
import { Spacer } from "../elements/Spacer";
67

78
interface IsaacFeaturedProfileProps {
89
doc: IsaacFeaturedProfileDTO;
@@ -13,7 +14,7 @@ export const IsaacFeaturedProfile = ({doc, contentIndex}: IsaacFeaturedProfilePr
1314
const path = doc.image && doc.image.src && apiHelper.determineImageUrl(doc.image.src);
1415
const summary = doc.children && doc.children[0];
1516

16-
return <div className={`text-center featured-profile ${contentIndex && contentIndex % 3 === 0 ? "featured-profile-new-row" : ""}`}>
17+
return <div className={`text-center featured-profile d-flex flex-column ${contentIndex && contentIndex % 3 === 0 ? "featured-profile-new-row" : ""}`}>
1718
<div>
1819
<img className="profile-image" src={path} alt=""/>
1920
</div>
@@ -33,6 +34,7 @@ export const IsaacFeaturedProfile = ({doc, contentIndex}: IsaacFeaturedProfilePr
3334
<div className="profile-description">
3435
{isDefined(summary) && <IsaacContent doc={summary} />}
3536
</div>
37+
<Spacer/>
3638
{doc.emailAddress && <a href={"mailto:" + doc.emailAddress} className="mb-4">
3739
<img src='/assets/phy/icons/icon-mailto.png' alt=""/>
3840
<span className="visually-hidden">{"Email " + doc.title}</span>

src/scss/phy/featured-profile.scss

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,59 @@
33
.profile-description {
44
padding: 0.5rem 1.5rem 0 1.5rem;
55
}
6+
7+
// Detecting a div with any number of featured-profile children
8+
div:has(> .featured-profile) {
9+
@extend .flex-row;
10+
@extend .card-deck;
11+
@extend .row-cols-1;
12+
@extend .row-cols-sm-2;
13+
@extend .row-cols-md-3;
14+
15+
.featured-profile {
16+
margin-bottom: 1rem;
17+
}
18+
}
19+
20+
// Detecting a div with exactly two featured-profile children (co-founders)
21+
div:has(> .featured-profile:first-child:nth-last-child(2)) {
22+
@extend .flex-row;
23+
@extend .row-cols-1;
24+
@extend .row-cols-sm-2;
25+
26+
.featured-profile {
27+
@extend .isaac-tab;
28+
29+
width: 47.5%;
30+
@include media-breakpoint-down(sm) {
31+
width: 100%;
32+
}
33+
34+
margin-top: 0%;
35+
margin-right: 0%;
36+
padding: 2.5%;
37+
overflow-x: hidden;
38+
39+
.profile-description {
40+
padding: 1rem 0;
41+
font-size: initial;
42+
color: black;
43+
}
44+
45+
.profile-image {
46+
padding-bottom: 1rem;
47+
width: 95%;
48+
}
49+
}
50+
51+
.featured-profile:first-child {
52+
margin-right: 5%;
53+
}
54+
}
55+
56+
@include media-breakpoint-down(lg) {
57+
div.pad:has(> div > .featured-profile:first-child:nth-last-child(2)) {
58+
padding-left: 0;
59+
}
60+
}
61+
Loading
Loading

0 commit comments

Comments
 (0)