Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make the announcements section easy to be configured #327

Merged
merged 2 commits into from
Nov 27, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 4 additions & 0 deletions hugo.config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,3 +46,7 @@ params:
twitter: "sourcedtech"
github: "src-d"
linkedin: "sourced"
# fixed web announcment; if one of its properties is empty, it won't be displayed.
announcement:
title: "Watch a 5 minutes video to understand how the engine works"
url: "https://medium.com/sourcedtech/source-d-engine-in-5-minutes-6b3b19789594"
17 changes: 10 additions & 7 deletions hugo/layouts/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,16 @@ <h3 class="card-title">Machine Learning on Code</h3>
</header>

<section class="news pt-3 pb-3">
<div class="container">
<h4 class="text-dark m-0"><span class="badge badge-warning">New</span><a href="https://blog.sourced.tech/post/announcing-pga/" style=" color: #000;
text-decoration: none;
font-weight: 500;
font-size: 21px;
padding: 0px 0 0 13px;">Announcing Public Git Archive!</a></h4>
</div>
{{ if and (default false .Site.Params.announcement.title) (default false .Site.Params.announcement.url) }}
<div class="container">
<h4 class="text-dark m-0">
<span class="badge badge-warning">New</span>
<a class="badge-text" href="{{ .Site.Params.announcement.url }}">
{{ .Site.Params.announcement.title }}
</a>
</h4>
</div>
{{ end }}
</section>

<section id="why" class="why pt-5 pb-0 pb-m-5">
Expand Down
12 changes: 12 additions & 0 deletions src/sass/partials/_layout.scss
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,18 @@
}
}


// Home - Announcement

section.news .badge-text {
color: #000;
text-decoration: none;
font-weight: 500;
font-size: 21px;
padding: 0 0 0 13px;
}


// Home - Why source{d}

section.why {
Expand Down