mirror of
https://github.com/alexmickelson/canvasManagement.git
synced 2026-03-26 15:48:32 -06:00
hovers go below
This commit is contained in:
@@ -24,38 +24,43 @@ export function ItemInDay({
|
|||||||
const { courseName } = useCourseContext();
|
const { courseName } = useCourseContext();
|
||||||
const { dragStart } = useDraggingContext();
|
const { dragStart } = useDraggingContext();
|
||||||
return (
|
return (
|
||||||
<Link
|
<div className={" relative group "}>
|
||||||
href={getModuleItemUrl(courseName, moduleName, type, item.name)}
|
<Link
|
||||||
shallow={true}
|
href={getModuleItemUrl(courseName, moduleName, type, item.name)}
|
||||||
className={
|
shallow={true}
|
||||||
" relative group " +
|
className={
|
||||||
" border rounded-sm px-1 mx-1 break-words mb-1 " +
|
" border rounded-sm px-1 mx-1 break-words mb-1 " +
|
||||||
" bg-slate-800 " +
|
" bg-slate-800 " +
|
||||||
" block " +
|
" block " +
|
||||||
(status === "localOnly" && " text-slate-500 border-slate-600 ") +
|
(status === "localOnly" && " text-slate-500 border-slate-600 ") +
|
||||||
(status === "incomplete" && " border-rose-900 ") +
|
(status === "incomplete" && " border-rose-900 ") +
|
||||||
(status === "published" && " border-green-800 ")
|
(status === "published" && " border-green-800 ")
|
||||||
}
|
}
|
||||||
role="button"
|
role="button"
|
||||||
draggable="true"
|
draggable="true"
|
||||||
onDragStart={(e) => {
|
onDragStart={(e) => {
|
||||||
const draggableItem: DraggableItem = {
|
const draggableItem: DraggableItem = {
|
||||||
type,
|
type,
|
||||||
item,
|
item,
|
||||||
sourceModuleName: moduleName,
|
sourceModuleName: moduleName,
|
||||||
};
|
};
|
||||||
e.dataTransfer.setData("draggableItem", JSON.stringify(draggableItem));
|
e.dataTransfer.setData(
|
||||||
dragStart();
|
"draggableItem",
|
||||||
}}
|
JSON.stringify(draggableItem)
|
||||||
>
|
);
|
||||||
{item.name}
|
dragStart();
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{item.name}
|
||||||
|
</Link>
|
||||||
{status === "incomplete" && (
|
{status === "incomplete" && (
|
||||||
<div
|
<div
|
||||||
className={
|
className={
|
||||||
" absolute opacity-0 transition-all duration-700 " +
|
" absolute opacity-0 transition-all duration-700 " +
|
||||||
" group-hover:block group-hover:opacity-100" +
|
" group-hover:block group-hover:opacity-100" +
|
||||||
" bg-gray-800 text-white text-sm " +
|
" bg-gray-800 text-white text-sm " +
|
||||||
" rounded py-1 px-2 bottom-full mb-2 left-1/2 transform -translate-x-1/2 " +
|
" rounded py-1 px-2 " +
|
||||||
|
" top-full mt-2 transform left-1/2 -translate-x-1/2 " +
|
||||||
" whitespace-no-wrap min-w-full max-w-96 "
|
" whitespace-no-wrap min-w-full max-w-96 "
|
||||||
}
|
}
|
||||||
role="tooltip"
|
role="tooltip"
|
||||||
@@ -63,6 +68,6 @@ export function ItemInDay({
|
|||||||
{message}
|
{message}
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
</Link>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -48,6 +48,7 @@ export default function AssignmentPreview({
|
|||||||
<br />
|
<br />
|
||||||
<section>
|
<section>
|
||||||
<div
|
<div
|
||||||
|
className="markdownPreview"
|
||||||
dangerouslySetInnerHTML={{
|
dangerouslySetInnerHTML={{
|
||||||
__html: markdownToHTMLSafe(assignment.description),
|
__html: markdownToHTMLSafe(assignment.description),
|
||||||
}}
|
}}
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import React from "react";
|
|||||||
export default function PagePreview({ page }: { page: LocalCoursePage }) {
|
export default function PagePreview({ page }: { page: LocalCoursePage }) {
|
||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
|
className="markdownPreview"
|
||||||
dangerouslySetInnerHTML={{
|
dangerouslySetInnerHTML={{
|
||||||
__html: markdownToHTMLSafe(page.text),
|
__html: markdownToHTMLSafe(page.text),
|
||||||
}}
|
}}
|
||||||
|
|||||||
@@ -78,7 +78,7 @@ function QuizQuestionPreview({ question }: { question: LocalQuizQuestion }) {
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div
|
<div
|
||||||
className="ms-4 mb-2"
|
className="ms-4 mb-2 markdownPreview"
|
||||||
dangerouslySetInnerHTML={{ __html: markdownToHTMLSafe(question.text) }}
|
dangerouslySetInnerHTML={{ __html: markdownToHTMLSafe(question.text) }}
|
||||||
></div>
|
></div>
|
||||||
{question.questionType === QuestionType.MATCHING && (
|
{question.questionType === QuestionType.MATCHING && (
|
||||||
|
|||||||
@@ -129,3 +129,7 @@ select {
|
|||||||
.markdownQuizAnswerPreview p:last-child {
|
.markdownQuizAnswerPreview p:last-child {
|
||||||
@apply p-0 m-0 ;
|
@apply p-0 m-0 ;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.markdownPreview a {
|
||||||
|
@apply text-blue-500 hover:text-blue-600 font-bold underline;
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user