Skip to content

Commit

Permalink
Highlights solution (#17)
Browse files Browse the repository at this point in the history
* Update page titles (#15)

* Created tabTitle to replace "Welcome to Astro."

* Replaced single Question webpages "Welcome to Astro." with exam name followed by question number

* changed tab title for auto generated quesitons tabs

* Replaced solution tab's title with "Solution"

* fixed all issues that had \ sticking out of them as well as rendering algorithms (#21)

* Updated Home Page to be somewhat presentable (#22)

* Highlights with less changes

* hovering over solution webpage does not darken buttons

* Delete index.md (#24)
  • Loading branch information
JohnLu2004 authored Jul 30, 2024
1 parent 1028612 commit 4d35524
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/components/Evaluation/Evaluation.astro
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ const sortedQuestionData = multipleChoiceQuestionData.sort(
{
sortedQuestionData.map((data: QuestionData, index: number) => (
<div class="Evaluation__question">
<Question question={data.question} index={index} />
<Question question={data.question} index={index} interactive={true} />
{includeLinks && (
<div class="Evaluation__questionLinks">
<a href={`/questions/${data.links.question}`}>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ const letterOptions = ["a", "b", "c", "d", "e"];
class={`MultipleChoiceQuestionOption`}
data-correct={option.correct ? "true" : "false"}
data-selected="false"
data-revealed="false"
data-revealed={interactive ? "false" : "true"}
data-interactive={interactive ? "true" : "false"}
>
<div class="MultipleChoiceQuestionOption__letter">
({letterOptions[optionIndex]})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,9 @@
}

&:hover {
background-color: #ededed;

&[data-interactive="true"] {
background-color: #ededed;
}
&[data-selected="false"] {
cursor: pointer;
}
Expand Down
2 changes: 1 addition & 1 deletion src/pages/questions/[...path].astro
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ const title = formatString(path);
</div>
<h1>{title}</h1>
<Content />
<MultipleChoiceQuestion question={question} interactive={false} />
<MultipleChoiceQuestion question={question} interactive={true} />
<div class="Question__buttons">
<a href={`/questions/solution/${path}`}
><Button
Expand Down

0 comments on commit 4d35524

Please sign in to comment.