PHPackages                             jainilnagar/curtains - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [DevOps &amp; Deployment](/categories/devops)
4. /
5. jainilnagar/curtains

ActiveCraft-plugin[DevOps &amp; Deployment](/categories/devops)

jainilnagar/curtains
====================

Maintenance mode, coming soon pages, and deployment windows for Craft CMS.

1.0.0(today)01↑2900%MITPHPPHP &gt;=8.2CI passing

Since Jun 20Pushed todayCompare

[ Source](https://github.com/jainilnagar/craft-curtains)[ Packagist](https://packagist.org/packages/jainilnagar/curtains)[ RSS](/packages/jainilnagar-curtains/feed)WikiDiscussions main Synced today

READMEChangelog (1)Dependencies (3)Versions (2)Used By (0)

 [![Curtains icon](src/icon.svg)](src/icon.svg)

Curtains for Craft CMS
======================

[](#curtains-for-craft-cms)

Maintenance mode, coming-soon pages, and deployment windows for **Craft CMS**.

Curtains lets you draw a polished "curtain" over your site — a maintenance screen or a coming-soon launch page — while keeping admins, allow-listed IPs, and people holding a secret preview link working as normal. It ships with a custom control-panel section, CLI commands for your deploy scripts, a deploy banner, email signup capture, a countdown timer, and two designed layouts.

Features
--------

[](#features)

**Maintenance**

- Enable/disable from the control panel or the command line
- Correct **503 Service Unavailable** response (with `Retry-After` when an end time is scheduled), or **200** if you prefer
- Optional no-cache headers so the curtain is never cached by browsers or proxies
- Admin bypass — logged-in users with CP access keep browsing
- IP allowlist with CIDR range support (toggleable)
- Named secret preview links with an optional expiry (or never) — listable and revocable on demand
- Optional automatic start and end times for scheduled deployment windows
- Custom heading and message

**Deployment**

- CLI commands: `curtains/on`, `curtains/off`, `curtains/status` — drop them straight into your deploy pipeline
- Deploy banner shown to admins across the CP (e.g. "Maintenance mode enabled by John Doe 5 minutes ago"), toggleable

**Launch / coming soon**

- Countdown timer to a target date (its own field, falling back to the scheduled end)
- Email signup capturing name and email, stored in Craft and exportable to CSV, with honeypot + per-IP throttle to deter spam
- Configurable signup button text and success message
- Social and contact icons (Facebook, X, LinkedIn, YouTube, Pinterest, Instagram, WhatsApp, email, phone)
- Analytics (GA4 measurement ID or a custom snippet)
- SEO controls (title, description, `X-Robots-Tag` / `noindex`)

**Design**

- **Minimal** layout — background image, logo, message, countdown, email form, social links
- **Split screen** layout — image on the left or right, content on the other side
- Configurable background colour, text colour, accent colour, background image, logo, and favicon

**Extras**

- Device preview mode (desktop / tablet / mobile) so you can check the curtain before raising it
- Dashboard "Curtains" widget (status, enabled at, scheduled off at, allowed IPs, subscribers)
- Granular permissions so you can scope access per user group
- Fully translatable (all strings run through the `curtains` translation category)

Requirements
------------

[](#requirements)

- Craft CMS 5.0.0 or later
- PHP 8.2 or later

Installation
------------

[](#installation)

You can install Curtains via the plugin store, or through Composer.

### Composer

[](#composer)

You can also add the package to your project using Composer and the command line.

1. Open your terminal and go to your Craft project:

    ```
     cd /path/to/project

    ```
2. Then tell Composer to require the plugin, and Craft to install it:

    ```
     composer require jainilnagar/curtains && php craft plugin/install curtains

    ```

### Craft Plugin Store

[](#craft-plugin-store)

To install Curtains, navigate to the Plugin Store section of your Craft control panel, search for Curtains.

Usage
-----

[](#usage)

### Control panel

[](#control-panel)

A **Curtains** section appears in the CP sidebar with four pages:

- **Settings** — a tabbed page covering everything: General (Curtain Mode on/off, optional automatic start and end times, 503/no-cache toggles, the admin banner toggle, and countdown/signup/social toggles), Content (heading, content, signup button text and success message, and the social/contact icons), Appearance (layout, colours, logo, background image, favicon), Access (admin bypass and IP allowlist), and SEO &amp; Analytics.
- **Preview** — view the curtain in a desktop/tablet/mobile frame and switch between layouts before going live.
- **Preview Links** — create, copy, and revoke named secret preview links.
- **Subscribers** — browse, search, and export everyone who signed up, or remove entries (individually or in bulk).

Most options are stored in project config, so they deploy with your codebase. The Curtain Mode on/off toggle and its optional start/end schedule are stored separately in the database, so you can toggle maintenance in production even when `allowAdminChanges` is off — and the "enabled by / enabled at" metadata is recorded for the banner and widget.

### Permissions

[](#permissions)

Curtains registers granular permissions so you can scope access per user group: manage settings; view and use the device preview; view, create, and delete preview links; and view, export, and delete subscribers. CP controls are hidden when a user lacks the matching permission, and every action is enforced server-side regardless.

### Command line

[](#command-line)

```
# Raise the curtain (maintenance ON)
./craft curtains/on

# Raise it and auto-lift after 30 minutes
./craft curtains/on --minutes=30

# Drop the curtain (site live again)
./craft curtains/off

# Show current status, schedule and subscriber count
./craft curtains/status
```

A typical deploy script wraps the risky steps:

```
./craft curtains/on
# run migrations, clear caches, deploy assets…
./craft up
./craft curtains/off
```

### Twig

[](#twig)

The plugin exposes a `craft.curtains` variable:

```
{% if craft.curtains.isActive() %}
    The curtain is currently up.
{% endif %}

{{ craft.curtains.subscriberCount() }} people are waiting.

{% set status = craft.curtains.getStatus() %}
{% if status.enabledAt %}Enabled at {{ status.enabledAt }}{% endif %}
```

Secret preview links
--------------------

[](#secret-preview-links)

Open the **Preview Links** page (also linked from **Settings → Access**) to add a named link and pick either **Never expire** or an **Expire at** date and time. Each link is listed with a one-click copy button and its expiry, and can be removed — individually or in bulk — at any time.

Links are stored and validated against the database on every request, so removing one revokes it immediately — including for anyone who already has the bypass cookie. Opening a valid link sets a short-lived cookie so the holder can keep browsing during downtime.

Development
-----------

[](#development)

This plugin follows the Craft CMS coding standards and ships with static analysis configured.

```
# Check code style (craftcms/ecs)
composer check-cs

# Auto-fix code style
composer fix-cs

# Static analysis (craftcms/phpstan)
composer phpstan
```

License
-------

[](#license)

This plugin is licensed under the MIT License — see [LICENSE.md](LICENSE.md).

###  Health Score

40

—

FairBetter than 86% of packages

Maintenance100

Actively maintained with recent releases

Popularity2

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity45

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

0d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/56784985?v=4)[Jainil Nagar](/maintainers/jainilnagar)[@jainilnagar](https://github.com/jainilnagar)

---

Top Contributors

[![jainilnagar](https://avatars.githubusercontent.com/u/56784985?v=4)](https://github.com/jainilnagar "jainilnagar (3 commits)")

---

Tags

cmsCraftcraftcmscraft-plugindeployment maintenance modecoming soon

### Embed Badge

![Health badge](/badges/jainilnagar-curtains/health.svg)

```
[![Health](https://phpackages.com/badges/jainilnagar-curtains/health.svg)](https://phpackages.com/packages/jainilnagar-curtains)
```

###  Alternatives

[verbb/formie

The most user-friendly forms plugin for Craft.

100387.6k57](/packages/verbb-formie)[verbb/vizy

A flexible visual editor field for Craft.

4249.7k](/packages/verbb-vizy)[verbb/hyper

A user-friendly links field for Craft.

24142.6k12](/packages/verbb-hyper)[verbb/social-poster

Automatically post entries to social media.

918.5k](/packages/verbb-social-poster)[verbb/icon-picker

A slick field to pick icons from. Supports SVGs, Sprites, Webfonts, Font Awesome and more.

16168.8k6](/packages/verbb-icon-picker)[verbb/tablemaker

Create customizable and user-defined table fields.

40174.4k2](/packages/verbb-tablemaker)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
