Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make the sidebar more UI friendly (#1) #16

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions pelicanconf.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,12 @@
# the default theme to be 2-tuples, but I need more info.
LINKS_EX = ((
'blog',
'/blog/',
'blog/',
'#f6b441', 'category-blog.png',
"detailed, thoughtful prose about why computers are the worst",
), (
'dev',
'/dev/',
'dev/',
'#ee7300', 'category-dev.png',
"updates on cool things i make",
), (
Expand All @@ -45,7 +45,7 @@
# "our house is overrun with them and they are the best",
#), (
'everything',
'/everything/',
'everything/',
'#c57be6', 'category-everything.png',
"why limit yourself when you can have it all",
))
Expand Down
12 changes: 6 additions & 6 deletions theme/templates/_sidebar.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@

<aside id="sidebar">
{% macro _render_link(title, url, color, image, desc) %}
<li style="background-color: {{ color }};">
<a href="{{ url }}">
<li style="background-color: {{ color }}{% if url in output_file %}!important; border-top-color: rgba(0, 0, 0, 0.1); background-image: linear-gradient(to bottom, rgba(255, 255, 255, 0.7), rgba(255, 255, 255, 0.6)){% endif %}">
<a{% if url in output_file %}{% else %} href="{{ SITEURL }}/{{ url }}"{% endif %}>
<div class="-glyph">
<img src="{{ SITEURL }}/theme/images/{{ image }}" alt="{{ title }}">
<img{% if url in output_file %} style="filter:none;-webkit-filter:none"{% endif %} src="{{ SITEURL }}/theme/images/{{ image }}" alt="{{ title }}">
</div>
<div class="-label">
<h2>{{ title }}</h2>
<p class="-details">{{ desc }}</p>
<h2{% if url in output_file %} style="color: #202020"{% endif %}>{{ title }}</h2>
<p class="-details"{% if url in output_file %} style="color: #404040"{% endif %}>{{ desc }}</p>
</div>
</a>
</li>
Expand All @@ -23,7 +23,7 @@ <h2>{{ title }}</h2>
{% for page in PAGES %}
{{ _render_link(
title=page.metadata.get('home-title', page.title),
url=SITEURL + "/" + page.url,
url=page.url,
color=page.metadata.get('home-color'),
image=page.metadata.get('home-image'),
desc=page.metadata.get('home-desc', ''),
Expand Down