Skip to content

Commit

Permalink
Merge pull request #39 from DP6/rebrand
Browse files Browse the repository at this point in the history
Rebrand #37
  • Loading branch information
1cadumagalhaes authored Jan 4, 2022
2 parents 09146c4 + cc72253 commit c529b0b
Show file tree
Hide file tree
Showing 19 changed files with 5,591 additions and 252 deletions.
28 changes: 15 additions & 13 deletions _includes/footer.html
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&copy; 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">
&copy;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>
15 changes: 11 additions & 4 deletions _includes/head.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,25 @@
<meta property="og:url" content="{{site.url}}">
<meta property="og:type" content="page">
<meta property="og:title" content="{{ site.title }}">
<meta property="og:image" content="https://raw.githubusercontent.com/DP6/templates-centro-de-inovacoes/main/public/images/centro_de_inovacao_dp6.png">
<meta property="og:image"
content="https://raw.githubusercontent.com/DP6/templates-centro-de-inovacoes/main/public/images/centro_de_inovacao_dp6.png">
<meta property="og:description" content="DP6 Open Source">
<meta property="og:site_name" content="{{ site.initiative }}">
<meta name="keywords"
content="dp6, Google Analytics, Sala de Performace, Marketing, Data Science, digital analytics, raft-suite, penguin-datalayer-collect, easy-collect, MAM, Marketing Attribution Models, Marketing Data Sync, open source" />
<title>{{ site.title }} {% if site.initiative.size > 1 %} - {% endif %} {{ site.initiative }}</title>
<link rel="icon" type="image/png" sizes="32x32" href="/assets/img/icone.png">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.3/css/all.min.css" integrity="sha512-iBBXm8fW90+nuLcSKlbmrPcLa0OT92xO1BIsZ+ywDWZCvqsWgccV3gFoRBv0z+8dLJgyAHIhR35VZc2oM/gI1w==" crossorigin="anonymous" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.3/css/all.min.css"
integrity="sha512-iBBXm8fW90+nuLcSKlbmrPcLa0OT92xO1BIsZ+ywDWZCvqsWgccV3gFoRBv0z+8dLJgyAHIhR35VZc2oM/gI1w=="
crossorigin="anonymous" />
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Ubuntu">
<link
href="https://fonts.googleapis.com/css?family=Material+Icons|Material+Icons+Outlined|Material+Icons+Two+Tone|Material+Icons+Round|Material+Icons+Sharp"
rel="stylesheet">
{% if jekyll.environment == "production" %}
<link rel="stylesheet" href="/src/bundle.css"/>
<link rel="stylesheet" href="/src/bundle.css" />
{% else %}
<link rel="stylesheet" href="/assets/css/style.css"/>
<link rel="stylesheet" href="/assets/css/style.css" />
{% endif %}
<!-- Google Tag Manager -->
<script>
Expand Down
8 changes: 4 additions & 4 deletions _includes/header.html
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
<header class="dp6-header">
<nav class="navbar primary-color shadow fixed row text-bg">
<nav class="navbar shadow fixed row text-dark">
<div class="container row justify-around">
<span class="icon" onclick="responsive()">
<em class="fa fa-bars"></em>
</span>
<a href="https://dp6.github.io">
<img src="/assets/img/logo-cor.png" height=50 width=160 alt="DP6 logo" id="nav-logo">
<img src="/assets/img/logo-dp6.png" height=50 width=110 alt="DP6 logo" id="nav-logo">
</a>
<div></div>
<ul class="nav row" id="topnav">
<li>
<a href="https://dp6.com.br/">Site</a>
</li>
<li>
<a href="https://github.com/DP6">Github</a>
<a href="https://blog.dp6.com.br/">Blog</a>
</li>
<li>
<a href="https://blog.dp6.com.br/">Blog</a>
<a href="https://github.com/DP6">Github</a>
</li>
<li class="dark-switch">
<span>
Expand Down
50 changes: 50 additions & 0 deletions _includes/initiatives.html
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>
75 changes: 75 additions & 0 deletions _includes/posts.html
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>
74 changes: 1 addition & 73 deletions _includes/scripts.html
Original file line number Diff line number Diff line change
@@ -1,78 +1,6 @@
{% if page.path == "index.html" %}
<script async>
function bindHtml(id, html) {
document.getElementById(id).innerHTML = html;
}

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);
montarBanner();
} else { // show the result
console.info('Artigos não carregados')
}
};

function generatePostId(post) {
return post.title.toLowerCase().replaceAll(/[^a-z0-9]/g, '-');
}

function montarBanner() {
let banners = '';
let buttons = '';
let qtdSlide = 5;
response.items.slice(0, qtdSlide).forEach((post, index) => {
let next = index +1;
let idPost = generatePostId(post);
banners += `
<li id="${idPost}"
tabindex="${index}"
class="carousel__slide" style="background-image: url(${post.thumbnail});">
<div class="carousel__snapper">
<a href="${post.link}" rel="noopener" target="_blank" class="carousel__slide__title">
<h3>${post.title}</h3>
</a>
<a href="#${generatePostId(response.items[qtdSlide -1])}"
class="carousel__prev">Go to last slide</a>
<a href="#${next == qtdSlide ? generatePostId(response.items[0]) : generatePostId(response.items[next])}"
class="carousel__next">Go to next slide</a>
</div>
</li>`

if (next < qtdSlide) {
buttons += `
<li class="carousel__navigation-item">
<a href="#${generatePostId(response.items[next])}"
class="carousel__navigation-button">Go to slide ${next}</a>
</li>
`
}
});

bindHtml('dynamic-carousel', `
<ol class="carousel__viewport" id="dynamic-post">
${banners}
</ol>
<aside class="carousel__navigation">
<ol class="carousel__navigation-list" id="dynamic-button">
${buttons}
</ol>
</aside>
`)
}
</script>
{% endif %}

<!-- dp6-copyright -->
<script async>
document.getElementById("dp6-copyright").innerHTML = "&copy;DP6 " + new Date().getFullYear()
document.getElementById("dp6-copyright").innerHTML = "Desenvolvido pelo Centro de inovações da DP6&copy; " + new Date().getFullYear()
</script>

<script src="assets/js/main.js" defer>
Expand Down
21 changes: 21 additions & 0 deletions _layouts/new.html
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>
14 changes: 8 additions & 6 deletions assets/css/card.css
Original file line number Diff line number Diff line change
Expand Up @@ -3,35 +3,37 @@
flex-wrap: wrap;
justify-content: space-around;
padding: 0 2em;
max-width: 1800px;
}

.card {
/* Add shadows to create the "card" effect */
box-shadow: 0 4px 8px 0 rgb(0 0 0 / 20%);
transition: 0.3s;
border-radius: 5px;
min-height: 350px;
width: 350px;
height: 220px;
width: 460px;
text-align: center;
text-overflow: ellipsis;
overflow: hidden;
position: relative;
margin: 0 1em 3em;
margin: 1em;
display: flex;
align-items: center;
justify-content: center;
background-color: var(--card);
z-index: 2;
padding: 10px 50px !important;
padding: 25px !important;
border-color: var(--light);
}

/* On mouse-over, add a deeper shadow */
.card:hover {
box-shadow: 0 8px 16px 0 rgba(0, 0, 0, 0.2);
border: 1px solid var(--light);
}

.card-logo {
width: 180px;
width: 120px;
max-width: 180px;
}

Expand Down
Loading

0 comments on commit c529b0b

Please sign in to comment.