]> git.ipfire.org Git - ipfire.org.git/commitdiff
blog: Make posts from Lightning Wire Labs indigo
authorMichael Tremer <michael.tremer@ipfire.org>
Tue, 17 Jul 2018 22:04:10 +0000 (23:04 +0100)
committerMichael Tremer <michael.tremer@ipfire.org>
Tue, 17 Jul 2018 22:04:10 +0000 (23:04 +0100)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/backend/blog.py
src/scss/style.scss
src/templates/blog/modules/post.html

index d54565f9e0d78a40f219110615eebe382c3514ac..c40837358bdae6b8af8588d5f824a4833b5fbbf9 100644 (file)
@@ -87,3 +87,7 @@ class Post(misc.Object):
                        Returns this post as rendered HTML
                """
                return self.data.html
+
+       @property
+       def tags(self):
+               return self.data.tags
index 13bac62f2a2a616759a81f6e5af3ee9a16ea1160..a303ec9f30a7c8367b45dadfaa35c4650c4ce4ca 100644 (file)
@@ -221,6 +221,12 @@ footer {
 
 .blog-post {
        // Custom CSS for blog posts goes here
+
+       &.lightning-wire-labs {
+               h5:first-of-type, a {
+                       color: $lwl;
+               }
+       }
 }
 
 // Sidebar navigation
index 5f0bcba6f43106eaf641d41f8b3e50ecc17b2f73..42670b7798ec2ee71be6b645095b58f9e57bb159 100644 (file)
@@ -1,4 +1,4 @@
-<div class="blog-post">
+<div class="blog-post {% if "lightning-wire-labs" in post.tags %}lightning-wire-labs{% end %}">
        <h5 class="mb-0">{{ post.title }}</h5>
 
        <p class="small text-muted">