mirror of
https://github.com/alexmickelson/canvasManagement.git
synced 2026-03-26 07:38:33 -06:00
hovers go below
This commit is contained in:
@@ -24,38 +24,43 @@ export function ItemInDay({
|
||||
const { courseName } = useCourseContext();
|
||||
const { dragStart } = useDraggingContext();
|
||||
return (
|
||||
<Link
|
||||
href={getModuleItemUrl(courseName, moduleName, type, item.name)}
|
||||
shallow={true}
|
||||
className={
|
||||
" relative group " +
|
||||
" border rounded-sm px-1 mx-1 break-words mb-1 " +
|
||||
" bg-slate-800 " +
|
||||
" block " +
|
||||
(status === "localOnly" && " text-slate-500 border-slate-600 ") +
|
||||
(status === "incomplete" && " border-rose-900 ") +
|
||||
(status === "published" && " border-green-800 ")
|
||||
}
|
||||
role="button"
|
||||
draggable="true"
|
||||
onDragStart={(e) => {
|
||||
const draggableItem: DraggableItem = {
|
||||
type,
|
||||
item,
|
||||
sourceModuleName: moduleName,
|
||||
};
|
||||
e.dataTransfer.setData("draggableItem", JSON.stringify(draggableItem));
|
||||
dragStart();
|
||||
}}
|
||||
>
|
||||
{item.name}
|
||||
<div className={" relative group "}>
|
||||
<Link
|
||||
href={getModuleItemUrl(courseName, moduleName, type, item.name)}
|
||||
shallow={true}
|
||||
className={
|
||||
" border rounded-sm px-1 mx-1 break-words mb-1 " +
|
||||
" bg-slate-800 " +
|
||||
" block " +
|
||||
(status === "localOnly" && " text-slate-500 border-slate-600 ") +
|
||||
(status === "incomplete" && " border-rose-900 ") +
|
||||
(status === "published" && " border-green-800 ")
|
||||
}
|
||||
role="button"
|
||||
draggable="true"
|
||||
onDragStart={(e) => {
|
||||
const draggableItem: DraggableItem = {
|
||||
type,
|
||||
item,
|
||||
sourceModuleName: moduleName,
|
||||
};
|
||||
e.dataTransfer.setData(
|
||||
"draggableItem",
|
||||
JSON.stringify(draggableItem)
|
||||
);
|
||||
dragStart();
|
||||
}}
|
||||
>
|
||||
{item.name}
|
||||
</Link>
|
||||
{status === "incomplete" && (
|
||||
<div
|
||||
className={
|
||||
" absolute opacity-0 transition-all duration-700 " +
|
||||
" group-hover:block group-hover:opacity-100" +
|
||||
" 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 "
|
||||
}
|
||||
role="tooltip"
|
||||
@@ -63,6 +68,6 @@ export function ItemInDay({
|
||||
{message}
|
||||
</div>
|
||||
)}
|
||||
</Link>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -48,6 +48,7 @@ export default function AssignmentPreview({
|
||||
<br />
|
||||
<section>
|
||||
<div
|
||||
className="markdownPreview"
|
||||
dangerouslySetInnerHTML={{
|
||||
__html: markdownToHTMLSafe(assignment.description),
|
||||
}}
|
||||
|
||||
@@ -5,6 +5,7 @@ import React from "react";
|
||||
export default function PagePreview({ page }: { page: LocalCoursePage }) {
|
||||
return (
|
||||
<div
|
||||
className="markdownPreview"
|
||||
dangerouslySetInnerHTML={{
|
||||
__html: markdownToHTMLSafe(page.text),
|
||||
}}
|
||||
|
||||
@@ -78,7 +78,7 @@ function QuizQuestionPreview({ question }: { question: LocalQuizQuestion }) {
|
||||
</div>
|
||||
|
||||
<div
|
||||
className="ms-4 mb-2"
|
||||
className="ms-4 mb-2 markdownPreview"
|
||||
dangerouslySetInnerHTML={{ __html: markdownToHTMLSafe(question.text) }}
|
||||
></div>
|
||||
{question.questionType === QuestionType.MATCHING && (
|
||||
|
||||
@@ -128,4 +128,8 @@ select {
|
||||
|
||||
.markdownQuizAnswerPreview p:last-child {
|
||||
@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