Customize
Dayparts
Dayparts is Duskline's signature system. The whole store follows each visitor's local time, so sections, announcements, greetings and colors can change for day, dusk and night.
What a daypart is
A daypart is one of three times of day: day, dusk or night. Duskline reads the clock on each visitor's device and decides which daypart applies, using the start hours you set. A visitor in New York at 8 PM and a visitor in Tokyo at 9 AM see different dayparts at the same moment.
- Day: from Day starts at until Dusk starts at.
- Dusk: from Dusk starts at until Night starts at.
- Night: from Night starts at until Day starts at the next morning.
With the defaults, a visitor sees day from 6:00 to 16:59, dusk from 17:00 to 20:59 and night from 21:00 to 5:59. The daypart is chosen before the page is drawn, so nothing jumps when the page loads. If a page stays open while the hour changes, the store moves to the next daypart on its own.
Everything on this page is optional. A store that never touches these settings looks the same all day, apart from the Time of day hero, which always follows the daypart.
Dayparts settings
Open Theme settings > Dayparts.
- Day starts at
- The hour the day begins. Hours use the 24-hour clock.
- Dusk starts at
- The hour dusk begins.
- Night starts at
- The hour night begins.
- Preview daypart
- Local time, Day, Dusk or Night. Only applies in the theme editor. Visitors always see the daypart for their local time.
Greeting
- Day greeting
- Default: Good morning.
- Dusk greeting
- Default: Good evening.
- Night greeting
- Default: Good night.
Ambient mode
- Change colors with the time of day
- Everything that uses the daytime scheme switches to the dusk and night schemes. Sections with any other color scheme keep it. See Ambient mode.
- Daytime scheme
- The color scheme that changes. Shown when ambient mode is on.
- Dusk scheme
- The colors used at dusk in place of the daytime scheme.
- Night scheme
- The colors used at night in place of the daytime scheme.
- Show appearance switch in the footer
- Lets visitors keep the daytime or night colors, or follow the time. The footer section has its own setting to hide it. See The appearance switch.
Preview a daypart in the editor
You do not have to wait for the evening to set up your evening store. In Theme settings > Dayparts, set Preview daypart to Day, Dusk or Night. The editor preview then shows that daypart: the sections, announcements, greeting and ambient colors for it.
- A small label in the corner of the editor preview names the daypart being shown, for example "Time of day: Dusk (Preview)". Visitors never see this label.
- A section that is hidden for the previewed daypart appears while you have it selected in the editor, so you can still edit it.
- The preview setting has no effect on your live store. Set it back to Local time when you are done, so the editor follows your own clock again.
Show during
Most sections have a Show during setting. Use it to show a section only at certain times of day, by each visitor's local time.
- Show during
- All day, Day, Dusk, Night, Day and dusk or Dusk and night.
For example, add two Image banner sections in the same place: one set to Day with a morning photo, one set to Dusk and night with an evening photo. Each visitor sees one of them.
- A hidden section takes no space and its images and videos are not downloaded.
- There is no option for day and night without dusk. To get it, add the section twice: one set to Day and one set to Night.
- Sections with the setting: Time of day hero, Slideshow, Image banner, Image with text, Rich text, Featured collection, Collection list, Collection tabs, Featured product, Multicolumn, Collapsible content, Lookbook mosaic, Shop the look, Editorial band, Gift guide, Timeline, Video, Media gallery, Before and after, Countdown, Image with hotspots, Comparison table, Store locations, Marquee, Testimonials, Logo list, Email signup, Blog posts, Recently viewed and Custom Liquid.
- Sections without it: the header, the footer, the overlay sections, Contact form, Product recommendations, Apps and the sections that hold a template's main content, such as Product information and Collection. Collection by time of day does not need it, because it changes its own content.
Announcements per daypart
In the Announcement bar, each Announcement block has its own Show during setting with the same choices. Announcements that do not match the visitor's daypart are left out, and the bar rotates through the rest. For example, show "Order by 2 PM for same-day dispatch" during the day and "Good evening. Tomorrow's orders ship first thing" at dusk and night.
The [greeting] token
Type [greeting] in a text setting and visitors see the greeting for their daypart in its place: Day greeting, Dusk greeting or Night greeting from Theme settings > Dayparts. For example, the heading "[greeting], welcome back" reads "Good evening, welcome back" at dusk.
The token works in these places:
| Section | Settings |
|---|---|
| Announcement bar | Text of an announcement |
| Time of day hero | Heading, Subheading and each Eyebrow |
| Collection by time of day | Each Eyebrow, Heading and Text |
| Image banner | Eyebrow, Heading and Body text |
| Editorial band | Eyebrow and Heading |
| Rich text | The Eyebrow, Heading and Text blocks |
| Timeline | Heading and Subheading |
- Anywhere else, the token is shown as typed. If you see "[greeting]" on your storefront, the setting you used does not support it. Product, collection and page content written in your Shopify admin does not support it.
- Type the token exactly, in lowercase and with square brackets.
- If the dusk greeting is empty, the day greeting is used at dusk. If the night greeting is empty, the dusk greeting is used at night.
Ambient mode
Ambient mode changes the store's colors with the time of day. Turn on Change colors with the time of day and choose three color schemes: the Daytime scheme, the Dusk scheme and the Night scheme. At dusk and at night, everything that uses the daytime scheme takes the colors of the dusk or night scheme.
Only sections that use the Daytime scheme change color. That is Scheme 1, your store's default scheme, unless you choose another. A section set to any other color scheme keeps its colors all day. If you turn ambient mode on and only part of a page changes, the other sections use a different scheme.
Get the full effect
- Keep Daytime scheme on the first scheme in Theme settings > Colors (Scheme 1). The page background behind your sections then changes too. With any other daytime scheme, sections change but the page background does not.
- Set Dusk scheme and Night scheme to schemes you like for the evening. In the Duskline preset, Scheme 2 is a warm white and Scheme 3 is dark espresso. Edit them or add new schemes in Theme settings > Colors.
- Go through your pages and set Color scheme to the daytime scheme on every section that should change, including the Header, the Footer, the cart drawer and the main sections of the product, collection and cart templates. In the presets, the announcement bar, the footer and some home page sections start on other schemes, so they stay the same until you change them.
- Use Preview daypart to check each page at dusk and at night.
Keep a section the same all day
Give it any scheme other than the daytime scheme. If you want it to look like the daytime scheme but never change, duplicate that scheme in Theme settings > Colors and use the copy.
What else changes
- When a light daytime scheme turns dark, a header that uses the daytime scheme shows your Inverse logo, if you have set one in Theme settings > Logo.
- Images, videos, badges and anything with its own color scheme setting, such as the phases of the Time of day hero, are not recolored.
- If the dusk or night scheme is the same as the daytime scheme, nothing changes for that daypart.
The appearance switch
With ambient mode and Show appearance switch in the footer on, a small switch appears in the footer, beside the country/region and language selectors. It gives visitors three choices:
- Light: always use the daytime scheme.
- Dark: always use the night scheme.
- Follow the time: change with the daypart. This is the default.
The choice is saved in the visitor's browser and applied before each page is drawn. The switch has the same limit as ambient mode: it only recolors what uses the daytime scheme. It does not change which sections or announcements show; those always follow the visitor's local time. The switch needs JavaScript and is hidden without it.
The switch shows only when all three of these are on: Change colors with the time of day and Show appearance switch in the footer in Theme settings > Dayparts, and Show appearance switch in the Footer section. All three settings start on except ambient mode itself, so turning ambient mode on is enough.
Collection by time of day
The Collection by time of day section shows a different collection for day, dusk and night, each with its own eyebrow, heading and text. Use it for "For the day" and "For the night" edits without building three sections. A time of day without its own collection or text uses the day one. See its settings.
Time of day hero
The Time of day hero has an image, video, eyebrow and color scheme for each daypart. It has its own three hour settings. Leave them at 6, 17 and 21 and the hero follows Theme settings > Dayparts. Change them to give that hero its own hours.
Good to know
- Dayparts use the clock and time zone of the visitor's device, not your store's time zone. You cannot set dayparts by country or by date.
- There are always three dayparts. You can move their start hours but not add or remove one.
- Without JavaScript, visitors see the day version of everything.
- A section or announcement that is hidden for the current daypart is still in the page's code. It is hidden, not removed, so do not use Show during for content that must stay private.
- Orders, prices, discounts and product availability are not affected. To schedule a sale, use Shopify's discount and price tools.