commit 3d89464db50f0bb9feb088c9cd801ecbbcb0e96c Author: Amie Chen Date: Fri Jan 12 06:31:18 2018 -0800 add project to github diff --git a/README.md b/README.md new file mode 100755 index 0000000..5bd6eaf --- /dev/null +++ b/README.md @@ -0,0 +1,22 @@ +# Scribbler - a responsive HTML template for coding projects and documentations + +Scribbler is a responsive HTML/CSS/Javascript template designed for developers who want to set up a small landing page and a documentation/usage page for their coding projects. It is developed with vanilla javascript and many great CSS3 features, such as CSS variables and CSS grid. With performance and simplicity in mind, the template is built without any extra overhead of libraries and is easy to customize. + +The template is made by [Amie Chen](http://amie-chen.com) exclusively for Codrops. + +## Live Demo +insert live demo link here + +## Credits +* [Highlight.js](https://highlightjs.org/) +* [Google Fonts - Nunito](https://fonts.google.com/specimen/Nunito+Sans) +* [Font Awesome v4](http://fontawesome.io/) + +## Misc + +Follow Amie: [Dribbble](http://www.dribbble.com/amiechen01), [Github](https://github.com/amiechen), [Website](http://amie-chen.com/) + +Follow Codrops: [Twitter](http://www.twitter.com/codrops), [Facebook](http://www.facebook.com/pages/Codrops/159107397912), [Google+](https://plus.google.com/101095823814290637419), [GitHub](https://github.com/codrops), [Pinterest](http://www.pinterest.com/codrops/) + +[© Codrops 2018](http://www.codrops.com) + diff --git a/doc.html b/doc.html new file mode 100755 index 0000000..9c8c96b --- /dev/null +++ b/doc.html @@ -0,0 +1,101 @@ + + + + + + + Scribbler Documentation - a code documentation page template for codrops + + + + + + + +
+ +
+ +
+
+

Get Started

+

Learn how to configure settings for Scribbler, such as your syntax highlighting preference and the default saving folder location.

+

Installation

+
+
+              
+                $ scribbler  ——config
+                  {
+                    “encryption”: true, 
+                    “highlighting“: true,
+                    “prettyTable”: false,
+                    “font”: [“Helvetica”, “sans-serif”],
+                    “folder”: “~/Desktop“
+                  }
+              
+            
+
+
+
+

Configuration

+

Learn how to configure settings for Scribbler, such as your syntax highlighting preference and the default saving folder location.

+ + + + + + + + + + + + + + + + + + + + + +
OptionsValueDefault
encryptionencrypt all notes before saving. If turned on, it requires password to open the file.false
highlightingShow syntax highlight on markdown text.true
prettyTableRender table with Scribbler’s pretty table style.true
+

Malis percipitur an pro. Pro aperiam persequeris at, at sonet sensibus mei, id mea postulant definiebas concludaturque. Id qui malis abhorreant, mazim melius quo et. At eam altera dolorum, case dicant lobortis ius te, ad vel affert oportere reprehendunt. Quo no verterem deseruisse, mea brute postea te, ne per tacimates suavitate vituperatoribus.

+
+
+
+

Keybindings

+

Lorem ipsum dolor sit amet, scripta tibique indoctum sit ei, mel inani aeterno ad. Facer oratio ex per. At eam movet verear, in sea brute patrioque disputando, usu nonumes torquatos an. Ex his quaerendum intellegebat, ut vel homero accusam. Eum at debet tibique, in vocibus temporibus adversarium sed. Porro verear eu vix, ne usu tation vituperata.

+

Malis percipitur an pro. Pro aperiam persequeris at, at sonet sensibus mei, id mea postulant definiebas concludaturque. Id qui malis abhorreant, mazim melius quo et. At eam altera dolorum, case dicant lobortis ius te, ad vel affert oportere reprehendunt. Quo no verterem deseruisse, mea brute postea te, ne per tacimates suavitate vituperatoribus.

+

Malis percipitur an pro. Pro aperiam persequeris at, at sonet sensibus mei, id mea postulant definiebas concludaturque. Id qui malis abhorreant, mazim melius quo et. At eam altera dolorum, case dicant lobortis ius te, ad vel affert oportere reprehendunt. Quo no verterem deseruisse, mea brute postea te, ne per tacimates suavitate vituperatoribus.

+
+
+
+

Issues

+

Lorem ipsum dolor sit amet, scripta tibique indoctum sit ei, mel inani aeterno ad. Facer oratio ex per. At eam movet verear, in sea brute patrioque disputando, usu nonumes torquatos an. Ex his quaerendum intellegebat, ut vel homero accusam. Eum at debet tibique, in vocibus temporibus adversarium sed. Porro verear eu vix, ne usu tation vituperata.

+

Malis percipitur an pro. Pro aperiam persequeris at, at sonet sensibus mei, id mea postulant definiebas concludaturque. Id qui malis abhorreant, mazim melius quo et. At eam altera dolorum, case dicant lobortis ius te, ad vel affert oportere reprehendunt. Quo no verterem deseruisse, mea brute postea te, ne per tacimates suavitate vituperatoribus.

+
+
+
+ + + + + + + \ No newline at end of file diff --git a/index.html b/index.html new file mode 100755 index 0000000..1bf1b4b --- /dev/null +++ b/index.html @@ -0,0 +1,149 @@ + + + + + + + Scribbler - a codding landing page template for codrops + + + + + + + + + +
+

Scribbler

+

Take your markdown notes in terminal

+
+
+
+        
+        hyperyolo ~ $ 
+      
+
+
+
+

Installation

+
+
    +
  • mac
  • +
  • linux
  • +
  • win
  • +
+
+            $  brew install scribbler
+            $  apt-get install scribbler
+            $  gem install scribbler
+          
+
+
+
+
+

Fast & Light

+

Start writing your notes immediately in any terminal! No more time wasted on navigating and opening your text editor.

+
+
+

File Syncing

+

Save your file in Dropbox then you can access to it from anywhere.

+
+
+

Secure

+

Encrypt your notes optionally. No one can get to your secrets!

+
+
+

Configuration

+

Maintain all your settings in a single config.json file. Never need to redo the setting every single time jotting down a note.

+
+
+

Highlightings

+

For better readability, scribbler has a clean, beautiful color scheme allow you to scan files fast.

+
+
+

Keybindings

+

You can expect common keybindings for scribbler. Customize bindings.json for your own liking!

+
+
+
+
    +

    Default Keybindings

    +
  • Quit without saving Ctrl+C
  • +
  • Save Cmd+S
  • +
  • Save and Quit Ctrl+D
  • +
  • Undo Cmd+Z
  • +
+
    +

    Markdown Keybindings

    +
  • Ctrl+A Insert Link Markdown
  • +
  • Ctrl+I Insert Image Markdown
  • +
  • Ctrl+V Insert YouTube Video
  • +
  • Ctrl+T Insert Table
  • +
+
+
+

Read our documentation for advanced keybindings and customization

+ Documentation +
+
+
+
+

Changelog

+
+
+

v0.7

+ 10/12/2017 +
+
+
    +
  • Improving the writing workflow with better key bindings
  • +
  • Design updates
  • +
  • SSL Verification for web hooks
  • +
  • Render Emoji
  • +
+
+
+
+
+

v0.6

+ 7/30/2017 +
+
+
    +
  • Adding Unicode support
  • +
  • Basic text highlighting
  • +
  • Fresh Design
  • +
+
+
+
+
+

v0.5

+ 5/10/2017 +
+
+
    +
  • Save default md file in new folders
  • +
  • Ability to quick search on existing notes
  • +
+
+
+ +
+
+ + + + + + \ No newline at end of file diff --git a/logo.svg b/logo.svg new file mode 100755 index 0000000..2cb5cef --- /dev/null +++ b/logo.svg @@ -0,0 +1,14 @@ + + + + logo + Created with Sketch. + + + + + \ No newline at end of file diff --git a/scribbler-doc.css b/scribbler-doc.css new file mode 100755 index 0000000..a3f8c96 --- /dev/null +++ b/scribbler-doc.css @@ -0,0 +1,115 @@ +html, body { + display: flex; + flex-direction: column; + min-height: 100vh; +} + +/* layout */ +.header { + border-bottom: 1px solid var(--code-bg-color); + grid-template-columns: 1fr 150px 60% 1fr; +} + +.wrapper { + display: flex; + flex-grow: 1; +} + +/* logo */ +.logo { + font-weight: 900; + color: var(--primary-color); + font-size: 1.4em; + grid-column: 2; +} + +.logo__thin { + font-weight: 300; +} + +/* menu */ +.menu { + grid-template-columns: 1fr 180px 60% 1fr; +} + +.menu__item { + padding: 1.5rem 1rem; +} + +/* doc */ +.doc__bg { + position: fixed; + top: 0; + left: 0; + bottom: 0; + width: 28%; + background-color: var(--bg-color); + z-index: -1; +} + +.doc__nav { + flex-basis: 20%; + font-weight: 200; +} + +.doc__nav ul { + list-style: none; + padding-left: 0; + line-height: 1.8; +} + +.doc__nav ul.fixed { + position: fixed; + top: 2rem; +} + +.doc__nav li:hover { + color: var(--primary-color-light); + cursor: pointer; + transition: color .3s ease-in-out; +} + +.doc__nav .selected { + color: var(--accent-color); + position: relative; +} + +.doc__nav .selected:after { + position: absolute; + content: ""; + width: 1rem; + height: 1rem; + background-color: var(--accent-color); + left: -1.5rem; + top: 0.3rem; +} + +.doc__content { + flex-basis: 80%; + padding: 0 0 5rem 1rem; +} + +@media (max-width: 750px) { + .wrapper { + flex-direction: column; + } + .doc__content { + padding-left: 0; + } + .doc__nav ul { + border-bottom: 1px solid var(--code-bg-color); + padding-bottom: 0.5rem; + } + .doc__nav ul.fixed { + /* nutralized the fixed menu for mobile*/ + position: relative; + top: 0; + } + .doc__nav li { + display: inline-block; + padding-right: 1rem; + } + .doc__nav .selected:after { + display: none; + } +} \ No newline at end of file diff --git a/scribbler-global.css b/scribbler-global.css new file mode 100755 index 0000000..68bdd7a --- /dev/null +++ b/scribbler-global.css @@ -0,0 +1,312 @@ +/* css variables*/ +:root { + --primary-color: #432E30; + --primary-color-light: #8E7474; + --accent-color: #FE6A6B; + --accent-color-light: #FFE4E4; + --accent-color-dark: #B94B4C; + --white-color: #FAFBFC; + --light-gray-color: #C6CBD1; + --medium-gray-color: #959DA5; + --dark-gray-color: #444D56; + --bg-color: #F8F8FA; + --code-bg-color: #F0E8E8; +} + +/* normalized */ +html, body { + padding: 0; + margin: 0; + font-family: 'Nunito Sans', sans-serif; + background-color: white; +} + +p { + font-weight: 300; + color: #4A4A4A; +} + +a, a:hover { + text-decoration: none; + color: var(--primary-color); +} + +hr { + padding: 1rem 0; + border: 0; + border-bottom: 1px solid var(--bg-color); +} + +* { + box-sizing: border-box; +} + +/* global components */ + +/* typography */ +.section__title { + color: var(--primary-color); +} + +/* tabs */ +.tab__container { + position: relative; +} + +.tab__container > ul { + position: absolute; + list-style: none; + margin: 0; + right: 1rem; + top: -2rem; +} + +.tab__container .code { + white-space: normal; + padding: 1rem 1.5rem; +} + +.tab { + display: inline-block; + padding: 0.3rem 0.5rem; + font-weight: 200; + cursor: pointer; +} + +.tab.active { + border-bottom: 1px solid var(--primary-color); + font-weight: 700; + display: inline-block; +} + +.tab__pane { + display: none; +} + +.tab__pane.active { + display: block; +} + +/* code */ +.code { + border-radius: 3px; + font-family: Space Mono, SFMono-Regular, Menlo,Monaco, Consolas, Liberation Mono, Courier New, monospace; + background: var(--bg-color); + border: 1px solid var(--code-bg-color); + color: var(--primary-color-light); +} + +.code--block { + white-space: pre-line; + padding: 0 1.5rem; +} + +.code--inline { + padding: 3px 6px; + font-size: 80%; +} + +/* buttons */ +.button--primary { + padding: 10px 22px; + background-color: var(--accent-color); + color: white; + position: relative; + text-decoration: none; + border: 0; + transition: all .3s ease-out; +} + +.button--primary:after { + position: absolute; + content: ""; + width: 1rem; + height: 1rem; + background-color: var(--accent-color-light); + right: -0.4rem; + top: -0.4rem; + transition: all 0.3s ease-out; +} + +.button--primary:hover { + text-shadow: 0px 1px 1px var(--accent-color-dark); + color: white; + transform: translate3D(0, -3px, 0); +} + +.button--primary:hover::after { + transform: rotate(90deg); +} + +.button--secondary { + padding: 10px 22px; + border: 2px solid var(--primary-color); + transition: all 0.5s ease-out; +} + +.button--secondary:hover { + border-color: var(--accent-color); + color: var(--accent-color); +} + +/* links */ +.link { + text-decoration: none; + transition: all 0.3s ease-out; +} + +.link:hover { + color: var(--accent-color); +} + +.link--dark { + color: var(--primary-color); +} + +.link--light { + color: var(--accent-color); +} + +/* menu */ +nav { + display: grid; + grid-template-columns: 70px auto; +} + +.menu { + margin: 0; + text-align: right; + overflow: hidden; + list-style: none; +} + +.toggle { + display: none; + position: relative; +} + +.toggle span, +.toggle span:before, +.toggle span:after { + content: ''; + position: absolute; + height: 2px; + width: 18px; + border-radius: 2px; + background: var(--primary-color); + display: block; + cursor: pointer; + transition: all 0.3s ease-in-out; + right: 0; +} + +.toggle span:before { + top: -6px; +} + +.toggle span:after { + bottom: -6px; +} + +.toggle.open span{ + background-color: transparent; +} + +.toggle.open span:before, +.toggle.open span:after { + top: 0; +} + +.toggle.open span:before { + transform: rotate(45deg); +} + +.toggle.open span:after { + transform: rotate(-45deg); +} + +.menu__item { + padding: 1rem; + display: inline-block; +} + +.menu__item.toggle { + display: none; +} + +/* table */ +table { + border-collapse: collapse; + width: 100%; + transition: color .3s ease-out; + margin-bottom: 2rem; +} + +table td, table th { + border: 1px solid var(--code-bg-color); + padding: 0.8rem; + font-weight: 300; +} + +table th { + text-align: left; + background-color: white; + border-color: white; + border-bottom-color: var(--code-bg-color); +} + +table td:first-child { + background-color: var(--bg-color); + font-weight: 600; +} + +@media screen and (max-width: 600px) { + nav { + grid-template-columns: 70px auto; + } + + .menu__item{ + display: none; + } + + .menu__item.toggle { + display: inline-block; + } + + .menu { + text-align: right; + padding: 0.5rem 1rem; + } + + .toggle { + display: block; + } + + .menu.responsive .menu__item:not(:first-child) { + display: block; + padding: 0 0 0.5rem 0; + } +} + +/* layout */ +.wrapper { + margin: 0 auto; + width: 70%; +} + +.footer { + text-align: center; + background-color: var(--primary-color); + padding: 2rem; + color: white; +} + +@keyframes fadeUp { + 0% { + opacity: 0; + transform: translate3d(0,30px,0); + } + 100% { + transform: translate3d(0,0,0); + } +} \ No newline at end of file diff --git a/scribbler-landing.css b/scribbler-landing.css new file mode 100755 index 0000000..fc10a90 --- /dev/null +++ b/scribbler-landing.css @@ -0,0 +1,180 @@ +/* nav specialized to landing page */ +.logo { + background: url('logo.svg') no-repeat; + background-size: contain; + margin: 1rem 0 0 1rem; +} + +nav { + background-color: var(--bg-color); +} + +/* hero section */ +.hero { + text-align: center; + background-color: var(--bg-color); + padding: 2rem 0 10rem 0; +} + +.hero__title { + font-weight: 900; + color: var(--primary-color); +} + +.hero__description { + margin: -1rem auto 2rem auto; +} + +.hero__terminal { + width: 60%; + margin: -11rem auto 3rem auto; + text-align: left; + color: white; + padding: 0 1rem; + border-radius: 4px; + background-color: #232323; + min-height: 285px; + animation: fadeUp 2s; + box-shadow: 0px 12px 36.8px 9.2px rgba(0, 0, 0, 0.1); +} + +.hero__terminal pre { + white-space: pre-line; + padding-top: 1rem; +} + +/* feature section */ +.feature { + display: flex; + flex-wrap: wrap; +} + +.feature__item { + max-width: calc(33% - 20px); + margin: 0 20px 0 0; +} + +.feature__item .section__title { + margin-bottom: 0; +} + +.feature__item p { + margin-top: 0.5rem; +} + +/* keybinding section */ +.keybinding { + margin-top: 3rem; + display: flex; +} + +.keybinding__detail { + position: relative; + border: 1px solid var(--code-bg-color); + flex-basis: 50%; + padding: 2rem 1rem 1rem 1rem; + list-style: none; + line-height: 2rem; +} + +.keybinding__detail:first-child { + text-align: right; + padding-right: 1rem; +} + +.keybinding__detail:last-child { + padding-left: 1rem; + margin-left: -1px; +} + +.keybinding__detail:first-child .keybinding__title { + position: absolute; + right: 0.5rem; + top: -2rem; + background-color: white; + padding: 0 0.5rem; +} + +.keybinding__detail:last-child .keybinding__title { + position: absolute; + left: 0.5rem; + top: -2rem; + background-color: white; + padding: 0 0.5rem; +} + +.keybinding__label { + background: var(--white-color); + border: 1px solid var(--light-gray-color); + box-shadow: 0 1px 0 0 var(--medium-gray-color); + border-radius: 3px; + font-family: Courier; + font-size: 0.7rem; + color: var(--dark-gray-color); + padding: 3px 3px 1px 3px; + vertical-align: middle; +} + +/* callout section */ +.callout { + text-align: center; + padding: 1rem 0 3rem 0; +} + +.callout .button--primary { + display: inline-block; + margin-top: 0.5rem; +} + +/* changelog section */ +.changelog { + background-color: var(--bg-color); + padding: 2rem 0; +} + +.changelog__item { + display: flex; +} + +.changelog__meta { + flex-basis: 25%; +} + +.changelog__meta small { + color: var(--primary-color-light); + font-weight: 200; + letter-spacing: 1px; +} + +.changelog__title { + margin-bottom: 0; +} + +.changelog__callout { + margin: 3rem auto 2rem auto; + text-align: center; +} + +@media (max-width: 750px) { + .hero__terminal { + width: 70%; + } + .tab__container > ul { + right: auto; + left: 0; + padding-left: 0; + } + .tab__container .code { + margin-top: 2rem; + } + .feature, .keybinding, .changelog__item { + flex-direction: column; + } + .feature__item { + max-width: 100%; + margin: 0; + } + .keybinding { + font-size: 0.8rem; + } +} \ No newline at end of file diff --git a/scribbler.js b/scribbler.js new file mode 100755 index 0000000..88def0b --- /dev/null +++ b/scribbler.js @@ -0,0 +1,146 @@ +// utilities +var get = function (selector, scope) { + scope = scope ? scope : document; + return scope.querySelector(selector); +}; + +var getAll = function (selector, scope) { + scope = scope ? scope : document; + return scope.querySelectorAll(selector); +}; + +// setup typewriter effect in the terminal demo +if (document.getElementsByClassName('demo').length > 0) { + var i = 0; + var txt = `scribbler + [Entry mode; press Ctrl+D to save and quit; press Ctrl+C to quit without saving] + + ###todo for new year dinner party + + - milk + - butter + - green onion + - lots and lots of kiwis 🥝`; + var speed = 60; + + function typeItOut () { + if (i < txt.length) { + document.getElementsByClassName('demo')[0].innerHTML += txt.charAt(i); + i++; + setTimeout(typeItOut, speed); + } + } + + setTimeout(typeItOut, 1800); +} + +// toggle tabs on codeblock +window.addEventListener("load", function() { + // get all tab_containers in the document + var tabContainers = getAll(".tab__container"); + + // bind click event to each tab container + for (var i = 0; i < tabContainers.length; i++) { + tabContainers[i].addEventListener("click", tabClick); + } + + // each click event is scoped to the tab_container + function tabClick (event) { + var scope = event.currentTarget; + var clickedTab = event.target; + var tabs = getAll('.tab', scope); + var panes = getAll('.tab__pane', scope); + var activePane = get(`.${clickedTab.getAttribute('data-tab')}`, scope); + + // remove all active tab classes + for (var i = 0; i < tabs.length; i++) { + tabs[i].classList.remove('active'); + } + + // remove all active pane classes + for (var i = 0; i < panes.length; i++) { + panes[i].classList.remove('active'); + } + + // apply active classes on desired tab and pane + clickedTab.classList.add('active'); + activePane.classList.add('active'); + } +}); + +//in page scrolling for documentaiton page +var btns = getAll('.js-btn'); +var sections = getAll('.js-section'); + +function setActiveLink(event) { + // remove all active tab classes + for (var i = 0; i < btns.length; i++) { + btns[i].classList.remove('selected'); + } + + event.target.classList.add('selected'); +} + +function smoothScrollTo(element, event) { + setActiveLink(event); + + window.scrollTo({ + 'behavior': 'smooth', + 'top': element.offsetTop - 20, + 'left': 0 + }); +} + +if (btns.length && sections.length > 0) { +// for (var i = 0; i ul'); + + if( docNav) { + if (window.pageYOffset > 63) { + docNav.classList.add('fixed'); + } else { + docNav.classList.remove('fixed'); + } + } +}); + +// responsive navigation +var topNav = document.querySelector('.menu'); +var icon = document.querySelector('.toggle'); + +window.addEventListener('load', function(){ + function showNav() { + if (topNav.className === 'menu') { + topNav.className += ' responsive'; + icon.className += ' open'; + } else { + topNav.className = 'menu'; + icon.classList.remove('open'); + } + } + icon.addEventListener('click', showNav); +}); + diff --git a/sketch/scribbler.sketch b/sketch/scribbler.sketch new file mode 100755 index 0000000..8a20af5 Binary files /dev/null and b/sketch/scribbler.sketch differ