diff --git a/.github/workflows/publish-docker-images.yaml b/.github/workflows/publish-docker-images.yaml index e48572cf2..308967965 100644 --- a/.github/workflows/publish-docker-images.yaml +++ b/.github/workflows/publish-docker-images.yaml @@ -1,4 +1,4 @@ -name: Publish NPM Packages +name: Publish Docker Images on: push: @@ -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 @@ -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 diff --git a/apps/docs/src/pages/en/website/blocks.md b/apps/docs/src/pages/en/website/blocks.md index a937bd2c6..24e6b014e 100644 --- a/apps/docs/src/pages/en/website/blocks.md +++ b/apps/docs/src/pages/en/website/blocks.md @@ -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) - + ![Header edit link](/assets/pages/header-edit-link.png) + ### [Rich Text](#rich-text) @@ -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) - + ![Create a hyperlink in rich text block](/assets/pages/rich-text-create-hyperlink.gif) + ### [Hero](#hero) @@ -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`. - + 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`. + ### [Grid](#grid) @@ -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`. - + 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`. + ### [Featured](#featured) @@ -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) - + ## [Shared blocks](#shared-blocks) diff --git a/apps/docs/src/pages/en/website/themes.md b/apps/docs/src/pages/en/website/themes.md index 0700d2e29..2d7bed189 100644 --- a/apps/docs/src/pages/en/website/themes.md +++ b/apps/docs/src/pages/en/website/themes.md @@ -192,14 +192,14 @@ 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 - +
Subheaders - Subheader 1: Primary subheaders for section introductions - Subheader 2: Secondary subheaders for supporting text -
+
Body Text @@ -207,7 +207,7 @@ The typography editor lets you customize text styles across your website. These - Text 1: Main body text for content - Text 2: Secondary body text for supporting content - Caption: Small text for image captions and footnotes -
+
Interactive Elements @@ -215,7 +215,7 @@ The typography editor lets you customize text styles across your website. These - Link: Text for clickable links - Button: Text for buttons and calls-to-action - Input: Text for form fields and search boxes -
+ For each text style, you can customize: @@ -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 - +
Serif Fonts @@ -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 -
+
Display Fonts @@ -264,7 +264,7 @@ 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 -
+
Modern Fonts @@ -272,7 +272,7 @@ CourseLit provides a carefully curated selection of professional fonts, organize - **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 -
+ 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. @@ -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 - +
Link @@ -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 -
+
Card @@ -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) -
+
Input @@ -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 -
+ ### 4. Structure @@ -332,14 +332,14 @@ The structure editor lets you customize the layout of your pages, like section p Page - 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 - +
Section - 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) -
+ ## Publishing Changes @@ -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 - +
Padding @@ -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 -
+
Colors @@ -454,7 +454,7 @@ Variants available: `hover`, `disabled`, `dark` - `ease-out`: Ease out - `ease-in-out`: Ease in and out - `ease-linear`: Linear -
+
Transforms @@ -481,7 +481,7 @@ Variants available: `hover`, `disabled`, `dark` - `scale-110`: 110% scale - `scale-125`: 125% scale - `scale-150`: 150% scale -
+
Shadows diff --git a/apps/web/components/community/index.tsx b/apps/web/components/community/index.tsx index 9eeb8e600..fba026fe6 100644 --- a/apps/web/components/community/index.tsx +++ b/apps/web/components/community/index.tsx @@ -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 => { + 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, diff --git a/apps/web/components/public/lesson-viewer/index.tsx b/apps/web/components/public/lesson-viewer/index.tsx index 8a906eb60..d3c350f2d 100644 --- a/apps/web/components/public/lesson-viewer/index.tsx +++ b/apps/web/components/public/lesson-viewer/index.tsx @@ -187,7 +187,7 @@ const LessonViewer = ({ return (
-
+
{!lesson && !error && (
@@ -224,6 +224,7 @@ const LessonViewer = ({