From the _config.yml file for this Jekyll theme:
colors:
black: '
white: '
blue: '
green: '
purple: '
orange: '
turquoise: '
We see that colorsthis is an array of key values.
Yes, this is fluid in CSS.
(, Liquid templating engine Jekyll, YAML, , [Enter key] . Liquid)
CSS :
{% for c in site.colors %}
.border-{{c[0]}} { border-color: {{ c[1] }} !important; }
.text-{{c[0]}} { color: {{ c[1] }}; }
.text-{{c[0]}} a { color: {{ c[1] }}; }
.bg-{{c[0]}} { background-color: {{ c[1] }} !important; }
{% endfor %}
for, colors.
CSS black - #111111:
.border-black { border-color: #111111 !important; }
.text-black { color: #111111; }
.text-black a { color:#111111; }
.bg-black { background-color: {{ c[1] }} !important; }
c colors, c[0] "", , , .., c[1] "", RGB . c[3], , , .
.
:
/* ----- per-post colors! ----- */
{% for node in site.posts %}
{% capture id %}{{ node.id | remove:'/' | downcase }}{% endcapture %}
{% capture bg %}{% if site.colors[node.bg] %}{{ site.colors[node.bg] }}{% else %}{{ node.bg }}{% endif %}{% endcapture %}
{% capture fg %}{% if site.colors[node.color] %}{{ site.colors[node.color] }}{% else %}{{ node.color }}{% endif %}{% endcapture %}
nav .p-{{id}} { border-color: {{ bg }}; }
{% endfor %}
for, _posts.
, , . :
, :
---
title: "home"
bg: white
color: black
style: center
---
bg, fg . id a posts.id ( , Jekyll), , .
, capture if, , bg, fg, (, CSS).
_config.yml, , RGB bg, fg . CSS.