Skip to content

Commit

Permalink
A couple of aesthetic touches and integrating photopea
Browse files Browse the repository at this point in the history
  • Loading branch information
Hayden Smith authored and Hayden Smith committed Sep 8, 2024
1 parent 30ec3e6 commit a302e0c
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 3 deletions.
Binary file added frontend/public/assets/photopea.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 10 additions & 2 deletions frontend/src/component/AssPrint.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,27 @@ const AssPrint = ({ mda, mdb, assNumber, startWeek }) => {
const { getters } = useContext(Context);
const readyFromWeek = (week) => {
const thisWeek = getters.content.weeks.filter(w => w.week === week)[0];
return new Date() >= new Date(thisWeek.starts_on);

let readyDate = new Date(thisWeek.starts_on)
readyDate = new Date(readyDate.getTime() + readyDate.getTimezoneOffset() * 60000);

return new Date() >= readyDate;
}
return (
<>
<Markdown remarkPlugins={[remarkGfm]}>{`# Assessment ${assNumber}`}</Markdown>
<Markdown remarkPlugins={[remarkGfm]}>{mda}</Markdown>
<Markdown remarkPlugins={[remarkGfm]}>{`## 2. The Task 🔥🔥`}</Markdown>
{readyFromWeek(assNumber) ?
<a target="_blank" href={`${config.BASE_URL}/gitlabredir/${getters.term}/${`ass${assNumber}`}`}>Please see details about the task here.</a>
<>
<a target="_blank" href={`${config.BASE_URL}/gitlabredir/${getters.term}/${`ass${assNumber}`}`}>Please see details about the task here.</a>
<marquee>The reluctant use of a generally-advised-against &lt;marquee&gt; HTML tag is being used here just to get your attention so you know to click this link above.</marquee>
</>
:
<><span style={{ color: 'red', fontWeight: 'bold'}}>Details of this task are not yet available. Please check back on Monday of week {startWeek}.</span></>
}
<Markdown remarkPlugins={[remarkGfm]}>{mdb}</Markdown>
<marquee>Another surprise &lt;marquee&gt; just to remind you that you're a cool cucumber 🥒 </marquee>
</>
);
};
Expand Down
3 changes: 2 additions & 1 deletion frontend/src/page/Assessments/Assignments/AssMd.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ export const ass1b = `
Two things will want to seek external help for are:
1) Determining the particular colour (RGB or HEX) of various pixels (we recommend the use of [a chrome extension](https://chrome.google.com/webstore/detail/eye-dropper/hmdcmlfkchdmnmnmheododdhjedfccka/), though other alternatives may be appropriate for you)
2) Determining the size of particular elements (we recommend the use of [photopea](https://www.photopea.com/)). An screenshot example of it's usage can be found in \`./help/photopea.png\`
2) Determining the size of particular elements (we recommend the use of [photopea](https://www.photopea.com/)). An screenshot example of it's usage is below
![](/~cs6080/assets/photopea.png)
### 3.2. Font Sizes
Expand Down

0 comments on commit a302e0c

Please sign in to comment.