├── .gitignore ├── Gemfile ├── Gemfile.lock ├── LICENSE.txt ├── README.md ├── config.rb └── source ├── _footer.html.erb ├── _header.html.erb ├── about.html.erb ├── images ├── background.png └── middleman.png ├── index.html.erb ├── javascripts ├── all.js ├── chart.js └── main.js ├── layouts └── layout.erb ├── photovoltaic └── index.html.erb ├── smartmeter └── index.html.erb ├── stylesheets ├── all.css ├── custom.css ├── normalize.css └── sticky-footer-navbar.css └── temperatures ├── _temp_menu.html.erb ├── humidity.html.erb └── index.html.erb /.gitignore: -------------------------------------------------------------------------------- 1 | # See http://help.github.com/ignore-files/ for more about ignoring files. 2 | # 3 | # If you find yourself ignoring temporary files generated by your text editor 4 | # or operating system, you probably want to add a global ignore instead: 5 | # git config --global core.excludesfile ~/.gitignore_global 6 | 7 | # Ignore bundler config 8 | /.bundle 9 | 10 | # Ignore the build directory 11 | /build 12 | 13 | # Ignore Sass' cache 14 | /.sass-cache 15 | 16 | # Ignore .DS_store file 17 | .DS_Store 18 | -------------------------------------------------------------------------------- /Gemfile: -------------------------------------------------------------------------------- 1 | # If you have OpenSSL installed, we recommend updating 2 | # the following line to use "https" 3 | source 'https://rubygems.org' 4 | 5 | gem 'middleman', '~>3.4.1' 6 | 7 | # Live-reloading plugin 8 | gem 'middleman-livereload', '~> 3.4.2' 9 | 10 | # For faster file watcher updates on Windows: 11 | gem 'wdm', '~> 0.1.0', :platforms => [:mswin, :mingw] 12 | 13 | # deployment 14 | gem 'middleman-deploy', '~> 1.0' -------------------------------------------------------------------------------- /Gemfile.lock: -------------------------------------------------------------------------------- 1 | GEM 2 | remote: https://rubygems.org/ 3 | specs: 4 | activesupport (4.2.5) 5 | i18n (~> 0.7) 6 | json (~> 1.7, >= 1.7.7) 7 | minitest (~> 5.1) 8 | thread_safe (~> 0.3, >= 0.3.4) 9 | tzinfo (~> 1.1) 10 | capybara (2.4.4) 11 | mime-types (>= 1.16) 12 | nokogiri (>= 1.3.3) 13 | rack (>= 1.0.0) 14 | rack-test (>= 0.5.4) 15 | xpath (~> 2.0) 16 | chunky_png (1.3.5) 17 | coffee-script (2.4.1) 18 | coffee-script-source 19 | execjs 20 | coffee-script-source (1.10.0) 21 | compass (1.0.3) 22 | chunky_png (~> 1.2) 23 | compass-core (~> 1.0.2) 24 | compass-import-once (~> 1.0.5) 25 | rb-fsevent (>= 0.9.3) 26 | rb-inotify (>= 0.9) 27 | sass (>= 3.3.13, < 3.5) 28 | compass-core (1.0.3) 29 | multi_json (~> 1.0) 30 | sass (>= 3.3.0, < 3.5) 31 | compass-import-once (1.0.5) 32 | sass (>= 3.2, < 3.5) 33 | em-websocket (0.5.1) 34 | eventmachine (>= 0.12.9) 35 | http_parser.rb (~> 0.6.0) 36 | erubis (2.7.0) 37 | eventmachine (1.0.8) 38 | execjs (2.6.0) 39 | ffi (1.9.10) 40 | haml (4.0.7) 41 | tilt 42 | hike (1.2.3) 43 | hooks (0.4.1) 44 | uber (~> 0.0.14) 45 | http_parser.rb (0.6.0) 46 | i18n (0.7.0) 47 | json (1.8.3) 48 | kramdown (1.9.0) 49 | listen (3.0.5) 50 | rb-fsevent (>= 0.9.3) 51 | rb-inotify (>= 0.9) 52 | middleman (3.4.1) 53 | coffee-script (~> 2.2) 54 | compass (>= 1.0.0, < 2.0.0) 55 | compass-import-once (= 1.0.5) 56 | execjs (~> 2.0) 57 | haml (>= 4.0.5) 58 | kramdown (~> 1.2) 59 | middleman-core (= 3.4.1) 60 | middleman-sprockets (>= 3.1.2) 61 | sass (>= 3.4.0, < 4.0) 62 | uglifier (~> 2.5) 63 | middleman-core (3.4.1) 64 | activesupport (~> 4.1) 65 | bundler (~> 1.1) 66 | capybara (~> 2.4.4) 67 | erubis 68 | hooks (~> 0.3) 69 | i18n (~> 0.7.0) 70 | listen (~> 3.0.3) 71 | padrino-helpers (~> 0.12.3) 72 | rack (>= 1.4.5, < 2.0) 73 | thor (>= 0.15.2, < 2.0) 74 | tilt (~> 1.4.1, < 2.0) 75 | middleman-deploy (1.0.0) 76 | middleman-core (>= 3.2) 77 | net-sftp 78 | ptools 79 | middleman-livereload (3.4.5) 80 | em-websocket (~> 0.5.1) 81 | middleman-core (>= 3.3) 82 | rack-livereload (~> 0.3.15) 83 | middleman-sprockets (3.4.2) 84 | middleman-core (>= 3.3) 85 | sprockets (~> 2.12.1) 86 | sprockets-helpers (~> 1.1.0) 87 | sprockets-sass (~> 1.3.0) 88 | mime-types (3.0) 89 | mime-types-data (~> 3.2015) 90 | mime-types-data (3.2015.1120) 91 | mini_portile2 (2.0.0) 92 | minitest (5.8.3) 93 | multi_json (1.11.2) 94 | net-sftp (2.1.2) 95 | net-ssh (>= 2.6.5) 96 | net-ssh (3.0.2) 97 | nokogiri (1.6.7.1) 98 | mini_portile2 (~> 2.0.0.rc2) 99 | padrino-helpers (0.12.5) 100 | i18n (~> 0.6, >= 0.6.7) 101 | padrino-support (= 0.12.5) 102 | tilt (~> 1.4.1) 103 | padrino-support (0.12.5) 104 | activesupport (>= 3.1) 105 | ptools (1.3.3) 106 | rack (1.6.4) 107 | rack-livereload (0.3.16) 108 | rack 109 | rack-test (0.6.3) 110 | rack (>= 1.0) 111 | rb-fsevent (0.9.7) 112 | rb-inotify (0.9.5) 113 | ffi (>= 0.5.0) 114 | sass (3.4.20) 115 | sprockets (2.12.4) 116 | hike (~> 1.2) 117 | multi_json (~> 1.0) 118 | rack (~> 1.0) 119 | tilt (~> 1.1, != 1.3.0) 120 | sprockets-helpers (1.1.0) 121 | sprockets (~> 2.0) 122 | sprockets-sass (1.3.1) 123 | sprockets (~> 2.0) 124 | tilt (~> 1.1) 125 | thor (0.19.1) 126 | thread_safe (0.3.5) 127 | tilt (1.4.1) 128 | tzinfo (1.2.2) 129 | thread_safe (~> 0.1) 130 | uber (0.0.15) 131 | uglifier (2.7.2) 132 | execjs (>= 0.3.0) 133 | json (>= 1.8.0) 134 | xpath (2.0.0) 135 | nokogiri (~> 1.3) 136 | 137 | PLATFORMS 138 | ruby 139 | 140 | DEPENDENCIES 141 | middleman (~> 3.4.1) 142 | middleman-deploy (~> 1.0) 143 | middleman-livereload (~> 3.4.2) 144 | wdm (~> 0.1.0) 145 | 146 | BUNDLED WITH 147 | 1.11.2 148 | -------------------------------------------------------------------------------- /LICENSE.txt: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2012 Christian Stade-Schuldt 4 | Permission is hereby granted, free of charge, to any person obtaining a copy 5 | of this software and associated documentation files (the "Software"), to deal 6 | in the Software without restriction, including without limitation the rights 7 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | copies of the Software, and to permit persons to whom the Software is 9 | furnished to do so, subject to the following conditions: 10 | 11 | The above copyright notice and this permission notice shall be included in all 12 | copies or substantial portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 20 | SOFTWARE. 21 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # My Raspberry Pi Site 2 | 3 | Website based on static site generator [Middleman](http://middlemanapp.com/) running on my RaspberryPi at [http://pi.tafkas.net](http://pi.tafkas.net). 4 | [![My RaspberryPi](http://i.imgur.com/wvVcJcR.png)](http://pi.tafkas.net) -------------------------------------------------------------------------------- /config.rb: -------------------------------------------------------------------------------- 1 | ### 2 | # Compass 3 | ### 4 | 5 | # Change Compass configuration 6 | # compass_config do |config| 7 | # config.output_style = :compact 8 | # end 9 | 10 | ### 11 | # Page options, layouts, aliases and proxies 12 | ### 13 | 14 | # Per-page layout changes: 15 | # 16 | # With no layout 17 | # page "/path/to/file.html", :layout => false 18 | # 19 | # With alternative layout 20 | # page "/path/to/file.html", :layout => :otherlayout 21 | # 22 | # A path which all have the same layout 23 | # with_layout :admin do 24 | # page "/admin/*" 25 | # end 26 | 27 | # Proxy pages (http://middlemanapp.com/dynamic-pages/) 28 | # proxy "/this-page-has-no-template.html", "/template-file.html", :locals => { 29 | # :which_fake_page => "Rendering a fake page with a local variable" } 30 | 31 | ### 32 | # Helpers 33 | ### 34 | 35 | # Automatic image dimensions on image_tag helper 36 | # activate :automatic_image_sizes 37 | 38 | # Reload the browser automatically whenever files change 39 | activate :livereload 40 | 41 | # Methods defined in the helpers block are available in templates 42 | # helpers do 43 | # def some_helper 44 | # "Helping" 45 | # end 46 | # end 47 | 48 | set :css_dir, 'stylesheets' 49 | 50 | set :js_dir, 'javascripts' 51 | 52 | set :images_dir, 'images' 53 | 54 | # Build-specific configuration 55 | configure :build do 56 | # For example, change the Compass output style for deployment 57 | # activate :minify_css 58 | 59 | # Minify Javascript on build 60 | # activate :minify_javascript 61 | 62 | # Enable cache buster 63 | # activate :asset_hash 64 | 65 | # Use relative URLs 66 | # activate :relative_assets 67 | 68 | # Or use a different image path 69 | # set :http_prefix, "/Content/images/" 70 | end 71 | 72 | # Deployment 73 | activate :deploy do |deploy| 74 | deploy.method = :rsync 75 | deploy.host = 'rpi' 76 | deploy.path = '/var/www/' 77 | # Optional Settings 78 | # deploy.user = 'tvaughan' # no default 79 | # deploy.port = 5309 # ssh port, default: 22 80 | # deploy.clean = true # remove orphaned files on remote host, default: false 81 | # deploy.flags = '-rltgoDvzO --no-p --del' # add custom flags, default: -avz 82 | end 83 | -------------------------------------------------------------------------------- /source/_footer.html.erb: -------------------------------------------------------------------------------- 1 | 6 | 7 | 8 | 9 | <%= javascript_include_tag 'all', 'main', 'chart' %> 10 | 72 | 73 | -------------------------------------------------------------------------------- /source/_header.html.erb: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /source/about.html.erb: -------------------------------------------------------------------------------- 1 | --- 2 | title: Tafkas RaspberryPi 3 | --- 4 | -------------------------------------------------------------------------------- /source/images/background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tafkas/my-raspberry-pi-site/358b9a7b7142a231f4685db4d0a601d0d3e32eb7/source/images/background.png -------------------------------------------------------------------------------- /source/images/middleman.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tafkas/my-raspberry-pi-site/358b9a7b7142a231f4685db4d0a601d0d3e32eb7/source/images/middleman.png -------------------------------------------------------------------------------- /source/index.html.erb: -------------------------------------------------------------------------------- 1 | --- 2 | title: Tafkas RaspberryPi 3 | --- 4 | 11 |
12 |
13 |

Home Temperatues

14 | 15 |

Logging and charting temperatures and humidity using wireless sensors in my apartment

16 | 17 |

View details »

18 |
19 | 20 |
21 |

Photovoltaic Monitoring

22 | 23 |

Monitoring a photovoltaic system

24 | 25 |

View details »

26 |
27 | 28 |
29 |

Smart Metering

30 | 31 |

Logging and charting electric usage in my apartment

32 | 33 |

View details »

34 |
35 | 36 |
-------------------------------------------------------------------------------- /source/javascripts/all.js: -------------------------------------------------------------------------------- 1 | //= require_tree . -------------------------------------------------------------------------------- /source/javascripts/chart.js: -------------------------------------------------------------------------------- 1 | Highcharts.setOptions({ 2 | global: { 3 | useUTC: false 4 | } 5 | }); 6 | 7 | options = { 8 | chart: { 9 | renderTo: 'content', 10 | type: 'spline' 11 | }, 12 | title: { 13 | text: 'Temperatures of the last 24h' 14 | }, 15 | subtitle: { 16 | text: '' 17 | }, 18 | colors: ['#4572A7', '#AA4643', '#89A54E', '#80699B', '#3D96AE', '#DB843D', '#92A8CD', '#A47D7C', '#B5CA92'], 19 | xAxis: { 20 | type: 'datetime', 21 | dateTimeLabelFormats: { 22 | hour: '%H. %M', 23 | } 24 | }, 25 | yAxis: { 26 | title: { 27 | text: 'T (°C)' 28 | } 29 | }, 30 | tooltip: { 31 | formatter: function () { 32 | return '' + this.series.name + '
' + Highcharts.dateFormat('%H:%M', this.x) + ': ' + this.y.toFixed(1) + '°C'; 33 | } 34 | }, 35 | 36 | plotOptions: { 37 | series: { 38 | marker: { 39 | radius: 2 40 | } 41 | } 42 | }, 43 | 44 | lineWidth: 1, 45 | 46 | series: [] 47 | } 48 | 49 | function computeSunrise(day, sunrise) { 50 | 51 | /*Sunrise/Sunset Algorithm taken from 52 | http://williams.best.vwh.net/sunrise_sunset_algorithm.htm 53 | inputs: 54 | day = day of the year 55 | sunrise = true for sunrise, false for sunset 56 | output: 57 | time of sunrise/sunset in hours */ 58 | 59 | //lat, lon for Berlin, Germany 60 | var longitude = 13.408056; 61 | var latitude = 52.518611; 62 | var zenith = 90.83333333333333; 63 | var D2R = Math.PI / 180; 64 | var R2D = 180 / Math.PI; 65 | 66 | // convert the longitude to hour value and calculate an approximate time 67 | var lnHour = longitude / 15; 68 | var t; 69 | if (sunrise) { 70 | t = day + ((6 - lnHour) / 24); 71 | } else { 72 | t = day + ((18 - lnHour) / 24); 73 | } 74 | //calculate the Sun's mean anomaly 75 | var M = (0.9856 * t) - 3.289; 76 | 77 | //calculate the Sun's true longitude 78 | var L = M + (1.916 * Math.sin(M * D2R)) + (0.020 * Math.sin(2 * M * D2R)) + 282.634; 79 | if (L > 360) { 80 | L = L - 360; 81 | } else if (L < 0) { 82 | L = L + 360; 83 | } 84 | //calculate the Sun's right ascension 85 | var RA = R2D * Math.atan(0.91764 * Math.tan(L * D2R)); 86 | if (RA > 360) { 87 | RA = RA - 360; 88 | } else if (RA < 0) { 89 | RA = RA + 360; 90 | } 91 | //right ascension value needs to be in the same qua 92 | var Lquadrant = (Math.floor(L / (90))) * 90; 93 | var RAquadrant = (Math.floor(RA / 90)) * 90; 94 | RA = RA + (Lquadrant - RAquadrant); 95 | 96 | //right ascension value needs to be converted into hours 97 | RA = RA / 15; 98 | 99 | //calculate the Sun's declination 100 | var sinDec = 0.39782 * Math.sin(L * D2R); 101 | var cosDec = Math.cos(Math.asin(sinDec)); 102 | 103 | //calculate the Sun's local hour angle 104 | var cosH = (Math.cos(zenith * D2R) - (sinDec * Math.sin(latitude * D2R))) / (cosDec * Math.cos(latitude * D2R)); 105 | var H; 106 | if (sunrise) { 107 | H = 360 - R2D * Math.acos(cosH) 108 | } else { 109 | H = R2D * Math.acos(cosH) 110 | } 111 | H = H / 15; 112 | 113 | //calculate local mean time of rising/setting 114 | var T = H + RA - (0.06571 * t) - 6.622; 115 | 116 | //adjust back to UTC 117 | var UT = T - lnHour; 118 | if (UT > 24) { 119 | UT = UT - 24; 120 | } else if (UT < 0) { 121 | UT = UT + 24; 122 | } 123 | 124 | //convert UT value to local time zone of latitude/longitude 125 | var localT = UT + 2; 126 | 127 | //convert to Milliseconds 128 | return localT * 3600 * 1000; 129 | } 130 | 131 | function dayOfYear() { 132 | var yearFirstDay = Math.floor(new Date().setFullYear(new Date().getFullYear(), 0, 1) / 86400000); 133 | var today = Math.ceil((new Date().getTime()) / 86400000); 134 | return today - yearFirstDay; 135 | } 136 | -------------------------------------------------------------------------------- /source/javascripts/main.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @return {string} 3 | */ 4 | function GetUrlPath() { 5 | var urlPath; 6 | urlPath = window.location.pathname.split(".")[0].substring(1).split("/")[1]; 7 | if (urlPath == "humidity") { 8 | return "humid" 9 | } else { 10 | return "temperature" 11 | } 12 | } 13 | urlPath = GetUrlPath(); 14 | 15 | // return everything after the question mark 16 | /** 17 | * @return {string} 18 | */ 19 | function GetUrlParameter() { 20 | var idx = window.location.href.indexOf("?"); 21 | if (idx < 0) return ""; 22 | return window.location.href.substring(idx + 1); 23 | } 24 | urlParameter = GetUrlParameter(); 25 | 26 | /** 27 | * @return {string} 28 | */ 29 | function GetChartXml() { 30 | switch (urlParameter) { 31 | case "3h": 32 | case "48h": 33 | case "1w": 34 | case "1m": 35 | case "3m": 36 | case "1y": 37 | case "1yminmax": 38 | return "data/" + urlPath + urlParameter + ".xml"; 39 | } 40 | return "data/" + urlPath + "24h.xml"; 41 | } 42 | 43 | /** 44 | * @return {string} 45 | */ 46 | function GetChartTitle() { 47 | 48 | var type = "Temperatures"; 49 | if (urlPath == "humid") { 50 | type = "Humidity" 51 | } 52 | switch (urlParameter) { 53 | case "3h": 54 | return type + " of the last 3 hours"; 55 | case "48h": 56 | return type + " of the last 48 hours"; 57 | case "1w": 58 | return type + " of the last week"; 59 | case "1m": 60 | return type + " of the last month"; 61 | case "3m": 62 | return type + " of the last 3 month"; 63 | case "1y": 64 | return type + " of the last year"; 65 | case "1yminmax": 66 | return "Min-Max " + type + " of the last year"; 67 | } 68 | return type + " of the last 24 hours"; 69 | } 70 | -------------------------------------------------------------------------------- /source/layouts/layout.erb: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | <%= current_page.data.title || 'The Middleman' %> 11 | 12 | <%= stylesheet_link_tag 'custom', 'sticky-footer-navbar' %> 13 | 14 | 15 | 16 |
17 | <%= partial 'header' %> 18 |
19 | <%= yield %> 20 |
21 |
22 | <%= partial 'footer' %> 23 | <%= javascript_include_tag 'all' %> 24 | 25 | -------------------------------------------------------------------------------- /source/photovoltaic/index.html.erb: -------------------------------------------------------------------------------- 1 | --- 2 | title: Photovoltaic - Tafkas' RaspberryPi' 3 | --- 4 | 7 |
8 |
9 |
10 |
11 |

A Raspberry Pi photovoltaic monitoring solution

12 | More information at my 13 | blog. 14 | Solar Pi Sneak Peak 15 |
16 |
-------------------------------------------------------------------------------- /source/smartmeter/index.html.erb: -------------------------------------------------------------------------------- 1 | --- 2 | title: Smartmeter - Tafkas' RaspberryPi' 3 | --- 4 | 7 |
8 |
9 | 10 |
11 |
12 |

Coming soon

13 |
14 |
-------------------------------------------------------------------------------- /source/stylesheets/all.css: -------------------------------------------------------------------------------- 1 | @charset "utf-8"; 2 | 3 | body { 4 | background: #d4d4d4 url("../images/background.png"); 5 | text-align: center; 6 | font-family: sans-serif; 7 | } 8 | 9 | h1 { 10 | color: rgba(0, 0, 0, .3); 11 | font-weight: bold; 12 | font-size: 32px; 13 | letter-spacing: -1px; 14 | text-transform: uppercase; 15 | text-shadow: 0 1px 0 rgba(255, 255, 255, .5); 16 | background: url("../images/middleman.png") no-repeat center 100px; 17 | padding: 350px 0 10px; 18 | margin: 0; 19 | } 20 | 21 | .doc { 22 | font-size: 14px; 23 | margin: 0; 24 | } 25 | 26 | .doc:before, 27 | .doc:after { 28 | opacity: .2; 29 | padding: 6px; 30 | font-style: normal; 31 | position: relative; 32 | content: "•"; 33 | } 34 | 35 | .doc a { 36 | color: rgba(0, 0, 0, 0.3); 37 | } 38 | 39 | .doc a:hover { 40 | color: #666; 41 | } 42 | 43 | .welcome { 44 | -webkit-animation-name: welcome; 45 | -webkit-animation-duration: .9s; 46 | } 47 | 48 | @-webkit-keyframes welcome { 49 | from { 50 | -webkit-transform: scale(0); 51 | opacity: 0; 52 | } 53 | 50% { 54 | -webkit-transform: scale(0); 55 | opacity: 0; 56 | } 57 | 82.5% { 58 | -webkit-transform: scale(1.03); 59 | -webkit-animation-timing-function: ease-out; 60 | opacity: 1; 61 | } 62 | to { 63 | -webkit-transform: scale(1); 64 | } 65 | } -------------------------------------------------------------------------------- /source/stylesheets/custom.css: -------------------------------------------------------------------------------- 1 | .navbar-brand { 2 | padding: 0 15px; 3 | } -------------------------------------------------------------------------------- /source/stylesheets/normalize.css: -------------------------------------------------------------------------------- 1 | /*! normalize.css v2.0.1 | MIT License | git.io/normalize */ 2 | 3 | /* ========================================================================== 4 | HTML5 display definitions 5 | ========================================================================== */ 6 | 7 | /* 8 | * Corrects `block` display not defined in IE 8/9. 9 | */ 10 | 11 | article, 12 | aside, 13 | details, 14 | figcaption, 15 | figure, 16 | footer, 17 | header, 18 | hgroup, 19 | nav, 20 | section, 21 | summary { 22 | display: block; 23 | } 24 | 25 | /* 26 | * Corrects `inline-block` display not defined in IE 8/9. 27 | */ 28 | 29 | audio, 30 | canvas, 31 | video { 32 | display: inline-block; 33 | } 34 | 35 | /* 36 | * Prevents modern browsers from displaying `audio` without controls. 37 | * Remove excess height in iOS 5 devices. 38 | */ 39 | 40 | audio:not([controls]) { 41 | display: none; 42 | height: 0; 43 | } 44 | 45 | /* 46 | * Addresses styling for `hidden` attribute not present in IE 8/9. 47 | */ 48 | 49 | [hidden] { 50 | display: none; 51 | } 52 | 53 | /* ========================================================================== 54 | Base 55 | ========================================================================== */ 56 | 57 | /* 58 | * 1. Sets default font family to sans-serif. 59 | * 2. Prevents iOS text size adjust after orientation change, without disabling 60 | * user zoom. 61 | */ 62 | 63 | html { 64 | font-family: sans-serif; /* 1 */ 65 | -webkit-text-size-adjust: 100%; /* 2 */ 66 | -ms-text-size-adjust: 100%; /* 2 */ 67 | } 68 | 69 | /* 70 | * Removes default margin. 71 | */ 72 | 73 | body { 74 | margin: 0; 75 | } 76 | 77 | /* ========================================================================== 78 | Links 79 | ========================================================================== */ 80 | 81 | /* 82 | * Addresses `outline` inconsistency between Chrome and other browsers. 83 | */ 84 | 85 | a:focus { 86 | outline: thin dotted; 87 | } 88 | 89 | /* 90 | * Improves readability when focused and also mouse hovered in all browsers. 91 | */ 92 | 93 | a:active, 94 | a:hover { 95 | outline: 0; 96 | } 97 | 98 | /* ========================================================================== 99 | Typography 100 | ========================================================================== */ 101 | 102 | /* 103 | * Addresses `h1` font sizes within `section` and `article` in Firefox 4+, 104 | * Safari 5, and Chrome. 105 | */ 106 | 107 | h1 { 108 | font-size: 2em; 109 | } 110 | 111 | /* 112 | * Addresses styling not present in IE 8/9, Safari 5, and Chrome. 113 | */ 114 | 115 | abbr[title] { 116 | border-bottom: 1px dotted; 117 | } 118 | 119 | /* 120 | * Addresses style set to `bolder` in Firefox 4+, Safari 5, and Chrome. 121 | */ 122 | 123 | b, 124 | strong { 125 | font-weight: bold; 126 | } 127 | 128 | /* 129 | * Addresses styling not present in Safari 5 and Chrome. 130 | */ 131 | 132 | dfn { 133 | font-style: italic; 134 | } 135 | 136 | /* 137 | * Addresses styling not present in IE 8/9. 138 | */ 139 | 140 | mark { 141 | background: #ff0; 142 | color: #000; 143 | } 144 | 145 | /* 146 | * Corrects font family set oddly in Safari 5 and Chrome. 147 | */ 148 | 149 | code, 150 | kbd, 151 | pre, 152 | samp { 153 | font-family: monospace, serif; 154 | font-size: 1em; 155 | } 156 | 157 | /* 158 | * Improves readability of pre-formatted text in all browsers. 159 | */ 160 | 161 | pre { 162 | white-space: pre; 163 | white-space: pre-wrap; 164 | word-wrap: break-word; 165 | } 166 | 167 | /* 168 | * Sets consistent quote types. 169 | */ 170 | 171 | q { 172 | quotes: "\201C" "\201D" "\2018" "\2019"; 173 | } 174 | 175 | /* 176 | * Addresses inconsistent and variable font size in all browsers. 177 | */ 178 | 179 | small { 180 | font-size: 80%; 181 | } 182 | 183 | /* 184 | * Prevents `sub` and `sup` affecting `line-height` in all browsers. 185 | */ 186 | 187 | sub, 188 | sup { 189 | font-size: 75%; 190 | line-height: 0; 191 | position: relative; 192 | vertical-align: baseline; 193 | } 194 | 195 | sup { 196 | top: -0.5em; 197 | } 198 | 199 | sub { 200 | bottom: -0.25em; 201 | } 202 | 203 | /* ========================================================================== 204 | Embedded content 205 | ========================================================================== */ 206 | 207 | /* 208 | * Removes border when inside `a` element in IE 8/9. 209 | */ 210 | 211 | img { 212 | border: 0; 213 | } 214 | 215 | /* 216 | * Corrects overflow displayed oddly in IE 9. 217 | */ 218 | 219 | svg:not(:root) { 220 | overflow: hidden; 221 | } 222 | 223 | /* ========================================================================== 224 | Figures 225 | ========================================================================== */ 226 | 227 | /* 228 | * Addresses margin not present in IE 8/9 and Safari 5. 229 | */ 230 | 231 | figure { 232 | margin: 0; 233 | } 234 | 235 | /* ========================================================================== 236 | Forms 237 | ========================================================================== */ 238 | 239 | /* 240 | * Define consistent border, margin, and padding. 241 | */ 242 | 243 | fieldset { 244 | border: 1px solid #c0c0c0; 245 | margin: 0 2px; 246 | padding: 0.35em 0.625em 0.75em; 247 | } 248 | 249 | /* 250 | * 1. Corrects color not being inherited in IE 8/9. 251 | * 2. Remove padding so people aren't caught out if they zero out fieldsets. 252 | */ 253 | 254 | legend { 255 | border: 0; /* 1 */ 256 | padding: 0; /* 2 */ 257 | } 258 | 259 | /* 260 | * 1. Corrects font family not being inherited in all browsers. 261 | * 2. Corrects font size not being inherited in all browsers. 262 | * 3. Addresses margins set differently in Firefox 4+, Safari 5, and Chrome 263 | */ 264 | 265 | button, 266 | input, 267 | select, 268 | textarea { 269 | font-family: inherit; /* 1 */ 270 | font-size: 100%; /* 2 */ 271 | margin: 0; /* 3 */ 272 | } 273 | 274 | /* 275 | * Addresses Firefox 4+ setting `line-height` on `input` using `!important` in 276 | * the UA stylesheet. 277 | */ 278 | 279 | button, 280 | input { 281 | line-height: normal; 282 | } 283 | 284 | /* 285 | * 1. Avoid the WebKit bug in Android 4.0.* where (2) destroys native `audio` 286 | * and `video` controls. 287 | * 2. Corrects inability to style clickable `input` types in iOS. 288 | * 3. Improves usability and consistency of cursor style between image-type 289 | * `input` and others. 290 | */ 291 | 292 | button, 293 | html input[type="button"], /* 1 */ 294 | input[type="reset"], 295 | input[type="submit"] { 296 | -webkit-appearance: button; /* 2 */ 297 | cursor: pointer; /* 3 */ 298 | } 299 | 300 | /* 301 | * Re-set default cursor for disabled elements. 302 | */ 303 | 304 | button[disabled], 305 | input[disabled] { 306 | cursor: default; 307 | } 308 | 309 | /* 310 | * 1. Addresses box sizing set to `content-box` in IE 8/9. 311 | * 2. Removes excess padding in IE 8/9. 312 | */ 313 | 314 | input[type="checkbox"], 315 | input[type="radio"] { 316 | box-sizing: border-box; /* 1 */ 317 | padding: 0; /* 2 */ 318 | } 319 | 320 | /* 321 | * 1. Addresses `appearance` set to `searchfield` in Safari 5 and Chrome. 322 | * 2. Addresses `box-sizing` set to `border-box` in Safari 5 and Chrome 323 | * (include `-moz` to future-proof). 324 | */ 325 | 326 | input[type="search"] { 327 | -webkit-appearance: textfield; /* 1 */ 328 | -moz-box-sizing: content-box; 329 | -webkit-box-sizing: content-box; /* 2 */ 330 | box-sizing: content-box; 331 | } 332 | 333 | /* 334 | * Removes inner padding and search cancel button in Safari 5 and Chrome 335 | * on OS X. 336 | */ 337 | 338 | input[type="search"]::-webkit-search-cancel-button, 339 | input[type="search"]::-webkit-search-decoration { 340 | -webkit-appearance: none; 341 | } 342 | 343 | /* 344 | * Removes inner padding and border in Firefox 4+. 345 | */ 346 | 347 | button::-moz-focus-inner, 348 | input::-moz-focus-inner { 349 | border: 0; 350 | padding: 0; 351 | } 352 | 353 | /* 354 | * 1. Removes default vertical scrollbar in IE 8/9. 355 | * 2. Improves readability and alignment in all browsers. 356 | */ 357 | 358 | textarea { 359 | overflow: auto; /* 1 */ 360 | vertical-align: top; /* 2 */ 361 | } 362 | 363 | /* ========================================================================== 364 | Tables 365 | ========================================================================== */ 366 | 367 | /* 368 | * Remove most spacing between table cells. 369 | */ 370 | 371 | table { 372 | border-collapse: collapse; 373 | border-spacing: 0; 374 | } -------------------------------------------------------------------------------- /source/stylesheets/sticky-footer-navbar.css: -------------------------------------------------------------------------------- 1 | /* Sticky footer styles 2 | -------------------------------------------------- */ 3 | 4 | html, 5 | body { 6 | height: 100%; 7 | /* The html and body elements cannot have any padding or margin. */ 8 | } 9 | 10 | /* Wrapper for page content to push down footer */ 11 | #wrap { 12 | min-height: 100%; 13 | height: auto; 14 | /* Negative indent footer by its height */ 15 | margin: 0 auto -60px; 16 | /* Pad bottom by footer height */ 17 | padding: 0 0 60px; 18 | } 19 | 20 | /* Set the fixed height of the footer here */ 21 | #footer { 22 | height: 60px; 23 | background-color: #f5f5f5; 24 | } 25 | 26 | /* Custom page CSS 27 | -------------------------------------------------- */ 28 | /* Not required for template or sticky footer method. */ 29 | 30 | #wrap > .container { 31 | padding: 60px 15px 0; 32 | } 33 | 34 | .container .credit { 35 | margin: 20px 0; 36 | } 37 | 38 | #footer > .container { 39 | padding-left: 15px; 40 | padding-right: 15px; 41 | } 42 | 43 | code { 44 | font-size: 80%; 45 | } 46 | -------------------------------------------------------------------------------- /source/temperatures/_temp_menu.html.erb: -------------------------------------------------------------------------------- 1 | 12 | -------------------------------------------------------------------------------- /source/temperatures/humidity.html.erb: -------------------------------------------------------------------------------- 1 | --- 2 | title: Temperatures - Tafkas' RaspberryPi' 3 | --- 4 | 7 |
8 |
9 | <%= partial 'temp_menu' %> 10 |
11 |
12 |
13 |
14 |
-------------------------------------------------------------------------------- /source/temperatures/index.html.erb: -------------------------------------------------------------------------------- 1 | --- 2 | title: Temperatures - Tafkas' RaspberryPi' 3 | --- 4 | 7 |
8 |
9 | <%= partial 'temp_menu' %> 10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------