Giter Site home page Giter Site logo

danielnordahl / remix-page-blocks Goto Github PK

View Code? Open in Web Editor NEW

This project forked from alexandromtzg/remix-page-blocks

0.0 0.0 0.0 1.17 MB

Simple page block editor with Remix and Tailwind CSS.

Home Page: https://remix-page-blocks.fly.dev

License: MIT License

Shell 0.08% JavaScript 0.21% TypeScript 99.05% CSS 0.39% Dockerfile 0.27%

remix-page-blocks's Introduction

Remix Page Blocks

Remix and Tailwind CSS simple page block editor.

Latest Updates

  • ⭐ Remix v2 + React v18
  • ⭐ Dockerfile: Demo is now hosted on Fly.io
  • Vercel demo: Translations take a second to load. I still don't know how to implement i18n-fetch-backend for Vercel.

Demo

Video Demo

https://www.loom.com/share/eccf927d35cd4ad3b4a1d512257cea53

Getting Started

💿 Rename .env.example to .env and set your variables.

💿 Install all the dependencies.

npm install

💿 Run the app.

npm run dev

Deploy to Fly.io

💿 Set the app name and primary region at fly.toml.

app = "YOUR_APP_NAME"
...
primary_region = "iad"

The primary region should match your database (e.g. Supabase) region.

💿 Create the app using fly CLI:

fly apps create YOUR_APP_NAME

💿 Set your secrets:

You can see the examples at .env.fly.example.

flyctl secrets set \
SERVER_URL=https://YOUR_APP_NAME.fly.dev \
SESSION_SECRET=abc123 \
APP_NAME="Remix Page Blocks" \
CONVERTKIT_APIKEY=abc123 \
CONVERTKIT_FORM=abc123 \
GITHUB_TOKEN=abc123 \
CONTACT_FORMSPREE=abc123 \
--app YOUR_APP_NAME

💿 Deploy the app:

fly deploy --remote-only

💿 (Optional) Scale

fly scale vm shared-cpu-2x --app YOUR_APP_NAME

Blocks

Pages are built using blocks.

...
export function defaultLandingPage({ t }: { t: TFunction }) {
  const blocks: PageBlockDto[] = [
    // Banner
    {
      banner: {
        style: "top",
        text: "Upgraded to Remix v2 + React 18 ✨"
        cta: [{ text: "Meet saasrock", href: "https://saasrock.com/?ref=remix-page-blocks-banner-v2", target: "_blank" }],
      },
    },
    // Header
    {
      header: {
        style: "simple",
        withLogo: true,
        withSignInAndSignUp: false,
        withThemeSwitcher: true,
        withLanguageSwitcher: true,
        links: [
          { path: "/", title: t("blocks.header.product") },
          { path: "/contact", title: t("blocks.header.contact") },
          { path: "/newsletter", title: t("blocks.header.newsletter") },
        ],
      },
    },
    // Hero
    {
      hero: {
        style: "simple",
        headline: "Remix Page Blocks",
        subheadline: "A collection of functional blocks: Header, Footer, Hero, Banner, Features, Logo Clouds, Community, Embeded Video, Testimonials, FAQ, Contact, Newsletter, and more.",
        image: "https://via.placeholder.com/720x600?text=Your%20Hero%20Image",
        cta: [
          {
            text: "View on GitHub"",
            href: "https://github.com/AlexandroMtzG/remix-page-blocks",
            isPrimary: true,
          },
          {
            text: "Built by SaasRock"",
            href: "https://saasrock.com/?ref=remix-page-blocks-hero",
            isPrimary: false,
            target: "_blank",
          },
        ],
        topText: {
          text: "Remix 2.3.1 ✨ Tailwind CSS 3.3.5 💅 DaisyUI 2.42.1",
        },
      },
    },
    // Logo Clouds
    // Gallery
    // Video
    // Community
    // Testimonials
    // Features
    // Newsletter
    // Faq
    // Footer
    ...
  ];
  return blocks;
}

Result:

Landing Page

remix-page-blocks's People

Contributors

alexandromtzg avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.