Skip to content

Commit

Permalink
chaning
Browse files Browse the repository at this point in the history
  • Loading branch information
TeaByte committed Jan 6, 2024
1 parent 2a3e96e commit 94ad633
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 18 deletions.
2 changes: 1 addition & 1 deletion components/Nav.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export default function NavBar() {
<nav class="bg-base-300 w-full py-4 px-8 flex flex-col md:flex-row gap-4">
<div class="flex items-center flex-1">
<div class="flex items-center gap-1">
<image alt="Website logo" src="/logo.png" class="h-8 w-8" />
<image alt="Website logo" src="/logo.webp" class="h-8 w-8" />
<a href="/" class="text-2xl ml-1 font-bold hover:animate-pulse">
NakhlahJS
</a>
Expand Down
6 changes: 3 additions & 3 deletions islands/Editor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -52,18 +52,18 @@ export default function Editor(props: CounterProps) {

return (
<>
<div class="flex gap-2 px-2">
<div class="flex gap-2 px-2 overflow-hidden">
<button
class="btn btn-info grow"
onClick={handleCodeRun}
>
Run
تشغيل
</button>
<button
class="btn btn-active btn-ghost grow"
onClick={handleCodeClear}
>
Clear
مسح
</button>
</div>

Expand Down
18 changes: 9 additions & 9 deletions routes/[slug].tsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,15 @@ export default function CoursePage(props: PageProps<Course>) {

<main>
<div dir="ltr" class="split flex-grow max-h-screen min-h-screen">
<div id="split-0" class="overflow-y-scroll">
<div id="split-0" class="flex flex-col gap-2">
<p class="py-2 bg-[#1E1E1E]"></p>
<div dir="ltr" class="h-[400px]" id="editor"></div>
<Editor
preCode={'console.log("Hello World!")'}
testCode={"x == x"}
/>
</div>
<div id="split-1" class="overflow-y-scroll">
<section dir="rtl" class="p-3 py-5">
<div class="flex flex-col gap-2 md:flex-row justify-between items-center mb-4">
<h1 class="text-3xl">{course.title}</h1>
Expand Down Expand Up @@ -92,14 +100,6 @@ export default function CoursePage(props: PageProps<Course>) {
/>
</section>
</div>
<div id="split-1" class="flex flex-col gap-2">
<p class="py-2 bg-[#1E1E1E]"></p>
<div dir="ltr" class="h-[400px]" id="editor"></div>
<Editor
preCode={'console.log("Hello World!")'}
testCode={"x == x"}
/>
</div>
</div>
</main>
</>
Expand Down
2 changes: 1 addition & 1 deletion routes/_404.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export default function Error404() {
<div class="max-w-screen-md mx-auto flex flex-col items-center justify-center">
<img
class="my-6"
src="/logo.png"
src="/logo.webp"
width="128"
height="128"
alt="the Fresh logo: a sliced lemon dripping with juice"
Expand Down
Binary file added static/logo.webp
Binary file not shown.
11 changes: 7 additions & 4 deletions static/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ body .markdown-body {
background-color: inherit !important;
}

.markdown-body h2 {
width: fit-content;
}

.split {
display: flex;
flex-direction: row;
Expand Down Expand Up @@ -37,10 +41,9 @@ pre {
mark {
background-color: transparent;
color: inherit;

border: 1px solid #cccccc; /* Border color, you can change it */
padding: 10px; /* Adjust padding as needed */
display: inline-block; /* Display as inline-block to contain content */
border: 1px solid #cccccc;
padding: 10px;
display: inline-block;
position: relative;
border-radius: 10px;
margin-bottom: 10px;
Expand Down

0 comments on commit 94ad633

Please sign in to comment.