-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #39 from DP6/rebrand
Rebrand #37
- Loading branch information
Showing
19 changed files
with
5,591 additions
and
252 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,33 @@ | ||
<footer> | ||
<div class="row"> | ||
<div class="row justify-between"> | ||
<div class="logo"> | ||
<a href="https://dp6.com.br/"> | ||
<img src="/assets/img/logo-branco.png" height=50 width=160 alt="DP6 logo"> | ||
<img src="/assets/img/logo-dp6.png" height=50 width=110 alt="DP6 logo"> | ||
</a> | ||
</div> | ||
<div class="centro-inovacao"> | ||
{/;centro_de_inovação/} | ||
<div> | ||
<div class="copyright" id="dp6-copyright"> | ||
DP6© 2020 | ||
</div> | ||
</div> | ||
<div class="social"> | ||
<a href="https://www.facebook.com/dp6.com.br" aria-label="Facebook DP6"><em class="icon fab fa-facebook"></em></a> | ||
<a href="https://www.linkedin.com/company/dp6/" aria-label="Linkedin DP6"><em class="icon fab fa-linkedin"></em></a> | ||
<a href="https://www.instagram.com/insta_dp6/" aria-label="Instagram DP6"><em class="icon fab fa-instagram"></em></a> | ||
<a href="https://www.twitter.com/_dp6" aria-label="Twitter DP6"><em class="icon fab fa-twitter"></em></a> | ||
<a href="https://www.linkedin.com/company/dp6/" aria-label="Linkedin DP6"><em | ||
class="icon fab fa-linkedin"></em></a> | ||
<a href="https://www.instagram.com/somosdp6/" aria-label="Instagram DP6"><em | ||
class="icon fab fa-instagram"></em></a> | ||
<a href="https://www.twitter.com/somosdp6" aria-label="Twitter DP6"><em class="icon fab fa-twitter"></em></a> | ||
<a href="https://www.github.com/DP6" aria-label="Github DP6"><em class="icon fab fa-github"></em></a> | ||
<a href="https://www.youtube.com/c/DP6br/featured" aria-label="Youtube DP6"><em class="icon fab fa-youtube"></em></a> | ||
<a href="https://open.spotify.com/show/1bzm9magk7HphrTFcQvA0j" aria-label="Spotify DP6"><em class="icon fab fa-spotify"></em></a> | ||
<a href="https://www.youtube.com/c/DP6br/featured" aria-label="Youtube DP6"><em | ||
class="icon fab fa-youtube"></em></a> | ||
<a href="https://open.spotify.com/show/1bzm9magk7HphrTFcQvA0j" aria-label="Spotify DP6"><em | ||
class="icon fab fa-spotify"></em></a> | ||
</div> | ||
</div> | ||
<hr> | ||
<div class="row"> | ||
<div class="copyright" id="dp6-copyright"> | ||
©DP6 2020 | ||
</div> | ||
<div class="politica"> | ||
<a href="https://dp6.com.br/politica-de-privacidade/">Política de Privacidade</a> | ||
</div> | ||
<div></div> | ||
</div> | ||
</footer> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
<div class="column"> | ||
<h1>Conheça nossas <span class="primary-text light">iniciativas</span></h1> | ||
<section class="cards-container"> | ||
|
||
|
||
{% assign repos = site.github.public_repositories | sort: "stargazers_count" | reverse %} | ||
{% for repository in repos %} | ||
|
||
{% if repository.homepage contains "dp6.github.io/"%} | ||
<a href="https://dp6.github.io/{{repository.name}}"> | ||
<div class="card"> | ||
<div class="column"> | ||
<figure> | ||
<img | ||
src="https://raw.githubusercontent.com/DP6/templates-centro-de-inovacoes/main/public/logos-iniciativas/{{repository.name}}.png" | ||
alt="logo {{repository.name}}" class="card-logo" /> | ||
</figure> | ||
<div> | ||
|
||
<img alt="GitHub stars" | ||
src="https://img.shields.io/github/stars/DP6/{{repository.name}}?style=social&cacheSeconds=3000" /> | ||
<img alt="GitHub forks" | ||
src="https://img.shields.io/github/forks/DP6/{{repository.name}}?style=social&cacheSeconds=3000" /> | ||
</div> | ||
|
||
</div> | ||
<div> | ||
<h3 class="card-title"> | ||
{% assign title = repository.name | replace: '-', ' ' | split: ' ' %} | ||
{% capture titlecase %} | ||
{% for word in title %} | ||
{{ word | capitalize }} | ||
{% endfor %}{% endcapture %} | ||
{{ titlecase }} | ||
</h3> | ||
<p class="card-subtitle">{{repository.description }}</p> | ||
</div> | ||
<div class="actions"> | ||
<div class="primary-text"> | ||
Mais detalhes <em class="fa fa-arrow-right"></em> | ||
</div> | ||
</div> | ||
</div> | ||
</a> | ||
{% endif %} | ||
{% endfor %} | ||
|
||
</section> | ||
|
||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
<section class="column"> | ||
<h1>Últimos posts no nosso <span class="primary-text light">Blog</span></h1> | ||
<section class="row posts" id="blog-posts"> | ||
<div class="post"> | ||
<!--<img src="https://cdn-images-1.medium.com/max/1024/1*K7PMRKJj1eE7W6dksfvk2w.png" alt="" width="250px"><!----> | ||
<h3>TOP 5 posts mais lidos do Blog DP6 em 2021</h3> | ||
<p>Abaixo selecionamos os 5 posts mais lidos do ano pra você ler, reler e compartilhar!</p> | ||
<a | ||
href="https://blog.dp6.com.br/top-5-posts-mais-lidos-do-blog-dp6-em-2021-b808823e489b?source=rss-3794c7b4a281------2">Leia | ||
mais</a> | ||
</div> | ||
</section> | ||
</section> | ||
|
||
<script async> | ||
function bindHtml(id, html) { | ||
document.getElementById(id).innerHTML = html; | ||
} | ||
|
||
function getPosts() { | ||
|
||
let xhr = new XMLHttpRequest(); | ||
let response = {}; | ||
|
||
//TODO implementar consumo de banner customizados a partir do github seguindo a mesma estrutura do medium | ||
xhr.open('GET', 'https://api.rss2json.com/v1/api.json?rss_url=https://medium.com/feed/@dp6blog'); | ||
xhr.send(); | ||
|
||
xhr.onload = function () { | ||
if (xhr.status == 200) { | ||
response = JSON.parse(xhr.response); | ||
parsePosts(response); | ||
} else { // show the result | ||
console.info('Artigos não carregados') | ||
} | ||
}; | ||
} | ||
|
||
function parsePosts(response) { | ||
let { items } = response; | ||
items = filterPosts(items); | ||
|
||
items = items.map(function ({ title, thumbnail, link, description, categories }) { | ||
description = description.match(/<p>(.*)<\/p>/)[1]; | ||
description = description.length > 150 ? description.slice(0, 150) + '...' : description; | ||
return { title, thumbnail, link, description, categories }; | ||
}).map(htmlPost); | ||
|
||
console.log(items); | ||
bindHtml('blog-posts', items.join("")); | ||
|
||
} | ||
|
||
function htmlPost({ title, thumbnail, link, description, categories }) { | ||
return `<div class="post"> | ||
<h3>${title}</h3> | ||
<p>${description}</p> | ||
<a | ||
href="${link}">Leia | ||
mais</a> | ||
</div>` | ||
} | ||
|
||
function filterPosts(items, lang = "pt", max = 4) { | ||
let blog = { | ||
pt: "blog.dp6.com.br", | ||
en: "medium.com" | ||
} | ||
items = items.filter(({ link }) => link.includes(blog[lang])).slice(0, max); | ||
return items; | ||
} | ||
|
||
getPosts(); | ||
|
||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
{% include head.html %} | ||
|
||
<body> | ||
<!-- Google Tag Manager (noscript) --> | ||
<noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-KCL3F3Z" height="0" width="0" | ||
style="display:none;visibility:hidden"></iframe></noscript> | ||
<!-- End Google Tag Manager (noscript) --> | ||
{% include header.html %} | ||
<main> | ||
<section class="content"> | ||
{{ content }} | ||
</section> | ||
</main> | ||
|
||
{% include footer.html %} | ||
{% include scripts.html %} | ||
</body> | ||
|
||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.