Skip to content

Commit 1c120d7

Browse files
committed
change projects layout
1 parent 9d5d021 commit 1c120d7

File tree

4 files changed

+75
-61
lines changed

4 files changed

+75
-61
lines changed

_pages/projects.md

+20-12
Original file line numberDiff line numberDiff line change
@@ -10,38 +10,46 @@ description: Research projects and collaborations
1010
{% for project in ordered_pages %}
1111

1212
{% if project.redirect %}
13+
1314
<div class="project">
14-
<div class="thumbnail">
15+
<div class="project_thumbnail">
1516
<a href="{{ project.redirect }}" target="_blank">
1617
{% if project.img %}
17-
<img class="thumbnail" src="{{ project.img | prepend: site.baseurl | prepend: site.url }}"/>
18+
<img class="aligned_image" src="{{ project.img | prepend: site.baseurl | prepend: site.url }}"/>
1819
{% else %}
19-
<div class="thumbnail blankbox"></div>
20-
{% endif %}
20+
<div class="project_thumbnail blankbox"></div>
21+
{% endif %}
22+
</a>
23+
</div>
24+
<div class="project_text">
25+
<a href="{{ project.redirect }}" target="_blank">
2126
<span>
22-
<h1>{{ project.title }}</h1>
23-
<br/>
27+
<h3>{{ project.title }}</h3>
2428
<p>{{ project.description }}</p>
2529
</span>
2630
</a>
2731
</div>
2832
</div>
33+
2934
{% else %}
3035

3136
<div class="project ">
32-
<div class="thumbnail">
33-
<a href="{{ project.url | prepend: site.baseurl | prepend: site.url }}">
37+
<div class="project_thumbnail">
38+
<a href="{{ project.url | prepend: site.baseurl | prepend: site.url }}">
3439
{% if project.img %}
35-
<img class="thumbnail" src="{{ project.img | prepend: site.baseurl | prepend: site.url }}"/>
40+
<img class="aligned_image" src="{{ project.img | prepend: site.baseurl | prepend: site.url }}"/>
3641
{% else %}
3742
<div class="thumbnail blankbox"></div>
3843
{% endif %}
44+
</a>
45+
</div>
46+
<div class="project_text">
47+
<a href="{{ project.url | prepend: site.baseurl | prepend: site.url }}">
3948
<span>
40-
<h1>{{ project.title }}</h1>
41-
<br/>
49+
<h3>{{ project.title }}</h3>
4250
<p>{{ project.description }}</p>
4351
</span>
44-
</a>
52+
</a>
4553
</div>
4654
</div>
4755

_projects/grizli.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
layout: page
33
title: Grizli
44
description: Imaging and slitless spectroscopy pipeline
5-
img: /assets/img/sq_grizli.png
5+
img: /assets/img/grizli_logo.png
66
order_number: 20
77
redirect: http://www.github.com/gbrammer/grizli
88
---

_sass/_projects.scss

+50-47
Original file line numberDiff line numberDiff line change
@@ -1,59 +1,62 @@
11
.project {
2-
box-sizing: border-box;
2+
// box-sizing: border-box;
33
float: left;
4-
height: 240px;
5-
padding: 5px;
6-
vertical-align: middle;
7-
width: 33.33%;
8-
min-width: 225px;
4+
padding: 0px;
5+
position:relative;
96

10-
.thumbnail {
11-
overflow: hidden;
12-
height: 230px;
13-
width: 100%;
14-
border: 1px solid $grey-color-light;
15-
16-
img {
17-
height: 100%;
18-
position: relative;
19-
left: 0%;
20-
top: 0%;
21-
width: auto;
22-
}
23-
24-
a {
7+
display: inline-flex;
8+
9+
width: 100%;
10+
margin: 5px;
11+
12+
border: 1px solid $grey-color-light;
13+
min-height: 90px;
14+
15+
.project_thumbnail {
16+
float: left;
17+
width: 20%;
18+
height: 100%;
19+
min-width: 40px;
20+
max-width: 140px;
21+
22+
margin: auto 0px;
23+
24+
.aligned_image {
2525
float: left;
26-
height: 230px;
27-
position: relative;
2826
width: 100%;
27+
vertical-align: middle;
28+
}
29+
}
30+
31+
.project_text {
32+
width: 78%;
33+
height: 100%;
34+
min-width:150px;
35+
float: left;
2936

30-
span {
31-
display: none;
32-
position: absolute;
33-
top: 0;
34-
left: 0;
35-
bottom: 0;
36-
right: 0;
37-
background: rgba(0,0,0,0.4);
38-
color: $grey-color-light;
39-
padding: 30px;
40-
text-align: center;
41-
42-
h1 {
43-
font-size: 1.5rem;
44-
margin: 0;
45-
}
37+
margin: auto 0px;
4638

47-
p {
48-
color: $grey-color-light;
49-
}
39+
padding: 0px;
40+
41+
span {
42+
vertical-align: middle;
43+
color: $text-color;
44+
text-align: center;
45+
height: 100%;
46+
47+
h3 {
48+
font-size: 1.0rem;
49+
font-weight: bold;
50+
margin: 0;
51+
padding: 0;
5052
}
5153

52-
&:hover {
53-
span {
54-
display: block;
55-
}
54+
p {
55+
color: $text-color;
56+
font-size: $base-font-size;
57+
margin: 0;
58+
padding-left: 5px;
5659
}
57-
}
60+
}
5861
}
5962
}

_sass/_variables.scss

+4-1
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,9 @@ $pink: #f92080 !default;
5555
$light-pink: #ffdddd !default;
5656
$yellow: #efcc00 !default;
5757

58+
// matplotlib colors
59+
$mpl-blue: #1f77b4 !default;
60+
5861
$white: #fff !default;
5962
$dark-gray: #333 !default;
6063
$mid-gray: #666 !default;
@@ -70,7 +73,7 @@ $darken-2: rgba(#000,.125) !default;
7073
$darken-3: rgba(#000,.25) !default;
7174
$darken-4: rgba(#000,.5) !default;
7275

73-
$theme-color: $purple;
76+
$theme-color: $mpl-blue;
7477
$code-color: $dark-gray;
7578
$text-color: $mid-gray;
7679
$background-color: white;

0 commit comments

Comments
 (0)