chore(layouts)
This commit is contained in:
parent
c3449986ea
commit
e10fe106ec
4 changed files with 71 additions and 52 deletions
Binary file not shown.
|
|
@ -11,6 +11,7 @@ system_prompt = """
|
|||
|
||||
- Provide content for each slide in markdown format.
|
||||
- Make sure that flow of the presentation is logical and consistent.
|
||||
- Place greater emphasis on numerical data.
|
||||
- If Additional Information is provided, divide it into slides.
|
||||
- Make sure that content follows language guidelines.
|
||||
"""
|
||||
|
|
|
|||
|
|
@ -41,6 +41,7 @@ body {
|
|||
--chart-5: 27 87% 67%;
|
||||
--radius: 0.5rem;
|
||||
}
|
||||
|
||||
.dark {
|
||||
--background: 240 10% 3.9%;
|
||||
--foreground: 0 0% 98%;
|
||||
|
|
@ -70,13 +71,14 @@ body {
|
|||
}
|
||||
|
||||
@layer base {
|
||||
|
||||
|
||||
body {
|
||||
@apply bg-background text-foreground;
|
||||
}
|
||||
}
|
||||
strong{
|
||||
@apply font-black ;
|
||||
|
||||
strong {
|
||||
@apply font-black;
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -97,13 +99,17 @@ input[type="number"] {
|
|||
-moz-appearance: textfield;
|
||||
}
|
||||
|
||||
thead, tbody tr {
|
||||
display: table;
|
||||
width: 100%;
|
||||
table-layout: fixed;/* even columns width , fix width of table too*/
|
||||
thead,
|
||||
tbody tr {
|
||||
display: table;
|
||||
width: 100%;
|
||||
table-layout: fixed;
|
||||
/* even columns width , fix width of table too*/
|
||||
}
|
||||
|
||||
thead {
|
||||
width: calc( 100% - 1em )/* scrollbar is average 1em/16px width, remove it from thead width */
|
||||
width: calc(100% - 1em)
|
||||
/* scrollbar is average 1em/16px width, remove it from thead width */
|
||||
}
|
||||
|
||||
/* Add this to your global CSS or a specific CSS module */
|
||||
|
|
@ -111,37 +117,54 @@ thead {
|
|||
from {
|
||||
width: 0;
|
||||
}
|
||||
|
||||
to {
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
.typing-effect {
|
||||
overflow: hidden; /* Ensures the text is hidden until revealed */
|
||||
white-space: nowrap; /* Prevents text from wrapping */
|
||||
display: inline-block; /* Ensures the width is respected */
|
||||
animation: typing 2s steps(10, end); /* Adjust duration and steps for effect */
|
||||
animation-fill-mode: forwards; /* Retain the final state of the animation */
|
||||
animation-delay: 1s; /* Optional: delay before starting the animation */
|
||||
overflow: hidden;
|
||||
/* Ensures the text is hidden until revealed */
|
||||
white-space: nowrap;
|
||||
/* Prevents text from wrapping */
|
||||
display: inline-block;
|
||||
/* Ensures the width is respected */
|
||||
animation: typing 2s steps(10, end);
|
||||
/* Adjust duration and steps for effect */
|
||||
animation-fill-mode: forwards;
|
||||
/* Retain the final state of the animation */
|
||||
animation-delay: 1s;
|
||||
/* Optional: delay before starting the animation */
|
||||
}
|
||||
|
||||
.typing-effect-complete {
|
||||
border-right: none; /* Remove the cursor after animation */
|
||||
border-right: none;
|
||||
/* Remove the cursor after animation */
|
||||
}
|
||||
|
||||
.blinking-cursor {
|
||||
animation: blink 1s step-end infinite;
|
||||
animation: blink 1s step-end infinite;
|
||||
}
|
||||
|
||||
@keyframes blink {
|
||||
from, to { opacity: 1; }
|
||||
50% { opacity: 0; }
|
||||
|
||||
from,
|
||||
to {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
50% {
|
||||
opacity: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.hide-scrollbar::-webkit-scrollbar {
|
||||
@apply hidden;
|
||||
}
|
||||
|
||||
.hide-scrollbar {
|
||||
-ms-overflow-style: none;
|
||||
-ms-overflow-style: none;
|
||||
scrollbar-width: none;
|
||||
}
|
||||
|
||||
|
|
@ -180,36 +203,39 @@ thead {
|
|||
/* word animation */
|
||||
|
||||
@keyframes slideUp {
|
||||
0% {
|
||||
transform: translateY(0);
|
||||
}
|
||||
100% {
|
||||
transform: translateY(-50%);
|
||||
}
|
||||
0% {
|
||||
transform: translateY(0);
|
||||
}
|
||||
|
||||
100% {
|
||||
transform: translateY(-50%);
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes slideDown {
|
||||
0% {
|
||||
transform: translateY(-50%);
|
||||
}
|
||||
100% {
|
||||
transform: translateY(0);
|
||||
}
|
||||
0% {
|
||||
transform: translateY(-50%);
|
||||
}
|
||||
|
||||
100% {
|
||||
transform: translateY(0);
|
||||
}
|
||||
}
|
||||
|
||||
.animate-slideUp {
|
||||
animation: slideUp 20s linear infinite;
|
||||
animation: slideUp 20s linear infinite;
|
||||
}
|
||||
|
||||
.animate-slideDown {
|
||||
animation: slideDown 20s linear infinite;
|
||||
animation: slideDown 20s linear infinite;
|
||||
}
|
||||
|
||||
/* Add hover pause */
|
||||
.animate-slideUp:hover,
|
||||
.animate-slideDown:hover {
|
||||
animation-play-state: paused;
|
||||
animation-play-state: paused;
|
||||
}
|
||||
|
||||
/* box animation */
|
||||
|
||||
.research-mode-bg {
|
||||
|
|
@ -237,18 +263,20 @@ thead {
|
|||
height: 0;
|
||||
opacity: 0.8;
|
||||
}
|
||||
|
||||
100% {
|
||||
width: 200%;
|
||||
height: 200%;
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
|
||||
/* Markdown Styles */
|
||||
.markdown-content {
|
||||
@apply prose prose-slate max-w-none;
|
||||
}
|
||||
|
||||
.markdown-content h1 {
|
||||
/* .markdown-content h1 {
|
||||
@apply text-xl font-bold mb-4 text-gray-900;
|
||||
}
|
||||
|
||||
|
|
@ -323,7 +351,7 @@ thead {
|
|||
|
||||
.markdown-content td {
|
||||
@apply border border-gray-300 px-4 py-2;
|
||||
}
|
||||
} */
|
||||
|
||||
/* Override Tailwind Typography prose heading sizes for markdown editor */
|
||||
.prose h1 {
|
||||
|
|
@ -383,7 +411,7 @@ thead {
|
|||
|
||||
.mdxeditor-button[data-active=true] {
|
||||
@apply bg-gray-100;
|
||||
}
|
||||
}
|
||||
|
||||
/* tippy-box */
|
||||
.tippy-box {
|
||||
|
|
@ -396,8 +424,4 @@ thead {
|
|||
float: left;
|
||||
height: 0;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -28,12 +28,6 @@ const barGraphSchema = z.object({
|
|||
]).meta({
|
||||
description: "Bar chart data",
|
||||
}),
|
||||
showLegend: z.boolean().default(true).meta({
|
||||
description: "Whether to show chart legend",
|
||||
}),
|
||||
showTooltip: z.boolean().default(true).meta({
|
||||
description: "Whether to show chart tooltip",
|
||||
}),
|
||||
})
|
||||
|
||||
const chartConfig = {
|
||||
|
|
@ -62,7 +56,7 @@ interface BarGraphLayoutProps {
|
|||
}
|
||||
|
||||
const BarGraphLayout: React.FC<BarGraphLayoutProps> = ({ data: slideData }) => {
|
||||
const { title, description, chartData, showLegend = false, showTooltip = true } = slideData;
|
||||
const { title, description, chartData } = slideData;
|
||||
|
||||
const CustomLegend = () => (
|
||||
<div className="flex justify-center space-x-8 mt-8">
|
||||
|
|
@ -98,9 +92,9 @@ const BarGraphLayout: React.FC<BarGraphLayoutProps> = ({ data: slideData }) => {
|
|||
/>
|
||||
<YAxis
|
||||
tick={{ fill: '#ffffff', fontSize: 16, fontWeight: 600 }}
|
||||
tickFormatter={(value) => `$${value.toFixed(0)}.00`}
|
||||
tickFormatter={(value) => value.toFixed(0)}
|
||||
/>
|
||||
{showTooltip && <ChartTooltip content={<ChartTooltipContent />} />}
|
||||
<ChartTooltip content={<ChartTooltipContent />} />
|
||||
<Bar
|
||||
dataKey="value"
|
||||
fill="#8b5cf6"
|
||||
|
|
@ -141,7 +135,7 @@ const BarGraphLayout: React.FC<BarGraphLayoutProps> = ({ data: slideData }) => {
|
|||
<ChartContainer config={chartConfig} className="h-[300px] w-full">
|
||||
{renderBarChart()}
|
||||
</ChartContainer>
|
||||
{showLegend && <CustomLegend />}
|
||||
<CustomLegend />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue