Skip to content

Commit 4b6c447

Browse files
committed
Allow user to define header and footer background style
1 parent e928a6e commit 4b6c447

File tree

7 files changed

+18
-6
lines changed

7 files changed

+18
-6
lines changed

templates/forms/misc/--variables.txp

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,18 @@ Value of '0' for no, '1' for yes.
1818
<txp:variable name="--site-head-rss" value="0" />
1919
<txp:variable name="--site-head-atom" value="0" />
2020

21+
<txp:hide>
22+
HEADER BACKGROUND NONE, LIGHT OR DARK? -----------------------------------------
23+
Value of '0' for no colour, '1' for light colour, '2' for dark colour.
24+
</txp:hide>
25+
<txp:variable name="--site-header-background" value="1" />
26+
27+
<txp:hide>
28+
FOOTER BACKGROUND NONE, LIGHT OR DARK? -----------------------------------------
29+
Value of '0' for no colour, '1' for light colour, '2' for dark colour.
30+
</txp:hide>
31+
<txp:variable name="--site-footer-background" value="1" />
32+
2133
<txp:hide>
2234
SITE LOGO IN HEADER? -----------------------------------------------------------
2335
Value of '0' for no, '1' for yes.

templates/forms/misc/header.txp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<a class="a--skip-link" href="#main"><txp:text item="go_content" /></a>
22
<txp:if_variable name="--site-header-search" value="1"><a class="a--skip-link" href="#search"><txp:text item="go_search" /></a></txp:if_variable>
3-
<div id="dynamic-header">
3+
<div class="dynamic-header<txp:if_variable name="--site-header-background" value="1"> box--subtle</txp:if_variable><txp:if_variable name="--site-header-background" value="2"> box--strong</txp:if_variable>">
44
<header class="site-header" itemscope itemtype="https://schema.org/WPHeader">
55
<txp:if_variable name="--site-header-logo" value="1">
66
<txp:if_variable name="--site-nav-home" value="1"><h2 class="site-logo"><txp:site_name /></h2><txp:else /><h2><a class="site-logo" href="<txp:site_url />" title="<txp:text item="home" />"><txp:site_name /></a></h2></txp:if_variable>

templates/pages/archive.txp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@
7979
</txp:if_category>
8080
</txp:if_author>
8181
</head>
82-
<body class="<txp:if_article_list>blog-listing-page<txp:else />blog-article-page</txp:if_article_list>" itemscope itemtype="https://schema.org/WebPage">
82+
<body class="<txp:if_article_list>blog-listing-page<txp:else />blog-article-page</txp:if_article_list><txp:if_variable name="--site-footer-background" value="1"> box--subtle</txp:if_variable><txp:if_variable name="--site-footer-background" value="2"> box--strong</txp:if_variable>" itemscope itemtype="https://schema.org/WebPage">
8383
<txp:output_form form="header" />
8484
<div class="wrapper">
8585
<txp:output_form form="breadcrumbs" />

templates/pages/article-non-blog.txp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555
</txp:if_category>
5656
</txp:if_author>
5757
</head>
58-
<body class="<txp:if_article_list>listing-page<txp:else />article-page</txp:if_article_list>" itemscope itemtype="https://schema.org/WebPage">
58+
<body class="<txp:if_article_list>listing-page<txp:else />article-page</txp:if_article_list><txp:if_variable name="--site-footer-background" value="1"> box--subtle</txp:if_variable><txp:if_variable name="--site-footer-background" value="2"> box--strong</txp:if_variable>" itemscope itemtype="https://schema.org/WebPage">
5959
<txp:output_form form="header" />
6060
<div class="wrapper">
6161
<txp:output_form form="breadcrumbs" />

templates/pages/contact.txp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
<meta name="robots" content="none">
2525
</txp:if_article_list>
2626
</head>
27-
<body class="contact-page" itemscope itemtype="https://schema.org/ContactPage">
27+
<body class="contact-page<txp:if_variable name="--site-footer-background" value="1"> box--subtle</txp:if_variable><txp:if_variable name="--site-footer-background" value="2"> box--strong</txp:if_variable>" itemscope itemtype="https://schema.org/ContactPage">
2828
<txp:output_form form="header" />
2929
<div class="wrapper">
3030
<txp:output_form form="breadcrumbs" />

templates/pages/default.txp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
</txp:if_author>
4242
</txp:if_search>
4343
</head>
44-
<body class="<txp:variable name="page-type" />" itemscope itemtype="<txp:if_variable name="page-type" value="front-page">https://schema.org/WebPage<txp:else /><txp:if_variable name="page-type" value="search-page">https://schema.org/SearchResultsPage<txp:else />https://schema.org/CollectionPage</txp:if_variable></txp:if_variable>">
44+
<body class="<txp:variable name="page-type" /><txp:if_variable name="--site-footer-background" value="1"> box--subtle</txp:if_variable><txp:if_variable name="--site-footer-background" value="2"> box--strong</txp:if_variable>" itemscope itemtype="<txp:if_variable name="page-type" value="front-page">https://schema.org/WebPage<txp:else /><txp:if_variable name="page-type" value="search-page">https://schema.org/SearchResultsPage<txp:else />https://schema.org/CollectionPage</txp:if_variable></txp:if_variable>">
4545
<txp:output_form form="header" />
4646
<txp:if_variable name="page-type" value="front-page">
4747
<txp:output_form form="-content--homepage" />

templates/pages/error_default.txp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<meta name="robots" content="none">
77
<txp:variable name="page-type" value="error-page" />
88
</head>
9-
<body class="error-page" itemscope itemtype="https://schema.org/WebPage">
9+
<body class="error-page<txp:if_variable name="--site-footer-background" value="1"> box--subtle</txp:if_variable><txp:if_variable name="--site-footer-background" value="2"> box--strong</txp:if_variable>" itemscope itemtype="https://schema.org/WebPage">
1010
<txp:output_form form="header" />
1111
<div class="wrapper">
1212
<txp:output_form form="breadcrumbs" />

0 commit comments

Comments
 (0)