Skip to content

Commit

Permalink
Merge pull request portabilis#315 from rsdevigo/landing_page
Browse files Browse the repository at this point in the history
Versão inicial do site do i-Educar
  • Loading branch information
MarceloCajueiro authored Jul 9, 2018
2 parents c9a865c + 5f5c2dc commit 4370182
Show file tree
Hide file tree
Showing 64 changed files with 1,479 additions and 176 deletions.
9 changes: 0 additions & 9 deletions website/blog/2018-05-18-inicio-documentacao.md

This file was deleted.

15 changes: 15 additions & 0 deletions website/blog/2018-05-18-lorem-ipsum.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
author: Rodrigo Sanches Devigo
authorURL: https://github.com/rsdevigo
title: Lorem Ipsum
---

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis accumsan tempus neque sed posuere. <!--truncate-->Aenean id risus vel purus fermentum bibendum. Maecenas eros sem, pharetra cursus lorem nec, dictum tempor mauris. Aliquam vitae efficitur tortor. Phasellus commodo est et mauris mattis rutrum. In hac habitasse platea dictumst. Donec fermentum sapien nec pretium ornare. Aenean dignissim dolor tristique purus consequat, sit amet vulputate nulla eleifend. Vestibulum ut feugiat felis. Donec vitae mauris sed metus bibendum convallis. Mauris nulla justo, condimentum vitae consequat in, malesuada quis ligula. Nunc molestie lorem non dui imperdiet faucibus. Pellentesque feugiat nulla id ex faucibus pharetra. Vivamus facilisis blandit metus id cursus.

Phasellus sed ipsum vestibulum, faucibus risus id, consectetur odio. Pellentesque ut porttitor neque, sed feugiat augue. Vestibulum ullamcorper pellentesque neque. Morbi tristique lorem eu pulvinar gravida. Proin convallis porttitor quam, sed lacinia metus maximus tincidunt. Phasellus in imperdiet arcu. Mauris accumsan mattis interdum. Vestibulum volutpat pharetra laoreet. Aliquam iaculis ante faucibus ex iaculis cursus. Cras ullamcorper in nulla at blandit.

In vitae volutpat purus, vitae pharetra dui. Mauris purus orci, interdum id leo ac, scelerisque ultrices eros. Integer fermentum venenatis nulla, sed fermentum lectus ornare eu. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Praesent imperdiet enim a neque condimentum, sit amet tempus orci aliquet. Donec placerat facilisis tempus. Maecenas euismod turpis non magna sollicitudin, eu viverra tellus tincidunt. Donec vitae ipsum id nulla lacinia sagittis quis quis eros. Vivamus molestie nunc vel velit molestie, vitae facilisis nibh semper. Praesent lobortis lectus quis quam fringilla pulvinar. Vestibulum interdum consectetur nisl, vel rhoncus leo consectetur a.

Morbi orci massa, pretium eget tellus eget, lacinia hendrerit turpis. Nam euismod, tortor sed luctus semper, sem justo malesuada nunc, vel feugiat orci quam dictum libero. Sed ut ullamcorper odio. Fusce et mi mauris. Integer viverra id turpis sit amet laoreet. Interdum et malesuada fames ac ante ipsum primis in faucibus. Fusce a lorem ante. Fusce fringilla erat et lorem volutpat, vel dignissim dolor aliquet. Orci varius natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus.

Nam pulvinar condimentum ipsum, ac consequat neque condimentum ut. Nunc id tincidunt nisi, at rutrum felis. Donec ultrices non nisl in ullamcorper. Nulla pulvinar viverra eleifend. Nulla facilisi. Vestibulum laoreet lectus in euismod elementum. Curabitur venenatis tristique elit, pellentesque luctus mauris vehicula non. Mauris eget elementum sapien, sed facilisis justo. Maecenas neque ligula, eleifend id cursus pulvinar, consectetur eu elit. Curabitur in lobortis massa, eu vulputate nibh. Donec diam ante, congue non dictum vitae, blandit eget sem. Integer facilisis lobortis ligula et convallis. In vestibulum lectus lorem, id tempus nisi ultrices sed. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos.
15 changes: 15 additions & 0 deletions website/blog/2018-05-19-lorem-ipsum.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
author: Rodrigo Sanches Devigo
authorURL: https://github.com/rsdevigo
title: Lorem Ipsum
---

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis accumsan tempus neque sed posuere. <!--truncate-->Aenean id risus vel purus fermentum bibendum. Maecenas eros sem, pharetra cursus lorem nec, dictum tempor mauris. Aliquam vitae efficitur tortor. Phasellus commodo est et mauris mattis rutrum. In hac habitasse platea dictumst. Donec fermentum sapien nec pretium ornare. Aenean dignissim dolor tristique purus consequat, sit amet vulputate nulla eleifend. Vestibulum ut feugiat felis. Donec vitae mauris sed metus bibendum convallis. Mauris nulla justo, condimentum vitae consequat in, malesuada quis ligula. Nunc molestie lorem non dui imperdiet faucibus. Pellentesque feugiat nulla id ex faucibus pharetra. Vivamus facilisis blandit metus id cursus.

Phasellus sed ipsum vestibulum, faucibus risus id, consectetur odio. Pellentesque ut porttitor neque, sed feugiat augue. Vestibulum ullamcorper pellentesque neque. Morbi tristique lorem eu pulvinar gravida. Proin convallis porttitor quam, sed lacinia metus maximus tincidunt. Phasellus in imperdiet arcu. Mauris accumsan mattis interdum. Vestibulum volutpat pharetra laoreet. Aliquam iaculis ante faucibus ex iaculis cursus. Cras ullamcorper in nulla at blandit.

In vitae volutpat purus, vitae pharetra dui. Mauris purus orci, interdum id leo ac, scelerisque ultrices eros. Integer fermentum venenatis nulla, sed fermentum lectus ornare eu. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Praesent imperdiet enim a neque condimentum, sit amet tempus orci aliquet. Donec placerat facilisis tempus. Maecenas euismod turpis non magna sollicitudin, eu viverra tellus tincidunt. Donec vitae ipsum id nulla lacinia sagittis quis quis eros. Vivamus molestie nunc vel velit molestie, vitae facilisis nibh semper. Praesent lobortis lectus quis quam fringilla pulvinar. Vestibulum interdum consectetur nisl, vel rhoncus leo consectetur a.

Morbi orci massa, pretium eget tellus eget, lacinia hendrerit turpis. Nam euismod, tortor sed luctus semper, sem justo malesuada nunc, vel feugiat orci quam dictum libero. Sed ut ullamcorper odio. Fusce et mi mauris. Integer viverra id turpis sit amet laoreet. Interdum et malesuada fames ac ante ipsum primis in faucibus. Fusce a lorem ante. Fusce fringilla erat et lorem volutpat, vel dignissim dolor aliquet. Orci varius natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus.

Nam pulvinar condimentum ipsum, ac consequat neque condimentum ut. Nunc id tincidunt nisi, at rutrum felis. Donec ultrices non nisl in ullamcorper. Nulla pulvinar viverra eleifend. Nulla facilisi. Vestibulum laoreet lectus in euismod elementum. Curabitur venenatis tristique elit, pellentesque luctus mauris vehicula non. Mauris eget elementum sapien, sed facilisis justo. Maecenas neque ligula, eleifend id cursus pulvinar, consectetur eu elit. Curabitur in lobortis massa, eu vulputate nibh. Donec diam ante, congue non dictum vitae, blandit eget sem. Integer facilisis lobortis ligula et convallis. In vestibulum lectus lorem, id tempus nisi ultrices sed. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos.
15 changes: 15 additions & 0 deletions website/blog/2018-05-20-lorem-ipsum.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
author: Rodrigo Sanches Devigo
authorURL: https://github.com/rsdevigo
title: Lorem Ipsum
---

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis accumsan tempus neque sed posuere. <!--truncate-->Aenean id risus vel purus fermentum bibendum. Maecenas eros sem, pharetra cursus lorem nec, dictum tempor mauris. Aliquam vitae efficitur tortor. Phasellus commodo est et mauris mattis rutrum. In hac habitasse platea dictumst. Donec fermentum sapien nec pretium ornare. Aenean dignissim dolor tristique purus consequat, sit amet vulputate nulla eleifend. Vestibulum ut feugiat felis. Donec vitae mauris sed metus bibendum convallis. Mauris nulla justo, condimentum vitae consequat in, malesuada quis ligula. Nunc molestie lorem non dui imperdiet faucibus. Pellentesque feugiat nulla id ex faucibus pharetra. Vivamus facilisis blandit metus id cursus.

Phasellus sed ipsum vestibulum, faucibus risus id, consectetur odio. Pellentesque ut porttitor neque, sed feugiat augue. Vestibulum ullamcorper pellentesque neque. Morbi tristique lorem eu pulvinar gravida. Proin convallis porttitor quam, sed lacinia metus maximus tincidunt. Phasellus in imperdiet arcu. Mauris accumsan mattis interdum. Vestibulum volutpat pharetra laoreet. Aliquam iaculis ante faucibus ex iaculis cursus. Cras ullamcorper in nulla at blandit.

In vitae volutpat purus, vitae pharetra dui. Mauris purus orci, interdum id leo ac, scelerisque ultrices eros. Integer fermentum venenatis nulla, sed fermentum lectus ornare eu. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Praesent imperdiet enim a neque condimentum, sit amet tempus orci aliquet. Donec placerat facilisis tempus. Maecenas euismod turpis non magna sollicitudin, eu viverra tellus tincidunt. Donec vitae ipsum id nulla lacinia sagittis quis quis eros. Vivamus molestie nunc vel velit molestie, vitae facilisis nibh semper. Praesent lobortis lectus quis quam fringilla pulvinar. Vestibulum interdum consectetur nisl, vel rhoncus leo consectetur a.

Morbi orci massa, pretium eget tellus eget, lacinia hendrerit turpis. Nam euismod, tortor sed luctus semper, sem justo malesuada nunc, vel feugiat orci quam dictum libero. Sed ut ullamcorper odio. Fusce et mi mauris. Integer viverra id turpis sit amet laoreet. Interdum et malesuada fames ac ante ipsum primis in faucibus. Fusce a lorem ante. Fusce fringilla erat et lorem volutpat, vel dignissim dolor aliquet. Orci varius natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus.

Nam pulvinar condimentum ipsum, ac consequat neque condimentum ut. Nunc id tincidunt nisi, at rutrum felis. Donec ultrices non nisl in ullamcorper. Nulla pulvinar viverra eleifend. Nulla facilisi. Vestibulum laoreet lectus in euismod elementum. Curabitur venenatis tristique elit, pellentesque luctus mauris vehicula non. Mauris eget elementum sapien, sed facilisis justo. Maecenas neque ligula, eleifend id cursus pulvinar, consectetur eu elit. Curabitur in lobortis massa, eu vulputate nibh. Donec diam ante, congue non dictum vitae, blandit eget sem. Integer facilisis lobortis ligula et convallis. In vestibulum lectus lorem, id tempus nisi ultrices sed. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos.
107 changes: 107 additions & 0 deletions website/core/BlogGridBlock.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
/**
* Copyright (c) 2017-present, Facebook, Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
const React = require('react');
const classNames = require('classnames');
const CompLibrary = require(process.cwd()+'/node_modules/docusaurus/lib/core/CompLibrary.js');
const MetadataBlog = require(process.cwd()+'/node_modules/docusaurus/lib/core/MetadataBlog.js');
const utils = require(process.cwd()+'/node_modules/docusaurus/lib/core/utils.js');
const siteConfig = require(process.cwd() + '/siteConfig.js');
const MarkdownBlock = CompLibrary.MarkdownBlock;
const GridBlock = CompLibrary.GridBlock;




class BlogGridBlock extends GridBlock {
constructor(){
super();
}

renderBlock(block) {
const blockClasses = classNames('blockElement', this.props.className, {
alignCenter: this.props.align === 'center',
alignRight: this.props.align === 'right',
fourByGridBlock: this.props.layout === 'fourColumn',
imageAlignSide:
block.image &&
(block.imageAlign === 'left' || block.imageAlign === 'right'),
imageAlignTop: block.image && block.imageAlign === 'top',
imageAlignRight: block.image && block.imageAlign === 'right',
imageAlignBottom: block.image && block.imageAlign === 'bottom',
imageAlignLeft: block.image && block.imageAlign === 'left',
threeByGridBlock: this.props.layout === 'threeColumn',
twoByGridBlock: this.props.layout === 'twoColumn',
});

const topLeftImage =
(block.imageAlign === 'top' || block.imageAlign === 'left') &&
this.renderBlockImage(block.image, block.imageLink, block.imageAlt);

const bottomRightImage =
(block.imageAlign === 'bottom' || block.imageAlign === 'right') &&
this.renderBlockImage(block.image, block.imageLink, block.imageAlt);

return (
<div className={blockClasses} key={block.title}>
{topLeftImage}
<div className="blockContent">
{this.renderBlockTitleAndDate(block.title, block.date)}
<MarkdownBlock>{utils.extractBlogPostBeforeTruncate(block.content)}</MarkdownBlock>
</div>
<div className="pluginWrapper buttonWrapper">
<a className="button" href={siteConfig.baseUrl +'blog/' +utils.getPath(block.path, siteConfig.cleanUrl)}>
Leia mais
</a>
</div>
</div>
);
}

render() {
this.loadPosts();
return (
<div className="gridBlock">
{this.props.contents.map(this.renderBlock, this)}
</div>
);
}

renderBlockTitleAndDate(title, date) {
if (title) {
return (
<div>
<h2>
<MarkdownBlock>{title}</MarkdownBlock>
</h2>
<p className="blogdate">
{this.formatDate(date)}
</p>
</div>
);
} else {
return null;
}
}

formatDate (date) {
return date.getDate() + '/' + (date.getMonth()+1) + '/' + date.getFullYear();
}

loadPosts () {
let lastThreePosts = MetadataBlog.slice(0,3);
lastThreePosts.map(function(post) {
this.props.contents.push ({title: post.title, content: post.content, date: new Date(post.seconds*1000), path: post.path});
}, this);
}
}

BlogGridBlock.defaultProps = {
align: 'left',
contents: [],
layout: 'twoColumn',
};
module.exports = BlogGridBlock;
83 changes: 83 additions & 0 deletions website/core/DocsBlock.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
/**
* Copyright (c) 2017-present, Facebook, Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
const React = require('react');
const classNames = require('classnames');
const CompLibrary = require(process.cwd()+'/node_modules/docusaurus/lib/core/CompLibrary.js');
const utils = require(process.cwd()+'/node_modules/docusaurus/lib/core/utils.js');
const siteConfig = require(process.cwd() + '/siteConfig.js');
const MarkdownBlock = CompLibrary.MarkdownBlock;
const GridBlock = CompLibrary.GridBlock;




class DocsBlock extends GridBlock {

renderBlock(block) {
const blockClasses = classNames('blockElement', this.props.className, {
alignCenter: this.props.align === 'center',
alignRight: this.props.align === 'right',
fourByGridBlock: this.props.layout === 'fourColumn',
imageAlignSide:
block.image &&
(block.imageAlign === 'left' || block.imageAlign === 'right'),
imageAlignTop: block.image && block.imageAlign === 'top',
imageAlignRight: block.image && block.imageAlign === 'right',
imageAlignBottom: block.image && block.imageAlign === 'bottom',
imageAlignLeft: block.image && block.imageAlign === 'left',
threeByGridBlock: this.props.layout === 'threeColumn',
twoByGridBlock: this.props.layout === 'twoColumn',
});

const topLeftImage =
(block.imageAlign === 'top' || block.imageAlign === 'left') &&
this.renderBlockImage(block.image, block.imageLink, block.imageAlt);

const bottomRightImage =
(block.imageAlign === 'bottom' || block.imageAlign === 'right') &&
this.renderBlockImage(block.image, block.imageLink, block.imageAlt);

return (
<div className={blockClasses} key={block.title}>
<div className="docsGridTitle">
{topLeftImage} {this.renderBlockTitle(block.title)}
</div>
<div className="blockContent">
<MarkdownBlock>{utils.extractBlogPostBeforeTruncate(block.content)}</MarkdownBlock>
<a className="docsLink" href={block.link}>
Visitar guia completo
</a>
</div>

</div>
);
}

render() {
return (
<div className="gridBlock">
{this.props.contents.map(this.renderBlock, this)}
</div>
);
}

renderBlockTitle(title) {
if (title) {
return (
<div>
<h2>
<MarkdownBlock>{title}</MarkdownBlock>
</h2>
</div>
);
} else {
return null;
}
}
}

module.exports = DocsBlock;
Loading

0 comments on commit 4370182

Please sign in to comment.