├── .gitignore ├── .travis.yml ├── Gemfile ├── LICENSE.txt ├── README.md ├── _includes ├── calfooter.html ├── calheader.html ├── footer.html ├── head.html ├── header.html ├── icon-github.html ├── icon-github.svg ├── icon-twitter.html └── icon-twitter.svg ├── _layouts ├── default.html ├── home.html ├── log.html ├── page.html └── project-home.html ├── _sass ├── lab-notebook.scss ├── lab-notebook │ ├── _base.scss │ ├── _log.scss │ └── _tables.scss └── minima │ ├── _base.scss │ ├── _layout.scss │ └── _syntax-highlighting.scss ├── assets ├── main.scss └── simple-jekyll-search.min.js ├── demo ├── Gemfile ├── README.md ├── _config.yml ├── _posts │ ├── 2017-06 │ │ └── 2017-06-01-June.md │ ├── 2017-07 │ │ ├── 2017-07-01-July.md │ │ └── assets │ │ │ └── d7ce15fd.png │ ├── 2017-10 │ │ ├── 2017-10-01-October.md │ │ └── assets │ │ │ └── export_samples.csv │ └── 2018_02 │ │ ├── 2018-02-01-February.md │ │ └── assets │ │ └── 8ad3aebe.png ├── index.html └── protocols │ └── example-protocol.md ├── jekyll-lab-notebook.gemspec ├── screenshot.png └── screenshot2.png /.gitignore: -------------------------------------------------------------------------------- 1 | *.gem 2 | .bundle 3 | .sass-cache 4 | _site 5 | Gemfile.lock 6 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: ruby 2 | env: 3 | global: 4 | - NOKOGIRI_USE_SYSTEM_LIBRARIES=true # speeds up installation of nokogiri 5 | 6 | gemfile: demo/Gemfile 7 | 8 | script: 9 | - cd demo 10 | - bundle exec jekyll build --baseurl=/jekyll-lab-notebook 11 | - cd .. 12 | 13 | deploy: 14 | provider: pages 15 | local-dir: demo/_site/ 16 | verbose: true 17 | skip-cleanup: true 18 | github-token: $GITHUB_TOKEN # Set in travis-ci.org dashboard, marked secure 19 | keep-history: true 20 | on: 21 | branch: master 22 | 23 | sudo: false 24 | -------------------------------------------------------------------------------- /Gemfile: -------------------------------------------------------------------------------- 1 | source "https://rubygems.org" 2 | gemspec 3 | -------------------------------------------------------------------------------- /LICENSE.txt: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2017 Tamas Nagy 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # 📓 jekyll-lab-notebook 2 | 3 | [![Gem Version](https://badge.fury.io/rb/jekyll-lab-notebook.svg)](https://badge.fury.io/rb/jekyll-lab-notebook) 4 | [![Build Status](https://travis-ci.org/tlnagy/jekyll-lab-notebook.svg?branch=master)](https://travis-ci.org/tlnagy/jekyll-lab-notebook) 5 | 6 | Supercharge your electronic lab notebook! 7 | 8 | This is a full-featured jekyll theme that lets you quickly write markdown 9 | notebook entries and will create a great HTML website that you can run locally 10 | to view all your hard work. It's hackable to its core so you can tweak it to 11 | your heart's desire. Add pages, change layouts, add cool jekyll plugins, 12 | whatever; think of this as your springboard. 13 | 14 | [LIVE DEMO HERE](http://tamasnagy.com/jekyll-lab-notebook/) 15 | 16 | ![](screenshot.png) 17 | 18 | ![](screenshot2.png) 19 | 20 | ## Features 21 | 22 | - Take simple markdown notes in your favorite text editor (I recommend [Atom](https://atom.io/)) 23 | - Easily embed images, CSVs, or PDFs in your protocols/logs/wherever 24 | - Interactive calendar to show you when you had log entries 25 | - Enter your log entries chronologically, but then tag them so they show up with other entries on the same project (Multi-project tags supported too!) 26 | - Add highlighted sections (note or thought bubbles) to draw attention to important things 27 | 28 | ## Installation and Usage 29 | 30 | The `demo/` folder contains a fully functioning example ELN. Clone this repo and navigate into the `demo/` folder. Make sure you have a recent version of ruby installed and then run 31 | 32 | ``` 33 | gem install bundler 34 | ``` 35 | 36 | which will install the `bundle` package manager. Next, run 37 | 38 | ``` 39 | bundle update 40 | ``` 41 | 42 | inside the `demo/` folder, which will install all the necessary packages. Then run 43 | 44 | ``` 45 | bundle exec jekyll serve -wi 46 | ``` 47 | 48 | to actually serve the ELN and navigate to the address listed using your browser to see your ELN. Edit the posts inside the `_posts/` subdirectory to add entries. 49 | 50 | ## Contributing 51 | 52 | This project is split into two main reports 53 | 54 | - The one you're on, which is where all the layout and design stuff happens 55 | - The [plugins](https://github.com/tlnagy/jekyll-lab-notebook-plugins) repo, this where the heavy lifting happens. 56 | 57 | Bug reports and pull requests are welcome on GitHub at and at . This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct. 58 | 59 | ## Development 60 | 61 | TODO 62 | 63 | ## License 64 | 65 | The theme is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT). 66 | -------------------------------------------------------------------------------- /_includes/calfooter.html: -------------------------------------------------------------------------------- 1 | 85 | -------------------------------------------------------------------------------- /_includes/calheader.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 36 | -------------------------------------------------------------------------------- /_includes/footer.html: -------------------------------------------------------------------------------- 1 |
2 | 3 |
4 | 5 | 41 | 42 |
43 | 44 | 45 | 46 | 47 | 59 | 60 |
61 | -------------------------------------------------------------------------------- /_includes/head.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | {{ site.short-title}} | 8 | {% if page.date %}{{ page.date | date: "%B %Y" }} 9 | {% elsif page.title %}{{ page.title | escape }} 10 | {% else %}{{ site.title | escape }}{% endif %} 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /_includes/header.html: -------------------------------------------------------------------------------- 1 | 21 | -------------------------------------------------------------------------------- /_includes/icon-github.html: -------------------------------------------------------------------------------- 1 | {% include icon-github.svg %}{{ include.username }} 2 | -------------------------------------------------------------------------------- /_includes/icon-github.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /_includes/icon-twitter.html: -------------------------------------------------------------------------------- 1 | {{ include.username }} 2 | -------------------------------------------------------------------------------- /_includes/icon-twitter.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /_layouts/default.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | {% include head.html %} 5 | 6 | 7 | 8 | {% include header.html %} 9 | 10 |
11 |
12 | {{ content }} 13 |
14 |
15 | 16 | {% include footer.html %} 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /_layouts/home.html: -------------------------------------------------------------------------------- 1 | --- 2 | layout: default 3 | --- 4 | 5 | {% include calheader.html %} 6 | {% assign home-items = site.jekyll-lab-notebook.home-page %} 7 | 8 | 39 | 40 |

{{ site.description | escape }}

41 |
42 |
43 |
44 | 45 | 46 |
47 |
48 |
49 | {% if home-items %} 50 | {% for item in home-items %} 51 |

{{ item.name }}

53 |
54 | 67 |
68 | {% endfor %} 69 | {% endif %} 70 |
71 | {% include calfooter.html %} 72 | -------------------------------------------------------------------------------- /_layouts/log.html: -------------------------------------------------------------------------------- 1 | --- 2 | layout: default 3 | --- 4 |
5 | 6 |
7 |

{{ page.date | date: "%B %Y"}}

8 |
10 | 11 | {% if page.next.url or page.previous.url %} 12 |
13 | {% if page.next.url %} 14 | 15 | {% endif %} 16 | {% if page.previous.url %} 17 | 18 | {% endif %} 19 |
20 | {% endif %} 21 | 22 |
23 | {{ content | replace: '
  • [ ]', 24 | '
  • 25 | ' | 26 | replace: '
  • [x]', 27 | '
  • 28 | ' }} 29 |
  • 30 | 31 | {% if page.next.url or page.previous.url %} 32 |
    33 | {% if page.next.url %} 34 | 35 | {% endif %} 36 | {% if page.previous.url %} 37 | 38 | {% endif %} 39 |
    40 | {% endif %} 41 |
    42 | -------------------------------------------------------------------------------- /_layouts/page.html: -------------------------------------------------------------------------------- 1 | --- 2 | layout: default 3 | --- 4 |
    5 | 6 |
    7 |

    {{ page.title | escape }}

    8 |
    9 | 10 |
    11 | {{ content }} 12 |
    13 | 14 |
    15 | -------------------------------------------------------------------------------- /_layouts/project-home.html: -------------------------------------------------------------------------------- 1 | --- 2 | layout: page 3 | title: Projects 4 | --- 5 | 6 |

    All log entries organized by project

    7 | 14 | -------------------------------------------------------------------------------- /_sass/lab-notebook.scss: -------------------------------------------------------------------------------- 1 | // based on the jekyll-minima theme 2 | @charset "utf-8"; 3 | 4 | // Define defaults for each variable. 5 | 6 | $base-font-family: "Helvetica Neue", Helvetica, Arial, sans-serif !default; 7 | $base-font-size: 16px !default; 8 | $base-font-weight: 400 !default; 9 | $small-font-size: $base-font-size * 0.875 !default; 10 | $base-line-height: 1.5 !default; 11 | 12 | $spacing-unit: 30px !default; 13 | 14 | $text-color: #111 !default; 15 | $background-color: #fdfdfd !default; 16 | $brand-color: #2a7ae2 !default; 17 | 18 | $grey-color: #828282 !default; 19 | $grey-color-light: lighten($grey-color, 40%) !default; 20 | $grey-color-dark: darken($grey-color, 25%) !default; 21 | 22 | // Width of the content area 23 | $content-width: 800px !default; 24 | 25 | $on-palm: 600px !default; 26 | $on-laptop: 800px !default; 27 | 28 | // Use media queries like this: 29 | // @include media-query($on-palm) { 30 | // .wrapper { 31 | // padding-right: $spacing-unit / 2; 32 | // padding-left: $spacing-unit / 2; 33 | // } 34 | // } 35 | @mixin media-query($device) { 36 | @media screen and (max-width: $device) { 37 | @content; 38 | } 39 | } 40 | 41 | @mixin relative-font-size($ratio) { 42 | font-size: $base-font-size * $ratio; 43 | } 44 | 45 | // Import partials. 46 | @import 47 | "minima/base", 48 | "minima/layout", 49 | "minima/syntax-highlighting", 50 | "lab-notebook/base", 51 | "lab-notebook/tables", 52 | "lab-notebook/log" 53 | ; 54 | -------------------------------------------------------------------------------- /_sass/lab-notebook/_base.scss: -------------------------------------------------------------------------------- 1 | .postNav { 2 | padding: 1em 0 1em 0; 3 | margin: 1em 0 2em 0; 4 | border-top: 1px solid #e6e6e6; 5 | border-bottom: 1px solid #e6e6e6; 6 | } 7 | 8 | .postNav a{ 9 | text-transform: uppercase; 10 | // text-align: center; 11 | // padding: 2em 0 2em 0; 12 | // margin: 2em; 13 | } 14 | 15 | .postNav .prev { 16 | float: left; 17 | } 18 | 19 | .postNav .next { 20 | float: right; 21 | } 22 | 23 | .cf:before, 24 | .cf:after { 25 | content: " "; /* 1 */ 26 | display: table; /* 2 */ 27 | } 28 | 29 | .cf:after { 30 | clear: both; 31 | } 32 | 33 | #results-container { 34 | margin: 1em 0; 35 | } 36 | 37 | #results-container ul{ 38 | list-style: none; 39 | } 40 | 41 | #results-container li{ 42 | padding: 0.5em 1em; 43 | display: inline-block; 44 | } 45 | -------------------------------------------------------------------------------- /_sass/lab-notebook/_log.scss: -------------------------------------------------------------------------------- 1 | // http://blog.winddweb.info/implement-github-like-checkbox 2 | .box, 3 | .box_done, 4 | .task-list-item { 5 | list-style-type: none; 6 | } 7 | 8 | .task-list-item input { 9 | margin: 0 0.2em 0.25em -1.6em; 10 | vertical-align: middle; 11 | } 12 | 13 | .task-list-item+.task-list-item { 14 | margin-top: 3px; 15 | } 16 | 17 | .alert-info { 18 | color: #0c5460; 19 | background-color: #d1ecf1; 20 | border-color: #bee5eb; 21 | } 22 | 23 | .alert-info hr { 24 | border-top-color: #abdde5; 25 | } 26 | 27 | .alert-info .alert-link { 28 | color: #062c33; 29 | } 30 | 31 | .alert { 32 | padding: 0.75rem 1.25rem 0 1.25em; 33 | margin: 0.5em 0; 34 | border: 1px solid transparent; 35 | border-radius: 0.25rem; 36 | } 37 | 38 | .alert-heading { 39 | color: inherit; 40 | } 41 | 42 | .alert-note { 43 | color: #856404; 44 | background-color: #fff3cd; 45 | border-color: #ffeeba; 46 | } 47 | 48 | .alert-note hr { 49 | border-top-color: #ffe8a1; 50 | } 51 | 52 | .alert-note .alert-link { 53 | color: #533f03; 54 | } 55 | 56 | #calendar { 57 | padding-bottom: 1.5rem; 58 | } 59 | 60 | .pdf-wrapper { 61 | padding: 2rem 0; 62 | } 63 | 64 | .pdf-wrapper embed{ 65 | display: inline-block; 66 | height: 500px; 67 | width: 100%; 68 | } 69 | 70 | .pdf-wrapper .caption{ 71 | display: table; 72 | margin: 0 auto; 73 | } 74 | 75 | .post-content img{ 76 | max-height: 400px; 77 | display: block; 78 | margin-left: auto; 79 | margin-right: auto; 80 | } 81 | -------------------------------------------------------------------------------- /_sass/lab-notebook/_tables.scss: -------------------------------------------------------------------------------- 1 | // table code stolen from here: http://johnsardine.com/freebies/dl-html-css/simple-little-tab/ 2 | table a:link { 3 | color: #666; 4 | font-weight: bold; 5 | text-decoration:none; 6 | } 7 | table a:visited { 8 | color: #999999; 9 | font-weight:bold; 10 | text-decoration:none; 11 | } 12 | table a:active, 13 | table a:hover { 14 | color: #bd5a35; 15 | text-decoration:underline; 16 | } 17 | table { 18 | color:#666; 19 | @include relative-font-size(0.8); 20 | text-shadow: 1px 1px 0px #fff; 21 | background:#eaebec; 22 | border:#ccc 1px solid; 23 | margin: 0em auto 2em auto; 24 | 25 | -moz-border-radius:3px; 26 | -webkit-border-radius:3px; 27 | border-radius:3px; 28 | 29 | -moz-box-shadow: 0 1px 2px #d1d1d1; 30 | -webkit-box-shadow: 0 1px 2px #d1d1d1; 31 | box-shadow: 0 1px 2px #d1d1d1; 32 | } 33 | table th { 34 | // padding:10px 12px 10px 12px; 35 | border-top:1px solid #fafafa; 36 | border-bottom:1px solid #e0e0e0; 37 | 38 | background: #ededed; 39 | background: -webkit-gradient(linear, left top, left bottom, from(#ededed), to(#ebebeb)); 40 | background: -moz-linear-gradient(top, #ededed, #ebebeb); 41 | } 42 | table th:first-child { 43 | text-align: left; 44 | padding-left:10px; 45 | } 46 | table tr:first-child th:first-child { 47 | -moz-border-radius-topleft:3px; 48 | -webkit-border-top-left-radius:3px; 49 | border-top-left-radius:3px; 50 | } 51 | table tr:first-child th:last-child { 52 | -moz-border-radius-topright:3px; 53 | -webkit-border-top-right-radius:3px; 54 | border-top-right-radius:3px; 55 | } 56 | table tr { 57 | text-align: center; 58 | padding-left:10px; 59 | } 60 | table td:first-child { 61 | text-align: left; 62 | padding-left:10px; 63 | border-left: 0; 64 | } 65 | table td { 66 | padding:9px; 67 | border-top: 1px solid #ffffff; 68 | border-bottom:1px solid #e0e0e0; 69 | border-left: 1px solid #e0e0e0; 70 | 71 | background: #fafafa; 72 | background: -webkit-gradient(linear, left top, left bottom, from(#fbfbfb), to(#fafafa)); 73 | background: -moz-linear-gradient(top, #fbfbfb, #fafafa); 74 | } 75 | table tr.even td { 76 | background: #f6f6f6; 77 | background: -webkit-gradient(linear, left top, left bottom, from(#f8f8f8), to(#f6f6f6)); 78 | background: -moz-linear-gradient(top, #f8f8f8, #f6f6f6); 79 | } 80 | table tr:last-child td { 81 | border-bottom:0; 82 | } 83 | table tr:last-child td:first-child { 84 | -moz-border-radius-bottomleft:3px; 85 | -webkit-border-bottom-left-radius:3px; 86 | border-bottom-left-radius:3px; 87 | } 88 | table tr:last-child td:last-child { 89 | -moz-border-radius-bottomright:3px; 90 | -webkit-border-bottom-right-radius:3px; 91 | border-bottom-right-radius:3px; 92 | } 93 | table tr:hover td { 94 | background: #f2f2f2; 95 | background: -webkit-gradient(linear, left top, left bottom, from(#f2f2f2), to(#f0f0f0)); 96 | background: -moz-linear-gradient(top, #f2f2f2, #f0f0f0); 97 | } 98 | -------------------------------------------------------------------------------- /_sass/minima/_base.scss: -------------------------------------------------------------------------------- 1 | /** 2 | * Reset some basic elements 3 | */ 4 | body, h1, h2, h3, h4, h5, h6, 5 | p, blockquote, pre, hr, 6 | dl, dd, ol, ul, figure { 7 | margin: 0; 8 | padding: 0; 9 | } 10 | 11 | 12 | 13 | /** 14 | * Basic styling 15 | */ 16 | body { 17 | font: $base-font-weight #{$base-font-size}/#{$base-line-height} $base-font-family; 18 | color: $text-color; 19 | background-color: $background-color; 20 | -webkit-text-size-adjust: 100%; 21 | -webkit-font-feature-settings: "kern" 1; 22 | -moz-font-feature-settings: "kern" 1; 23 | -o-font-feature-settings: "kern" 1; 24 | font-feature-settings: "kern" 1; 25 | font-kerning: normal; 26 | } 27 | 28 | 29 | 30 | /** 31 | * Set `margin-bottom` to maintain vertical rhythm 32 | */ 33 | h1, h2, h3, h4, h5, h6, 34 | p, blockquote, pre, 35 | ul, ol, dl, figure, 36 | %vertical-rhythm { 37 | margin-bottom: $spacing-unit / 2; 38 | } 39 | 40 | 41 | 42 | /** 43 | * Images 44 | */ 45 | img { 46 | max-width: 100%; 47 | vertical-align: middle; 48 | } 49 | 50 | 51 | 52 | /** 53 | * Figures 54 | */ 55 | figure > img { 56 | display: block; 57 | } 58 | 59 | figcaption { 60 | font-size: $small-font-size; 61 | } 62 | 63 | 64 | 65 | /** 66 | * Lists 67 | */ 68 | ul, ol { 69 | margin-left: $spacing-unit; 70 | } 71 | 72 | li { 73 | > ul, 74 | > ol { 75 | margin-bottom: 0; 76 | } 77 | } 78 | 79 | 80 | 81 | /** 82 | * Headings 83 | */ 84 | h1, h2, h3, h4, h5, h6 { 85 | font-weight: $base-font-weight; 86 | } 87 | 88 | 89 | 90 | /** 91 | * Links 92 | */ 93 | a { 94 | color: $brand-color; 95 | text-decoration: none; 96 | 97 | &:visited { 98 | color: darken($brand-color, 15%); 99 | } 100 | 101 | &:hover { 102 | color: $text-color; 103 | text-decoration: underline; 104 | } 105 | 106 | .social-media-list &:hover { 107 | text-decoration: none; 108 | 109 | .username { 110 | text-decoration: underline; 111 | } 112 | } 113 | } 114 | 115 | 116 | /** 117 | * Blockquotes 118 | */ 119 | blockquote { 120 | color: $grey-color; 121 | border-left: 4px solid $grey-color-light; 122 | padding-left: $spacing-unit / 2; 123 | @include relative-font-size(1.125); 124 | letter-spacing: -1px; 125 | font-style: italic; 126 | 127 | > :last-child { 128 | margin-bottom: 0; 129 | } 130 | } 131 | 132 | 133 | 134 | /** 135 | * Code formatting 136 | */ 137 | pre, 138 | code { 139 | @include relative-font-size(0.9375); 140 | border: 1px solid $grey-color-light; 141 | border-radius: 3px; 142 | background-color: #eef; 143 | } 144 | 145 | code { 146 | padding: 1px 5px; 147 | } 148 | 149 | pre { 150 | padding: 8px 12px; 151 | overflow-x: auto; 152 | 153 | > code { 154 | border: 0; 155 | padding-right: 0; 156 | padding-left: 0; 157 | } 158 | } 159 | 160 | 161 | 162 | /** 163 | * Wrapper 164 | */ 165 | .wrapper { 166 | max-width: -webkit-calc(#{$content-width} - (#{$spacing-unit} * 2)); 167 | max-width: calc(#{$content-width} - (#{$spacing-unit} * 2)); 168 | margin-right: auto; 169 | margin-left: auto; 170 | padding-right: $spacing-unit; 171 | padding-left: $spacing-unit; 172 | @extend %clearfix; 173 | 174 | @include media-query($on-laptop) { 175 | max-width: -webkit-calc(#{$content-width} - (#{$spacing-unit})); 176 | max-width: calc(#{$content-width} - (#{$spacing-unit})); 177 | padding-right: $spacing-unit / 2; 178 | padding-left: $spacing-unit / 2; 179 | } 180 | } 181 | 182 | 183 | 184 | /** 185 | * Clearfix 186 | */ 187 | %clearfix:after { 188 | content: ""; 189 | display: table; 190 | clear: both; 191 | } 192 | 193 | 194 | 195 | /** 196 | * Icons 197 | */ 198 | .icon > svg { 199 | display: inline-block; 200 | vertical-align: middle; 201 | 202 | path { 203 | fill: $grey-color; 204 | } 205 | } 206 | 207 | .social-media-list { 208 | .icon { 209 | padding-right: 5px; 210 | } 211 | 212 | li + li { 213 | padding-top: 5px; 214 | } 215 | } 216 | -------------------------------------------------------------------------------- /_sass/minima/_layout.scss: -------------------------------------------------------------------------------- 1 | /** 2 | * Site header 3 | */ 4 | .site-header { 5 | border-top: 5px solid $grey-color-dark; 6 | border-bottom: 1px solid $grey-color-light; 7 | min-height: $spacing-unit * 1.865; 8 | 9 | // Positioning context for the mobile navigation icon 10 | position: relative; 11 | } 12 | 13 | .site-title { 14 | @include relative-font-size(1.625); 15 | font-weight: 300; 16 | line-height: $base-line-height * $base-font-size * 2.25; 17 | letter-spacing: -1px; 18 | margin-bottom: 0; 19 | float: left; 20 | 21 | &, 22 | &:visited { 23 | color: $grey-color-dark; 24 | } 25 | } 26 | 27 | .site-nav { 28 | float: right; 29 | line-height: $base-line-height * $base-font-size * 2.25; 30 | 31 | .nav-trigger { 32 | display: none; 33 | } 34 | 35 | .menu-icon { 36 | display: none; 37 | } 38 | 39 | .page-link { 40 | color: $text-color; 41 | line-height: $base-line-height; 42 | 43 | // Gaps between nav items, but not on the last one 44 | &:not(:last-child) { 45 | margin-right: 20px; 46 | } 47 | } 48 | 49 | @include media-query($on-palm) { 50 | position: absolute; 51 | top: 9px; 52 | right: $spacing-unit / 2; 53 | background-color: $background-color; 54 | border: 1px solid $grey-color-light; 55 | border-radius: 5px; 56 | text-align: right; 57 | 58 | label[for="nav-trigger"] { 59 | display: block; 60 | float: right; 61 | width: 36px; 62 | height: 36px; 63 | z-index: 2; 64 | cursor: pointer; 65 | } 66 | 67 | .menu-icon { 68 | display: block; 69 | float: right; 70 | width: 36px; 71 | height: 26px; 72 | line-height: 0; 73 | padding-top: 10px; 74 | text-align: center; 75 | 76 | > svg path { 77 | fill: $grey-color-dark; 78 | } 79 | } 80 | 81 | input ~ .trigger { 82 | clear: both; 83 | display: none; 84 | } 85 | 86 | input:checked ~ .trigger { 87 | display: block; 88 | padding-bottom: 5px; 89 | } 90 | 91 | .page-link { 92 | display: block; 93 | padding: 5px 10px; 94 | 95 | &:not(:last-child) { 96 | margin-right: 0; 97 | } 98 | margin-left: 20px; 99 | } 100 | } 101 | } 102 | 103 | 104 | 105 | /** 106 | * Site footer 107 | */ 108 | .site-footer { 109 | border-top: 1px solid $grey-color-light; 110 | padding: $spacing-unit 0; 111 | } 112 | 113 | .footer-heading { 114 | @include relative-font-size(1.125); 115 | margin-bottom: $spacing-unit / 2; 116 | } 117 | 118 | .contact-list, 119 | .social-media-list { 120 | list-style: none; 121 | margin-left: 0; 122 | } 123 | 124 | .footer-col-wrapper { 125 | @include relative-font-size(0.9375); 126 | color: $grey-color; 127 | margin-left: -$spacing-unit / 2; 128 | @extend %clearfix; 129 | } 130 | 131 | .footer-col { 132 | float: left; 133 | margin-bottom: $spacing-unit / 2; 134 | padding-left: $spacing-unit / 2; 135 | } 136 | 137 | .footer-col-1 { 138 | width: -webkit-calc(35% - (#{$spacing-unit} / 2)); 139 | width: calc(35% - (#{$spacing-unit} / 2)); 140 | } 141 | 142 | .footer-col-2 { 143 | width: -webkit-calc(20% - (#{$spacing-unit} / 2)); 144 | width: calc(20% - (#{$spacing-unit} / 2)); 145 | } 146 | 147 | .footer-col-3 { 148 | width: -webkit-calc(45% - (#{$spacing-unit} / 2)); 149 | width: calc(45% - (#{$spacing-unit} / 2)); 150 | } 151 | 152 | @include media-query($on-laptop) { 153 | .footer-col-1, 154 | .footer-col-2 { 155 | width: -webkit-calc(50% - (#{$spacing-unit} / 2)); 156 | width: calc(50% - (#{$spacing-unit} / 2)); 157 | } 158 | 159 | .footer-col-3 { 160 | width: -webkit-calc(100% - (#{$spacing-unit} / 2)); 161 | width: calc(100% - (#{$spacing-unit} / 2)); 162 | } 163 | } 164 | 165 | @include media-query($on-palm) { 166 | .footer-col { 167 | float: none; 168 | width: -webkit-calc(100% - (#{$spacing-unit} / 2)); 169 | width: calc(100% - (#{$spacing-unit} / 2)); 170 | } 171 | } 172 | 173 | 174 | 175 | /** 176 | * Page content 177 | */ 178 | .page-content { 179 | padding: $spacing-unit 0; 180 | } 181 | 182 | .page-heading { 183 | @include relative-font-size(1.25); 184 | } 185 | 186 | .post-list { 187 | margin-left: 0; 188 | list-style: none; 189 | 190 | > li { 191 | margin-bottom: $spacing-unit; 192 | } 193 | } 194 | 195 | .post-meta { 196 | font-size: $small-font-size; 197 | color: $grey-color; 198 | } 199 | 200 | .post-link { 201 | display: block; 202 | @include relative-font-size(1.5); 203 | } 204 | 205 | 206 | 207 | /** 208 | * Posts 209 | */ 210 | .post-header { 211 | margin-bottom: $spacing-unit; 212 | } 213 | 214 | .post-title { 215 | @include relative-font-size(2.625); 216 | letter-spacing: -1px; 217 | line-height: 1; 218 | 219 | @include media-query($on-laptop) { 220 | @include relative-font-size(2.25); 221 | } 222 | } 223 | 224 | .post-content { 225 | margin-bottom: $spacing-unit; 226 | 227 | h2 { 228 | @include relative-font-size(2); 229 | 230 | @include media-query($on-laptop) { 231 | @include relative-font-size(1.75); 232 | } 233 | } 234 | 235 | h3 { 236 | @include relative-font-size(1.625); 237 | 238 | @include media-query($on-laptop) { 239 | @include relative-font-size(1.375); 240 | } 241 | } 242 | 243 | h4 { 244 | @include relative-font-size(1.25); 245 | 246 | @include media-query($on-laptop) { 247 | @include relative-font-size(1.125); 248 | } 249 | } 250 | } 251 | -------------------------------------------------------------------------------- /_sass/minima/_syntax-highlighting.scss: -------------------------------------------------------------------------------- 1 | /** 2 | * Syntax highlighting styles 3 | */ 4 | .highlight { 5 | background: #fff; 6 | @extend %vertical-rhythm; 7 | 8 | .highlighter-rouge & { 9 | background: #eef; 10 | } 11 | 12 | .c { color: #998; font-style: italic } // Comment 13 | .err { color: #a61717; background-color: #e3d2d2 } // Error 14 | .k { font-weight: bold } // Keyword 15 | .o { font-weight: bold } // Operator 16 | .cm { color: #998; font-style: italic } // Comment.Multiline 17 | .cp { color: #999; font-weight: bold } // Comment.Preproc 18 | .c1 { color: #998; font-style: italic } // Comment.Single 19 | .cs { color: #999; font-weight: bold; font-style: italic } // Comment.Special 20 | .gd { color: #000; background-color: #fdd } // Generic.Deleted 21 | .gd .x { color: #000; background-color: #faa } // Generic.Deleted.Specific 22 | .ge { font-style: italic } // Generic.Emph 23 | .gr { color: #a00 } // Generic.Error 24 | .gh { color: #999 } // Generic.Heading 25 | .gi { color: #000; background-color: #dfd } // Generic.Inserted 26 | .gi .x { color: #000; background-color: #afa } // Generic.Inserted.Specific 27 | .go { color: #888 } // Generic.Output 28 | .gp { color: #555 } // Generic.Prompt 29 | .gs { font-weight: bold } // Generic.Strong 30 | .gu { color: #aaa } // Generic.Subheading 31 | .gt { color: #a00 } // Generic.Traceback 32 | .kc { font-weight: bold } // Keyword.Constant 33 | .kd { font-weight: bold } // Keyword.Declaration 34 | .kp { font-weight: bold } // Keyword.Pseudo 35 | .kr { font-weight: bold } // Keyword.Reserved 36 | .kt { color: #458; font-weight: bold } // Keyword.Type 37 | .m { color: #099 } // Literal.Number 38 | .s { color: #d14 } // Literal.String 39 | .na { color: #008080 } // Name.Attribute 40 | .nb { color: #0086B3 } // Name.Builtin 41 | .nc { color: #458; font-weight: bold } // Name.Class 42 | .no { color: #008080 } // Name.Constant 43 | .ni { color: #800080 } // Name.Entity 44 | .ne { color: #900; font-weight: bold } // Name.Exception 45 | .nf { color: #900; font-weight: bold } // Name.Function 46 | .nn { color: #555 } // Name.Namespace 47 | .nt { color: #000080 } // Name.Tag 48 | .nv { color: #008080 } // Name.Variable 49 | .ow { font-weight: bold } // Operator.Word 50 | .w { color: #bbb } // Text.Whitespace 51 | .mf { color: #099 } // Literal.Number.Float 52 | .mh { color: #099 } // Literal.Number.Hex 53 | .mi { color: #099 } // Literal.Number.Integer 54 | .mo { color: #099 } // Literal.Number.Oct 55 | .sb { color: #d14 } // Literal.String.Backtick 56 | .sc { color: #d14 } // Literal.String.Char 57 | .sd { color: #d14 } // Literal.String.Doc 58 | .s2 { color: #d14 } // Literal.String.Double 59 | .se { color: #d14 } // Literal.String.Escape 60 | .sh { color: #d14 } // Literal.String.Heredoc 61 | .si { color: #d14 } // Literal.String.Interpol 62 | .sx { color: #d14 } // Literal.String.Other 63 | .sr { color: #009926 } // Literal.String.Regex 64 | .s1 { color: #d14 } // Literal.String.Single 65 | .ss { color: #990073 } // Literal.String.Symbol 66 | .bp { color: #999 } // Name.Builtin.Pseudo 67 | .vc { color: #008080 } // Name.Variable.Class 68 | .vg { color: #008080 } // Name.Variable.Global 69 | .vi { color: #008080 } // Name.Variable.Instance 70 | .il { color: #099 } // Literal.Number.Integer.Long 71 | } 72 | -------------------------------------------------------------------------------- /assets/main.scss: -------------------------------------------------------------------------------- 1 | --- 2 | # Needs empty front matter to work 3 | --- 4 | 5 | @import "lab-notebook"; 6 | -------------------------------------------------------------------------------- /assets/simple-jekyll-search.min.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * Simple-Jekyll-Search v1.6.0 (https://github.com/christian-fei/Simple-Jekyll-Search) 3 | * Copyright 2015-2017, Christian Fei 4 | * Licensed under the MIT License. 5 | */ 6 | !function(){"use strict";function e(e){return Boolean(e)&&"[object Object]"===Object.prototype.toString.call(e)}function t(e){return a.push(e),a}var n={load:function(e,t){var n=window.XMLHttpRequest?new XMLHttpRequest:new ActiveXObject("Microsoft.XMLHTTP");n.open("GET",e,!0),n.onreadystatechange=function(e,t){return function(){if(4===e.readyState&&200===e.status)try{t(null,JSON.parse(e.responseText))}catch(n){t(n,null)}}}(n,t),n.send()}},r=function(e,t){var n=t.length,r=e.length;if(r>n)return!1;if(r===n)return e===t;e:for(var i=0,o=0;i=0}},u={put:function(n){return e(n)?t(n):function(e){return Boolean(e)&&"[object Array]"===Object.prototype.toString.call(e)}(n)?function(n){for(var r=[],i=0,o=n.length;i0})(e)&&function(e){var t=e.length;if(0===t)return r(a.noResultsText);for(var n=0;n{title}',templateMiddleware:function(){},noResultsText:"No results found",limit:10,fuzzy:!1,exclude:[]},l=["searchInput","resultsContainer","json"],f=function p(e){if(!function(e){return!!e&&"undefined"!=typeof e.required&&e.required instanceof Array}(e))throw new Error("-- OptionsValidator: required options missing");if(!(this instanceof p))return new p(e);var t=e.required;this.getRequiredOptions=function(){return t},this.validate=function(e){var n=[];return t.forEach(function(t){"undefined"==typeof e[t]&&n.push(t)}),n}}({required:l});e.SimpleJekyllSearch=function(e){return f.validate(e).length>0&&o("You must specify the following required options: "+l),a=s.merge(a,e),c.setOptions({template:a.searchResultTemplate,middleware:a.templateMiddleware}),u.setOptions({fuzzy:a.fuzzy,limit:a.limit}),s.isJSON(a.json)?t(a.json):function(e){n.load(e,function(n,r){n&&o("failed to get JSON ("+e+")"),t(r)})}(a.json),{search:i}},e.SimpleJekyllSearch.init=e.SimpleJekyllSearch,"function"==typeof e.SimpleJekyllSearchInit&&e.SimpleJekyllSearchInit.call(this,e.SimpleJekyllSearch)}(window)}(); 7 | -------------------------------------------------------------------------------- /demo/Gemfile: -------------------------------------------------------------------------------- 1 | source 'https://rubygems.org' 2 | 3 | gem 'jekyll' 4 | gem 'jekyll-paginate' 5 | gem 'kramdown-parser-gfm' 6 | gem 'pygments.rb' 7 | gem 'jekyll-lab-notebook' 8 | gem 'jekyll-lab-notebook-plugins' 9 | 10 | # support for auto reloading page in browser when changed 11 | group :jekyll_plugins do 12 | gem 'jekyll-livereload' 13 | end 14 | -------------------------------------------------------------------------------- /demo/README.md: -------------------------------------------------------------------------------- 1 | # eln-example 2 | 3 | An example eln created using the [jekyll-lab-notebook](https://github.com/tlnagy/jekyll-lab-notebook) infrastructure 4 | 5 | ## Layout 6 | 7 | ### Log entries 8 | 9 | The default setup is to have a separate notebook entries every month with a separate folder for each month. These folders live inside the `_posts/` folder. Each month folder has a single markdown file with the following name: `YYYY-MM-DD-title.md` where title can be anything you want. You can put any images and assets in the month folder or in sub-folders and these will be associated with your month post. 10 | 11 | Log entries have to have the following as the first couple lines in the file: 12 | ``` 13 | --- 14 | layout: log 15 | --- 16 | ``` 17 | and then you can follow them with day entries like so 18 | 19 | ``` 20 | # 2017.07.19 21 | ``` 22 | you can also tag day entries with project tags like so 23 | 24 | ``` 25 | # 2017.07.19 #project1 #fancy-project2 26 | ``` 27 | and then this post will be grouped with other day entries that also have the same project tags. 28 | 29 | ## Installation 30 | 31 | ### Requirements 32 | 33 | You'll need a recent version of [Ruby](https://www.ruby-lang.org/en/documentation/installation/#package-management-systems). The best way of installing it is via your favorite package manager (e.g. [brew](https://brew.sh/) for macOS or zypper on openSUSE) or via the [RubyInstaller](https://rubyinstaller.org) on Windows. Then install `bundler` and `jekyll` by running the following command in the terminal: 34 | 35 | ``` 36 | gem install bundler jekyll 37 | ``` 38 | 39 | ### Instructions 40 | 41 | Clone this repository (or just download it) by running 42 | 43 | ``` 44 | git clone https://github.com/tlnagy/eln-example.git 45 | ``` 46 | 47 | and make sure to have `ruby`, `bundler`, and `jekyll` installed (see above). Navigate to the `eln-example` folder and run 48 | 49 | ``` 50 | bundle update 51 | ``` 52 | 53 | which will install all the dependencies necessary for this project and then run 54 | 55 | ``` 56 | bundle exec jekyll serve -wi 57 | ``` 58 | 59 | to build and serve your website. Point your browser to the address that jekyll specifies to see your eln. 60 | -------------------------------------------------------------------------------- /demo/_config.yml: -------------------------------------------------------------------------------- 1 | title: Example ELN 2 | short-title: ELN # this prepended to the page title 3 | author: Your Name 4 | website: https://github.com/tlnagy/jekyll-lab-notebook 5 | description: > 6 | This is a live demo of the jekyll-lab-notebook software. 7 | 8 | twitter_username: example 9 | github_username: example 10 | 11 | permalink: /log/:year_:month/ 12 | 13 | # Build settings 14 | markdown: kramdown 15 | theme: jekyll-lab-notebook 16 | 17 | plugins: 18 | - jekyll-lab-notebook-plugins 19 | 20 | jekyll-lab-notebook: 21 | home-page: 22 | - 23 | name: Log 24 | is_posts: true 25 | hidden: false 26 | - 27 | name: Protocols 28 | dir: 'protocols/' 29 | hidden: true 30 | - 31 | name: Miscellaneous 32 | dir: 'random/' 33 | hidden: true 34 | 35 | # live reload options 36 | livereload: true 37 | reload_port: 5678 38 | 39 | # prevent jekyll from exploding on Travis 40 | exclude: [vendor] 41 | -------------------------------------------------------------------------------- /demo/_posts/2017-06/2017-06-01-June.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: log 3 | --- 4 | 5 | # 17.06.10 #misc 6 | 7 | - I just started in the lab! 8 | -------------------------------------------------------------------------------- /demo/_posts/2017-07/2017-07-01-July.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: log 3 | --- 4 | 5 | # 2017.07.18 #test 6 | 7 | - Maybe I should have done something today? 8 | 9 | ![This is a cool picture](assets/d7ce15fd.png) 10 | 11 | # 2017.07.19 #test #test2 12 | 13 | - [ ] Write my first log entry 14 | - [ ] Second thing to do 15 | 16 | {% note Don't forget to take notes %} 17 | 18 | - [ ] Another thing to do 19 | 20 | {% thought This is a thought %} 21 | -------------------------------------------------------------------------------- /demo/_posts/2017-07/assets/d7ce15fd.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tlnagy/jekyll-lab-notebook/2f26a257a9cd8b7d7f0c377b266aaa01cde889a2/demo/_posts/2017-07/assets/d7ce15fd.png -------------------------------------------------------------------------------- /demo/_posts/2017-10/2017-10-01-October.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: log 3 | --- 4 | 5 | # 2017.10.04 6 | 7 | Add an example of embedding csvs to the demo! 8 | 9 | {% embedcsv assets/export_samples.csv %} 10 | -------------------------------------------------------------------------------- /demo/_posts/2017-10/assets/export_samples.csv: -------------------------------------------------------------------------------- 1 | Shorthand,Sample name,Sample type,Sample group,Added on,Added by 2 | 1,t0,No sample type,control,02.02.2017 23:53,Tamas 3 | 2,t1,No sample type,control,02.02.2017 23:55,Tamas 4 | 3,t1,No sample type,exp replicate 1,02.02.2017 23:55,Tamas 5 | 4,t1,No sample type,exp replicate 2,02.02.2017 23:56,Tamas 6 | 5,t2,No sample type,control,02.02.2017 23:56,Tamas 7 | 6,t2,No sample type,exp replicate 1,02.02.2017 23:57,Tamas 8 | 7,t2,No sample type,exp replicate 2,02.02.2017 23:57,Tamas 9 | -------------------------------------------------------------------------------- /demo/_posts/2018_02/2018-02-01-February.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: log 3 | --- 4 | 5 | # 2018.02.21 #meta #test2 6 | 7 | - [x] Finally got around to deploying the live demo! 8 | 9 | {% note All of the daily log entries live in the [`_posts/`](https://github.com/tlnagy/jekyll-lab-notebook/tree/master/demo/_posts) folder. There's a folder for each month. Each month-folder contains one file named `YYYY-MM-DD-XXXX.md` where `XXXX` is some arbitrary name. This was a compromise because having a single file for each day is annoying for looking back and forth and having to create new files all the time. Also having a single file per year leads to an unwieldy, monster markdown file. %} 10 | 11 | - You can also tag daily entries with project names like `#meta` or `#test2`. These project names cannot have spaces. You can see posts categorized according to these tags under [Projects](../../projects/). It looks something like this: 12 | 13 | ``` 14 | # 2018.02.21 #meta #test2 15 | ``` 16 | 17 | #### Section 18 | 19 | - You can have sections and images 20 | 21 | {% thought 22 | 23 | ![](assets/8ad3aebe.png) 24 | 25 | This is an image inside of a thought bubble 26 | 27 | > This is a quote 28 | 29 | More thoughts %} 30 | 31 | - You can use my plugin for Atom, [`atom-markdown-image-assistant`](https://github.com/tlnagy/atom-markdown-image-assistant) to quickly insert images into your lab notebook. 32 | 33 | - You can also include nice formatted code: 34 | 35 | ```julia 36 | f(x) = x + x^2 37 | 38 | """ 39 | This is a Julia function 40 | """ 41 | function g() 42 | result = 0 43 | for i in 1:1000 44 | result += f(i) 45 | end 46 | result 47 | end 48 | ``` 49 | -------------------------------------------------------------------------------- /demo/_posts/2018_02/assets/8ad3aebe.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tlnagy/jekyll-lab-notebook/2f26a257a9cd8b7d7f0c377b266aaa01cde889a2/demo/_posts/2018_02/assets/8ad3aebe.png -------------------------------------------------------------------------------- /demo/index.html: -------------------------------------------------------------------------------- 1 | --- 2 | layout: home 3 | # nothing else is needed here. Create _layouts/home.html to override the 4 | # default layout 5 | --- 6 | -------------------------------------------------------------------------------- /demo/protocols/example-protocol.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: page 3 | title: Example protocol 4 | --- 5 | 6 | 1. Step 1 7 | 2. Step 2 8 | {% note Step 2 is very important for reasons %} 9 | 3. Step 3 10 | -------------------------------------------------------------------------------- /jekyll-lab-notebook.gemspec: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | Gem::Specification.new do |spec| 4 | spec.name = "jekyll-lab-notebook" 5 | spec.version = "0.1.8" 6 | spec.authors = ["Tamas Nagy"] 7 | spec.email = ["tamas@tamasnagy.com"] 8 | 9 | spec.summary = "A full-feature electronic lab notebook theme/engine for Jekyll" 10 | spec.homepage = "https://github.com/tlnagy/jekyll-lab-notebook" 11 | spec.license = "MIT" 12 | 13 | spec.files = `git ls-files -z`.split("\x0").select do |f| 14 | f.match(%r{^(assets|_(includes|layouts|sass)/|(LICENSE|README)((\.(txt|md|markdown)|$)))}i) 15 | end 16 | 17 | spec.add_runtime_dependency "jekyll", "~> 3" 18 | 19 | spec.add_development_dependency "bundler", "~> 2.1" 20 | spec.add_development_dependency "rake", ">= 12.3.3" 21 | 22 | end 23 | -------------------------------------------------------------------------------- /screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tlnagy/jekyll-lab-notebook/2f26a257a9cd8b7d7f0c377b266aaa01cde889a2/screenshot.png -------------------------------------------------------------------------------- /screenshot2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tlnagy/jekyll-lab-notebook/2f26a257a9cd8b7d7f0c377b266aaa01cde889a2/screenshot2.png --------------------------------------------------------------------------------