Skip to content

Commit

Permalink
Merge branch 'stampy-redesign' into jrhender-420-advanced-content-h-tag
Browse files Browse the repository at this point in the history
  • Loading branch information
jrhender authored Mar 3, 2024
2 parents 532431f + feb4466 commit 9813eb2
Show file tree
Hide file tree
Showing 30 changed files with 796 additions and 1,053 deletions.
File renamed without changes
5 changes: 5 additions & 0 deletions app/assets/icons/carrot - large.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
46 changes: 46 additions & 0 deletions app/assets/icons/get-involved-mobile.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
24 changes: 24 additions & 0 deletions app/assets/icons/intro-mobile.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 7 additions & 0 deletions app/assets/icons/list - large.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions app/assets/icons/magnifying-large.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions app/assets/icons/x - large.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
21 changes: 17 additions & 4 deletions app/components/Article/article.css
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,6 @@ article .glossary-entry {
article .link-popup {
visibility: hidden;
opacity: 0;
width: 522px;
height: 304px;
position: absolute;
display: inline-block;
font: var(--baseFont);
Expand All @@ -80,6 +78,10 @@ article .link-popup {
visibility 0s 300ms,
opacity cubic-bezier(1, 0, 1, 1) 300ms;
}
article .glossary-popup {
width: 522px;
height: 304px;
}

article .contents a.button {
font-weight: normal;
Expand All @@ -88,13 +90,14 @@ article .link-popup .glossary-popup > .contents {
padding: var(--spacing-24) var(--spacing-40) var(--spacing-24);
}
article .defintion {
height: 160px;
height: 140px;
display: -webkit-box;
/* These are webkit specific things, so might not work in all browsers (firefox handles them fine) */
-webkit-box-orient: vertical;
-webkit-line-clamp: 4; /* Number of lines you want to display */
-webkit-line-clamp: 5; /* Number of lines you want to display */
overflow: hidden;
text-overflow: ellipsis;
margin-bottom: var(--spacing-32);
}
article .link-popup .glossary-popup > img {
width: 100%;
Expand Down Expand Up @@ -130,6 +133,16 @@ article .footer-comtainer > * {
margin: var(--spacing-8, 8px);
}

article a.see-more:not(.visible) + div.see-more-contents {
display: none;
}
article a.see-more:after {
content: 'See more...';
}
article a.see-more.visible:after {
content: 'See less';
}

@media only screen and (max-width: 640px) {
article {
max-width: 100%;
Expand Down
13 changes: 1 addition & 12 deletions app/components/ContentBox/box.css
Original file line number Diff line number Diff line change
Expand Up @@ -42,20 +42,9 @@
text-decoration: none;
}

.content-box-table.main svg {
margin: -10px 0;
}

.content-box-table.main img {
width: fit-content;
height: -webkit-fill-available;
height: -moz-available;
margin: -7px 0;
}
.content-box-table.main {
overflow: hidden;
padding: 0;
padding-right: var(--spacing-8);
padding: 0 var(--spacing-8);
}

@media (max-width: 640px) {
Expand Down
14 changes: 7 additions & 7 deletions app/components/ContentBox/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@ import {ReactNode} from 'react'
import {ArrowRight} from '~/components/icons-generated'
import ListTable from '~/components/Table'
import Button from '~/components/Button'
import BookCircle from '~/components/icons-generated/BookCircle'
import SvgGroup from '~/components/icons-generated/Group'
import IntroMobile from '~/components/icons-generated/IntroMobile'
import GetInvolvedMobile from '~/components/icons-generated/GetInvolvedMobile'
import {questionUrl} from '~/routesMapper'
import './box.css'

Expand Down Expand Up @@ -53,12 +56,8 @@ export const ContentBoxMain = () => (
</>
}
>
<img
loading="lazy"
src="/assets/book-circle.svg"
className="content-box-right-icon"
alt="AI Safety Image"
/>
<BookCircle className="desktop-only" />
<IntroMobile className="mobile-only" />
</ContentBox>
)

Expand Down Expand Up @@ -94,7 +93,8 @@ export const ContentBoxThird = () => {
actionTitle="Get involved"
classNameTable={'content-box-table main'}
>
<SvgGroup />
<SvgGroup className="desktop-only" />
<GetInvolvedMobile className="mobile-only full-width" />
</ContentBox>
)
}
Expand Down
23 changes: 10 additions & 13 deletions app/components/Grid/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,14 @@ export const GridBox = ({title, subtitle, icon, pageid}: TOCItem) => (
interface GridProps {
gridBoxes: TOCItem[]
}
export const Grid = ({gridBoxes}: GridProps) => {
console.log(gridBoxes)
return (
<div className="grid">
{gridBoxes
.filter(({category}) => category)
.slice(0, 6)
.map((gridBoxProps) => (
<GridBox key={gridBoxProps.title} {...gridBoxProps} />
))}
</div>
)
}
export const Grid = ({gridBoxes}: GridProps) => (
<div className="grid">
{gridBoxes
.filter(({category}) => category)
.slice(0, 6)
.map((gridBoxProps) => (
<GridBox key={gridBoxProps.title} {...gridBoxProps} />
))}
</div>
)
export default Grid
Loading

0 comments on commit 9813eb2

Please sign in to comment.