Skip to content

Commit

Permalink
Portfolio Activity Viewer Avatar and elispe Label
Browse files Browse the repository at this point in the history
  • Loading branch information
kevincharles committed Mar 24, 2023
1 parent 83d09d2 commit abe0de0
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 2 deletions.
16 changes: 14 additions & 2 deletions src/Tools/_framework/Paths/PortfolioActivityViewer.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -99,14 +99,26 @@ const HeaderSectionRight = styled.div`
display: flex;
justify-content: flex-end;
`
const Label = styled.span`
const Label = styled.div`
font-size: 1.4em;
font-weight: bold;
max-width: 500px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
`

const AvatarLink = styled(Link)`
text-decoration: none;
color: black;
position: relative;
`

const Byline = styled.small`
position: absolute;
left: 36px;
top: 8px;
width: 400px;
`

export function PortfolioActivityViewer() {
Expand Down Expand Up @@ -146,7 +158,7 @@ export function PortfolioActivityViewer() {
<div>
<HeaderSectionLeft><Label>{label}</Label></HeaderSectionLeft>
<HeaderSectionLeft><AvatarLink to={`/portfolio/${courseId}/public`}>
<Avatar size='sm' name={fullName} /> By {fullName}</AvatarLink></HeaderSectionLeft>
<Avatar size='sm' name={fullName} /> <Byline>By {fullName}</Byline></AvatarLink></HeaderSectionLeft>
</div>
<div>
<HeaderSectionRight><Button value="See Inside" onClick={()=>navigate(`/portfolioeditor?tool=editor&doenetId=${doenetId}&pageId=${pageDoenetId}`)} /></HeaderSectionRight>
Expand Down
3 changes: 3 additions & 0 deletions src/Tools/singlepage/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import {loader as portfolioLoader, action as portfolioAction, Portfolio } from "
import { loader as portfolioEditorMenuCapLoader } from "../_framework/MenuPanelCaps/PortfilioEditorInfoCap";
import { loader as publicPortfolioLoader, PublicPortfolio } from "../_framework/Paths/PublicPortfolio";
import { loader as portfolioActivityViewerLoader, PortfolioActivityViewer } from "../_framework/Paths/PortfolioActivityViewer";
import { ChakraProvider } from "@chakra-ui/react";

const router = createBrowserRouter([
{
Expand Down Expand Up @@ -73,7 +74,9 @@ const router = createBrowserRouter([
config={mathjaxConfig}
onStartup={(mathJax) => (mathJax.Hub.processSectionDelay = 0)}
>
<ChakraProvider>
<PortfolioActivityViewer />
</ChakraProvider>
</MathJaxContext>
</DarkmodeController>
</RecoilRoot>),
Expand Down

0 comments on commit abe0de0

Please sign in to comment.