Skip to content

Commit ea97fcf

Browse files
committed
make projects template look good on a phone
1 parent 16f0f83 commit ea97fcf

2 files changed

Lines changed: 85 additions & 69 deletions

File tree

_layouts/project.html

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@
1212
<div class="breadcrumbs">
1313
<a href="{{ site.github.url }}/projects">&lt; Back to Projects Gallery</a>
1414
</div>
15+
<div class="project-content-wrapper">
16+
{% include youtube-embed.html %}
17+
{{ content }}
18+
</div>
1519
<div class="project-sidebar">
1620
<h3>
1721
Project Info
@@ -40,13 +44,8 @@ <h3>
4044
{% include author-card.html %}
4145
{% endif %}
4246
</div>
43-
<div class="project-content-wrapper">
44-
{% include youtube-embed.html %}
45-
{{ content }}
46-
<br />
47-
<div id="project-credit">
48-
Posted on {{ page.date | date_to_string }}
49-
</div>
47+
<div id="project-credit" class="clear">
48+
Posted on {{ page.date | date_to_string }}
5049
</div>
5150
</section>
5251
{% include footer.html %}

stylesheets/styles.css

Lines changed: 79 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -627,14 +627,18 @@ strong {
627627
.project-content-wrapper {
628628
width: 650px;
629629
width: calc(100% - 250px);
630+
display: inline;
631+
float: left;
632+
margin-right: 20px;
630633
}
631634

632635
.project-sidebar {
633-
float: right;
634-
right: 0;
635-
position: absolute;
636+
float: left;
637+
display: inline;
636638
width: 180px;
637639
text-align:center;
640+
margin-right: 20px;
641+
margin-left: 20px;
638642
}
639643

640644
.project-sidebar .button a {
@@ -909,6 +913,66 @@ section #title p {
909913
margin-bottom: -50px;
910914
}
911915

916+
.user-card {
917+
position: relative;
918+
min-height: 40px;
919+
background-color: #333333;
920+
font-family: "Helvetica", Arial, sans-serif;
921+
color: #fff;
922+
border-radius: 2px;
923+
text-align: center;
924+
font-weight: 100;
925+
padding: 5px;
926+
927+
-moz-box-shadow: 0px 3px 7px rgba(0, 0, 0, 0.7);
928+
-webkit-box-shadow: 0px 3px 7px rgba(0, 0, 0, 0.7);
929+
-o-box-shadow: 0px 3px 7px rgba(0, 0, 0, 0.7);
930+
box-shadow: 0px 3px 7px rgba(0, 0, 0, 0.7);
931+
}
932+
933+
.user-card .user-card-avatar {
934+
position: absolute;
935+
float: left;
936+
max-height: 100%;
937+
width: auto;
938+
max-width: 20%;
939+
top: 50%;
940+
941+
-webkit-transform: translateY(-50%);
942+
-ms-transform: translateY(-50%);
943+
-o-transform: translateY(-50%);
944+
-moz-transform: translateY(-50%);
945+
transform: translateY(-50%);
946+
}
947+
948+
.user-card .user-card-avatar img {
949+
vertical-align: middle;
950+
border: 1px solid #aaa;
951+
border-radius: 2px;
952+
}
953+
954+
.user-card .user-card-text {
955+
clear: both;
956+
margin-left: auto;
957+
margin-right: 0;
958+
width: 75%;
959+
height: 100%;
960+
vertical-align: middle;
961+
}
962+
963+
.user-card .user-card-name {
964+
font-size: 1.1em;
965+
font-weight: normal;
966+
vertical-align: middle;
967+
}
968+
969+
.user-card .user-card-login {
970+
font-size: 0.9em;
971+
font-weight: 100;
972+
vertical-align: middle;
973+
}
974+
975+
912976
@media print, screen and (max-width: 450px) {
913977
#logo {
914978
display: none;
@@ -923,6 +987,18 @@ section #title p {
923987
clear: both;
924988
}
925989

990+
@media print, screen and (max-width: 850px) {
991+
.project-content-wrapper {
992+
float: none;
993+
}
994+
995+
.project-sidebar {
996+
float: none;
997+
display: table;
998+
margin: 0 auto;
999+
}
1000+
}
1001+
9261002
@media print, screen and (max-width: 720px) {
9271003
#footer .credits {
9281004
display: block;
@@ -983,62 +1059,3 @@ section #title p {
9831059
70% { color: rgb(255, 204, 0); }
9841060
100% { color: #e8e8e8 }
9851061
}
986-
987-
.user-card {
988-
position: relative;
989-
min-height: 40px;
990-
background-color: #333333;
991-
font-family: "Helvetica", Arial, sans-serif;
992-
color: #fff;
993-
border-radius: 2px;
994-
text-align: center;
995-
font-weight: 100;
996-
padding: 5px;
997-
998-
-moz-box-shadow: 0px 3px 7px rgba(0, 0, 0, 0.7);
999-
-webkit-box-shadow: 0px 3px 7px rgba(0, 0, 0, 0.7);
1000-
-o-box-shadow: 0px 3px 7px rgba(0, 0, 0, 0.7);
1001-
box-shadow: 0px 3px 7px rgba(0, 0, 0, 0.7);
1002-
}
1003-
1004-
.user-card .user-card-avatar {
1005-
position: absolute;
1006-
float: left;
1007-
max-height: 100%;
1008-
width: auto;
1009-
max-width: 20%;
1010-
top: 50%;
1011-
1012-
-webkit-transform: translateY(-50%);
1013-
-ms-transform: translateY(-50%);
1014-
-o-transform: translateY(-50%);
1015-
-moz-transform: translateY(-50%);
1016-
transform: translateY(-50%);
1017-
}
1018-
1019-
.user-card .user-card-avatar img {
1020-
vertical-align: middle;
1021-
border: 1px solid #aaa;
1022-
border-radius: 2px;
1023-
}
1024-
1025-
.user-card .user-card-text {
1026-
clear: both;
1027-
margin-left: auto;
1028-
margin-right: 0;
1029-
width: 75%;
1030-
height: 100%;
1031-
vertical-align: middle;
1032-
}
1033-
1034-
.user-card .user-card-name {
1035-
font-size: 1.1em;
1036-
font-weight: normal;
1037-
vertical-align: middle;
1038-
}
1039-
1040-
.user-card .user-card-login {
1041-
font-size: 0.9em;
1042-
font-weight: 100;
1043-
vertical-align: middle;
1044-
}

0 commit comments

Comments
 (0)