pelican-alchemy/alchemy/static/css/theme.css
Vitaly Potyarkin 18996a6c1d Enable alternative themes for Bootstrap (e.g. Boostwatch)
Alchemy is a great theme, but it was not using the full potential of
underlying technology. Bootstrap provides an easy way to customize look
and feel of rendered pages, and a lot of themes for Bootstrap are freely
available, e.g. at <https://boostwatch.com>

This commit introduces a new configuration variable BOOTSTRAP_CSS to make
use of any existing Bootstrap skins. All incompatibilities in `theme.css`
were fixed:

- Instead of using constant color values we use Bootstrap css variables for
  colors:
  <https://getbootstrap.com/docs/4.3/getting-started/theming/#css-variables>
- The only hardcoded color value left is the color for header/footer
  borders. It was moved into a variable `--alchemy-border` for easier
  overriding if needed. I have tested the current value against both dark
  and light Boostwatch themes, it works ok.
- Pagination template was slightly changed to avoid producing invisible
  text with some of Bootstrap skins
2019-09-18 17:52:08 +03:00

112 lines
1.4 KiB
CSS

:root {
--alchemy-border: rgba(0,0,0,.1);
}
::selection {
background: var(--primary);
color: var(--secondary);
text-shadow: none;
}
blockquote {
opacity: .7;
font-style: italic;
}
hr {
margin: 1.5rem 0;
}
/* ------------------------------------------------------------------------- */
.container {
max-width: 960px;
}
.header,
.footer {
padding: 1.5rem 0 .5rem;
}
.header {
border-bottom: 1px solid var(--alchemy-border);
}
.header img {
margin-bottom: 1rem;
}
.header .title {
font-weight: bold;
margin-bottom: 1rem;
}
.header ul,
.header li {
margin-bottom: .5rem;
}
.header ul {
font-size: 1.25rem;
font-weight: 300;
text-transform: lowercase;
}
.main {
padding: 1.5rem 0;
}
.footer {
border-top: 1px solid var(--alchemy-border);
}
.highlight pre {
border: 1px solid var(--alchemy-border);
padding: 1rem;
}
.teaser header ul {
list-style: none;
padding-left: 0;
}
.teaser header li {
margin-bottom: .5rem;
}
.teaser .content p {
margin-bottom: 0;
}
.article header ul,
.article header li {
margin-bottom: .5rem;
}
.article header li:not(:last-child) {
margin-right: 10px;
}
.article .content a {
text-decoration: underline
}
@media (min-width: 576px) {
.header .title {
font-size: 3rem;
}
}
@media (max-width: 576px) {
.header,
.footer {
text-align: center;
}
.teaser header li {
display: inline-block;
}
.teaser header li:not(:last-child) {
margin-right: 10px;
}
}