=== Hayati ===

Contributors: Ali Reza Hayati
Requires at least: 6.4
Tested up to: 7.0
Requires PHP: 7.4
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

A quiet, editorial WordPress theme modeled on the look and feel of
hayati.net: a warm paper-and-ink palette with a built-in light/dark
toggle, a right sidebar, a three-column footer, and a distinct
treatment for every post format. Built to work with JavaScript
disabled: the menu, the search box, the light/dark toggle, and every
link keep working; JavaScript only adds a small convenience (instant,
no-reload switching, and one-click heading links) on top.

== Description ==

Hayati is a classic (template-based, non-block) theme built around:

* A right sidebar that appears on every post, page, and archive.
* Up to three footer widget areas above a footer menu. However many
  you actually use (one, two, or three) fill the row evenly — a
  single widget area spans the full width rather than sitting in a
  narrow one-third column.
* A header with a small logo mark, the site title and tagline, the
  full menu (never hidden behind a JS-only button, so it's always
  readable), and an always-visible search box.
* A light/dark mode toggle in the header. Before you've ever clicked
  it, the theme follows your device's own light/dark setting
  automatically (and keeps following it if it changes) — this works
  even with JavaScript disabled. Light (a warm paper and ink palette,
  accent blue #27518b) is used when there's no system preference
  either way. Clicking the toggle stores that explicit choice in a
  cookie and is remembered on return visits, overriding the system
  setting from then on — this also works with JavaScript disabled;
  JavaScript just makes the switch instant instead of reloading the
  page.
* A distinct look for nine post formats — see below.
* Inside post and page content, every H1–H3 gets a stable id and a
  small "#" next to it on hover for linking straight to that section;
  clicking it copies the link (see "Heading links" below).
* No external requests of any kind: no icon fonts, no CDN-hosted
  webfonts, no third-party scripts. Every icon is inline SVG; every
  font is a system font stack.

== Installation ==

1. In your WordPress admin, go to Appearance → Themes → Add New Theme
   → Upload Theme, and upload the hayati.zip file. Activate it.
2. Go to Appearance → Menus and assign a menu to the "Header Menu" and
   "Footer Menu" locations. Until you do, sensible placeholder menus
   (Home / Blog / Tools, and Home / Blog / Now / Blogroll / Policies)
   are shown automatically.
3. Go to Appearance → Widgets and add widgets to "Sidebar" and however
   many of the three "Footer Widget Area" regions you want to use. A
   placeholder search/recent posts/categories/archives sidebar is
   shown until you add your own.
4. Go to Appearance → Customize:
   - Site Identity: set your Site Title, Tagline, and Site Icon
     (favicon) — Site Icon is a built-in WordPress feature, not a
     custom setting, so it works exactly like it does on any theme.
   - Theme Options: set an Accent Color (defaults to hayati.net's own
     #27518b) and, optionally, an author byline or a custom date
     format.
   - Footer: optionally set custom Footer Text and a Footer Note.
   - Announcement Banner, Old Post Notice, and External Links: all
     optional, all off by default — see below for what each one does.

== Post formats ==

Set a post's format from the Format box in the editor sidebar. Aside,
Link, Quote, Status, and Photo are titleless by design — give them a
title if you like, but it won't be displayed; a small badge names the
format instead. Gallery, Video, Audio, and Chat keep their titles,
with the same badge alongside.

* Aside — a short note. No title. Just body and meta.
* Link — no title. Put a real link in the post body (a normal <a
  href> is enough); the theme finds it, shows it with a circular link
  badge, and displays the target URL beneath the headline.
* Quote — no title. The body sits in a blockquote with a single,
  faint quotation mark behind it — just enough to mark it as a quote
  without competing with the text. Add <cite>Source</cite> in the
  body for an attribution line.
* Status — no title. A short, italic update.
* Photo (WordPress calls this format "Image" internally; this theme
  relabels it "Photo" everywhere you see it) — no title. Uses the
  Featured Image if one is set, or whatever image is in the post body.
* Gallery — keeps its title. Add a Gallery block or [gallery]
  shortcode; the grid styling is automatic.
* Video / Audio — keep their titles. Add a video/audio file or embed.
* Chat — keeps its title. The body renders in a bordered, monospaced
  transcript box.
* Standard — the default. Title and meta always show. On the index,
  the theme shows everything before a "More" tag if the post has one,
  with a "Read more…" link after it — and the full post if it
  doesn't. Single posts always show everything.

== Heading links (posts and pages only) ==

Inside the body of a post or page, any H1, H2, or H3 automatically
gets an id you can link to, plus a small "#" that fades in on hover.
Clicking it copies a direct link to that heading. IDs are unique even
when two headings share the same words: the scheme is t{level}-{slug}
(t1 for an H1, t2 for an H2, t3 for an H3), and if that's still a
duplicate — two H2s both called "Introduction", say — a -2, -3, ...
is added until it's unique. If you've already set an id on a heading
by hand, that's left alone and reused for the link. This never
appears anywhere except inside post/page content — not in widgets,
not on archive pages, not in comments. The "#" is a genuine link, so
it still works with JavaScript off; only the one-click copy is
JavaScript-only.

== Theme Options (Customizer) ==

* Accent Color — used for links, format badges, and both the light
  and dark palettes (the dark variant is computed automatically from
  whatever color you pick).
* Show Author Name — off by default. Turn it on if the site ever has
  more than one author; most single-author blogs don't need "by
  [Name]" repeated on every post.
* Custom Date Format — leave blank to use the site's own Date Format
  setting (Settings → General), or enter any PHP date format string
  (e.g. "F j, Y" or "Y-m-d") to override it just for the dates shown
  on posts, pages, and day-archive URLs.

== Footer ==

* Footer Text — freeform text/links shown at the bottom of every page.
  Leave blank for an automatic "© [year] [Site Title]." line.
* Footer Note — an optional line (e.g. a contact blurb) shown above
  the copyright line, spanning the full width of the footer. Leave
  blank to hide it.

== Announcement Banner ==

A full-width bar just under the header, above every post — good for a
domain change notice, a seasonal greeting (Nowruz, say), or anything
else that should sit above the whole site for a while. Off by
default. In Appearance → Customize → Announcement Banner:

* Show Announcement Banner — the on/off switch.
* Banner Text — a little HTML is fine (links, em, strong).
* Background Color, Text Color, Link Color — set independently of the
  site's own Accent Color, and the same in both light and dark mode
  (they're a specific choice for a specific announcement, not part of
  the theme's palette). Background defaults to the current Accent
  Color so it looks reasonable immediately; both are yours to change.

The banner only ever appears when it's switched on *and* has text —
an empty or disabled banner prints nothing at all, not even an empty
bar.

== Old Post Notice ==

A separate, optional notice shown on individual posts once they cross
an age you set — good for flagging posts whose information may be
outdated. Off by default. A different feature from the Announcement
Banner above: it doesn't require the banner to be on (or off), has
its own on/off switch, and only ever appears on posts old enough to
qualify, never sitewide. In Appearance → Customize → Old Post Notice:

* Show Old Post Notice — the on/off switch.
* Post Age / Post Age Unit — together set the threshold (e.g. 1 year,
  or 4 months) a post's publish date must cross before the notice
  appears.
* Notice Text — a little HTML is fine (links, em, strong). Use
  `{time}` where the age should appear; it's filled in automatically
  for each post (e.g. "This post is over 1 year old.").
* Notice Background Color, Text Color, Link Color — default to the
  Announcement Banner's own colors, which themselves cascade from the
  Accent Color, so the notice looks consistent even before you've
  styled it on its own.

== External Links ==

Off by default. When switched on, adds a small inline icon after any
link that points to a different domain than the site itself — in
post/page content, comments, text widgets, the banner/footer text,
the Old Post Notice, and nav menus. The icon is a plain inline SVG
baked into the theme; nothing is loaded from elsewhere. In
Appearance → Customize → External Links:

* Show External Link Icon — the on/off switch.
* Domains to Treat as Internal — one per line (e.g. hayati.net).
  Links to these domains, and their subdomains, never get the icon,
  even though they're technically a different domain from the site.

== Widget areas ==

* Sidebar — one right-hand sidebar.
* Footer Widget Area 1, 2, and 3 — however many you use fill the
  footer row evenly, for everyone (yourself included): one area in use
  spans the full row, two split it in half, three split it in thirds.
  An area with nothing in it simply isn't shown, so the others expand
  to fill the space it would have taken.

== Menus ==

* Header Menu — shown in full next to the site title/description, and
  wraps onto more lines on narrow screens rather than collapsing
  behind a button.
* Footer Menu — shown above the footer's copyright line.

== Credits ==

* Layout, styles, and templates: original code written for this theme.
* Icons: original inline SVG, drawn for this theme.
* No bundled third-party libraries, fonts, or icon sets.

== Changelog ==

= 1.2.2 =
* Fix: the Archives widget/block's "display as dropdown" option now
  works with JavaScript disabled (previously required JS to navigate).
* Fix: archive/category/tag/author page titles are now properly
  escaped.
* Fix: category and taxonomy archive descriptions no longer get
  wrapped in duplicate paragraph tags.
* Fix: the RTL stylesheet was missing styling for the Old Post Notice.
* Fix: the light/dark toggle could take two clicks — and could set
  the wrong browser toolbar color — for visitors whose device is in
  dark mode but who haven't made an explicit choice yet.

= 1.0.0 =
* Initial release.
