Skip to content

Commit

Permalink
feat: Project site redesign, 1-software layout WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
strogonoff committed Mar 17, 2019
1 parent aca7230 commit 2941c03
Show file tree
Hide file tree
Showing 6 changed files with 79 additions and 25 deletions.
10 changes: 4 additions & 6 deletions _includes/home-hero.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
<div class="text">
<h1 class="title">{{ site.tagline }}</h1>
<p class="desc">{{ site.pitch | safe }}</p>

{% if site.pitch %}
<p class="desc">{{ site.pitch | safe }}</p>
{% endif %}

<div class="cta">
{% if site.is_hub %}
Expand All @@ -19,8 +22,3 @@ <h1 class="title">{{ site.tagline }}</h1>
{% endif %}
</div>
</div>
<div class="illustration">
<div role="presentation" class="logo">
{% include assets/symbol.svg %}
</div>
</div>
35 changes: 35 additions & 0 deletions _includes/home-project-one-software.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
<div class="cta">
{% assign ctas = site.home_calls_to_action | slice: 0, 2 %}

{% for link in ctas %}
<a class="button" href="{{ link.url | relative_url }}">
{{ link.title }}
</a>
{% endfor %}
</div>

{% assign software_docs_base_url = site.one_software.url | append: "docs/" %}
{% assign docs_nav = site.software | where_exp: "item", "item.path contains 'docs/navigation'" | first %}

{% if docs_nav and docs_nav.items %}
<section class="docs-nav">
<h3>Jump to documentation</h3>

<ul class="nav-items">
{% for item in docs_nav.items %}
{% include _nav-item.html item=item base_url=software_docs_base_url %}
{% endfor %}
</ul>
</section>
{% endif %}

{% assign num_posts = site.num_posts_combined %}
{% assign num_specs = site.num_all_specs %}

{% if num_posts > 0 %}
{% include featured_posts.html %}
{% endif %}

{% if num_specs > 0 %}
{% include featured_specs.html %}
{% endif %}
7 changes: 6 additions & 1 deletion _layouts/default.html
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,12 @@
{% assign num_projects = site.projects | size %}
<body class="
{{ page.html-class }} {{ layout.html-class }}
{% if num_projects > 0 %}site--hub{% else %}site--project{% endif %}
{% if num_projects > 0 %}
site--hub
{% else %}
site--project
{% if site.one_software %}site--project--one-software{% endif %}
{% endif %}
{% if page.layout %}layout--{{ page.layout }}{% endif %}">
<div class="underlay header">
<header>
Expand Down
7 changes: 6 additions & 1 deletion _layouts/home.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,10 @@
{% if num_projects > 0 %}
{% include home-hub.html %}
{% else %}
{% include home-project.html %}
{% assign num_software = site.all_software | size %}
{% if num_software == 1 %}
{% include home-project-one-software.html %}
{% else %}
{% include home-project.html %}
{% endif %}
{% endif %}
22 changes: 22 additions & 0 deletions _sass/jekyll-theme-open-project.scss
Original file line number Diff line number Diff line change
Expand Up @@ -525,6 +525,28 @@ main {
/* Project */

.site--project {
&.site--project--one-software.layout--home > main {
.docs-nav {

ul.nav-items {
@include reset-list;
font-size: 15px;
}

> ul.nav-items > li {
> .item-title {
font-size: 20px;
font-weight: bold;
margin: 0;
line-height: 1.8;
}
ul {
line-height: 2;
}
}
}
}

&.layout--home > main > .underlay.summary-background {
padding-top: 20px;

Expand Down
23 changes: 6 additions & 17 deletions _sass/open-project-header-footer.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,9 @@ body > .underlay > footer {
.site-logo {
margin: 0;
padding: 0;

line-height: .5;
font-size: 24px;

color: white;
font-weight: 600;

white-space: nowrap;

:link, :hover, :visited {
Expand Down Expand Up @@ -69,7 +65,6 @@ body > .underlay > footer {

> .hero {
padding-top: 20px;
color: white;

> .text {
padding-bottom: 50px;
Expand Down Expand Up @@ -98,6 +93,9 @@ body > .underlay > footer {
&:last-child {
margin-right: 0;
}
&:only-child {
@include cta-button($primary-dark-color, white);
}
}
}
}
Expand Down Expand Up @@ -167,7 +165,7 @@ body > .underlay > footer {
}

body > .underlay.footer {
background: #2E333B;
background: rgba(black, 0.4);
}

body > .underlay > header {
Expand All @@ -180,12 +178,9 @@ body > .underlay > header {
flex-flow: row nowrap;
justify-content: space-between;

color: white;

> button.hamburger {
border: 0;
background: transparent;
color: white;
font-size: inherit;
z-index: 20;
}
Expand All @@ -201,7 +196,6 @@ body > .underlay > header {
height: 100vh;
overflow: hidden;
z-index: 10;
color: white;
background: rgba($primary-dark-color, 0.95);

display: flex;
Expand All @@ -220,7 +214,6 @@ body > .underlay > header {
a {
&:link, &:visited, &:hover {
font-size: 1.3em;
color: white;
}
}
}
Expand Down Expand Up @@ -268,7 +261,6 @@ body > .underlay > header {
font-size: inherit;
line-height: inherit;
border: 0;
background-color: white;
}
}

Expand Down Expand Up @@ -310,9 +302,6 @@ body > .underlay > header {
.active {
background-color: rgba(black, 0.1);
}
a:link, a:hover, a:visited {
color: white;
}
}

@media screen and (min-width: $bigscreen-breakpoint) {
Expand All @@ -334,10 +323,10 @@ body > .underlay > footer {
align-items: center;
flex-flow: column nowrap;

color: #909B9C;
color: white;

a:link, a:visited, a:hover {
color: #909B9C;
color: white;
}

.legal {
Expand Down

0 comments on commit 2941c03

Please sign in to comment.