Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions .github/workflows/publish-docker-images.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Publish NPM Packages
name: Publish Docker Images

on:
push:
Expand All @@ -8,6 +8,8 @@ on:
jobs:
publish-docker-images:
runs-on: ubuntu-latest
env:
NODE_OPTIONS: --dns-result-order=ipv4first --no-network-family-autoselection --network-family-autoselection-attempt-timeout=5000
steps:
- name: checkout
uses: actions/checkout@v1
Expand All @@ -30,13 +32,13 @@ jobs:
id: metaapp
uses: docker/metadata-action@v3
with:
images: codelit/courselit-app
images: egjoka/courselit-app

- name: Docker meta for the queue
id: metaqueue
uses: docker/metadata-action@v3
with:
images: codelit/courselit-queue
images: egjoka/courselit-queue

- name: Build and push app
id: docker_build_app
Expand Down
22 changes: 11 additions & 11 deletions apps/docs/src/pages/en/website/blocks.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ You will also see the newly added link on the header itself.

3. Click on the pencil icon against the newly added link to edit it as shown above.
4. Change the label (displayed as text on the header block) and the URL (where the user should be taken upon clicking the label on the header) and click `Done` to save.
![Header edit link](/assets/pages/header-edit-link.png)
</details>
![Header edit link](/assets/pages/header-edit-link.png)
</details>

### [Rich Text](#rich-text)

Expand All @@ -60,8 +60,8 @@ You can also use the floating controls to do the same as shown below.
> Double-clicking the text to select won't work due to a bug. We are working on it.
2. Click on the floating `link` button to reveal a popup text input.
3. In the popup text input, enter the URL as shown below.
![Create a hyperlink in rich text block](/assets/pages/rich-text-create-hyperlink.gif)
</details>
![Create a hyperlink in rich text block](/assets/pages/rich-text-create-hyperlink.gif)
</details>

### [Hero](#hero)

Expand All @@ -85,9 +85,9 @@ Following is how it looks on a page.

3. In the button text field, add the text that will be visible on the button.
4. In the button action, enter the URL the user should be taken to upon clicking.
a. If the URL is from your own school, use its relative form, i.e., `/courses`.
b. If the URL is from some external website, use the absolute (complete) URL, i.e., `https://website.com/courses`.
</details>
a. If the URL is from your own school, use its relative form, i.e., `/courses`.
b. If the URL is from some external website, use the absolute (complete) URL, i.e., `https://website.com/courses`.
</details>

### [Grid](#grid)

Expand Down Expand Up @@ -130,9 +130,9 @@ A grid block comes in handy when you want to show some sort of list, for example

3. In the button text field, add the text that will be visible on the button.
4. In the button action, enter the URL the user should be taken to upon clicking.
a. If the URL is from your own school, use its relative form, i.e., `/courses`.
b. If the URL is from some external website, use the absolute (complete) URL, i.e., `https://website.com/courses`.
</details>
a. If the URL is from your own school, use its relative form, i.e., `/courses`.
b. If the URL is from some external website, use the absolute (complete) URL, i.e., `https://website.com/courses`.
</details>

### [Featured](#featured)

Expand Down Expand Up @@ -268,7 +268,7 @@ In the `Design` panel, you can customize:
- Maximum width
- Vertical padding
- Social media links (Facebook, Twitter, Instagram, LinkedIn, YouTube, Discord, GitHub)
</details>
</details>

## [Shared blocks](#shared-blocks)

Expand Down
36 changes: 18 additions & 18 deletions apps/docs/src/pages/en/website/themes.md
Original file line number Diff line number Diff line change
Expand Up @@ -192,30 +192,30 @@ The typography editor lets you customize text styles across your website. These
- Header 3: Smaller titles for subsections
- Header 4: Small titles for minor sections
- Preheader: Introductory text that appears above headers
</details>
</details>

<details>
<summary>Subheaders</summary>

- Subheader 1: Primary subheaders for section introductions
- Subheader 2: Secondary subheaders for supporting text
</details>
</details>

<details>
<summary>Body Text</summary>

- Text 1: Main body text for content
- Text 2: Secondary body text for supporting content
- Caption: Small text for image captions and footnotes
</details>
</details>

<details>
<summary>Interactive Elements</summary>

- Link: Text for clickable links
- Button: Text for buttons and calls-to-action
- Input: Text for form fields and search boxes
</details>
</details>

For each text style, you can customize:

Expand Down Expand Up @@ -243,7 +243,7 @@ CourseLit provides a carefully curated selection of professional fonts, organize
- **Mulish**: A geometric sans-serif with a modern feel
- **Nunito**: A well-balanced font with rounded terminals
- **Work Sans**: A clean, modern font with a geometric feel
</details>
</details>

<details>
<summary>Serif Fonts</summary>
Expand All @@ -253,7 +253,7 @@ CourseLit provides a carefully curated selection of professional fonts, organize
- **Playfair Display**: An elegant serif font for headings
- **Roboto Slab**: A serif variant of Roboto
- **Source Serif 4**: A serif font designed for digital reading
</details>
</details>

<details>
<summary>Display Fonts</summary>
Expand All @@ -264,15 +264,15 @@ CourseLit provides a carefully curated selection of professional fonts, organize
- **Rubik**: A sans-serif with a geometric feel
- **Oswald**: A reworking of the classic style
- **Bebas Neue**: A display font with a strong personality
</details>
</details>

<details>
<summary>Modern Fonts</summary>

- **Lato**: A sans-serif font with a warm feel
- **PT Sans**: A font designed for public use
- **Quicksand**: A display sans-serif with rounded terminals
</details>
</details>

Each font is optimized for web use and includes multiple weights for flexibility in design. All fonts support Latin characters and are carefully selected for their readability and professional appearance.

Expand All @@ -290,7 +290,7 @@ The interactives editor allows you to customize the appearance of interactive el
- Shadow effects: From None to 2X Large
- Custom styles: Add your own custom styles using [supported Tailwind classes](#supported-tailwind-classes)
- Disabled state: How the button looks when it can't be clicked
</details>
</details>

<details>
<summary>Link</summary>
Expand All @@ -300,7 +300,7 @@ The interactives editor allows you to customize the appearance of interactive el
- Text shadow: Add depth to your links
- Custom styles: Add your own custom styles using [supported Tailwind classes](#supported-tailwind-classes)
- Disabled state: How the link looks when it can't be clicked
</details>
</details>

<details>
<summary>Card</summary>
Expand All @@ -309,7 +309,7 @@ The interactives editor allows you to customize the appearance of interactive el
- Border style: Choose from various border styles
- Shadow effects: Add depth to your cards
- Custom styles: Add your own custom styles using [supported Tailwind classes](#supported-tailwind-classes)
</details>
</details>

<details>
<summary>Input</summary>
Expand All @@ -320,7 +320,7 @@ The interactives editor allows you to customize the appearance of interactive el
- Shadow effects: Add depth to your input fields
- Custom styles: Add your own custom styles using [supported Tailwind classes](#supported-tailwind-classes)
- Disabled state: How the input looks when it can't be used
</details>
</details>

### 4. Structure

Expand All @@ -332,14 +332,14 @@ The structure editor lets you customize the layout of your pages, like section p
<summary>Page</summary>

- Maximum width options: - 2XL (42rem): Compact layout - 3XL (48rem): Standard layout - 4XL (56rem): Wide layout - 5XL (64rem): Extra wide layout - 6XL (72rem): Full width layout
</details>
</details>

<details>
<summary>Section</summary>

- Horizontal padding: Space on the left and right sides (None to 9X Large)
- Vertical padding: Space on the top and bottom (None to 9X Large)
</details>
</details>

## Publishing Changes

Expand Down Expand Up @@ -387,7 +387,7 @@ When adding custom styles to interactive elements, you can use the following Tai
- `text-6xl`: 6X large text
- `text-7xl`: 7X large text
- `text-8xl`: 8X large text
</details>
</details>

<details>
<summary>Padding</summary>
Expand All @@ -399,7 +399,7 @@ When adding custom styles to interactive elements, you can use the following Tai
#### Horizontal Padding

- `px-4` to `px-20`: Horizontal padding from 1rem to 5rem
</details>
</details>

<details>
<summary>Colors</summary>
Expand Down Expand Up @@ -454,7 +454,7 @@ Variants available: `hover`, `disabled`, `dark`
- `ease-out`: Ease out
- `ease-in-out`: Ease in and out
- `ease-linear`: Linear
</details>
</details>

<details>
<summary>Transforms</summary>
Expand All @@ -481,7 +481,7 @@ Variants available: `hover`, `disabled`, `dark`
- `scale-110`: 110% scale
- `scale-125`: 125% scale
- `scale-150`: 150% scale
</details>
</details>

<details>
<summary>Shadows</summary>
Expand Down
37 changes: 35 additions & 2 deletions apps/web/components/community/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -579,13 +579,46 @@ export function CommunityForum({
const uploadFile = async (file: File) => {
try {
const presignedUrl = await getPresignedUrl();
const media = await uploadToServer(presignedUrl, file);
return media;

// Use chunked upload for files larger than 10MB
const useChunkedUpload = file.size > 10 * 1024 * 1024;

if (useChunkedUpload) {
const media = await uploadFileInChunks(presignedUrl, file);
return media;
} else {
const media = await uploadToServer(presignedUrl, file);
return media;
}
} catch (err) {
throw new Error(`Media upload: ${err.message}`);
}
};

const uploadFileInChunks = async (
presignedUrl: string,
file: File,
): Promise<Media> => {
const { uploadFileInChunks: uploadChunked } = await import(
"../../lib/chunked-upload"
);

return uploadChunked({
file,
presignedUrl,
access: "public",
caption: file.name,
group: community?.name,
onProgress: (progress) => {
// You can add progress tracking here if needed
console.error(`Upload progress: ${progress.percentage}%`);
},
onError: (error) => {
console.error("Chunked upload error:", error);
},
});
};

const uploadToServer = async (
presignedUrl: string,
file: File,
Expand Down
7 changes: 4 additions & 3 deletions apps/web/components/public/lesson-viewer/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ const LessonViewer = ({

return (
<div className="h-full">
<article className="flex flex-col pb-[100px] lg:max-w-[40rem] xl:max-w-[48rem] mx-auto">
<article className="flex flex-col pb-[100px] lg:max-w-[40rem] xl:max-w-[70rem] mx-auto">
{!lesson && !error && (
<div className="flex flex-col">
<Skeleton className="h-12 w-full mb-4" />
Expand Down Expand Up @@ -224,6 +224,7 @@ const LessonViewer = ({
<div>
<video
controls
autoPlay
controlsList="nodownload" // eslint-disable-line react/no-unknown-property
key={lesson.lessonId}
className="w-full rounded mb-2"
Expand Down Expand Up @@ -274,11 +275,11 @@ const LessonViewer = ({
)}
{String.prototype.toUpperCase.call(LESSON_TYPE_PDF) ===
lesson.type && (
<div>
<div className="flex flex-col h-screen">
<iframe
frameBorder="0"
width="100%"
height="500"
className="flex-1 min-h-[70vh]"
src={`${
lesson.media && lesson.media.file
}#view=fit`}
Expand Down
Loading