diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..e5bf836 --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +_site/ +.sass-cache/ +.jekyll-metadata \ No newline at end of file diff --git a/Gemfile b/Gemfile new file mode 100644 index 0000000..1831fdb --- /dev/null +++ b/Gemfile @@ -0,0 +1,11 @@ +source 'https://rubygems.org' + +gem 'jekyll', '3.4.3' + +group :jekyll_plugins do + gem 'jekyll-archives', '2.1.1' + gem 'jekyll-sitemap', '1.0.0' + gem 'jekyll-seo-tag', '2.1.0' + gem 'jekyll-feed', '0.9.1' + gem 'jekyll-extract-element', '0.0.6' +end \ No newline at end of file diff --git a/Gemfile.lock b/Gemfile.lock new file mode 100644 index 0000000..b62aa74 --- /dev/null +++ b/Gemfile.lock @@ -0,0 +1,68 @@ +GEM + remote: https://rubygems.org/ + specs: + addressable (2.5.0) + public_suffix (~> 2.0, >= 2.0.2) + colorator (1.1.0) + ffi (1.9.18) + forwardable-extended (2.6.0) + jekyll (3.4.3) + addressable (~> 2.4) + colorator (~> 1.0) + jekyll-sass-converter (~> 1.0) + jekyll-watch (~> 1.1) + kramdown (~> 1.3) + liquid (~> 3.0) + mercenary (~> 0.3.3) + pathutil (~> 0.9) + rouge (~> 1.7) + safe_yaml (~> 1.0) + jekyll-archives (2.1.1) + jekyll (>= 2.4) + jekyll-extract-element (0.0.6) + jekyll (~> 3.3) + nokogiri (= 1.6.8) + jekyll-feed (0.9.1) + jekyll (~> 3.3) + jekyll-sass-converter (1.5.0) + sass (~> 3.4) + jekyll-seo-tag (2.1.0) + jekyll (~> 3.3) + jekyll-sitemap (1.0.0) + jekyll (~> 3.3) + jekyll-watch (1.5.0) + listen (~> 3.0, < 3.1) + kramdown (1.13.2) + liquid (3.0.6) + listen (3.0.8) + rb-fsevent (~> 0.9, >= 0.9.4) + rb-inotify (~> 0.9, >= 0.9.7) + mercenary (0.3.6) + mini_portile2 (2.1.0) + nokogiri (1.6.8) + mini_portile2 (~> 2.1.0) + pkg-config (~> 1.1.7) + pathutil (0.14.0) + forwardable-extended (~> 2.6) + pkg-config (1.1.7) + public_suffix (2.0.5) + rb-fsevent (0.9.8) + rb-inotify (0.9.8) + ffi (>= 0.5.0) + rouge (1.11.1) + safe_yaml (1.0.4) + sass (3.4.23) + +PLATFORMS + ruby + +DEPENDENCIES + jekyll (= 3.4.3) + jekyll-archives (= 2.1.1) + jekyll-extract-element (= 0.0.6) + jekyll-feed (= 0.9.1) + jekyll-seo-tag (= 2.1.0) + jekyll-sitemap (= 1.0.0) + +BUNDLED WITH + 1.12.5 diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..f81f42e --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2017 CloudCannon + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/README.md b/README.md new file mode 100644 index 0000000..e0bc4e9 --- /dev/null +++ b/README.md @@ -0,0 +1,77 @@ +# Base + +Knowledge base template for Jekyll. Browse through a [live demo](https://orange-ape.cloudvent.net/). + +![Base template screenshot](images/_screenshot.png) + +Base was made by [CloudCannon](http://cloudcannon.com/), the Cloud CMS for Jekyll. +Find more templates and themes at [Jekyll Tips](https://learn.cloudcannon.com/jekyll-templates/). + +Learn Jekyll with step-by-step tutorials and videos at [CloudCannon Academy](https://learn.cloudcannon.com/). + +## Features + +* Tutorials organised by category +* Two types of tutorials - text and video +* Ability to have a "tutorial series" +* FAQ section +* Disqus comments +* Sticky sidebar for main headings in tutorials +* Optimised for editing in [CloudCannon](http://cloudcannon.com/) +* RSS/Atom feed +* SEO tags +* Google Analytics + +## Setup + +1. Add your site and author details in `_config.yml`. +2. Add your Google Analytics, Disqus and MailChimp keys to `_config.yml`. +3. Get a workflow going to see your site's output (with [CloudCannon](https://app.cloudcannon.com/) or Jekyll locally). + +## Develop + +Base was built with [Jekyll](http://jekyllrb.com/) version 3.4.3, but should support newer versions as well. + +Install the dependencies with [Bundler](http://bundler.io/): + +~~~bash +$ bundle install +~~~ + +Run `jekyll` commands through Bundler to ensure you're using the right versions: + +~~~bash +$ bundle exec jekyll serve +~~~ + +## Editing + +Base is already optimised for adding, updating and removing tutorials, navigation, footer and FAQ information in CloudCannon. + +The sticky sidebar in tutorials in populated by pulling out `

` elements from the content. + +### Posts + +* Add, update or remove a post in the *Posts* collection. +* The tutorials page is organised by categories. +* Change the defaults when new posts are created in `_posts/_defaults.md`. + +### Post Series +To create a new series: + +* Add a new document to the `sets` collection. +* Set the `title` and `description`. + +To add a tutorial/post to a series: +* Add a `set` field to the tutorial front matter which points to the file name of the desired set without the `.md` extention. e.g. If I have a set at `_sets/getting-started.md` I would use this in my tutorial front matter: `set: getting-started`. +* Add a `set_order` field to the tutorial front matter and specify a number. This is the tutorials order in the set. + +### Navigation + +* Exposed as a data file to give clients better access. +* Set in the *Data* / *Navigation* section. + +### Footer + +* Exposed as a data file to give clients better access. +* Set in the *Data* / *Footer* section. \ No newline at end of file diff --git a/_config.yml b/_config.yml new file mode 100644 index 0000000..0d52054 --- /dev/null +++ b/_config.yml @@ -0,0 +1,88 @@ +# ---- +# Site + +title: ZUP +url: "https://orange-ape.cloudvent.net/" +baseurl: +google_analytics_key: +disqus_shortname: +newsletter_action: + +# Values for the jekyll-seo-tag gem (https://github.com/jekyll/jekyll-seo-tag) +logo: /logo-light.png +description: Knowledge base template for Jekyll. +author: + name: + email: + twitter: # twitter username without the @ symbol +social: + name: ZUP + links: + - https://github.com/CloudCannon/base-jekyll-template + +# ----- +# Build + +permalink: /:categories/:title/ + +gems: + - jekyll-sitemap + - jekyll-seo-tag + - jekyll-feed + - jekyll-archives + +exclude: + - Gemfile + - Gemfile.lock + - README.md + - LICENCE + +collections: + sets: + + +jekyll-archives: + enabled: ['categories'] + +defaults: + - + scope: + path: "" + values: + layout: "default" + - + scope: + type: "posts" + values: + layout: "post" + comments: true + - + scope: + type: "sets" + values: + _hide_content: true + - + scope: + path: "index.html" + values: + body_class: "show_hero_search" +# ----------- +# CloudCannon + +social_icons: + - Facebook + - Google Plus + - Instagram + - LinkedIn + - Pinterest + - Tumblr + - Twitter + - YouTube + - Email + - RSS + +types: + - Document + - Video + +_comments: diff --git a/_data/footer.yml b/_data/footer.yml new file mode 100644 index 0000000..315fe39 --- /dev/null +++ b/_data/footer.yml @@ -0,0 +1,16 @@ +- name: + link: https://facebook.com/ + new_window: true + social_icon: Facebook +- name: + link: https://twitter.com/ + social_icon: Twitter + new_window: true +- name: + link: https://youtube.com/ + social_icon: YouTube + new_window: true +- name: + link: /feed.xml + social_icon: RSS + new_window: false \ No newline at end of file diff --git a/_data/navigation.yml b/_data/navigation.yml new file mode 100644 index 0000000..3ce411e --- /dev/null +++ b/_data/navigation.yml @@ -0,0 +1,6 @@ +- name: Base de conhecimento + link: / +- name: Videos + link: /videos/ +- name: Enviar Solicitação + link: /contact/ diff --git a/_includes/document-icon.html b/_includes/document-icon.html new file mode 100644 index 0000000..bb94d2c --- /dev/null +++ b/_includes/document-icon.html @@ -0,0 +1,12 @@ +{% case include.icon %} + {% when "Video" %} + + + + + {% when "Document" %} + + + + +{% endcase %} \ No newline at end of file diff --git a/_includes/footer.html b/_includes/footer.html new file mode 100644 index 0000000..0e8a2f3 --- /dev/null +++ b/_includes/footer.html @@ -0,0 +1,15 @@ + \ No newline at end of file diff --git a/_includes/listings.html b/_includes/listings.html new file mode 100644 index 0000000..e90970d --- /dev/null +++ b/_includes/listings.html @@ -0,0 +1,15 @@ + \ No newline at end of file diff --git a/_includes/logo.html b/_includes/logo.html new file mode 100644 index 0000000..8d82f18 --- /dev/null +++ b/_includes/logo.html @@ -0,0 +1,7 @@ + + + + Layer 1 + + + \ No newline at end of file diff --git a/_includes/navigation.html b/_includes/navigation.html new file mode 100644 index 0000000..f0f9ddf --- /dev/null +++ b/_includes/navigation.html @@ -0,0 +1,12 @@ + + diff --git a/_includes/relative-src.html b/_includes/relative-src.html new file mode 100644 index 0000000..4535448 --- /dev/null +++ b/_includes/relative-src.html @@ -0,0 +1 @@ +{% assign prefix = include.src | slice: 0, 2 %}{% assign protocol = include.src | slice: 0, 4 %}{% unless protocol == 'http' or prefix == "//" %}{{ site.baseurl }}{% endunless %}{{ include.src }} \ No newline at end of file diff --git a/_includes/search-icon.html b/_includes/search-icon.html new file mode 100644 index 0000000..ccc84b6 --- /dev/null +++ b/_includes/search-icon.html @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/_includes/search.html b/_includes/search.html new file mode 100644 index 0000000..3548fd9 --- /dev/null +++ b/_includes/search.html @@ -0,0 +1,5 @@ +
+ + {% include search-icon.html %} + +
\ No newline at end of file diff --git a/_includes/social-icon.html b/_includes/social-icon.html new file mode 100644 index 0000000..da0e376 --- /dev/null +++ b/_includes/social-icon.html @@ -0,0 +1,43 @@ +{% case include.icon %} + {% when "Facebook" %} + + {% when "Facebook2" %} + + {% when "Google Plus" %} + + {% when "Instagram" %} + + {% when "LinkedIn" %} + + {% when "Pinterest" %} + + {% when "Tumblr" %} + + {% when "Twitter" %} + + {% when "YouTube" %} + + {% when "Hacker News" %} + + {% when "Designer News" %} + + {% when "RSS" %} + + {% when "Email" %} + + {% when "Subscribe" %} + + + + + {% when "Share" %} + + + + + {% when "Close" %} + + + + +{% endcase %} diff --git a/_includes/youtube.html b/_includes/youtube.html new file mode 100644 index 0000000..ee9bf86 --- /dev/null +++ b/_includes/youtube.html @@ -0,0 +1,3 @@ +
+ +
\ No newline at end of file diff --git a/_layouts/archive.html b/_layouts/archive.html new file mode 100644 index 0000000..b283826 --- /dev/null +++ b/_layouts/archive.html @@ -0,0 +1,7 @@ +--- +layout: default +--- +{% assign posts = page.posts | sort: "title" %} +

{{ page.title | replace: "-", " " }} ({{ posts | size }})

+ +{% include listings.html listings=posts %} \ No newline at end of file diff --git a/_layouts/default.html b/_layouts/default.html new file mode 100644 index 0000000..e1d9f80 --- /dev/null +++ b/_layouts/default.html @@ -0,0 +1,75 @@ + + + + + + + + + + + + + + + + {% seo %} + {% feed_meta %} + + {% if jekyll.environment == 'production' and site.google_analytics_key != '' %} + + {% endif %} + + + +
+
+
+ + {% include navigation.html %} +
+ +
+ +
+
+
+ {{ content }} +
+
+ + {% include footer.html %} + + + diff --git a/_layouts/post.html b/_layouts/post.html new file mode 100644 index 0000000..5fbcece --- /dev/null +++ b/_layouts/post.html @@ -0,0 +1,145 @@ +--- +layout: default +--- + +
+ +
+

{{ page.title }}

+ + {% if page.type == "Video" %} + {% include youtube.html video_id=page.video_id %} + + {% if page.resources %} +
+ +
+ {% endif %} + {% endif %} + +
+ {{ content }} +
+ +
+
+ +{% if page.set %} + {% assign set_file_name = "_sets/" | append: page.set | append: ".md" %} + {% assign set = site.sets | where: "title", "Getting Started" | first %} + {% assign series_posts = site.posts | where: "set", page.set %} +
+

{{ set.title }} - Series

+

{{ set.description }}

+ + {% include listings.html listings=series_posts numbered=true%} +
+{% endif %} +{% assign related_posts = site.related_posts %} +{% assign related_posts_size = related_posts | size %} +{% if related_posts_size > 0 %} + +{% endif %} + +{% if site.disqus_shortname and page.comments %} +
+ + +{% endif %} + +
+
+ × +
+

Subscribe

+

The latest tutorials sent straight to your inbox.

+ + +
+
+
+ +
+
+ × +

Share

+

Share this tutorial with your community.

+ +
+
+ + + + diff --git a/_posts/2017-04-02-welcome-to-zup.md b/_posts/2017-04-02-welcome-to-zup.md new file mode 100644 index 0000000..bf3ef61 --- /dev/null +++ b/_posts/2017-04-02-welcome-to-zup.md @@ -0,0 +1,12 @@ +--- +date: 2017-05-02 +title: Bem Vindo a central de ajuda do ZUP +categories: + - Início +description: "Bem Vindo a central de ajuda do ZUP" +type: Document +--- + +Esta será a sua Central de Ajuda para o sistema ZUP. Aqui você pode consultar artigos, manuais e FAQ sobre todas as funcionalidades presente na ferramenta. + +Caso você tenha alguma dúvida ou problema que a Central de Ajuda não forneceu informações suficientes, você pode Abrir um Chamado. \ No newline at end of file diff --git a/_posts/2017-05-02-what-is-zup.md b/_posts/2017-05-02-what-is-zup.md new file mode 100644 index 0000000..936675f --- /dev/null +++ b/_posts/2017-05-02-what-is-zup.md @@ -0,0 +1,20 @@ +--- +date: 2017-05-02 +title: O que é o ZUP +categories: + - Início +description: "O que é o ZUP" +type: Document +--- + +ZUP (Zeladoria Urbana Participativa) é um sistema inovador desenhado para prefeituras e empresas que desejam fazer a gestão da informação de maneira eficiente sem a necessidade de diversas soluções. + +Sabemos que o manejo de informação é uma das chaves para uma gestão eficiente, para isso o ZUP apresenta um completo histórico de vida de cada um dos ativos e dos problemas do município, incorporando solicitacões de cidadãos, dados georeferenciados, laudos técnicos, fotografias e ações preventivas realizadas ao longo do tempo. Desta forma, o sistema centraliza todas as informações permitindo uma rápida tomada de decisões tanto das autoridades como dos técnicos em campo. + +O ZUP é composto pelos seguintes componentes: + +- Aplicativo Android e iOS para munícipes +- Aplicativo web para munícipes +- Aplicativo Android para gestão de inventário +- Painel administrativo web +- API \ No newline at end of file diff --git a/_posts/_defaults.md b/_posts/_defaults.md new file mode 100644 index 0000000..937c20a --- /dev/null +++ b/_posts/_defaults.md @@ -0,0 +1,7 @@ +--- +date: +title: +categories: +description: +type: Document +--- diff --git a/_sass/cloudcannon.scss b/_sass/cloudcannon.scss new file mode 100644 index 0000000..fab4f2d --- /dev/null +++ b/_sass/cloudcannon.scss @@ -0,0 +1,32 @@ +.editor-link { + display: none; + margin-top: 0; + border: 0; + border-radius: 2px; + box-sizing: border-box; + text-decoration: none; + margin: 0; + cursor: pointer; + background-color: #f7e064; + color: #333; + box-shadow: 1px 1px 5px 0 rgba(0, 0, 0, 0.2); + + &:hover { + background-color: #f4d525; + color: #333; + } +} + +.cms-editor-active .editor-link { + display: block; +} + +.cms-editor-active nav .editor-link { + display: inline; +} + +.cms-editor-active .sidebar .editor-link { + display: inline-block; + margin: 0 auto 20px auto; + padding: 10px 20px; +} diff --git a/_sass/contact.scss b/_sass/contact.scss new file mode 100644 index 0000000..ab82b53 --- /dev/null +++ b/_sass/contact.scss @@ -0,0 +1,55 @@ +.faq { + + textarea { + display: block; + width: 100%; + font-size: 1.3em; + padding: 10px; + box-sizing: border-box; + border-radius: 3px; + border: 1px solid #ccc; + } + select { + display: block; + width: 100%; + font-size: 1.3em; + padding: 10px; + box-sizing: border-box; + border-radius: 3px; + border: 1px solid #ccc; + background: #fff url("http://www.scottgood.com/jsg/blog.nsf/images/arrowdown.gif") no-repeat 80% 50%; + } + + input[type="file"] { + display: none; + } + + .custom-file-upload { + border: 1px solid #ccc; + display: inline-block; + padding: 6px 12px; + cursor: pointer; + } + + ul { + padding: 0; + margin: 0 0 50px 0; + list-style: none; + } + + li { + font-size: 1em; + + a { + color: $medium-grey; + text-decoration: none; + display: block; + border-bottom: 1px solid #eee; + padding: 5px 0; + + &:hover { + color: $dark-grey; + } + } + } +} \ No newline at end of file diff --git a/_sass/dark-theme.scss b/_sass/dark-theme.scss new file mode 100644 index 0000000..daea3c2 --- /dev/null +++ b/_sass/dark-theme.scss @@ -0,0 +1,37 @@ +/* + Darkly Pygments Theme + (c) 2014 Sourcey + http://sourcey.com +*/ + +.highlight { + white-space: pre; + overflow: auto; + word-wrap: normal; /* horizontal scrolling */ + -moz-border-radius: 3px; + -webkit-border-radius: 3px; + border-radius: 3px; + padding: 10px 15px; + background: #404145; + color: #C1C2C3; +} +.highlight .hll { background-color: #ffc; } +.highlight .gd { color: #2e3436; background-color: #0e1416; } +.highlight .gr { color: #eeeeec; background-color: #c00; } +.highlight .gi { color: #babdb6; background-color: #1f2b2d; } +.highlight .go { color: #2c3032; background-color: #2c3032; } +.highlight .kt { color: #e3e7df; } +.highlight .ni { color: #888a85; } +.highlight .c,.highlight .cm,.highlight .c1,.highlight .cs { color: #8D9684; } +.highlight .err,.highlight .g,.highlight .l,.highlight .n,.highlight .x,.highlight .p,.highlight .ge, +.highlight .gp,.highlight .gs,.highlight .gt,.highlight .ld,.highlight .s,.highlight .nc,.highlight .nd, +.highlight .ne,.highlight .nl,.highlight .nn,.highlight .nx,.highlight .py,.highlight .ow,.highlight .w,.highlight .sb, +.highlight .sc,.highlight .sd,.highlight .s2,.highlight .se,.highlight .sh,.highlight .si,.highlight .sx,.highlight .sr, +.highlight .s1,.highlight .ss,.highlight .bp { color: #C1C2C3; } +.highlight .k,.highlight .kc,.highlight .kd,.highlight .kn,.highlight .kp,.highlight .kr, +.highlight .nt { color: #729fcf; } +.highlight .cp,.highlight .gh,.highlight .gu,.highlight .na,.highlight .nf { color: #E9A94B ; } +.highlight .m,.highlight .nb,.highlight .no,.highlight .mf,.highlight .mh,.highlight .mi,.highlight .mo, +.highlight .il { color: #8ae234; } +.highlight .o { color: #989DAA; } +.highlight .nv,.highlight .vc,.highlight .vg,.highlight .vi { color: #fff; } \ No newline at end of file diff --git a/_sass/elements.scss b/_sass/elements.scss new file mode 100644 index 0000000..f8e5348 --- /dev/null +++ b/_sass/elements.scss @@ -0,0 +1,48 @@ +html, body { + padding: 0; + margin: 0; + background: #343642; +} + +body { + min-height: 100vh; + color: $dark-grey; + -webkit-font-smoothing: antialiased; +} + +h2, h2 a { + color: $dark-grey; + + &:hover { + text-decoration: none; + } +} + +h4 { + margin: 0 0 20px 0; +} + +img { + max-width: 100%; +} + +ul, ol { + margin-top: 20px; + margin-bottom: 20px; + li { + margin: 0 0 10px 0; + } +} + +code, pre, tt { + font-family: Inconsolata,Consolas,Courier,"Courier New","Liberation Mono",monospace; + font-size: .9em; + white-space: pre-wrap; + border-radius: 2px; + line-height: 1.4; + font-weight: 400; + background-color: #404145; + color: #FAFAFA; + border-radius: 2px; + padding: 2px 5px; +} \ No newline at end of file diff --git a/_sass/footer.scss b/_sass/footer.scss new file mode 100644 index 0000000..42952d3 --- /dev/null +++ b/_sass/footer.scss @@ -0,0 +1,45 @@ +footer { + background: #343642; + color: #fff; + padding: 20px 0; + + .edit-footer { + text-align: center; + margin: 0; + } + + .copyright { + color: $medium-grey; + margin: 0; + text-align: center; + font-size: .9em; + } + + a { + color: #fff; + text-decoration: none; + + &:hover svg { + fill: #fff; + } + } + + ul { + padding: 0; + list-style: none; + margin: 0; + text-align: center; + } + + li { + display: inline-block; + margin: 0 6px 15px 0; + } + + svg { + fill: $medium-grey; + position: relative; + top: 5px; + transition: fill 200ms ease-in; + } +} diff --git a/_sass/form.scss b/_sass/form.scss new file mode 100644 index 0000000..64bb088 --- /dev/null +++ b/_sass/form.scss @@ -0,0 +1,54 @@ +input[type="text"], input[type="email"] { + display: block; + width: 100%; + font-size: 1.3em; + padding: 10px; + box-sizing: border-box; + border-radius: 3px; + border: 1px solid #ccc; +} + +input[type="submit"] { + background: #2f8cff; + color: #fff; + border: 0; + padding: 9px 10px; + font-size: 1em; + margin-top: 9px; + border-radius: 3px; + width: 100%; + cursor: pointer; +} + +input { + outline: none; +} + +input[type=search] { + -webkit-appearance: textfield; + -webkit-box-sizing: content-box; + font-size: 100%; +} + +input::-webkit-search-decoration, +input::-webkit-search-cancel-button { + display: none; +} + + +input[type=search] { + border: solid 1px #ccc; + padding: 7px 14px 7px 32px; + + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; +} + + +input:-moz-placeholder { + color: #ccc; +} +input::-webkit-input-placeholder { + color: #ccc; +} \ No newline at end of file diff --git a/_sass/header.scss b/_sass/header.scss new file mode 100644 index 0000000..74346dc --- /dev/null +++ b/_sass/header.scss @@ -0,0 +1,162 @@ +@media #{$mid-point} { + .show_hero_search header nav form { + display: none; + } + + .show_hero_search .hero_search { + display: block; + } +} + +header { + padding: 16px 0 10px 0; + background: $header-color; + color: #fff; + + form { + position: relative; + + input[type=search] { + box-sizing: border-box; + width: 100%; + } + } + + .top-bar { + @media #{$mid-point} { + display: flex; + } + + .logo { + a { + display: block; + line-height: 0; + } + + svg { + fill: #fff; + width: 100%; + height: 46px; + min-width: 100px; + } + } + + form svg { + fill: #eee; + } + } + + nav { + @media #{$mid-point} { + flex: 1; + margin: 0 0 0 10px; + display: block; + + form { + position: absolute; + right: 25px; + top: 4px; + text-align: right; + } + + input[type="search"] { + max-width: 300px; + } + } + display: none; + + input[type="search"] { + width: 100%; + padding: 5px 10px; + } + + svg { + position: absolute; + top: 6px; + right: 7px; + width: 25px; + cursor: pointer; + } + + a { + color: #fff; + text-decoration: none; + display: block; + padding: 20px 0; + + @media #{$mid-point} { + display: inline-block; + padding: 7px 0; + margin: 0 15px; + border-bottom: 2px solid rgba(255, 255, 255, 0) + } + + &.active, &.active:hover { + border-bottom-color: rgba(255, 255, 255, .3); + } + + &:hover { + text-decoration: none; + color: #fff; + @media #{$mid-point} { + border-bottom-color: rgba(255, 255, 255, .1); + } + } + } + } +} + +.nav-open header nav { + display: block; +} + +.nav-toggle { + position: absolute; + right: 25px; + font-size: 1.6em; + line-height: 1em; + text-decoration: none; + color: #fff; + top: 4px; + + @media #{$mid-point} { + display: none; + } +} + +.hero_search { + display: none; + text-align: center; + flex: 0 0 100%; + padding: 60px 0 30px 0; + + form { + position: relative; + max-width: 800px; + margin: 0 auto; + padding: 20px 0; + + svg { + fill: #eee; + position: absolute; + top: 31px; + right: 12px; + display: inline-block; + width: 36px; + height: 40px; + cursor: pointer; + } + } + + h1 { + // font-size: 2.4em; + color: #fff; + } + + input[type=search] { + margin: 0; + color: #555; + padding: 15px; + font-size: 1.1em; + } +} diff --git a/_sass/layout.scss b/_sass/layout.scss new file mode 100644 index 0000000..e0e0153 --- /dev/null +++ b/_sass/layout.scss @@ -0,0 +1,51 @@ +.wrapper { + max-width: 900px; + margin: 0 auto; + padding: 0 30px; + position: relative; +} + +.logo { + img { + height: 30px; + } +} + +.content { + background: #fff; + padding: 60px 0; +} + +dt, h2 { + a.header-link { + text-decoration: none; + color: #ccc; + opacity: 0; + transition: opacity ease .2s,color ease .2s; + vertical-align: bottom; + margin: 0 0 0 5px; + + &:hover { + color: $link-color; + } + } + + &:hover a { + opacity: 1; + } +} + +.video_wrapper { + position: relative; + padding-bottom: 59.5%; + padding-top: 25px; + height: 0; + + iframe { + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; + } +} \ No newline at end of file diff --git a/_sass/modal.scss b/_sass/modal.scss new file mode 100644 index 0000000..b7c83b8 --- /dev/null +++ b/_sass/modal.scss @@ -0,0 +1,64 @@ +.modalDialog { + position: fixed; + top: 0; + right: 0; + bottom: 0; + left: 0; + background: rgba(0,0,0,0.6); + z-index: 99999; + opacity:0; + -webkit-transition: opacity 200ms ease-in; + -moz-transition: opacity 200ms ease-in; + transition: opacity 200ms ease-in; + pointer-events: none; + + &.show { + opacity:1; + pointer-events: auto; + } + + & > div { + max-width: 600px; + position: relative; + margin: 10% auto; + padding: 130px 40px 40px; + border-radius: 3px; + background: #fff; + box-sizing: border-box; + } + + h2 { + font-weight: bold; + position: absolute; + top: 0; + left: 0; + padding: 0 40px; + line-height: 100px; + width: 100%; + box-sizing: border-box; + background: #eee; + border-radius: 2px 2px 0 0; + } + + p { + font-size: .9em; + line-height: 1.3em; + margin: 0 0 20px 0; + } + + input[type="email"] { + font-size: 1em; + } + + .close { + position: absolute; + top: 33px; + right: 35px; + font-size: 1.5em; + width: 25px; + height: 25px; + cursor: pointer; + z-index: 99; + font-size: 30px; + } +} \ No newline at end of file diff --git a/_sass/search.scss b/_sass/search.scss new file mode 100644 index 0000000..fd66b35 --- /dev/null +++ b/_sass/search.scss @@ -0,0 +1,24 @@ +#search-results { + margin: 0; + padding: 0; + + li { + list-style: none; + margin: 0; + padding: 0; + + h4 { + margin: 20px 0 10px 0; + } + + p { + line-height: 1.5; + padding: 0; + margin: 0; + } + } +} + +#search-query { + font-weight: bold; +} \ No newline at end of file diff --git a/_sass/tutorials.scss b/_sass/tutorials.scss new file mode 100644 index 0000000..ad32d3f --- /dev/null +++ b/_sass/tutorials.scss @@ -0,0 +1,378 @@ +.count { + color: $light-grey; + font-size: .7em; + position: relative; + top: -2px; +} + +.categories { + display: flex; + flex-wrap:wrap; + flex-direction:row; + justify-content:flex-start; + align-items:stretch; + font-size: .9em; + + h3 { + font-size: 2.75rem; + margin-bottom: 20px; + } +} + +.category { + flex: 0 0 100%; + + h3 { + text-transform:capitalize; + } + + @media #{$mid-point} { + flex: 0 0 50%; + } + + @media #{$desktop} { + flex: 0 0 33%; + } + margin: 0 0 30px 0; + + ul { + padding: 0; + margin: 0; + list-style: none; + } + + li { + margin-right: 15px; + a { + padding: 2px 0; + display: flex; + font-size: 1.1em; + align-items: center; + + svg { + margin: 0 5px 0 0; + fill: $link-color; + width: 25px; + height: 25px; + -webkit-transition: all .2s ease; + } + + &:hover { + text-decoration: none; + svg { + fill: $link-hover-color; + width: 30px; + height: 30px; + } + } + } + } +} + +.tutorial { + display: flex; + + h2 { + margin-top: 40px; + } + + .sidebar { + display: none; + padding: 0 20px 0 0; + position: absolute; + top: 85px; + width: 200px; + + @media #{$mid-point} { + display: block; + } + + h3 { + margin-top: 0; + } + + ul { + padding: 0; + margin: 0; + list-style: none; + + li { + margin: 0 0 15px 0; + } + } + + a { + color: $medium-grey; + text-decoration: none; + display: block; + -webkit-transition: transform .2s ease; + line-height: 1.3em; + + &.active { + color: $link-color; + transform: translateX(10px); + } + } + } + + .tutorial-content { + width: 100%; + + @media #{$mid-point} { + margin-left: 230px; + } + } +} + +.listing { + list-style: none; + padding: 0; + margin: 0; + display: flex; + flex-flow: wrap; + + li { + margin: 10px 0; + padding: 0; + width: 100%; + @media #{$mid-point} { + flex: 0 0 50%; + } + } + + h3 { + margin: 0; + font-size: 1.3em; + } + + a { + display: flex; + text-decoration: none; + padding: 5px; + border-radius: 5px; + height: 100%; + + article { + display: flex; + align-items: center; + flex-wrap: wrap; + } + + .icon { + flex: 0 0 50px; + display: flex; + align-items: center; + padding: 0 5px 0 0; + svg { + width: 35px; + height: 35px; + fill: $link-color; + -webkit-transition: all .2s ease; + margin: 0 auto; + } + } + + .length { + color: $light-grey; + font-size: .8em; + } + + &:hover { + svg { + fill: $link-hover-color; + width: 40px; + height: 40px; + } + } + + p { + margin: 5px 0 0 0; + color: #888; + font-size: .9em; + line-height: 1.4em; + width: 100%; + } + } +} + +.tutorial-share { + + a { + color: $medium-grey; + text-decoration: none; + margin-right: 10px; + + &:hover { + color: $dark-grey; + + svg { + fill: $dark-grey; + } + } + } + + svg { + fill: $medium-grey; + position: relative; + top: 5px; + width: 20px; + } +} + +.sharing { + ul { + list-style: none; + padding: 0; + margin: 0; + + li { + margin: 10px 0 0 0; + } + + svg { + background-color: black; + fill: #fff; + padding: 6px; + border-radius: 3px; + margin: 0 10px 0 0; + transition: border-radius 200ms ease-in; + + &.email { + background-color: #ff9d09; + } + + &.facebook { + background-color: #3b5998; + } + + &.twitter { + background-color: #55acee; + } + + &.google-plus { + background-color: #db4437; + } + + &.youtube { + background-color: #cd201f; + } + + &.instagram { + background-color: #f167f5; + } + + &.linkedin { + background-color: #0077b5; + } + + &.pinterest { + background-color: #bd081c; + } + + &.hacker-news { + background-color: #ff6600; + } + + &.designer-news { + background-color: #2d72d9; + } + } + } + + a { + text-decoration: none; + padding: 3px 0; + display: flex; + align-items: center; + font-size: 1.1em; + color: #666; + + &:hover { + color: #111; + } + } +} + +.related, .tutorial-series { + margin: 50px 0; + padding: 20px 0; + + ul { + padding: 0; + margin: 0; + list-style: none; + } +} + +.tutorial-series { + ul { + padding: 0 0 0 20px; + } + + li:last-child a:after { + background: none; + height: 0; + width: 0; + } + + li { + flex: 0 0 100%; + margin: 0; + + a { + position: relative; + margin: 0 0 20px 0; + &:before { + content: "\25BA"; + position: absolute; + display: block; + top: 50%; + -webkit-transform: translateY(-50%); + -moz-transform: translateY(-50%); + -ms-transform: translateY(-50%); + transform: translateY(-50%); + left: -23px; + color: #e0e0e0; + z-index: 1; + } + + &:after { + content: ""; + display: block; + left: -22px; + background: #e0e0e0; + position: absolute; + bottom: -43px; + width: 2px; + top: 39px; + } + } + + &.active a:before { + color: $medium-grey; + } + } + + h4 { + margin: 0; + } +} + +.resources { + background: #fafafa; + padding: 15px; + border: 1px solid #eee; + border-top: 0; + margin: 0 0 30px 0; + h3 { + margin-top: 0; + } + + ul { + margin: 0; + } + + li { + margin: 0; + } +} \ No newline at end of file diff --git a/_sass/typography.scss b/_sass/typography.scss new file mode 100644 index 0000000..e65e4f1 --- /dev/null +++ b/_sass/typography.scss @@ -0,0 +1,251 @@ + +html { + height: 100%; + max-height: 100%; + font-size: 10px; + -webkit-tap-highlight-color: transparent +} + +body { + height: 100%; + max-height: 100%; + font-family: "Merriweather", serif; + letter-spacing: 0.01rem; + font-size: 1.8em; + line-height: 1.75em; + color: #3A4145; + -webkit-font-feature-settings: 'kern' 1; + -moz-font-feature-settings: 'kern' 1; + -o-font-feature-settings: 'kern' 1; + text-rendering: geometricPrecision +} + +h1, h2, h3, h4, h5, h6, +input, label, select, textarea, table, header, footer, .categories, .listing, .sidebar, .tutorial-share, .modalDialog, .faq ul, .tutorial-series ul { + -webkit-font-feature-settings: 'dlig' 1, 'liga' 1, 'lnum' 1, 'kern' 1; + -moz-font-feature-settings: 'dlig' 1, 'liga' 1, 'lnum' 1, 'kern' 1; + -o-font-feature-settings: 'dlig' 1, 'liga' 1, 'lnum' 1, 'kern' 1; + font-family: "Open Sans", sans-serif; + text-rendering: geometricPrecision; +} + +.categories a { + text-decoration: none; +} + +h1, +h2, +h3, +h4, +h5, +h6 { + color: #2E2E2E; + line-height: 1.15em; + margin: 0 0 0.4em 0; + font-weight: 500; +} + +h1 { + font-size: 5rem; + letter-spacing: -2px; + text-indent: -3px +} + +.tutorial-content h1 { + font-size: 4.5rem; + margin: 0 0 .7em 0; +} + +h2 { + font-size: 3.6rem; + letter-spacing: -1px +} + +h3 { + font-size: 3rem +} + +h4 { + font-size: 2.5rem +} + +h5 { + font-size: 2rem +} + +h6 { + font-size: 2rem +} + +a { + color: $link-color; + transition: color 0.3s ease; +} + +a:hover { + color: $link-hover-color; +} + +p, +ul, +ol, +dl { + -webkit-font-feature-settings: 'liga' 1, 'onum' 1, 'kern' 1; + -moz-font-feature-settings: 'liga' 1, 'onum' 1, 'kern' 1; + -o-font-feature-settings: 'liga' 1, 'onum' 1, 'kern' 1; + margin: 0 0 1.75em 0; + text-rendering: geometricPrecision +} + +ol, +ul { + padding-left: 3rem +} + +ol ol, +ul ul, +ul ol, +ol ul { + margin: 0 0 0.4em 0; + padding-left: 2em +} + +li { + margin: 0.4em 0 +} + +li li { + margin: 0 +} + +hr { + display: block; + height: 1px; + border: 0; + border-top: #EFEFEF 1px solid; + margin: 3.2em 0; + padding: 0 +} + +blockquote { + -moz-box-sizing: border-box; + box-sizing: border-box; + margin: 1.75em 0 1.75em -2.2em; + padding: 0 0 0 1.75em; + border-left: #4A4A4A 0.4em solid +} + +blockquote p { + margin: 0.8em 0; + font-style: italic +} + +blockquote small { + display: inline-block; + margin: 0.8em 0 0.8em 1.5em; + font-size: 0.9em; + color: #CCC +} + +blockquote small:before { + content: "\2014 \00A0" +} + +blockquote cite { + font-weight: 700 +} + +blockquote cite a { + font-weight: normal +} + +mark { + background-color: #fdffb6 +} + +kbd { + display: inline-block; + margin-bottom: 0.4em; + padding: 1px 8px; + border: #CCC 1px solid; + color: #666; + text-shadow: #FFF 0 1px 0; + font-size: 0.9em; + font-weight: 700; + background: #F4F4F4; + border-radius: 4px; + box-shadow: 0 1px 0 rgba(0, 0, 0, 0.2), 0 1px 0 0 #fff inset +} + +@media only screen and (max-width: 900px) { + blockquote { + margin-left: 0 + } + hr { + margin: 2.4em 0 + } + ol, + ul { + padding-left: 2em + } + h1 { + font-size: 4.5rem; + text-indent: -2px + } + h2 { + font-size: 3.6rem + } + h3 { + font-size: 3.1rem + } + h4 { + font-size: 2.5rem + } + h5 { + font-size: 2.2rem + } + h6 { + font-size: 1.8rem + } +} + +@media only screen and (max-width: 500px) { + hr { + margin: 1.75em 0 + } + p, + ul, + ol, + dl { + font-size: 0.95em; + margin: 0 0 2.5rem 0 + } + h1, + h2, + h3, + h4, + h5, + h6 { + margin: 0 0 0.3em 0 + } + h1 { + font-size: 2.8rem; + letter-spacing: -1px + } + h2 { + font-size: 2.4rem; + letter-spacing: 0 + } + h3 { + font-size: 2.1rem + } + h4 { + font-size: 1.9rem + } + h5 { + font-size: 1.8rem + } + h6 { + font-size: 1.8rem + } +} \ No newline at end of file diff --git a/_sass/variables.scss b/_sass/variables.scss new file mode 100644 index 0000000..b3817d0 --- /dev/null +++ b/_sass/variables.scss @@ -0,0 +1,14 @@ +// Breakpoints +$tablet: "(min-width: 450px)"; +$mid-point: "(min-width: 750px)"; +$desktop: "(min-width: 900px)"; + +// Colors + +$dark-grey: #222; +$medium-grey: #666; +$light-grey: #ccc; +$header-color: #0c92f1; + +$link-color: #4A4A4A; +$link-hover-color: #111; \ No newline at end of file diff --git a/_sets/_defaults.md b/_sets/_defaults.md new file mode 100644 index 0000000..703ee2b --- /dev/null +++ b/_sets/_defaults.md @@ -0,0 +1,4 @@ +--- +title: +description: +--- \ No newline at end of file diff --git a/_sets/getting-started.md b/_sets/getting-started.md new file mode 100644 index 0000000..1be85f5 --- /dev/null +++ b/_sets/getting-started.md @@ -0,0 +1,4 @@ +--- +title: Getting Started +description: This series guides you through getting started on our platform. +--- \ No newline at end of file diff --git a/apple-touch-icon.png b/apple-touch-icon.png new file mode 100644 index 0000000..c1cf271 Binary files /dev/null and b/apple-touch-icon.png differ diff --git a/contact.html b/contact.html new file mode 100644 index 0000000..cba9218 --- /dev/null +++ b/contact.html @@ -0,0 +1,50 @@ +--- +faq: + +--- + +

Enviar Solicitação

+
+
+ +

Email

+
+ +

Cidade

+
+ +

Nome

+
+ +

Telefone para contato

+
+ +

Ocorrência

+
+ +

Descrição

+
+ +

Imagem

+ + +
+ + +
+ diff --git a/css/screen.scss b/css/screen.scss new file mode 100644 index 0000000..a9ef1a5 --- /dev/null +++ b/css/screen.scss @@ -0,0 +1,15 @@ +--- +--- +@import "variables"; +@import "typography"; +@import "elements"; +@import "tutorials"; +@import "header"; +@import "layout"; +@import "search"; +@import "dark-theme"; +@import "footer"; +@import "contact"; +@import "modal"; +@import "form"; +@import "cloudcannon"; diff --git a/images/_screenshot.png b/images/_screenshot.png new file mode 100644 index 0000000..f8d499b Binary files /dev/null and b/images/_screenshot.png differ diff --git a/images/favicon.png b/images/favicon.png new file mode 100644 index 0000000..c2c76ff Binary files /dev/null and b/images/favicon.png differ diff --git a/images/it-logo-light.png b/images/it-logo-light.png new file mode 100644 index 0000000..9c45f56 Binary files /dev/null and b/images/it-logo-light.png differ diff --git a/images/logo-dark.png b/images/logo-dark.png new file mode 100644 index 0000000..f6fbfe8 Binary files /dev/null and b/images/logo-dark.png differ diff --git a/images/logo-light.png b/images/logo-light.png new file mode 100644 index 0000000..ce730b7 Binary files /dev/null and b/images/logo-light.png differ diff --git a/index.html b/index.html new file mode 100644 index 0000000..373f4af --- /dev/null +++ b/index.html @@ -0,0 +1,26 @@ +--- +--- + +
+ {% assign categories = site.categories | sort %} + {% for category in categories %} + {% assign name = category[0] %} + {% assign posts = category[1] %} + {% assign size = posts | size %} +
+

+ {{ name | replace: "-", " " }} +

+ + +
+ {% endfor %} +
\ No newline at end of file diff --git a/js/lunr.min.js b/js/lunr.min.js new file mode 100644 index 0000000..884d1f2 --- /dev/null +++ b/js/lunr.min.js @@ -0,0 +1,7 @@ +/** + * lunr - http://lunrjs.com - A bit like Solr, but much smaller and not as bright - 0.7.0 + * Copyright (C) 2016 Oliver Nightingale + * MIT Licensed + * @license + */ +!function(){var t=function(e){var n=new t.Index;return n.pipeline.add(t.trimmer,t.stopWordFilter,t.stemmer),e&&e.call(n,n),n};t.version="0.7.0",t.utils={},t.utils.warn=function(t){return function(e){t.console&&console.warn&&console.warn(e)}}(this),t.utils.asString=function(t){return void 0===t||null===t?"":t.toString()},t.EventEmitter=function(){this.events={}},t.EventEmitter.prototype.addListener=function(){var t=Array.prototype.slice.call(arguments),e=t.pop(),n=t;if("function"!=typeof e)throw new TypeError("last argument must be a function");n.forEach(function(t){this.hasHandler(t)||(this.events[t]=[]),this.events[t].push(e)},this)},t.EventEmitter.prototype.removeListener=function(t,e){if(this.hasHandler(t)){var n=this.events[t].indexOf(e);this.events[t].splice(n,1),this.events[t].length||delete this.events[t]}},t.EventEmitter.prototype.emit=function(t){if(this.hasHandler(t)){var e=Array.prototype.slice.call(arguments,1);this.events[t].forEach(function(t){t.apply(void 0,e)})}},t.EventEmitter.prototype.hasHandler=function(t){return t in this.events},t.tokenizer=function(e){return arguments.length&&null!=e&&void 0!=e?Array.isArray(e)?e.map(function(e){return t.utils.asString(e).toLowerCase()}):e.toString().trim().toLowerCase().split(t.tokenizer.seperator):[]},t.tokenizer.seperator=/[\s\-]+/,t.tokenizer.load=function(t){var e=this.registeredFunctions[t];if(!e)throw new Error("Cannot load un-registered function: "+t);return e},t.tokenizer.label="default",t.tokenizer.registeredFunctions={"default":t.tokenizer},t.tokenizer.registerFunction=function(e,n){n in this.registeredFunctions&&t.utils.warn("Overwriting existing tokenizer: "+n),e.label=n,this.registeredFunctions[n]=e},t.Pipeline=function(){this._stack=[]},t.Pipeline.registeredFunctions={},t.Pipeline.registerFunction=function(e,n){n in this.registeredFunctions&&t.utils.warn("Overwriting existing registered function: "+n),e.label=n,t.Pipeline.registeredFunctions[e.label]=e},t.Pipeline.warnIfFunctionNotRegistered=function(e){var n=e.label&&e.label in this.registeredFunctions;n||t.utils.warn("Function is not registered with pipeline. This may cause problems when serialising the index.\n",e)},t.Pipeline.load=function(e){var n=new t.Pipeline;return e.forEach(function(e){var i=t.Pipeline.registeredFunctions[e];if(!i)throw new Error("Cannot load un-registered function: "+e);n.add(i)}),n},t.Pipeline.prototype.add=function(){var e=Array.prototype.slice.call(arguments);e.forEach(function(e){t.Pipeline.warnIfFunctionNotRegistered(e),this._stack.push(e)},this)},t.Pipeline.prototype.after=function(e,n){t.Pipeline.warnIfFunctionNotRegistered(n);var i=this._stack.indexOf(e);if(-1==i)throw new Error("Cannot find existingFn");i+=1,this._stack.splice(i,0,n)},t.Pipeline.prototype.before=function(e,n){t.Pipeline.warnIfFunctionNotRegistered(n);var i=this._stack.indexOf(e);if(-1==i)throw new Error("Cannot find existingFn");this._stack.splice(i,0,n)},t.Pipeline.prototype.remove=function(t){var e=this._stack.indexOf(t);-1!=e&&this._stack.splice(e,1)},t.Pipeline.prototype.run=function(t){for(var e=[],n=t.length,i=this._stack.length,r=0;n>r;r++){for(var o=t[r],s=0;i>s&&(o=this._stack[s](o,r,t),void 0!==o&&""!==o);s++);void 0!==o&&""!==o&&e.push(o)}return e},t.Pipeline.prototype.reset=function(){this._stack=[]},t.Pipeline.prototype.toJSON=function(){return this._stack.map(function(e){return t.Pipeline.warnIfFunctionNotRegistered(e),e.label})},t.Vector=function(){this._magnitude=null,this.list=void 0,this.length=0},t.Vector.Node=function(t,e,n){this.idx=t,this.val=e,this.next=n},t.Vector.prototype.insert=function(e,n){this._magnitude=void 0;var i=this.list;if(!i)return this.list=new t.Vector.Node(e,n,i),this.length++;if(en.idx?n=n.next:(i+=e.val*n.val,e=e.next,n=n.next);return i},t.Vector.prototype.similarity=function(t){return this.dot(t)/(this.magnitude()*t.magnitude())},t.SortedSet=function(){this.length=0,this.elements=[]},t.SortedSet.load=function(t){var e=new this;return e.elements=t,e.length=t.length,e},t.SortedSet.prototype.add=function(){var t,e;for(t=0;t1;){if(o===t)return r;t>o&&(e=r),o>t&&(n=r),i=n-e,r=e+Math.floor(i/2),o=this.elements[r]}return o===t?r:-1},t.SortedSet.prototype.locationFor=function(t){for(var e=0,n=this.elements.length,i=n-e,r=e+Math.floor(i/2),o=this.elements[r];i>1;)t>o&&(e=r),o>t&&(n=r),i=n-e,r=e+Math.floor(i/2),o=this.elements[r];return o>t?r:t>o?r+1:void 0},t.SortedSet.prototype.intersect=function(e){for(var n=new t.SortedSet,i=0,r=0,o=this.length,s=e.length,a=this.elements,h=e.elements;;){if(i>o-1||r>s-1)break;a[i]!==h[r]?a[i]h[r]&&r++:(n.add(a[i]),i++,r++)}return n},t.SortedSet.prototype.clone=function(){var e=new t.SortedSet;return e.elements=this.toArray(),e.length=e.elements.length,e},t.SortedSet.prototype.union=function(t){var e,n,i;this.length>=t.length?(e=this,n=t):(e=t,n=this),i=e.clone();for(var r=0,o=n.toArray();rp;p++)c[p]===a&&d++;h+=d/f*l.boost}}this.tokenStore.add(a,{ref:o,tf:h})}n&&this.eventEmitter.emit("add",e,this)},t.Index.prototype.remove=function(t,e){var n=t[this._ref],e=void 0===e?!0:e;if(this.documentStore.has(n)){var i=this.documentStore.get(n);this.documentStore.remove(n),i.forEach(function(t){this.tokenStore.remove(t,n)},this),e&&this.eventEmitter.emit("remove",t,this)}},t.Index.prototype.update=function(t,e){var e=void 0===e?!0:e;this.remove(t,!1),this.add(t,!1),e&&this.eventEmitter.emit("update",t,this)},t.Index.prototype.idf=function(t){var e="@"+t;if(Object.prototype.hasOwnProperty.call(this._idfCache,e))return this._idfCache[e];var n=this.tokenStore.count(t),i=1;return n>0&&(i=1+Math.log(this.documentStore.length/n)),this._idfCache[e]=i},t.Index.prototype.search=function(e){var n=this.pipeline.run(this.tokenizerFn(e)),i=new t.Vector,r=[],o=this._fields.reduce(function(t,e){return t+e.boost},0),s=n.some(function(t){return this.tokenStore.has(t)},this);if(!s)return[];n.forEach(function(e,n,s){var a=1/s.length*this._fields.length*o,h=this,u=this.tokenStore.expand(e).reduce(function(n,r){var o=h.corpusTokens.indexOf(r),s=h.idf(r),u=1,l=new t.SortedSet;if(r!==e){var c=Math.max(3,r.length-e.length);u=1/Math.log(c)}o>-1&&i.insert(o,a*s*u);for(var f=h.tokenStore.get(r),d=Object.keys(f),p=d.length,v=0;p>v;v++)l.add(f[d[v]].ref);return n.union(l)},new t.SortedSet);r.push(u)},this);var a=r.reduce(function(t,e){return t.intersect(e)});return a.map(function(t){return{ref:t,score:i.similarity(this.documentVector(t))}},this).sort(function(t,e){return e.score-t.score})},t.Index.prototype.documentVector=function(e){for(var n=this.documentStore.get(e),i=n.length,r=new t.Vector,o=0;i>o;o++){var s=n.elements[o],a=this.tokenStore.get(s)[e].tf,h=this.idf(s);r.insert(this.corpusTokens.indexOf(s),a*h)}return r},t.Index.prototype.toJSON=function(){return{version:t.version,fields:this._fields,ref:this._ref,tokenizer:this.tokenizerFn.label,documentStore:this.documentStore.toJSON(),tokenStore:this.tokenStore.toJSON(),corpusTokens:this.corpusTokens.toJSON(),pipeline:this.pipeline.toJSON()}},t.Index.prototype.use=function(t){var e=Array.prototype.slice.call(arguments,1);e.unshift(this),t.apply(this,e)},t.Store=function(){this.store={},this.length=0},t.Store.load=function(e){var n=new this;return n.length=e.length,n.store=Object.keys(e.store).reduce(function(n,i){return n[i]=t.SortedSet.load(e.store[i]),n},{}),n},t.Store.prototype.set=function(t,e){this.has(t)||this.length++,this.store[t]=e},t.Store.prototype.get=function(t){return this.store[t]},t.Store.prototype.has=function(t){return t in this.store},t.Store.prototype.remove=function(t){this.has(t)&&(delete this.store[t],this.length--)},t.Store.prototype.toJSON=function(){return{store:this.store,length:this.length}},t.stemmer=function(){var t={ational:"ate",tional:"tion",enci:"ence",anci:"ance",izer:"ize",bli:"ble",alli:"al",entli:"ent",eli:"e",ousli:"ous",ization:"ize",ation:"ate",ator:"ate",alism:"al",iveness:"ive",fulness:"ful",ousness:"ous",aliti:"al",iviti:"ive",biliti:"ble",logi:"log"},e={icate:"ic",ative:"",alize:"al",iciti:"ic",ical:"ic",ful:"",ness:""},n="[^aeiou]",i="[aeiouy]",r=n+"[^aeiouy]*",o=i+"[aeiou]*",s="^("+r+")?"+o+r,a="^("+r+")?"+o+r+"("+o+")?$",h="^("+r+")?"+o+r+o+r,u="^("+r+")?"+i,l=new RegExp(s),c=new RegExp(h),f=new RegExp(a),d=new RegExp(u),p=/^(.+?)(ss|i)es$/,v=/^(.+?)([^s])s$/,g=/^(.+?)eed$/,m=/^(.+?)(ed|ing)$/,y=/.$/,S=/(at|bl|iz)$/,w=new RegExp("([^aeiouylsz])\\1$"),k=new RegExp("^"+r+i+"[^aeiouwxy]$"),x=/^(.+?[^aeiou])y$/,b=/^(.+?)(ational|tional|enci|anci|izer|bli|alli|entli|eli|ousli|ization|ation|ator|alism|iveness|fulness|ousness|aliti|iviti|biliti|logi)$/,E=/^(.+?)(icate|ative|alize|iciti|ical|ful|ness)$/,F=/^(.+?)(al|ance|ence|er|ic|able|ible|ant|ement|ment|ent|ou|ism|ate|iti|ous|ive|ize)$/,_=/^(.+?)(s|t)(ion)$/,z=/^(.+?)e$/,O=/ll$/,P=new RegExp("^"+r+i+"[^aeiouwxy]$"),T=function(n){var i,r,o,s,a,h,u;if(n.length<3)return n;if(o=n.substr(0,1),"y"==o&&(n=o.toUpperCase()+n.substr(1)),s=p,a=v,s.test(n)?n=n.replace(s,"$1$2"):a.test(n)&&(n=n.replace(a,"$1$2")),s=g,a=m,s.test(n)){var T=s.exec(n);s=l,s.test(T[1])&&(s=y,n=n.replace(s,""))}else if(a.test(n)){var T=a.exec(n);i=T[1],a=d,a.test(i)&&(n=i,a=S,h=w,u=k,a.test(n)?n+="e":h.test(n)?(s=y,n=n.replace(s,"")):u.test(n)&&(n+="e"))}if(s=x,s.test(n)){var T=s.exec(n);i=T[1],n=i+"i"}if(s=b,s.test(n)){var T=s.exec(n);i=T[1],r=T[2],s=l,s.test(i)&&(n=i+t[r])}if(s=E,s.test(n)){var T=s.exec(n);i=T[1],r=T[2],s=l,s.test(i)&&(n=i+e[r])}if(s=F,a=_,s.test(n)){var T=s.exec(n);i=T[1],s=c,s.test(i)&&(n=i)}else if(a.test(n)){var T=a.exec(n);i=T[1]+T[2],a=c,a.test(i)&&(n=i)}if(s=z,s.test(n)){var T=s.exec(n);i=T[1],s=c,a=f,h=P,(s.test(i)||a.test(i)&&!h.test(i))&&(n=i)}return s=O,a=c,s.test(n)&&a.test(n)&&(s=y,n=n.replace(s,"")),"y"==o&&(n=o.toLowerCase()+n.substr(1)),n};return T}(),t.Pipeline.registerFunction(t.stemmer,"stemmer"),t.generateStopWordFilter=function(t){var e=t.reduce(function(t,e){return t[e]=e,t},{});return function(t){return t&&e[t]!==t?t:void 0}},t.stopWordFilter=t.generateStopWordFilter(["a","able","about","across","after","all","almost","also","am","among","an","and","any","are","as","at","be","because","been","but","by","can","cannot","could","dear","did","do","does","either","else","ever","every","for","from","get","got","had","has","have","he","her","hers","him","his","how","however","i","if","in","into","is","it","its","just","least","let","like","likely","may","me","might","most","must","my","neither","no","nor","not","of","off","often","on","only","or","other","our","own","rather","said","say","says","she","should","since","so","some","than","that","the","their","them","then","there","these","they","this","tis","to","too","twas","us","wants","was","we","were","what","when","where","which","while","who","whom","why","will","with","would","yet","you","your"]),t.Pipeline.registerFunction(t.stopWordFilter,"stopWordFilter"),t.trimmer=function(t){return t.replace(/^\W+/,"").replace(/\W+$/,"")},t.Pipeline.registerFunction(t.trimmer,"trimmer"),t.TokenStore=function(){this.root={docs:{}},this.length=0},t.TokenStore.load=function(t){var e=new this;return e.root=t.root,e.length=t.length,e},t.TokenStore.prototype.add=function(t,e,n){var n=n||this.root,i=t.charAt(0),r=t.slice(1);return i in n||(n[i]={docs:{}}),0===r.length?(n[i].docs[e.ref]=e,void(this.length+=1)):this.add(r,e,n[i])},t.TokenStore.prototype.has=function(t){if(!t)return!1;for(var e=this.root,n=0;n bottom) { + $sidebar.css("position", "absolute").css("top", $tutorial.outerHeight() - $sidebar.outerHeight()); + } else if (window.scrollY > $tutorial.offset().top) { + $sidebar.css("position", "fixed").css("top", offset); + } else { + $sidebar.css("position", "absolute").css("top", offset); + } + } + + function setActiveSidebarLink() { + $('.sidebar a').removeClass('active'); + var $closest = getClosestHeader(); + $closest.addClass('active'); + } +}); + +function getClosestHeader() { + var $links = $('.sidebar a'), + top = window.scrollY, + $last = $links.first(), + $content = $(".tutorial-content"); + + console.log(top); + + if (top < 300) { + return $last; + } + + if (top + window.innerHeight >= $content.offset().top + $content.height()) { + return $links.last(); + } + + for (var i = 0; i < $links.length; i++) { + var $link = $links.eq(i), + href = $link.attr("href"); + + if (href !== undefined && href.charAt(0) === "#" && href.length > 1) { + var $anchor = $(href); + + if ($anchor.length > 0) { + var offset = $anchor.offset(); + + if (top < offset.top - (window.innerHeight / 2)) { + return $last; + } + + $last = $link; + } + } + } + return $last; +} + +function throttle (callback, limit) { + + var wait = false; + return function () { + if (!wait) { + + callback.apply(null, arguments); + wait = true; + setTimeout(function () { + wait = false; + }, limit); + } + }; +} \ No newline at end of file diff --git a/js/search.js b/js/search.js new file mode 100644 index 0000000..1eaad85 --- /dev/null +++ b/js/search.js @@ -0,0 +1,103 @@ +--- +layout: null +--- +(function () { + function getQueryVariable(variable) { + var query = window.location.search.substring(1), + vars = query.split("&"); + + for (var i = 0; i < vars.length; i++) { + var pair = vars[i].split("="); + + if (pair[0] === variable) { + return pair[1]; + } + } + } + + function getPreview(query, content, previewLength) { + previewLength = previewLength || (content.length * 2); + + var parts = query.split(" "), + match = content.toLowerCase().indexOf(query.toLowerCase()), + matchLength = query.length, + preview; + + // Find a relevant location in content + for (var i = 0; i < parts.length; i++) { + if (match >= 0) { + break; + } + + match = content.toLowerCase().indexOf(parts[i].toLowerCase()); + matchLength = parts[i].length; + } + + // Create preview + if (match >= 0) { + var start = match - (previewLength / 2), + end = start > 0 ? match + matchLength + (previewLength / 2) : previewLength; + + preview = content.substring(start, end).trim(); + + if (start > 0) { + preview = "..." + preview; + } + + if (end < content.length) { + preview = preview + "..."; + } + + // Highlight query parts + preview = preview.replace(new RegExp("(" + parts.join("|") + ")", "gi"), "$1"); + } else { + // Use start of content if no match found + preview = content.substring(0, previewLength).trim() + (content.length > previewLength ? "..." : ""); + } + + return preview; + } + + function displaySearchResults(results, query) { + var searchResultsEl = document.getElementById("search-results"), + searchProcessEl = document.getElementById("search-process"); + + if (results.length) { + var resultsHTML = ""; + results.forEach(function (result) { + var item = window.data[result.ref], + contentPreview = getPreview(query, item.content, 170), + titlePreview = getPreview(query, item.title); + + resultsHTML += "
  • " + titlePreview + "

    " + contentPreview + "

  • "; + }); + + searchResultsEl.innerHTML = resultsHTML; + searchProcessEl.innerText = "Showing"; + } else { + searchResultsEl.style.display = "none"; + searchProcessEl.innerText = "No"; + } + } + + window.index = lunr(function () { + this.field("id"); + this.field("title", {boost: 10}); + this.field("categories"); + this.field("url"); + this.field("content"); + }); + + var query = decodeURIComponent((getQueryVariable("q") || "").replace(/\+/g, "%20")), + searchQueryContainerEl = document.getElementById("search-query-container"), + searchQueryEl = document.getElementById("search-query"); + + searchQueryEl.innerText = query; + searchQueryContainerEl.style.display = "inline"; + + for (var key in window.data) { + window.index.add(window.data[key]); + } + + displaySearchResults(window.index.search(query), query); // Hand the results off to be displayed +})(); \ No newline at end of file diff --git a/logo-light.png b/logo-light.png new file mode 100644 index 0000000..ce730b7 Binary files /dev/null and b/logo-light.png differ diff --git a/search.html b/search.html new file mode 100644 index 0000000..40923ed --- /dev/null +++ b/search.html @@ -0,0 +1,30 @@ +--- +title: Search +sitemap: false +--- + +

    Loading results

    +
      + + + + \ No newline at end of file diff --git a/siteicon.png b/siteicon.png new file mode 100644 index 0000000..f995835 Binary files /dev/null and b/siteicon.png differ diff --git a/success.html b/success.html new file mode 100644 index 0000000..85037d5 --- /dev/null +++ b/success.html @@ -0,0 +1,6 @@ +--- +success: + +--- + +

      Sua mensagem foi enviada com sucesso!

      diff --git a/touch-icon.png b/touch-icon.png new file mode 100644 index 0000000..6d5380e Binary files /dev/null and b/touch-icon.png differ diff --git a/videos.html b/videos.html new file mode 100644 index 0000000..a827d98 --- /dev/null +++ b/videos.html @@ -0,0 +1,7 @@ +--- +--- +{% assign videos = site.posts | where: "type", "Video" | sort: "title" %} + +

      Videos ({{ videos | size }})

      + +{% include listings.html listings=videos %} \ No newline at end of file