You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@allura.apache.org by ke...@apache.org on 2017/12/06 21:46:39 UTC
allura git commit: Remove SF branding from default icon (on profile
pages), allow overriding
Repository: allura
Updated Branches:
refs/heads/master 8031ba781 -> 312a3ffb5
Remove SF branding from default icon (on profile pages), allow overriding
Project: http://git-wip-us.apache.org/repos/asf/allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/allura/commit/312a3ffb
Tree: http://git-wip-us.apache.org/repos/asf/allura/tree/312a3ffb
Diff: http://git-wip-us.apache.org/repos/asf/allura/diff/312a3ffb
Branch: refs/heads/master
Commit: 312a3ffb510c7e5d964aac35b1a7cef77203419b
Parents: 8031ba7
Author: Dave Brondsema <da...@brondsema.net>
Authored: Tue Dec 5 12:55:52 2017 -0500
Committer: Dave Brondsema <da...@brondsema.net>
Committed: Tue Dec 5 12:55:52 2017 -0500
----------------------------------------------------------------------
.../templates/sections/projects.html | 3 ++-
Allura/allura/nf/allura/css/site_style.css | 20 ++++++++++++++------
.../templates/jinja_master/theme_macros.html | 6 ++++++
3 files changed, 22 insertions(+), 7 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/allura/blob/312a3ffb/Allura/allura/ext/user_profile/templates/sections/projects.html
----------------------------------------------------------------------
diff --git a/Allura/allura/ext/user_profile/templates/sections/projects.html b/Allura/allura/ext/user_profile/templates/sections/projects.html
index 7f9c2d8..bee6552 100644
--- a/Allura/allura/ext/user_profile/templates/sections/projects.html
+++ b/Allura/allura/ext/user_profile/templates/sections/projects.html
@@ -18,6 +18,7 @@
-#}
{% extends "allura.ext.user_profile:templates/profile_section_base.html" %}
{% import 'allura:templates/jinja_master/lib.html' as lib with context %}
+{% import g.theme.jinja_macros as theme_macros with context %}
{% block title %}
Projects
@@ -38,7 +39,7 @@
{% if project.icon -%}
<img {{ lib.project_icon_srcs(project) }} alt="Project Logo" width="48" height="48"/>
{%- else -%}
- <img src="{{g.forge_static('images/project_default.png')}}" alt="Project Logo" width="48" height="48"/>
+ {{ theme_macros.placeholder_project_icon() }}
{%- endif -%}
<span class="project-info">
<a href="{{project.url()}}">{{project.name}}</a>
http://git-wip-us.apache.org/repos/asf/allura/blob/312a3ffb/Allura/allura/nf/allura/css/site_style.css
----------------------------------------------------------------------
diff --git a/Allura/allura/nf/allura/css/site_style.css b/Allura/allura/nf/allura/css/site_style.css
index e7d5e65..daaa991 100644
--- a/Allura/allura/nf/allura/css/site_style.css
+++ b/Allura/allura/nf/allura/css/site_style.css
@@ -3545,25 +3545,33 @@ ul.dropdown ul li:first-child a {
display: inline-block;
margin-left: 0;
}
-.profile-section.projects ul, .profile-section.projects ol {
+.profile-section.projects ul {
list-style: none;
margin: 0;
}
-.profile-section.projects ul li, .profile-section.projects ol li {
+.profile-section.projects ul li {
clear: both;
border-top: 1px solid #e5e5e5;
padding: 10px;
}
-.profile-section.projects ul img, .profile-section.projects ol img {
+.profile-section.projects ul img, .profile-section.projects ul .placeholder-icon {
vertical-align: top;
margin-right: 10px;
- margin-bottom: 10px;
float: left;
}
-.profile-section.projects ul .project-info a, .profile-section.projects ol .project-info a {
+.profile-section.projects ul .placeholder-icon {
+ width: 48px;
+ height: 48px;
+ /* inspired by https://lea.verou.me/css3patterns/#blueprint-grid */
+ background-color: lightgray;
+ background-image: linear-gradient(rgba(255,255,255,.5) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.5) 1px, transparent 1px);
+ background-size: 10px 10px;
+ background-position: 4px 4px;
+}
+.profile-section.projects ul .project-info a {
font-weight: bold;
}
-.profile-section.projects ul .project-info a:after, .profile-section.projects ol .project-info a:after {
+.profile-section.projects ul .project-info a:after {
content: '\A';
white-space: pre;
}
http://git-wip-us.apache.org/repos/asf/allura/blob/312a3ffb/Allura/allura/templates/jinja_master/theme_macros.html
----------------------------------------------------------------------
diff --git a/Allura/allura/templates/jinja_master/theme_macros.html b/Allura/allura/templates/jinja_master/theme_macros.html
index 238c8a2..70a6d68 100644
--- a/Allura/allura/templates/jinja_master/theme_macros.html
+++ b/Allura/allura/templates/jinja_master/theme_macros.html
@@ -173,3 +173,9 @@ http://stackoverflow.com/questions/26582731/redefining-imported-jinja-macros
{% endif %}
{%- endmacro %}
{% endif %}
+
+{% if not placeholder_project_icon %}
+{%- macro placeholder_project_icon() %}
+ <div class="placeholder-icon"></div>
+{%- endmacro %}
+{% endif %}