Skip to content

Commit 67b9ce3

Browse files
authored
Merge pull request #3 from apvarun/support-color-customization
Support color customization
2 parents 4d785a1 + b1fd0de commit 67b9ce3

File tree

9 files changed

+25
-5
lines changed

9 files changed

+25
-5
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@
22

33
All the changes made to Showcase theme for Hugo.
44

5+
## v1.2.0 - 2021-07-18
6+
7+
### Added
8+
9+
- Add color customization for Intro and Social links blocks
10+
511
## v1.1.0 - 2021-07-17
612

713
### Added

README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ Blist is a clean and fast blog theme for your Hugo site.
1515
- Text Search
1616
- Social links
1717
- Code highlighting
18+
- Color customization
1819
- Dark mode
1920
- Fast performance
2021
- SEO optimized
@@ -86,6 +87,12 @@ Menu in Blist theme is pre-set to have all section names. You can include custom
8687

8788
`[params.darkModeToggle]` enables the dark mode toggle in header. The preference is then saved so that the mode is automatically chosen for return visits.
8889

90+
### Customize Ascent Color
91+
92+
Use `[params.ascentColor]` to change the default `pink` color to any supported color from the [list of default colors](https://tailwindcss.com/docs/customizing-colors) from Tailwind CSS.
93+
94+
Some example values: bg-blue-200, bg-yellow-300
95+
8996
### Search
9097

9198
`[params.enableSearch]` option is used to enable search option in the theme.

assets/css/tailwind.config.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,11 @@ module.exports = {
77
themeDir + "layouts/**/*.html",
88
themeDir + "content/**/*.html",
99
"layouts/**/*.html",
10+
"config.toml",
1011
"content/**/*.html",
1112
"assets/js/search.js",
1213
"exampleSite/layouts/**/*.html",
14+
"exampleSite/config.toml",
1315
"exampleSite/content/**/*.html",
1416
],
1517
},

exampleSite/config.toml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,11 @@ title = "Blist Theme"
1717
copyright = "Copyright © 2021 - Katheryn Fox · All rights reserved"
1818
favicon = "favicon.svg"
1919

20+
# Color for the intro details and social links block, not applicable for dark mode
21+
# Supported values: Any color from TailwindCSS default colors
22+
# Reference: https://tailwindcss.com/docs/customizing-colors
23+
ascentColor = "bg-blue-100"
24+
2025
[params.homepage]
2126
title = "Hey! I'm Katheryn Fox"
2227
description = "26 y/o junior developer who enjoys social card games, blogging and painting"

layouts/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
{{ if gt (len (where .Site.RegularPages.ByDate.Reverse "Type" "blog")) 6 }}
1010
<div class="text-center mb-8">
11-
<a class="px-8 py-3 rounded transition-colors bg-pink-50 text-gray-500 hover:text-gray-800 dark:bg-gray-900 dark:text-gray-400 dark:hover:text-white" href="/blog">
11+
<a class="px-8 py-3 rounded transition-colors {{ .Site.Params.ascentColor | default "bg-pink-50" }} text-gray-500 hover:text-gray-800 dark:bg-gray-900 dark:text-gray-400 dark:hover:text-white" href="/blog">
1212
More posts
1313
</a>
1414
</div>

layouts/partials/intro.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<section class="bg-pink-50 dark:bg-gray-900">
1+
<section class="{{ .Site.Params.ascentColor | default "bg-pink-50" }} dark:bg-gray-900">
22
<div class="container max-w-screen-lg mx-auto px-6 py-12 grid md:grid-cols-2 gap-4 lg:gap-16 items-center">
33
<div>
44
<h1 class="text-4xl font-bold mb-4">{{ .Site.Params.homepage.title }}</h1>

layouts/partials/social.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<div class="bg-pink-50 dark:bg-gray-900">
1+
<div class="{{ .Site.Params.ascentColor | default "bg-pink-50" }} dark:bg-gray-900">
22
<div class="container px-6 py-12 mx-auto max-w-4xl grid grid-cols-1 md:grid-cols-2 gap-8 items-center">
33
<div>
44
<div class="text-2xl font-bold mb-2">Follow me</div>

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "blist",
3-
"version": "1.1.0",
3+
"version": "1.2.0",
44
"description": "Blist is a clean and fast blog theme for your Hugo site.",
55
"main": "index.js",
66
"repository": "https://github.com/apvarun/blist-hugo-theme",

0 commit comments

Comments
 (0)