Skip to content

Commit

Permalink
General css/template updates
Browse files Browse the repository at this point in the history
  • Loading branch information
gthole committed Feb 21, 2016
1 parent 478d78b commit 1e55c5e
Show file tree
Hide file tree
Showing 6 changed files with 55 additions and 17 deletions.
2 changes: 1 addition & 1 deletion gedgo/models/gedcom.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,4 @@ def __unicode__(self):
@property
def photo_sample(self):
photos = Document.objects.filter(gedcom=self, kind='PHOTO')
return random.sample(photos, min(20, len(photos)))
return random.sample(photos, min(24, len(photos)))
47 changes: 36 additions & 11 deletions gedgo/static/styles/style-default.css
Original file line number Diff line number Diff line change
@@ -1,47 +1,72 @@
/* Move down content because we have a fixed navbar that is 50px tall */
body {
background-color: #7EB5D6;
background-color: #F5F8FA;
}

.navbar {
background-color: #3097D1 !important;
}
.navbar-nav li a {
color: #fcfcfc !important;
}
.navbar-nav .dropdown .footlist a {
color: #666 !important;
}
.navbar-nav .active a {
background-color: #3097D1 !important;
}
.navbar-nav .open .dropdown-toggle {
background-color: #3097D1 !important;
}

.navbar-brand {
color: #fff !important;
}
.container {
max-width: 780px;

.main-container {
margin-top: 65px;
}

.main {
max-width: 750px;
padding-top: 65px;
background-color: #FFFBFF;
color: #666;
background-color: #fff;
padding: 20px;
border-radius: 5px;
border-style: solid;
border-color: #6E6E6E;
border-color: #d3d3d3;
border-width: 1px;
}
.section {
margin-top: 35px;
}
.sidebar-thumb {
width: 105px;
display: block;
margin-left: auto;
margin-right: auto;
max-width: 100%;
margin-bottom: 10px;
}
.subsection-thumb {
width: 90px;
display: block;
margin-left: auto;
margin-right: auto;
max-width: 100%;
margin-bottom: 10px;
}
.photo-subsection {
margin-right: 20px;
}
.sidebar-lead {
width: 210px;
min-width: 100%;
margin-bottom: 10px;
}
.documentary-thumb {
width: 120px;
margin-bottom: 10px;
}
.thumb {
width: 100%;
min-width: 100%;
max-width: 100%;
margin-bottom: 10px;
}
.comment-area {
Expand Down
9 changes: 5 additions & 4 deletions gedgo/templates/default/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
</div>
</div>

<div class="main container">
<div class="main-container container">
{% if messages %}
{% for message in messages %}
<br />
Expand All @@ -65,10 +65,11 @@
{% endfor %}
{% endif %}
<div class="row">
<div class="col-sm-4 hidden-xs">
<div class="main col-sm-4 hidden-xs">
{% block leftsidebar %}{% endblock %}
</div>
<div class="col-sm-8">
<div class="col-sm-1 hidden-xs"></div>
<div class="main col-sm-7">
{% block content %}{% endblock %}<br>&nbsp;
</div>
</div>
Expand All @@ -78,4 +79,4 @@
<script src="https://netdna.bootstrapcdn.com/bootstrap/3.1.0/js/bootstrap.min.js"></script>
<script>$('#help-popover').popover({html: true})</script>
{% block javascript %}{% endblock %}
</html>
</html>
2 changes: 1 addition & 1 deletion gedgo/templates/default/blogpost.html
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,4 @@ <h3>People in this post:</h3>
{% include "comment_form.html" %}
</div>

{% endblock %}
{% endblock %}
4 changes: 4 additions & 0 deletions gedgo/templates/default/gedcom.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,15 @@


{% block leftsidebar %}
<div class="row">
{% for photo in gedcom.photo_sample %}
<div class="col-lg-4 col-md-6">
<a href="{% if photo.key_person_tag %}{{ photo.key_person_tag.pointer }}{% else %}{{ photo.docfile.url }}{% endif %}">
<img src="{{ MEDIA_URL }}{{ photo.thumb }}" class="sidebar-thumb img-rounded">
</a>
</div>
{% endfor %}
</div>
{% endblock %}


Expand Down
8 changes: 8 additions & 0 deletions gedgo/templates/default/person.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,21 @@


{% block leftsidebar %}
<div class="row">
{% for photo in person.photos %}
{% if not photo == person.key_photo %}
<div class="col-lg-4 col-md-6">
<a href="{{ photo.docfile.url }}">
<img src="{{ photo.thumb.url }}" class="sidebar-thumb img-rounded">
</a>
</div>
{% endif %}
{% empty %}
<div class="col-lg-12">
<span class="text-center text-muted">(no photos)</span>
</div>
{% endfor %}
</div>
{% endblock %}


Expand Down

0 comments on commit 1e55c5e

Please sign in to comment.