├── website
├── db.inc.php
├── config.inc.php
├── classes
│ ├── Interfaces
│ │ ├── View.php
│ │ ├── Model.php
│ │ ├── Singleton.php
│ │ └── Listener.php
│ ├── View
│ │ ├── Readout.php
│ │ ├── FrontpageInternal.php
│ │ ├── Base.php
│ │ └── Frontpage.php
│ ├── Model
│ │ ├── InternalReadout.php
│ │ ├── Readout.php
│ │ └── Base.php
│ ├── General
│ │ ├── StaticUtils.php
│ │ ├── Statistics.php
│ │ ├── Autoloader.php
│ │ ├── Enviroment.php
│ │ ├── Session.php
│ │ ├── Config.php
│ │ ├── GoogleChart.php
│ │ ├── Templater.php
│ │ ├── Formater.php
│ │ └── Debug.php
│ ├── Database
│ │ ├── Config.php
│ │ ├── Factory.php
│ │ └── SQLiteWrapper.php
│ ├── Translate
│ │ ├── Controller.php
│ │ └── Translate.php
│ ├── Controller
│ │ ├── Base.php
│ │ ├── Frontpage.php
│ │ └── Main.php
│ ├── Cache
│ │ ├── Factory.php
│ │ ├── Variable.php
│ │ ├── FileElement.php
│ │ ├── Memcached.php
│ │ ├── Session.php
│ │ ├── Apc.php
│ │ └── File.php
│ └── Listeners
│ │ ├── LowLevelMessage.php
│ │ └── Message.php
├── .settings
│ └── org.eclipse.php.core.prefs
├── css
│ ├── index.css
│ └── docs.css
├── index.php
├── assets
│ └── bootstrap
│ │ ├── img
│ │ ├── glyphicons-halflings.png
│ │ └── glyphicons-halflings-white.png
│ │ └── css
│ │ └── bootstrap-responsive.min.css
├── .buildpath
├── translations
│ └── translations.php
├── js
│ ├── engine.js
│ └── form-validator.js
├── common.php
├── templates
│ ├── chartHead.html
│ ├── charts.html
│ ├── tables.html
│ ├── mainpage.html
│ └── index.html
└── .project
├── .gitignore
├── data.db
├── diagram.png
├── sensor_driver
├── assets
└── img
│ ├── 1.png
│ ├── 2.jpg
│ └── 3.png
├── run.sh
├── diagram.sch
├── compute_daily_aggregate.py
├── get_data.py
├── README.md
├── diagram.sch~
├── sensor_driver.c
└── diagram.ps
/website/db.inc.php:
--------------------------------------------------------------------------------
1 | get();
6 |
--------------------------------------------------------------------------------
/website/assets/bootstrap/img/glyphicons-halflings.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DzikuVx/raspberry_temperature_log/HEAD/website/assets/bootstrap/img/glyphicons-halflings.png
--------------------------------------------------------------------------------
/run.sh:
--------------------------------------------------------------------------------
1 | #set SHELL='/bin/bash'
2 | #set PWD='/home/pi/raspberry_temperature_log'
3 |
4 | set > /home/pi/run.log
5 |
6 | python /home/pi/raspberry_temperature_log/log_data.py
7 |
8 |
--------------------------------------------------------------------------------
/website/assets/bootstrap/img/glyphicons-halflings-white.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DzikuVx/raspberry_temperature_log/HEAD/website/assets/bootstrap/img/glyphicons-halflings-white.png
--------------------------------------------------------------------------------
/website/classes/View/Readout.php:
--------------------------------------------------------------------------------
1 |
2 |
| 8 | | {T:Temperature} | 9 |{T:Humidity} | 10 |||||
|---|---|---|---|---|---|---|
| {T:Date} | 13 |{T:Min.} | 14 |{T:Avg.} | 15 |{T:Max.} | 16 |{T:Min.} | 17 |{T:Avg.} | 18 |{T:Max.} | 19 |
| # | 33 |{T:Date} | 34 |{T:Temperature} | 35 |{T:Humidity} | 36 |
|---|
24h average: {1dTempAvg}°C
9 |24h min: {1dTempMin}°C
10 |24h max: {1dTempMax}°C
11 |7d average: {7dTempAvg}°C
12 |7d min: {7dTempMin}°C
13 |7d max: {7dTempMax}°C
14 |24h average: {1dHumidityAvg}%
19 |24h min: {1dHumidityMin}%
20 |24h max: {1dHumidityMax}%
21 |7d average: {7dHumidityAvg}%
22 |7d min: {7dHumidityMin}%
23 |7d max: {7dHumidityMax}%
24 |' . $text . '
'; 163 | 164 | if ($config ['attach'] && ! empty ( self::$additionalErrorText )) { 165 | $retVal .= '
' . self::$additionalErrorText . '
'; 166 | } 167 | 168 | $retVal = " and border
461 | *
462 | * @param mixed $value
463 | */
464 | public static function print_r($value) {
465 |
466 | echo "";
467 | print_r ( $value );
468 | echo "
";
469 | }
470 |
471 | }
472 |
473 | /**
474 | * psDebug exception class
475 | *
476 | * @author Pawel Spychalski
477 | * @link http://www.spychalski.info
478 | * @version 1
479 | * @category universal
480 | * @copyright 2009 Lynx-IT Pawel Stanislaw Spychalski
481 | * @see psDebug
482 | *
483 | */
484 | class DebugException extends \Exception {
485 |
486 | }
487 |
488 | /**
489 | * Exception for custom usage
490 | *
491 | * @author Pawel Spychalski
492 | * @link http://www.spychalski.info
493 | * @version 1
494 | * @copyright 2009 Lynx-IT Pawel Stanislaw Spychalski
495 | * @see Debug
496 | */
497 | class CustomException extends \Exception {
498 |
499 | }
--------------------------------------------------------------------------------
/website/assets/bootstrap/css/bootstrap-responsive.min.css:
--------------------------------------------------------------------------------
1 | /*!
2 | * Bootstrap Responsive v2.3.1
3 | *
4 | * Copyright 2012 Twitter, Inc
5 | * Licensed under the Apache License v2.0
6 | * http://www.apache.org/licenses/LICENSE-2.0
7 | *
8 | * Designed and built with all the love in the world @twitter by @mdo and @fat.
9 | */.clearfix{*zoom:1}.clearfix:before,.clearfix:after{display:table;line-height:0;content:""}.clearfix:after{clear:both}.hide-text{font:0/0 a;color:transparent;text-shadow:none;background-color:transparent;border:0}.input-block-level{display:block;width:100%;min-height:30px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}@-ms-viewport{width:device-width}.hidden{display:none;visibility:hidden}.visible-phone{display:none!important}.visible-tablet{display:none!important}.hidden-desktop{display:none!important}.visible-desktop{display:inherit!important}@media(min-width:768px) and (max-width:979px){.hidden-desktop{display:inherit!important}.visible-desktop{display:none!important}.visible-tablet{display:inherit!important}.hidden-tablet{display:none!important}}@media(max-width:767px){.hidden-desktop{display:inherit!important}.visible-desktop{display:none!important}.visible-phone{display:inherit!important}.hidden-phone{display:none!important}}.visible-print{display:none!important}@media print{.visible-print{display:inherit!important}.hidden-print{display:none!important}}@media(min-width:1200px){.row{margin-left:-30px;*zoom:1}.row:before,.row:after{display:table;line-height:0;content:""}.row:after{clear:both}[class*="span"]{float:left;min-height:1px;margin-left:30px}.container,.navbar-static-top .container,.navbar-fixed-top .container,.navbar-fixed-bottom .container{width:1170px}.span12{width:1170px}.span11{width:1070px}.span10{width:970px}.span9{width:870px}.span8{width:770px}.span7{width:670px}.span6{width:570px}.span5{width:470px}.span4{width:370px}.span3{width:270px}.span2{width:170px}.span1{width:70px}.offset12{margin-left:1230px}.offset11{margin-left:1130px}.offset10{margin-left:1030px}.offset9{margin-left:930px}.offset8{margin-left:830px}.offset7{margin-left:730px}.offset6{margin-left:630px}.offset5{margin-left:530px}.offset4{margin-left:430px}.offset3{margin-left:330px}.offset2{margin-left:230px}.offset1{margin-left:130px}.row-fluid{width:100%;*zoom:1}.row-fluid:before,.row-fluid:after{display:table;line-height:0;content:""}.row-fluid:after{clear:both}.row-fluid [class*="span"]{display:block;float:left;width:100%;min-height:30px;margin-left:2.564102564102564%;*margin-left:2.5109110747408616%;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.row-fluid [class*="span"]:first-child{margin-left:0}.row-fluid .controls-row [class*="span"]+[class*="span"]{margin-left:2.564102564102564%}.row-fluid .span12{width:100%;*width:99.94680851063829%}.row-fluid .span11{width:91.45299145299145%;*width:91.39979996362975%}.row-fluid .span10{width:82.90598290598291%;*width:82.8527914166212%}.row-fluid .span9{width:74.35897435897436%;*width:74.30578286961266%}.row-fluid .span8{width:65.81196581196582%;*width:65.75877432260411%}.row-fluid .span7{width:57.26495726495726%;*width:57.21176577559556%}.row-fluid .span6{width:48.717948717948715%;*width:48.664757228587014%}.row-fluid .span5{width:40.17094017094017%;*width:40.11774868157847%}.row-fluid .span4{width:31.623931623931625%;*width:31.570740134569924%}.row-fluid .span3{width:23.076923076923077%;*width:23.023731587561375%}.row-fluid .span2{width:14.52991452991453%;*width:14.476723040552828%}.row-fluid .span1{width:5.982905982905983%;*width:5.929714493544281%}.row-fluid .offset12{margin-left:105.12820512820512%;*margin-left:105.02182214948171%}.row-fluid .offset12:first-child{margin-left:102.56410256410257%;*margin-left:102.45771958537915%}.row-fluid .offset11{margin-left:96.58119658119658%;*margin-left:96.47481360247316%}.row-fluid .offset11:first-child{margin-left:94.01709401709402%;*margin-left:93.91071103837061%}.row-fluid .offset10{margin-left:88.03418803418803%;*margin-left:87.92780505546462%}.row-fluid .offset10:first-child{margin-left:85.47008547008548%;*margin-left:85.36370249136206%}.row-fluid .offset9{margin-left:79.48717948717949%;*margin-left:79.38079650845607%}.row-fluid .offset9:first-child{margin-left:76.92307692307693%;*margin-left:76.81669394435352%}.row-fluid .offset8{margin-left:70.94017094017094%;*margin-left:70.83378796144753%}.row-fluid .offset8:first-child{margin-left:68.37606837606839%;*margin-left:68.26968539734497%}.row-fluid .offset7{margin-left:62.393162393162385%;*margin-left:62.28677941443899%}.row-fluid .offset7:first-child{margin-left:59.82905982905982%;*margin-left:59.72267685033642%}.row-fluid .offset6{margin-left:53.84615384615384%;*margin-left:53.739770867430444%}.row-fluid .offset6:first-child{margin-left:51.28205128205128%;*margin-left:51.175668303327875%}.row-fluid .offset5{margin-left:45.299145299145295%;*margin-left:45.1927623204219%}.row-fluid .offset5:first-child{margin-left:42.73504273504273%;*margin-left:42.62865975631933%}.row-fluid .offset4{margin-left:36.75213675213675%;*margin-left:36.645753773413354%}.row-fluid .offset4:first-child{margin-left:34.18803418803419%;*margin-left:34.081651209310785%}.row-fluid .offset3{margin-left:28.205128205128204%;*margin-left:28.0987452264048%}.row-fluid .offset3:first-child{margin-left:25.641025641025642%;*margin-left:25.53464266230224%}.row-fluid .offset2{margin-left:19.65811965811966%;*margin-left:19.551736679396257%}.row-fluid .offset2:first-child{margin-left:17.094017094017094%;*margin-left:16.98763411529369%}.row-fluid .offset1{margin-left:11.11111111111111%;*margin-left:11.004728132387708%}.row-fluid .offset1:first-child{margin-left:8.547008547008547%;*margin-left:8.440625568285142%}input,textarea,.uneditable-input{margin-left:0}.controls-row [class*="span"]+[class*="span"]{margin-left:30px}input.span12,textarea.span12,.uneditable-input.span12{width:1156px}input.span11,textarea.span11,.uneditable-input.span11{width:1056px}input.span10,textarea.span10,.uneditable-input.span10{width:956px}input.span9,textarea.span9,.uneditable-input.span9{width:856px}input.span8,textarea.span8,.uneditable-input.span8{width:756px}input.span7,textarea.span7,.uneditable-input.span7{width:656px}input.span6,textarea.span6,.uneditable-input.span6{width:556px}input.span5,textarea.span5,.uneditable-input.span5{width:456px}input.span4,textarea.span4,.uneditable-input.span4{width:356px}input.span3,textarea.span3,.uneditable-input.span3{width:256px}input.span2,textarea.span2,.uneditable-input.span2{width:156px}input.span1,textarea.span1,.uneditable-input.span1{width:56px}.thumbnails{margin-left:-30px}.thumbnails>li{margin-left:30px}.row-fluid .thumbnails{margin-left:0}}@media(min-width:768px) and (max-width:979px){.row{margin-left:-20px;*zoom:1}.row:before,.row:after{display:table;line-height:0;content:""}.row:after{clear:both}[class*="span"]{float:left;min-height:1px;margin-left:20px}.container,.navbar-static-top .container,.navbar-fixed-top .container,.navbar-fixed-bottom .container{width:724px}.span12{width:724px}.span11{width:662px}.span10{width:600px}.span9{width:538px}.span8{width:476px}.span7{width:414px}.span6{width:352px}.span5{width:290px}.span4{width:228px}.span3{width:166px}.span2{width:104px}.span1{width:42px}.offset12{margin-left:764px}.offset11{margin-left:702px}.offset10{margin-left:640px}.offset9{margin-left:578px}.offset8{margin-left:516px}.offset7{margin-left:454px}.offset6{margin-left:392px}.offset5{margin-left:330px}.offset4{margin-left:268px}.offset3{margin-left:206px}.offset2{margin-left:144px}.offset1{margin-left:82px}.row-fluid{width:100%;*zoom:1}.row-fluid:before,.row-fluid:after{display:table;line-height:0;content:""}.row-fluid:after{clear:both}.row-fluid [class*="span"]{display:block;float:left;width:100%;min-height:30px;margin-left:2.7624309392265194%;*margin-left:2.709239449864817%;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.row-fluid [class*="span"]:first-child{margin-left:0}.row-fluid .controls-row [class*="span"]+[class*="span"]{margin-left:2.7624309392265194%}.row-fluid .span12{width:100%;*width:99.94680851063829%}.row-fluid .span11{width:91.43646408839778%;*width:91.38327259903608%}.row-fluid .span10{width:82.87292817679558%;*width:82.81973668743387%}.row-fluid .span9{width:74.30939226519337%;*width:74.25620077583166%}.row-fluid .span8{width:65.74585635359117%;*width:65.69266486422946%}.row-fluid .span7{width:57.18232044198895%;*width:57.12912895262725%}.row-fluid .span6{width:48.61878453038674%;*width:48.56559304102504%}.row-fluid .span5{width:40.05524861878453%;*width:40.00205712942283%}.row-fluid .span4{width:31.491712707182323%;*width:31.43852121782062%}.row-fluid .span3{width:22.92817679558011%;*width:22.87498530621841%}.row-fluid .span2{width:14.3646408839779%;*width:14.311449394616199%}.row-fluid .span1{width:5.801104972375691%;*width:5.747913483013988%}.row-fluid .offset12{margin-left:105.52486187845304%;*margin-left:105.41847889972962%}.row-fluid .offset12:first-child{margin-left:102.76243093922652%;*margin-left:102.6560479605031%}.row-fluid .offset11{margin-left:96.96132596685082%;*margin-left:96.8549429881274%}.row-fluid .offset11:first-child{margin-left:94.1988950276243%;*margin-left:94.09251204890089%}.row-fluid .offset10{margin-left:88.39779005524862%;*margin-left:88.2914070765252%}.row-fluid .offset10:first-child{margin-left:85.6353591160221%;*margin-left:85.52897613729868%}.row-fluid .offset9{margin-left:79.8342541436464%;*margin-left:79.72787116492299%}.row-fluid .offset9:first-child{margin-left:77.07182320441989%;*margin-left:76.96544022569647%}.row-fluid .offset8{margin-left:71.2707182320442%;*margin-left:71.16433525332079%}.row-fluid .offset8:first-child{margin-left:68.50828729281768%;*margin-left:68.40190431409427%}.row-fluid .offset7{margin-left:62.70718232044199%;*margin-left:62.600799341718584%}.row-fluid .offset7:first-child{margin-left:59.94475138121547%;*margin-left:59.838368402492065%}.row-fluid .offset6{margin-left:54.14364640883978%;*margin-left:54.037263430116376%}.row-fluid .offset6:first-child{margin-left:51.38121546961326%;*margin-left:51.27483249088986%}.row-fluid .offset5{margin-left:45.58011049723757%;*margin-left:45.47372751851417%}.row-fluid .offset5:first-child{margin-left:42.81767955801105%;*margin-left:42.71129657928765%}.row-fluid .offset4{margin-left:37.01657458563536%;*margin-left:36.91019160691196%}.row-fluid .offset4:first-child{margin-left:34.25414364640884%;*margin-left:34.14776066768544%}.row-fluid .offset3{margin-left:28.45303867403315%;*margin-left:28.346655695309746%}.row-fluid .offset3:first-child{margin-left:25.69060773480663%;*margin-left:25.584224756083227%}.row-fluid .offset2{margin-left:19.88950276243094%;*margin-left:19.783119783707537%}.row-fluid .offset2:first-child{margin-left:17.12707182320442%;*margin-left:17.02068884448102%}.row-fluid .offset1{margin-left:11.32596685082873%;*margin-left:11.219583872105325%}.row-fluid .offset1:first-child{margin-left:8.56353591160221%;*margin-left:8.457152932878806%}input,textarea,.uneditable-input{margin-left:0}.controls-row [class*="span"]+[class*="span"]{margin-left:20px}input.span12,textarea.span12,.uneditable-input.span12{width:710px}input.span11,textarea.span11,.uneditable-input.span11{width:648px}input.span10,textarea.span10,.uneditable-input.span10{width:586px}input.span9,textarea.span9,.uneditable-input.span9{width:524px}input.span8,textarea.span8,.uneditable-input.span8{width:462px}input.span7,textarea.span7,.uneditable-input.span7{width:400px}input.span6,textarea.span6,.uneditable-input.span6{width:338px}input.span5,textarea.span5,.uneditable-input.span5{width:276px}input.span4,textarea.span4,.uneditable-input.span4{width:214px}input.span3,textarea.span3,.uneditable-input.span3{width:152px}input.span2,textarea.span2,.uneditable-input.span2{width:90px}input.span1,textarea.span1,.uneditable-input.span1{width:28px}}@media(max-width:767px){body{padding-right:20px;padding-left:20px}.navbar-fixed-top,.navbar-fixed-bottom,.navbar-static-top{margin-right:-20px;margin-left:-20px}.container-fluid{padding:0}.dl-horizontal dt{float:none;width:auto;clear:none;text-align:left}.dl-horizontal dd{margin-left:0}.container{width:auto}.row-fluid{width:100%}.row,.thumbnails{margin-left:0}.thumbnails>li{float:none;margin-left:0}[class*="span"],.uneditable-input[class*="span"],.row-fluid [class*="span"]{display:block;float:none;width:100%;margin-left:0;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.span12,.row-fluid .span12{width:100%;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.row-fluid [class*="offset"]:first-child{margin-left:0}.input-large,.input-xlarge,.input-xxlarge,input[class*="span"],select[class*="span"],textarea[class*="span"],.uneditable-input{display:block;width:100%;min-height:30px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.input-prepend input,.input-append input,.input-prepend input[class*="span"],.input-append input[class*="span"]{display:inline-block;width:auto}.controls-row [class*="span"]+[class*="span"]{margin-left:0}.modal{position:fixed;top:20px;right:20px;left:20px;width:auto;margin:0}.modal.fade{top:-100px}.modal.fade.in{top:20px}}@media(max-width:480px){.nav-collapse{-webkit-transform:translate3d(0,0,0)}.page-header h1 small{display:block;line-height:20px}input[type="checkbox"],input[type="radio"]{border:1px solid #ccc}.form-horizontal .control-label{float:none;width:auto;padding-top:0;text-align:left}.form-horizontal .controls{margin-left:0}.form-horizontal .control-list{padding-top:0}.form-horizontal .form-actions{padding-right:10px;padding-left:10px}.media .pull-left,.media .pull-right{display:block;float:none;margin-bottom:10px}.media-object{margin-right:0;margin-left:0}.modal{top:10px;right:10px;left:10px}.modal-header .close{padding:10px;margin:-10px}.carousel-caption{position:static}}@media(max-width:979px){body{padding-top:0}.navbar-fixed-top,.navbar-fixed-bottom{position:static}.navbar-fixed-top{margin-bottom:20px}.navbar-fixed-bottom{margin-top:20px}.navbar-fixed-top .navbar-inner,.navbar-fixed-bottom .navbar-inner{padding:5px}.navbar .container{width:auto;padding:0}.navbar .brand{padding-right:10px;padding-left:10px;margin:0 0 0 -5px}.nav-collapse{clear:both}.nav-collapse .nav{float:none;margin:0 0 10px}.nav-collapse .nav>li{float:none}.nav-collapse .nav>li>a{margin-bottom:2px}.nav-collapse .nav>.divider-vertical{display:none}.nav-collapse .nav .nav-header{color:#777;text-shadow:none}.nav-collapse .nav>li>a,.nav-collapse .dropdown-menu a{padding:9px 15px;font-weight:bold;color:#777;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}.nav-collapse .btn{padding:4px 10px 4px;font-weight:normal;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}.nav-collapse .dropdown-menu li+li a{margin-bottom:2px}.nav-collapse .nav>li>a:hover,.nav-collapse .nav>li>a:focus,.nav-collapse .dropdown-menu a:hover,.nav-collapse .dropdown-menu a:focus{background-color:#f2f2f2}.navbar-inverse .nav-collapse .nav>li>a,.navbar-inverse .nav-collapse .dropdown-menu a{color:#999}.navbar-inverse .nav-collapse .nav>li>a:hover,.navbar-inverse .nav-collapse .nav>li>a:focus,.navbar-inverse .nav-collapse .dropdown-menu a:hover,.navbar-inverse .nav-collapse .dropdown-menu a:focus{background-color:#111}.nav-collapse.in .btn-group{padding:0;margin-top:5px}.nav-collapse .dropdown-menu{position:static;top:auto;left:auto;display:none;float:none;max-width:none;padding:0;margin:0 15px;background-color:transparent;border:0;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}.nav-collapse .open>.dropdown-menu{display:block}.nav-collapse .dropdown-menu:before,.nav-collapse .dropdown-menu:after{display:none}.nav-collapse .dropdown-menu .divider{display:none}.nav-collapse .nav>li>.dropdown-menu:before,.nav-collapse .nav>li>.dropdown-menu:after{display:none}.nav-collapse .navbar-form,.nav-collapse .navbar-search{float:none;padding:10px 15px;margin:10px 0;border-top:1px solid #f2f2f2;border-bottom:1px solid #f2f2f2;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,0.1),0 1px 0 rgba(255,255,255,0.1);-moz-box-shadow:inset 0 1px 0 rgba(255,255,255,0.1),0 1px 0 rgba(255,255,255,0.1);box-shadow:inset 0 1px 0 rgba(255,255,255,0.1),0 1px 0 rgba(255,255,255,0.1)}.navbar-inverse .nav-collapse .navbar-form,.navbar-inverse .nav-collapse .navbar-search{border-top-color:#111;border-bottom-color:#111}.navbar .nav-collapse .nav.pull-right{float:none;margin-left:0}.nav-collapse,.nav-collapse.collapse{height:0;overflow:hidden}.navbar .btn-navbar{display:block}.navbar-static .navbar-inner{padding-right:10px;padding-left:10px}}@media(min-width:980px){.nav-collapse.collapse{height:auto!important;overflow:visible!important}}
10 |
--------------------------------------------------------------------------------
/website/classes/Model/Base.php:
--------------------------------------------------------------------------------
1 | aParams['id'];
51 | }
52 |
53 | if (empty($iId)) {
54 | return false;
55 | }
56 |
57 | /**
58 | * @var \Cache\Memcached
59 | */
60 | $oCache = \Cache\Factory::getInstance();
61 |
62 | $oCache->clear(get_class($this) . '::loadDataObject', $iId);
63 | }
64 |
65 | /**
66 | * stdClass będący reprezentacją obiektu bazy danych
67 | * @var stdClass
68 | */
69 | protected $dataObject = null;
70 |
71 | /**
72 | * Tablica parametrów przekazanych do modelu
73 | * @var array
74 | */
75 | protected $aParams = array();
76 |
77 | /**
78 | * Pobranie dataObject
79 | * @return stdClass
80 | */
81 | public function getDataObject()
82 | {
83 | return $this->dataObject;
84 | }
85 |
86 | protected function loadDataObjectEncapsulate($val) {
87 |
88 | return "'".$val."'";
89 |
90 | }
91 |
92 | /**
93 | * Metoda pobiera dane obiektu do właściwości dataObject
94 | * @throws \Exception
95 | */
96 | protected function loadDataObject()
97 | {
98 |
99 | $oCache = \Cache\Factory::getInstance();
100 |
101 | if (empty($this->aParams['id'])) {
102 | throw new \Exception('{T:Nie podano identyfikatora obiektu}');
103 | }
104 |
105 | $sModule = get_class($this) . '::loadDataObject';
106 | $sProperty = $this->aParams['id'];
107 |
108 | if (!$this->bUseCache || !$oCache->check($sModule, $sProperty)) {
109 |
110 | $sQuery = "SELECT
111 | {$this->selectList}
112 | FROM
113 | $this->tableList
114 | WHERE
115 | {$this->registryIdField}={$this->loadDataObjectEncapsulate($this->aParams['id'])}
116 | LIMIT 1";
117 |
118 | $rQuery = Database::getInstance()->execute($sQuery);
119 | $this->dataObject = Database::getInstance()->fetch($rQuery);
120 |
121 | $oCache->set($sModule, $sProperty, $this->dataObject);
122 | }
123 | else {
124 | $this->dataObject = $oCache->get($sModule, $sProperty);
125 | }
126 | }
127 |
128 | /**
129 | * Ustawienie dodatkowych warunków dla modelu, wykorzystywane dla rejestrów
130 | */
131 | protected function setConstrains()
132 | {
133 |
134 | }
135 |
136 | /**
137 | * Konstruktor
138 | * @param array $aParams
139 | */
140 | public function __construct(array $aParams = null)
141 | {
142 | $this->aParams = $aParams;
143 |
144 | $this->tableList = $this->tableName . ' ' . $this->tableJoin;
145 |
146 | $this->setConstrains();
147 |
148 | if (!empty($this->aParams['id'])) {
149 | $this->loadDataObject();
150 | }
151 | }
152 |
153 | /**
154 | *
155 | * Pobranie nazwy pola identyfikującego wiersz
156 | * @return string
157 | */
158 | public function getRegistryIdField()
159 | {
160 | return $this->registryIdField;
161 | }
162 |
163 | /**
164 | * Prztygotowanie warunku zapytania dla rejstru
165 | * @param string $sSearchIn
166 | * @param string $sSearchValue
167 | * @param string $sStartDate
168 | * @param string $sEndDate
169 | * @param boolean $bUseDateSelect
170 | * @return string
171 | */
172 | public function prepareWhere($sSearchIn, $sSearchValue, $sStartDate, $sEndDate, $bUseDateSelect = false)
173 | {
174 |
175 | /*
176 | * Warunek wyszukiwania w rejestrze
177 | */
178 | $set = false;
179 |
180 | if (!empty($this->aParams['constraints'])) {
181 |
182 | $set = true;
183 |
184 | $sCondition = '';
185 |
186 | foreach ($this->aParams['constraints'] as $sKey => $sValue) {
187 |
188 | $sCondition .= " AND {$sKey}='{$sValue}' ";
189 | }
190 |
191 | if (mb_strlen($sCondition) > 0) {
192 | $sCondition = mb_substr($sCondition, 4);
193 | }
194 |
195 | $this->registryWhere .= $sCondition;
196 | }
197 |
198 |
199 | if ($sSearchValue != '') {
200 |
201 | if ($set) {
202 | $this->registryWhere .= " AND ";
203 | }
204 |
205 | $this->registryWhere .= $sSearchIn . " LIKE '%" . $sSearchValue . "%'";
206 | $set = true;
207 | }
208 |
209 | /*
210 | * Selektor dat
211 | */
212 | if ($bUseDateSelect) {
213 |
214 | if ($set) {
215 | $this->registryWhere .= " AND ";
216 | }
217 | $this->registryWhere .= $this->tableDateField . " >= '" . $sStartDate . "' AND " . $this->tableDateField . " <= '" . $sEndDate . "'";
218 | $set = true;
219 | }
220 |
221 | }
222 |
223 | /**
224 | * Pobranie pojedynczej strony rejestru
225 | * @param int $iLimitSkip
226 | * @param int $iLimitNumber
227 | * @return resource
228 | */
229 | public function getRegistryResults($iLimitSkip, $iLimitNumber)
230 | {
231 |
232 | $tQuery = "SELECT {$this->selectList} FROM {$this->tableList} WHERE {$this->fixEmptyWhere()} ORDER BY {$this->registryOrder} LIMIT {$iLimitSkip},{$iLimitNumber} ";
233 |
234 | return Database::getInstance()->execute($tQuery);
235 | }
236 |
237 | /**
238 | * Przygotowanie warunku sortowania do zapytania o wyniki rejestru
239 | * @param string $sSortBy
240 | * @param string $sSortDirection
241 | */
242 | public function prepareSorting($sSortBy, $sSortDirection)
243 | {
244 |
245 | $this->registryOrder = $sSortBy . " " . $sSortDirection;
246 | }
247 |
248 | /**
249 | *
250 | * Pobranie liczby wyników w rejstrze spełniających warunki
251 | * @return int
252 | */
253 | public function getRegistryCount()
254 | {
255 |
256 | $tQuery = Database::getInstance()->execute("SELECT COUNT($this->selectCountField) AS ile FROM {$this->tableList} WHERE {$this->fixEmptyWhere()}");
257 | while ($tResult = Database::getInstance()->fetch($tQuery)) {
258 | return $tResult->ile;
259 | }
260 | }
261 |
262 | /**
263 | * Naprawienie przypadku gdy warunek WHERE jest pusty
264 | *
265 | * @return string
266 | */
267 | protected function fixEmptyWhere()
268 | {
269 |
270 | $sRetVal = "";
271 |
272 | if ($this->extraList == "" && $this->registryWhere == "") {
273 | $sRetVal = "1";
274 | }
275 | elseif ($this->extraList != "" && $this->registryWhere == "") {
276 | $sRetVal = $this->extraList;
277 | }
278 | elseif ($this->extraList == "" && $this->registryWhere != "") {
279 | $sRetVal = $this->registryWhere;
280 | }
281 | elseif ($this->extraList != "" && $this->registryWhere != "") {
282 | $sRetVal = $this->extraList . " AND " . $this->registryWhere;
283 | }
284 |
285 | return $sRetVal;
286 | }
287 |
288 | protected function prepareGetAllQuery()
289 | {
290 |
291 | $sRetVal = 'SELECT ' . $this->selectList . ' FROM ' . $this->tableList;
292 |
293 | if (!empty($this->getAllSorting)) {
294 | $sRetVal .= ' ORDER BY ' . $this->getAllSorting;
295 | }
296 |
297 | return $sRetVal;
298 | }
299 |
300 | /**
301 | * Funkcja zwracająca tablię wszystkich elementów
302 | *
303 | * @return array Tablica elementów
304 | * @throws
305 | * @since 2012-06-18
306 | * @version 1.0
307 | */
308 | public function getAll()
309 | {
310 | $res = Database::getInstance()->execute($this->prepareGetAllQuery());
311 | $aUsergroup = array();
312 |
313 | while ($oData = Database::getInstance()->fetch($res)) {
314 | $aUsergroup[] = get_object_vars($oData);
315 | }
316 |
317 | return $aUsergroup;
318 | }
319 |
320 | /**
321 | * Funkcja przygotowująca zapytanie z WHERE
322 | *
323 | * @param array $aTerms tablica warunków klucz=>wartosc
324 | * @param array $aTermsOR tablica warunków "OR" array(kolumna=>array(wartosc1,wartosc2))
325 | * @return string zapytanie
326 | * @throws
327 | * @since 2012-10-01
328 | * @version 2.0
329 | */
330 |
331 | protected function prepareGetAllWhereQuery($aTerms,$aTermsOR)
332 | {
333 |
334 | $sRetVal = 'SELECT ' . $this->selectList . ' FROM ' . $this->tableList.' WHERE ' ;
335 |
336 | if($aTerms!=null){
337 | foreach ($aTerms as $key => $val){
338 | $sWhere[]= $key ."=". $val;
339 | }
340 | }
341 |
342 | if($aTermsOR!=null){
343 | foreach ($aTermsOR as $column => $values){
344 |
345 | foreach($values as $key=>$val){
346 |
347 | $sOr[]=$column."=".$val;
348 | }
349 |
350 | $sWhere[]="(".implode($sOr," OR ").")";
351 | }
352 |
353 | }
354 |
355 |
356 | $sRetVal.=implode($sWhere," AND ");
357 |
358 | if (!empty($this->getAllSorting)) {
359 | $sRetVal .= ' ORDER BY ' . $this->getAllSorting;
360 |
361 | if (!empty($this->getAllSortingDir)) {
362 | $sRetVal .= ' ' . $this->getAllSortingDir;
363 | }
364 |
365 | }
366 |
367 | return $sRetVal;
368 | }
369 |
370 | /**
371 | * Funkcja zwracająca tablię wszystkich elementów z uwzględnieniem warunków WHERE
372 | *
373 | * @param array $aTerms tablica warunków klucz=>wartosc
374 | * @return array Tablica elementów
375 | * @throws
376 | * @since 2012-10-01
377 | * @version 1.0
378 | */
379 |
380 | public function getAllWhere($aTerms=null,$aTermsOR=null)
381 | {
382 | $res = Database::getInstance()->execute($this->prepareGetAllWhereQuery($aTerms,$aTermsOR));
383 | $aUsergroup = array();
384 |
385 | while ($oData = Database::getInstance()->fetch($res)) {
386 | $aUsergroup[] = get_object_vars($oData);
387 | }
388 |
389 | return $aUsergroup;
390 | }
391 |
392 | /**
393 | * Funkcja zwracająca tablię wybranych elementów Klucz - Wartość
394 | *
395 | * @param string $key Klucz
396 | * @param string $value Wartość
397 | * @return array Tablica elementów
398 | * @throws
399 | * @since 2012-06-18
400 | * @version 1.0
401 | */
402 | public function getAllKeyValue($key, $value, $addEmpty = false)
403 | {
404 | $res = Database::getInstance()->execute($this->prepareGetAllQuery());
405 | $aUsergroup = array();
406 |
407 | if ($addEmpty) {
408 | $aUsergroup[''] = '-';
409 | }
410 |
411 | while ($oData = Database::getInstance()->fetch($res)) {
412 | $aUsergroup[$oData->{$key}] = $oData->{$value};
413 | }
414 |
415 | return $aUsergroup;
416 | }
417 |
418 | /**
419 | * Funkcja usuwająca element o podanym id
420 | *
421 | * @param int $id id elementu do usunięcia
422 | * @return
423 | * @throws
424 | * @since 2012-06-15
425 | * @version 1.0
426 | */
427 | public function deleteById($id)
428 | {
429 | $a = Database::getInstance()->execute('DELETE FROM ' . $this->tableName . ' WHERE ' . $this->registryIdField . ' = ' . $id);
430 |
431 | /*
432 | * Zrzuć cache
433 | */
434 | $this->dropCache($id);
435 | }
436 |
437 | /**
438 | * Funkcja usuwająca element o podanych warunkach
439 | *
440 | * @param array $params tablica parametrów
441 | * @return
442 | * @throws
443 | * @since 2012-09-5
444 | * @version 1.0
445 | */
446 | public function delete($params)
447 | {
448 |
449 | $aWhere = array();
450 | foreach ($params as $key => $value) {
451 | $aWhere[] = '`' . $key . '`' . ' = ' . $value;
452 | }
453 | $sWhere = implode(' AND ', $aWhere);
454 | $a = Database::getInstance()->execute('DELETE FROM ' . $this->tableName . ' WHERE ' . $sWhere);
455 |
456 | /*
457 | * Zrzuć cache
458 | */
459 | $this->dropCache($this->aParams['id']);
460 | }
461 |
462 | public function checkIfExists($sKey, $mValue = null, $iId = null, $getId = false)
463 | {
464 | $sSql = 'SELECT ' . $this->registryIdField . ' FROM ' . $this->tableName . ' WHERE ';
465 |
466 | if (!is_array($sKey)) {
467 | $aParams = array($sKey => $mValue);
468 | }
469 | else {
470 | $aParams = $sKey;
471 | }
472 | $aWhere = array();
473 | foreach ($aParams as $sKey => $sValue) {
474 | switch (gettype($sValue)) {
475 | case 'integer':
476 | $aWhere[] = '`' . $sKey . '` = ' . $sValue;
477 | break;
478 | case 'string':
479 | $aWhere[] = '`' . $sKey . '` = "' . $sValue . '"';
480 | break;
481 | default:
482 | throw new \Exception('Bad value type. Only string and integer accepted');
483 | break;
484 | }
485 | }
486 | $sQuery = $sSql . implode(' AND ', $aWhere);
487 |
488 | $res = Database::getInstance()->execute($sQuery);
489 | $value = Database::getInstance()->fetch($res);
490 |
491 | if (!empty($value)) {
492 | if (!empty($iId)) {
493 | if ($value->{$this->registryIdField} == $iId) {
494 | return true;
495 | }
496 | else {
497 | return false;
498 | }
499 | }
500 | if ($getId) {
501 | return $value->{$this->registryIdField};
502 | }
503 | else {
504 | return true;
505 | }
506 | }
507 | else {
508 | if (!empty($iId)) {
509 | return true;
510 | }
511 | }
512 |
513 | return false;
514 | }
515 |
516 | /**
517 | * Metoda dodaje nowy rekord do bazy.
518 | *
519 | * @param array $aParams Tablica z danymi do dodania do bazy
520 | * @return int Identyfikator ostatnio dodanego rekordu
521 | * @throws
522 | * @since 2012-06-18
523 | * @version 1.0
524 | */
525 | public function add($aParams)
526 | {
527 | $aSet = array();
528 | $aValues = array();
529 |
530 | if (empty($this->tableFields)) {
531 | throw new \Exception('Brak tableFields dla modelu');
532 | }
533 |
534 | foreach ($aParams as $sKey => $mValue) {
535 | if ($mValue === null) {
536 | continue;
537 | }
538 | if (in_array($sKey, $this->tableFields)) {
539 | $aSet[] = '`' . $sKey . '`';
540 | switch (gettype($mValue)) {
541 | case 'integer':
542 | case 'boolean':
543 | $aValues[] = $mValue;
544 | break;
545 | case 'string':
546 | $aValues[] = "'$mValue'";
547 | }
548 | }
549 | }
550 |
551 | $sSet = implode(',', $aSet);
552 | $sValues = implode(',', $aValues);
553 |
554 | $sSql = 'INSERT INTO ' . $this->tableName . ' (' . $sSet . ') VALUES (' . $sValues . ')';
555 | $oDatabase = Database::getInstance();
556 | $oDatabase->execute($sSql);
557 | $iLastInsertId = $oDatabase->lastUsedID();
558 |
559 | return $iLastInsertId;
560 | }
561 |
562 | /**
563 | * Metoda edytuje dane w tabeli.
564 | *
565 | * @param array $aParams Tablica z danymi do edycji bazy
566 | * @param int $$iId Identyfikator rekordu
567 | * @return int Identyfikator ostatnio zedytowanego rekordu
568 | * @throws
569 | * @since 2012-06-19
570 | * @version 1.0
571 | */
572 | public function edit($aParams, $iId)
573 | {
574 | $aUpdate = array();
575 |
576 | foreach ($aParams as $sKey => $mValue) {
577 | if ($mValue === null) {
578 | continue;
579 | }
580 | if (in_array($sKey, $this->tableFields)) {
581 | switch (gettype($mValue)) {
582 | case 'integer':
583 | case 'boolean':
584 | $aUpdate[$sKey] = '`' . $sKey . '`' . '=' . $mValue;
585 | break;
586 | case 'string':
587 | $aUpdate[$sKey] = '`' . $sKey . '`' . '=' . "'$mValue'";
588 | }
589 | }
590 | }
591 |
592 | $sUpdate = implode(',', $aUpdate);
593 |
594 | $sSql = 'UPDATE ' . $this->tableName . ' SET ' . $sUpdate .
595 | ' WHERE ' . $this->registryIdField . '=' . $iId;
596 | $oDatabase = Database::getInstance();
597 | $oDatabase->execute($sSql);
598 | $iLastInsertId = $oDatabase->lastUsedID();
599 |
600 | /*
601 | * Zrzuć cache
602 | */
603 | $this->dropCache($iId);
604 |
605 | return $iLastInsertId;
606 | }
607 |
608 | }
--------------------------------------------------------------------------------
/diagram.ps:
--------------------------------------------------------------------------------
1 | %!PS-Adobe-3.0
2 | %%Creator: gEDA gschem 1.6.1-20100214-22-ga30f00b
3 | %%CreationDate: Mon Jul 1 10:36:51 2013
4 | %%Title: /home/pawel/Projects/raspberry_temperature_log/diagram.sch
5 | %%Author: (null)
6 | %%BoundingBox: 0 0 612 792
7 | %%Orientation: Landscape
8 | %%Pages: 1
9 | %%Endcomments
10 | %%BeginProlog
11 | % Prolog for gEDA, define all the functions needed for rendering
12 | % schematics on Postscript devices
13 |
14 |
15 | % Draw a line from the second coordinate to the first
16 | % x2 y2 x1 y1 width line -
17 | /line {
18 | setlinewidth
19 | % pop off first element and moveto
20 | moveto
21 | % pop off remaining elements and draw a line segment
22 | lineto
23 | % draw it
24 | stroke
25 | } bind def
26 |
27 |
28 | % Draw a dot
29 | % x y r dot -
30 | /dot {
31 | 0 360 arc fill
32 | } bind def
33 |
34 | % Draw a dot-dashed line, a bunch of lined segments,
35 | % if the array element only has length two, draw a dot.
36 | % [ [x2 y2 x1 y1] [x4 y4 x3 y3] [x5 y5] ... ] width dashed -
37 | /width 0 def
38 | /dashed {
39 | dup 2.0 div /width exch def
40 | setlinewidth
41 | % pop off each line segment and draw it as a dot or as a line
42 | {
43 | aload length 2 gt
44 | { moveto lineto stroke}
45 | { width dot } ifelse
46 | } forall
47 | } bind def
48 |
49 | % Draw an arc segment
50 | % x y r ang1 ang2 width darc -
51 | /darc {
52 | setlinewidth
53 | arc stroke
54 | } bind def
55 |
56 | % Draw a series of arc segment bits, if the array element only has a single
57 | % element in it, draw a dot.
58 | % [ [sa1 ea1] [sa2 ea2] ... ] x y r width dashedarc -
59 | /x 0 def
60 | /y 0 def
61 | /dashedarc {
62 | dup /width exch def
63 | setlinewidth
64 | /r exch def
65 | /y exch def
66 | /x exch def
67 | { aload length 1 gt
68 | {
69 | % this element had two angles in it
70 | % extract start and stop angles
71 | x y r % drop x y and r onto stack
72 | % at this point we have: sa ea x y r
73 | % we need x y r sa ea
74 | % so..
75 | 5 -2 roll
76 | % and add it to the current path, and draw it
77 | arc stroke
78 | } {
79 | % this element only had one angle in it, place a
80 | % filled dot at the appropriate place
81 | % compute center point of the arc using the angle
82 | % that is on the top of the stack
83 | dup % angle angle
84 | cos r mul x add % angle x
85 | exch % x angle
86 | sin r mul y add % x y
87 | width % x y width/2
88 | dot % draw the dot
89 | } ifelse
90 | } forall
91 |
92 | % Now draw it
93 | stroke
94 | } bind def
95 |
96 | % Draw a box
97 | % width height x y linethickness box -
98 | /box {
99 | setlinewidth
100 | moveto
101 | exch dup 0 rlineto % w h, h w w 0 -- Draw bottom line
102 | exch 0 exch rlineto % h w, w h 0, w 0 h -- Draw right line
103 | neg 0 rlineto % w, -w 0 -- Draw Top line
104 | closepath % finish and draw it
105 | stroke
106 | } bind def
107 |
108 | % Draw a filled box
109 | % width height x y fbox -
110 | /fbox {
111 | moveto
112 | exch dup 0 rlineto
113 | exch 0 exch rlineto
114 | neg 0 rlineto
115 | closepath
116 | fill
117 | } bind def
118 |
119 | % Font reincoding utilities
120 |
121 | % ISOLatin1Encoding, extended with remaining uncoded glyphs
122 | /ISOLatin1Extended [
123 | /.notdef /Lslash /lslash /OE /oe /Scaron /scaron /Zcaron /zcaron
124 | /Ydieresis /trademark /bullet /dagger /daggerdbl /ellipsis /emdash
125 | /endash /fi /fl /florin /fraction /guilsinglleft /guilsinglright
126 | /perthousand /quotedblbase /quotedblleft /quotedblright
127 | /quotesinglbase /quotesingle /.notdef /.notdef /.notdef /space
128 | /exclam /quotedbl /numbersign /dollar /percent /ampersand
129 | /quoteright /parenleft /parenright /asterisk /plus /comma /minus
130 | /period /slash /zero /one /two /three /four /five /six /seven /eight
131 | /nine /colon /semicolon /less /equal /greater /question /at /A /B /C
132 | /D /E /F /G /H /I /J /K /L /M /N /O /P /Q /R /S /T /U /V /W /X /Y /Z
133 | /bracketleft /backslash /bracketright /asciicircum /underscore
134 | /quoteleft /a /b /c /d /e /f /g /h /i /j /k /l /m /n /o /p /q /r /s
135 | /t /u /v /w /x /y /z /braceleft /bar /braceright /asciitilde
136 | /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
137 | /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
138 | /.notdef /.notdef /.notdef /dotlessi /grave /acute /circumflex
139 | /tilde /macron /breve /dotaccent /dieresis /.notdef /ring /cedilla
140 | /.notdef /hungarumlaut /ogonek /caron /space /exclamdown /cent
141 | /sterling /currency /yen /brokenbar /section /dieresis /copyright
142 | /ordfeminine /guillemotleft /logicalnot /hyphen /registered /macron
143 | /degree /plusminus /twosuperior /threesuperior /acute /mu /paragraph
144 | /periodcentered /cedilla /onesuperior /ordmasculine /guillemotright
145 | /onequarter /onehalf /threequarters /questiondown /Agrave /Aacute
146 | /Acircumflex /Atilde /Adieresis /Aring /AE /Ccedilla /Egrave /Eacute
147 | /Ecircumflex /Edieresis /Igrave /Iacute /Icircumflex /Idieresis /Eth
148 | /Ntilde /Ograve /Oacute /Ocircumflex /Otilde /Odieresis /multiply
149 | /Oslash /Ugrave /Uacute /Ucircumflex /Udieresis /Yacute /Thorn
150 | /germandbls /agrave /aacute /acircumflex /atilde /adieresis /aring
151 | /ae /ccedilla /egrave /eacute /ecircumflex /edieresis /igrave
152 | /iacute /icircumflex /idieresis /eth /ntilde /ograve /oacute
153 | /ocircumflex /otilde /odieresis /divide /oslash /ugrave /uacute
154 | /ucircumflex /udieresis /yacute /thorn /ydieresis
155 | ] def
156 |
157 | % `new-font-name' `encoding-vector' `old-font-name' RE -
158 | /RE {
159 | findfont
160 | dup maxlength dict begin {
161 | 1 index /FID ne { def } { pop pop } ifelse
162 | } forall
163 | /Encoding exch def
164 | dup /FontName exch def
165 | currentdict end definefont pop
166 | } bind def
167 |
168 | % Text handling functions, select the font and scale it, then we need
169 | % only to apply the appropriate transformations to get the text
170 | % justified into the right spots. The bad thing here is that we don't
171 | % do any kerning, so the output may look a bit strange.
172 |
173 | % compute the height of one character and return lly and ury
174 | % (char) charheight lly ury
175 | /charheight {
176 | gsave % push graphics state
177 | newpath % clear current path
178 | 0 0 moveto % Set current point
179 | false charpath % get path
180 | flattenpath % flatten path
181 | pathbbox % stack = llx lly urx ury
182 | exch pop % stack = llx lly ury
183 | 3 -1 roll pop % stack = lly ury
184 | grestore % pop graphics state
185 | } bind def
186 |
187 | % compute the height of a string, one character at a time
188 | % (string) stringheight lly ury
189 | /lly 0.0 def
190 | /ury 0.0 def
191 |
192 | /stringheight {
193 | /lly 0.0 def % initial value of heightmin
194 | /ury 0.0 def % initial value of heightmax
195 | { % work through string
196 | ( ) dup 0 4 -1 roll put % create one character string
197 | charheight % measure it's height
198 | dup ury gt { % if ury gt heightmax
199 | /ury exch def % update with new value
200 | } {
201 | pop % else discard ury
202 | } ifelse
203 | dup lly lt { % if lly lt heightmin
204 | /lly exch def % update with new value
205 | } {
206 | pop % else discard lly
207 | } ifelse
208 | } forall
209 | lly ury % Return the results
210 | } bind def
211 |
212 | % calculate the string width taking into account the escapes.
213 | /mystrx 0.0 def
214 | /mystry 0.0 def
215 | /mystresc false def
216 |
217 | /mystringwidth {
218 | /mystrx 0.0 def
219 | /mystry 0.0 def
220 | /mystresc false def
221 | { % work through string
222 | % did we process the escape character last?
223 | mystresc {
224 | % last character was escape
225 | % handle the escape
226 | % is it an _ = 95?
227 | dup 95 eq {
228 | pop % we don't need the character anymore
229 | % toggle drawing overbars
230 | 0.0 0.0 % make it like it never happened...
231 | } {
232 | % otherwise measure the character
233 | (\\ ) dup 1 4 -1 roll put % count a \ and the character
234 | stringwidth
235 | } ifelse
236 | % and reset the flag
237 | /mystresc false def
238 | } {
239 | % last character was not escape
240 | % is this escape
241 | dup 92 eq {
242 | % yes, escape character, set flag
243 | /mystresc true def
244 | pop % drop character
245 | 0.0 0.0 % make like this character has no width and height
246 | } {
247 | ( ) dup 0 4 -1 roll put % create one character string
248 | stringwidth % measure it's height/width
249 | } ifelse
250 | } ifelse
251 | % accumulate x and y movements
252 | mystry add /mystry exch def
253 | mystrx add /mystrx exch def
254 | } forall
255 | mystrx mystry % drop results on stack
256 | } bind def
257 |
258 | % Render a string with overbars
259 | %
260 | /escaped false def
261 | /drawoverbar false def
262 | /fontsize 0.0 def
263 |
264 | %string1 string2 append -
265 | /append {
266 | 2 copy length exch length add % find new length
267 | string dup % string1 string2 string string
268 | 4 2 roll % string string string1 string2
269 | 2 index 0 3 index
270 | % string string string1 string2 string 0 string1
271 | putinterval % string string string1 string2
272 | exch length exch putinterval
273 | } bind def
274 |
275 | % If drawoverbar is set, draw a line of the same length as the given string
276 | % string overbarshowline -
277 | /overbarshowline {
278 | % print overbar if necessary
279 | stringwidth pop 0
280 | drawoverbar {
281 | rlineto
282 | gsave stroke grestore
283 | } {
284 | rmoveto
285 | } ifelse
286 | } bind def
287 |
288 | % Draws overbars for the given string, then shows the string itself
289 | % string overbarshow
290 | /overbarshow {
291 | /overbarshowacc () def
292 | /overbarshowtxt () def
293 |
294 | gsave
295 | fontsize 10.0 div setlinewidth
296 | 0 fontsize rmoveto % move to (0,overbarheight)
297 |
298 | { % work through string
299 | escaped {
300 | % the last character was the escape
301 | % handle the escape
302 | % is it an _ = 95?
303 | dup 95 eq {
304 | pop % we don't need the character anymore
305 | overbarshowacc overbarshowline
306 | % toggle drawing overbars
307 | /drawoverbar drawoverbar not def
308 |
309 | % Append the contents off the accumulator to the text
310 | % string we're eventually going to show
311 | /overbarshowtxt overbarshowtxt overbarshowacc append def
312 |
313 | % clear accumulator
314 | /overbarshowacc () def
315 | } {
316 | % add to accumulator
317 | (\\ ) dup 1 4 -1 roll put
318 | overbarshowacc exch append
319 | /overbarshowacc exch def
320 | } ifelse
321 | % and reset the flag
322 | /escaped false def
323 | } {
324 | % check for escape character \ = 92
325 | dup 92 eq {
326 | % yes, escape character, set flag
327 | /escaped true def
328 | pop % drop character
329 | } {
330 | % add to accumulator
331 | ( ) dup 0 4 -1 roll put
332 | overbarshowacc exch append
333 | /overbarshowacc exch def
334 | } ifelse
335 | } ifelse
336 | } forall
337 | % Catch any leftovers
338 | overbarshowacc overbarshowline
339 | overbarshowtxt overbarshowacc append
340 |
341 | grestore
342 | show
343 | } bind def
344 |
345 | %
346 | % hcenter rjustify vcenter vjustify spacing [(line1) (line2) ... ] rot x y size text -
347 | /stringw 0.0 def
348 | /stringh 0.0 def
349 | /spacing 0.0 def
350 | /strings [ ] def
351 | /stringtxt ( ) def
352 | /stringcount 0 def
353 | /rot 0.0 def
354 |
355 | /text {
356 | gsave % save state for later
357 | /drawoverbar false def % start by not drawing overbars
358 |
359 | dup /fontsize exch def % save font size for corrections later
360 | % do font selection
361 | /gEDAFont findfont
362 | exch scalefont
363 | setfont
364 |
365 | % set up coordinates
366 | translate % move origin to given point
367 | rotate % rotate so that text is drawn
368 | 0 0 moveto
369 | dup length /stringcount exch def % Get number of strings
370 | /strings exch def % save strings
371 | /spacing exch def
372 | % do we have more than 1 string to render?
373 | stringcount 1 eq {
374 | /stringtxt strings aload pop def % get the string
375 | /stringw stringtxt mystringwidth pop neg def % get the -width
376 | /stringh stringtxt stringheight exch pop neg def% get the -height
377 |
378 | % First do vertical calculations
379 | % hcenter rjustify vcenter vjustify
380 | % vertical justification
381 | { 0 stringh rmoveto } if
382 | % vertical center
383 | { 0 stringh 0.3571425 mul rmoveto } if % not 0.5, so that
384 | % it looks nicer
385 | % Then do horizontal calculations
386 | % right justify
387 | { stringw 0 rmoveto } if
388 | % center
389 | { stringw 2.0 div 0 rmoveto } if
390 | % Draw the text
391 | stringtxt overbarshow
392 | } {
393 | % More than one line, compute bounding box for the text
394 |
395 | % vertical height, don't use the actual hieght of the characters
396 | % assume that the user wants to make the baselines line up with two
397 | % text boxes placed side by side
398 | /stringh stringcount spacing mul neg def
399 | % Now figure out horizontal size, this amounts to keeping track
400 | % of the longest string
401 | /stringw 0.0 def
402 | strings {
403 | mystringwidth pop
404 | dup stringw gt {
405 | /stringw exch def
406 | } {
407 | pop
408 | } ifelse
409 | } forall
410 | /stringw stringw neg def % get the -width
411 |
412 | % First do vertical calculations
413 | % hcenter rjustify vcenter vjustify
414 | % vertical justification
415 | { 0 stringh fontsize add rmoveto } if
416 | % vertical center
417 | { 0 stringh 0.5 mul rmoveto } if
418 | % Then do horizontal calculations
419 | % right justify
420 | { stringw 0 rmoveto } if
421 | % center
422 | { stringw 2.0 div 0 rmoveto } if
423 | % now move up to the first line and begin rendering
424 | 0 stringcount 1 sub spacing mul rmoveto
425 | strings {
426 | gsave % Save starting point
427 | overbarshow % render the text
428 | grestore
429 | 0 spacing neg rmoveto
430 | } forall
431 | } ifelse
432 | grestore % Restore old state
433 | } bind def
434 |
435 |
436 | %%EndProlog
437 | %%Page: 1 1
438 | /gEDAFont ISOLatin1Extended /Helvetica RE
439 | 2 setlinecap
440 | 0.072000 0.072000 scale
441 | 7485 500 translate 90 rotate
442 | 0.588235 0.588235 scale
443 | -40000 -40000 translate
444 | gsave
445 | 40000 40000 57000 40000 10 line
446 | 57000 40000 57000 51000 10 line
447 | 57000 51000 40000 51000 10 line
448 | 40000 51000 40000 40000 10 line
449 | 52900 40600 52900 40000 10 line
450 | gsave
451 | false false false false 208.000000 [(FILE:) ] 0 49500 40400 144.444443 text
452 | grestore
453 | gsave
454 | false false false false 208.000000 [(REVISION:) ] 0 53000 40400 144.444443 text
455 | grestore
456 | gsave
457 | false false false false 208.000000 [(DRAWN BY: ) ] 0 53000 40100 144.444443 text
458 | grestore
459 | gsave
460 | false false false false 208.000000 [(PAGE) ] 0 49500 40100 144.444443 text
461 | grestore
462 | gsave
463 | false false false false 208.000000 [(OF) ] 0 51200 40100 144.444443 text
464 | grestore
465 | gsave
466 | false false false false 208.000000 [(TITLE) ] 0 49500 40700 144.444443 text
467 | grestore
468 | 49400 40000 57000 40000 10 line
469 | 57000 40000 57000 41400 10 line
470 | 57000 41400 49400 41400 10 line
471 | 49400 41400 49400 40000 10 line
472 | 49400 40600 57000 40600 10 line
473 | grestore
474 | gsave
475 | 42100 50000 42300 50000 10 line
476 | 41500 50100 41500 49900 10 line
477 | 41500 50100 42000 50100 10 line
478 | 42000 50100 42100 50000 10 line
479 | 42100 50000 42000 49900 10 line
480 | 42000 49900 41500 49900 10 line
481 | grestore
482 | gsave
483 | 42100 47000 42300 47000 10 line
484 | 41500 47100 41500 46900 10 line
485 | 41500 47100 42000 47100 10 line
486 | 42000 47100 42100 47000 10 line
487 | 42100 47000 42000 46900 10 line
488 | 42000 46900 41500 46900 10 line
489 | grestore
490 | gsave
491 | 42100 48500 42300 48500 10 line
492 | 41500 48600 41500 48400 10 line
493 | 41500 48600 42000 48600 10 line
494 | 42000 48600 42100 48500 10 line
495 | 42100 48500 42000 48400 10 line
496 | 42000 48400 41500 48400 10 line
497 | grestore
498 | gsave
499 | 45900 50000 45700 50000 10 line
500 | 46500 49900 46500 50100 10 line
501 | 46500 49900 46000 49900 10 line
502 | 46000 49900 45900 50000 10 line
503 | 45900 50000 46000 50100 10 line
504 | 46000 50100 46500 50100 10 line
505 | grestore
506 | gsave
507 | 45900 48500 45700 48500 10 line
508 | 46500 48400 46500 48600 10 line
509 | 46500 48400 46000 48400 10 line
510 | 46000 48400 45900 48500 10 line
511 | 45900 48500 46000 48600 10 line
512 | 46000 48600 46500 48600 10 line
513 | grestore
514 | gsave
515 | 45900 47000 45700 47000 10 line
516 | 46500 46900 46500 47100 10 line
517 | 46500 46900 46000 46900 10 line
518 | 46000 46900 45900 47000 10 line
519 | 45900 47000 46000 47100 10 line
520 | 46000 47100 46500 47100 10 line
521 | grestore
522 | gsave
523 | false false false false 260.000000 [(Raspberry Pi) ] 0 41300 50400 180.555557 text
524 | grestore
525 | gsave
526 | false false false false 260.000000 [(DHT11) ] 0 45900 50300 180.555557 text
527 | grestore
528 | gsave
529 | false false false false 260.000000 [(Vcc) ] 0 46700 50000 180.555557 text
530 | grestore
531 | gsave
532 | false false false false 260.000000 [(Sig) ] 0 46700 48500 180.555557 text
533 | grestore
534 | gsave
535 | false false false false 260.000000 [(GND) ] 0 46700 47000 180.555557 text
536 | grestore
537 | gsave
538 | false false false false 260.000000 [(3.3V [1]) ] 0 40800 50000 180.555557 text
539 | grestore
540 | gsave
541 | false false false false 260.000000 [(GND [6]) ] 0 40700 47000 180.555557 text
542 | grestore
543 | gsave
544 | false false false false 260.000000 [(GPIO4 [7]) ] 0 40600 48600 180.555557 text
545 | grestore
546 | 42300 50000 45700 50000 10 line
547 | gsave
548 | 42700 49500 42900 49400 10 line
549 | 42900 49400 42700 49300 10 line
550 | 42700 49300 42900 49200 10 line
551 | 42900 49200 42700 49100 10 line
552 | 42700 49500 42900 49600 10 line
553 | 42900 49600 42800 49650 10 line
554 | 42800 49800 42800 49650 10 line
555 | 42800 48900 42800 49052 10 line
556 | 42700 49101 42800 49050 10 line
557 | grestore
558 | gsave
559 | false false false false 260.000000 [(10k) ] 90 42600 49100 180.555557 text
560 | grestore
561 | 42800 49800 42800 50000 10 line
562 | 42300 48500 45700 48500 10 line
563 | 42800 48900 42800 48500 10 line
564 | 42300 47000 45700 47000 10 line
565 | newpath
566 | 42800 50000
567 | 25
568 | 0 360 arc
569 | fill
570 | newpath
571 | 42800 50000
572 | 25
573 | 0 360 arc
574 | fill
575 | newpath
576 | 42800 50000
577 | 25
578 | 0 360 arc
579 | fill
580 | newpath
581 | 42800 48500
582 | 25
583 | 0 360 arc
584 | fill
585 | newpath
586 | 42800 48500
587 | 25
588 | 0 360 arc
589 | fill
590 | newpath
591 | 42800 48500
592 | 25
593 | 0 360 arc
594 | fill
595 | showpage
596 | %%End
597 |
--------------------------------------------------------------------------------
/website/css/docs.css:
--------------------------------------------------------------------------------
1 | /* Add additional stylesheets below
2 | -------------------------------------------------- */
3 | /*
4 | Bootstrap's documentation styles
5 | Special styles for presenting Bootstrap's documentation and examples
6 | */
7 |
8 |
9 | /* Body and structure
10 | -------------------------------------------------- */
11 |
12 | body {
13 | position: relative;
14 | padding-top: 40px;
15 | }
16 |
17 | /* Code in headings */
18 | h3 code {
19 | font-size: 14px;
20 | font-weight: normal;
21 | }
22 |
23 |
24 | /* Sections
25 | -------------------------------------------------- */
26 |
27 | /* padding for in-page bookmarks and fixed navbar */
28 | section {
29 | padding-top: 30px;
30 | }
31 | section > .page-header,
32 | section > .lead {
33 | color: #5a5a5a;
34 | }
35 | section > ul li {
36 | margin-bottom: 5px;
37 | }
38 |
39 | /* Separators (hr) */
40 | .bs-docs-separator {
41 | margin: 40px 0 39px;
42 | }
43 |
44 | /* Faded out hr */
45 | hr.soften {
46 | height: 1px;
47 | margin: 70px 0;
48 | background-image: -webkit-linear-gradient(left, rgba(0,0,0,0), rgba(0,0,0,.1), rgba(0,0,0,0));
49 | background-image: -moz-linear-gradient(left, rgba(0,0,0,0), rgba(0,0,0,.1), rgba(0,0,0,0));
50 | background-image: -ms-linear-gradient(left, rgba(0,0,0,0), rgba(0,0,0,.1), rgba(0,0,0,0));
51 | background-image: -o-linear-gradient(left, rgba(0,0,0,0), rgba(0,0,0,.1), rgba(0,0,0,0));
52 | border: 0;
53 | }
54 |
55 |
56 |
57 | /* Jumbotrons
58 | -------------------------------------------------- */
59 |
60 | /* Base class
61 | ------------------------- */
62 | .jumbotron {
63 | position: relative;
64 | padding: 40px 0;
65 | color: #fff;
66 | text-align: center;
67 | text-shadow: 0 1px 3px rgba(0,0,0,.4), 0 0 30px rgba(0,0,0,.075);
68 | background: #020031; /* Old browsers */
69 | background: -moz-linear-gradient(45deg, #020031 0%, #6d3353 100%); /* FF3.6+ */
70 | background: -webkit-gradient(linear, left bottom, right top, color-stop(0%,#020031), color-stop(100%,#6d3353)); /* Chrome,Safari4+ */
71 | background: -webkit-linear-gradient(45deg, #020031 0%,#6d3353 100%); /* Chrome10+,Safari5.1+ */
72 | background: -o-linear-gradient(45deg, #020031 0%,#6d3353 100%); /* Opera 11.10+ */
73 | background: -ms-linear-gradient(45deg, #020031 0%,#6d3353 100%); /* IE10+ */
74 | background: linear-gradient(45deg, #020031 0%,#6d3353 100%); /* W3C */
75 | filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#020031', endColorstr='#6d3353',GradientType=1 ); /* IE6-9 fallback on horizontal gradient */
76 | -webkit-box-shadow: inset 0 3px 7px rgba(0,0,0,.2), inset 0 -3px 7px rgba(0,0,0,.2);
77 | -moz-box-shadow: inset 0 3px 7px rgba(0,0,0,.2), inset 0 -3px 7px rgba(0,0,0,.2);
78 | box-shadow: inset 0 3px 7px rgba(0,0,0,.2), inset 0 -3px 7px rgba(0,0,0,.2);
79 | }
80 | .jumbotron h1 {
81 | font-size: 80px;
82 | font-weight: bold;
83 | letter-spacing: -1px;
84 | line-height: 1;
85 | }
86 | .jumbotron p {
87 | font-size: 24px;
88 | font-weight: 300;
89 | line-height: 1.25;
90 | margin-bottom: 30px;
91 | }
92 |
93 | /* Link styles (used on .masthead-links as well) */
94 | .jumbotron a {
95 | color: #fff;
96 | color: rgba(255,255,255,.5);
97 | -webkit-transition: all .2s ease-in-out;
98 | -moz-transition: all .2s ease-in-out;
99 | transition: all .2s ease-in-out;
100 | }
101 | .jumbotron a:hover {
102 | color: #fff;
103 | text-shadow: 0 0 10px rgba(255,255,255,.25);
104 | }
105 |
106 | /* Download button */
107 | .masthead .btn {
108 | padding: 19px 24px;
109 | font-size: 24px;
110 | font-weight: 200;
111 | color: #fff; /* redeclare to override the `.jumbotron a` */
112 | border: 0;
113 | -webkit-border-radius: 6px;
114 | -moz-border-radius: 6px;
115 | border-radius: 6px;
116 | -webkit-box-shadow: inset 0 1px 0 rgba(255,255,255,.1), 0 1px 5px rgba(0,0,0,.25);
117 | -moz-box-shadow: inset 0 1px 0 rgba(255,255,255,.1), 0 1px 5px rgba(0,0,0,.25);
118 | box-shadow: inset 0 1px 0 rgba(255,255,255,.1), 0 1px 5px rgba(0,0,0,.25);
119 | -webkit-transition: none;
120 | -moz-transition: none;
121 | transition: none;
122 | }
123 | .masthead .btn:hover {
124 | -webkit-box-shadow: inset 0 1px 0 rgba(255,255,255,.1), 0 1px 5px rgba(0,0,0,.25);
125 | -moz-box-shadow: inset 0 1px 0 rgba(255,255,255,.1), 0 1px 5px rgba(0,0,0,.25);
126 | box-shadow: inset 0 1px 0 rgba(255,255,255,.1), 0 1px 5px rgba(0,0,0,.25);
127 | }
128 | .masthead .btn:active {
129 | -webkit-box-shadow: inset 0 2px 4px rgba(0,0,0,.1), 0 1px 0 rgba(255,255,255,.1);
130 | -moz-box-shadow: inset 0 2px 4px rgba(0,0,0,.1), 0 1px 0 rgba(255,255,255,.1);
131 | box-shadow: inset 0 2px 4px rgba(0,0,0,.1), 0 1px 0 rgba(255,255,255,.1);
132 | }
133 |
134 |
135 | /* Pattern overlay
136 | ------------------------- */
137 | .jumbotron .container {
138 | position: relative;
139 | z-index: 2;
140 | }
141 | .jumbotron:after {
142 | content: '';
143 | display: block;
144 | position: absolute;
145 | top: 0;
146 | right: 0;
147 | bottom: 0;
148 | left: 0;
149 | background: url(../img/bs-docs-masthead-pattern.png) repeat center center;
150 | opacity: .4;
151 | }
152 |
153 | /* Masthead (docs home)
154 | ------------------------- */
155 | .masthead {
156 | padding: 70px 0 80px;
157 | margin-bottom: 0;
158 | color: #fff;
159 | }
160 | .masthead h1 {
161 | font-size: 120px;
162 | line-height: 1;
163 | letter-spacing: -2px;
164 | }
165 | .masthead p {
166 | font-size: 40px;
167 | font-weight: 200;
168 | line-height: 1.25;
169 | }
170 |
171 | /* Textual links in masthead */
172 | .masthead-links {
173 | margin: 0;
174 | list-style: none;
175 | }
176 | .masthead-links li {
177 | display: inline;
178 | padding: 0 10px;
179 | color: rgba(255,255,255,.25);
180 | }
181 |
182 | /* Social proof buttons from GitHub & Twitter */
183 | .bs-docs-social {
184 | padding: 15px 0;
185 | text-align: center;
186 | background-color: #f5f5f5;
187 | border-top: 1px solid #fff;
188 | border-bottom: 1px solid #ddd;
189 | }
190 |
191 | /* Quick links on Home */
192 | .bs-docs-social-buttons {
193 | margin-left: 0;
194 | margin-bottom: 0;
195 | padding-left: 0;
196 | list-style: none;
197 | }
198 | .bs-docs-social-buttons li {
199 | display: inline-block;
200 | padding: 5px 8px;
201 | line-height: 1;
202 | *display: inline;
203 | *zoom: 1;
204 | }
205 |
206 | /* Subhead (other pages)
207 | ------------------------- */
208 | .subhead {
209 | text-align: left;
210 | border-bottom: 1px solid #ddd;
211 | }
212 | .subhead h1 {
213 | font-size: 60px;
214 | }
215 | .subhead p {
216 | margin-bottom: 20px;
217 | }
218 | .subhead .navbar {
219 | display: none;
220 | }
221 |
222 |
223 |
224 | /* Marketing section of Overview
225 | -------------------------------------------------- */
226 |
227 | .marketing {
228 | text-align: center;
229 | color: #5a5a5a;
230 | }
231 | .marketing h1 {
232 | margin: 60px 0 10px;
233 | font-size: 60px;
234 | font-weight: 200;
235 | line-height: 1;
236 | letter-spacing: -1px;
237 | }
238 | .marketing h2 {
239 | font-weight: 200;
240 | margin-bottom: 5px;
241 | }
242 | .marketing p {
243 | font-size: 16px;
244 | line-height: 1.5;
245 | }
246 | .marketing .marketing-byline {
247 | margin-bottom: 40px;
248 | font-size: 20px;
249 | font-weight: 300;
250 | line-height: 1.25;
251 | color: #999;
252 | }
253 | .marketing img {
254 | display: block;
255 | margin: 0 auto 30px;
256 | }
257 |
258 |
259 |
260 | /* Footer
261 | -------------------------------------------------- */
262 |
263 | .footer {
264 | padding: 20px 0;
265 | margin-top: 20px;
266 | border-top: 1px solid #e5e5e5;
267 | background-color: #f5f5f5;
268 | }
269 | .footer p {
270 | margin-bottom: 0;
271 | color: #777;
272 | }
273 | .footer-links {
274 | margin: 10px 0;
275 | }
276 | .footer-links li {
277 | display: inline;
278 | padding: 0 2px;
279 | }
280 | .footer-links li:first-child {
281 | padding-left: 0;
282 | }
283 |
284 |
285 |
286 | /* Special grid styles
287 | -------------------------------------------------- */
288 |
289 | .show-grid {
290 | margin-top: 10px;
291 | margin-bottom: 20px;
292 | }
293 | .show-grid [class*="span"] {
294 | background-color: #eee;
295 | text-align: center;
296 | -webkit-border-radius: 3px;
297 | -moz-border-radius: 3px;
298 | border-radius: 3px;
299 | min-height: 40px;
300 | line-height: 40px;
301 | }
302 | .show-grid:hover [class*="span"] {
303 | background: #ddd;
304 | }
305 | .show-grid .show-grid {
306 | margin-top: 0;
307 | margin-bottom: 0;
308 | }
309 | .show-grid .show-grid [class*="span"] {
310 | background-color: #ccc;
311 | }
312 |
313 |
314 |
315 | /* Mini layout previews
316 | -------------------------------------------------- */
317 | .mini-layout {
318 | border: 1px solid #ddd;
319 | -webkit-border-radius: 6px;
320 | -moz-border-radius: 6px;
321 | border-radius: 6px;
322 | -webkit-box-shadow: 0 1px 2px rgba(0,0,0,.075);
323 | -moz-box-shadow: 0 1px 2px rgba(0,0,0,.075);
324 | box-shadow: 0 1px 2px rgba(0,0,0,.075);
325 | }
326 | .mini-layout,
327 | .mini-layout .mini-layout-body,
328 | .mini-layout.fluid .mini-layout-sidebar {
329 | height: 300px;
330 | }
331 | .mini-layout {
332 | margin-bottom: 20px;
333 | padding: 9px;
334 | }
335 | .mini-layout div {
336 | -webkit-border-radius: 3px;
337 | -moz-border-radius: 3px;
338 | border-radius: 3px;
339 | }
340 | .mini-layout .mini-layout-body {
341 | background-color: #dceaf4;
342 | margin: 0 auto;
343 | width: 70%;
344 | }
345 | .mini-layout.fluid .mini-layout-sidebar,
346 | .mini-layout.fluid .mini-layout-header,
347 | .mini-layout.fluid .mini-layout-body {
348 | float: left;
349 | }
350 | .mini-layout.fluid .mini-layout-sidebar {
351 | background-color: #bbd8e9;
352 | width: 20%;
353 | }
354 | .mini-layout.fluid .mini-layout-body {
355 | width: 77.5%;
356 | margin-left: 2.5%;
357 | }
358 |
359 |
360 |
361 | /* Download page
362 | -------------------------------------------------- */
363 |
364 | .download .page-header {
365 | margin-top: 36px;
366 | }
367 | .page-header .toggle-all {
368 | margin-top: 5px;
369 | }
370 |
371 | /* Space out h3s when following a section */
372 | .download h3 {
373 | margin-bottom: 5px;
374 | }
375 | .download-builder input + h3,
376 | .download-builder .checkbox + h3 {
377 | margin-top: 9px;
378 | }
379 |
380 | /* Fields for variables */
381 | .download-builder input[type=text] {
382 | margin-bottom: 9px;
383 | font-family: Menlo, Monaco, "Courier New", monospace;
384 | font-size: 12px;
385 | color: #d14;
386 | }
387 | .download-builder input[type=text]:focus {
388 | background-color: #fff;
389 | }
390 |
391 | /* Custom, larger checkbox labels */
392 | .download .checkbox {
393 | padding: 6px 10px 6px 25px;
394 | font-size: 13px;
395 | line-height: 18px;
396 | color: #555;
397 | background-color: #f9f9f9;
398 | -webkit-border-radius: 3px;
399 | -moz-border-radius: 3px;
400 | border-radius: 3px;
401 | cursor: pointer;
402 | }
403 | .download .checkbox:hover {
404 | color: #333;
405 | background-color: #f5f5f5;
406 | }
407 | .download .checkbox small {
408 | font-size: 12px;
409 | color: #777;
410 | }
411 |
412 | /* Variables section */
413 | #variables label {
414 | margin-bottom: 0;
415 | }
416 |
417 | /* Giant download button */
418 | .download-btn {
419 | margin: 36px 0 108px;
420 | }
421 | #download p,
422 | #download h4 {
423 | max-width: 50%;
424 | margin: 0 auto;
425 | color: #999;
426 | text-align: center;
427 | }
428 | #download h4 {
429 | margin-bottom: 0;
430 | }
431 | #download p {
432 | margin-bottom: 18px;
433 | }
434 | .download-btn .btn {
435 | display: block;
436 | width: auto;
437 | padding: 19px 24px;
438 | margin-bottom: 27px;
439 | font-size: 30px;
440 | line-height: 1;
441 | text-align: center;
442 | -webkit-border-radius: 6px;
443 | -moz-border-radius: 6px;
444 | border-radius: 6px;
445 | }
446 |
447 |
448 |
449 | /* Misc
450 | -------------------------------------------------- */
451 |
452 | /* Make tables spaced out a bit more */
453 | h2 + table,
454 | h3 + table,
455 | h4 + table,
456 | h2 + .row {
457 | margin-top: 5px;
458 | }
459 |
460 | /* Example sites showcase */
461 | .example-sites {
462 | xmargin-left: 20px;
463 | }
464 | .example-sites img {
465 | max-width: 100%;
466 | margin: 0 auto;
467 | }
468 |
469 | .scrollspy-example {
470 | height: 200px;
471 | overflow: auto;
472 | position: relative;
473 | }
474 |
475 |
476 | /* Fake the :focus state to demo it */
477 | .focused {
478 | border-color: rgba(82,168,236,.8);
479 | -webkit-box-shadow: inset 0 1px 3px rgba(0,0,0,.1), 0 0 8px rgba(82,168,236,.6);
480 | -moz-box-shadow: inset 0 1px 3px rgba(0,0,0,.1), 0 0 8px rgba(82,168,236,.6);
481 | box-shadow: inset 0 1px 3px rgba(0,0,0,.1), 0 0 8px rgba(82,168,236,.6);
482 | outline: 0;
483 | }
484 |
485 | /* For input sizes, make them display block */
486 | .docs-input-sizes select,
487 | .docs-input-sizes input[type=text] {
488 | display: block;
489 | margin-bottom: 9px;
490 | }
491 |
492 | /* Icons
493 | ------------------------- */
494 | .the-icons {
495 | margin-left: 0;
496 | list-style: none;
497 | }
498 | .the-icons li {
499 | float: left;
500 | width: 25%;
501 | line-height: 25px;
502 | }
503 | .the-icons i:hover {
504 | background-color: rgba(255,0,0,.25);
505 | }
506 |
507 | /* Example page
508 | ------------------------- */
509 | .bootstrap-examples p {
510 | font-size: 13px;
511 | line-height: 18px;
512 | }
513 | .bootstrap-examples .thumbnail {
514 | margin-bottom: 9px;
515 | background-color: #fff;
516 | }
517 |
518 |
519 |
520 | /* Bootstrap code examples
521 | -------------------------------------------------- */
522 |
523 | /* Base class */
524 | .bs-docs-example {
525 | position: relative;
526 | margin: 15px 0;
527 | padding: 39px 19px 14px;
528 | *padding-top: 19px;
529 | background-color: #fff;
530 | border: 1px solid #ddd;
531 | -webkit-border-radius: 4px;
532 | -moz-border-radius: 4px;
533 | border-radius: 4px;
534 | }
535 |
536 | /* Echo out a label for the example */
537 | .bs-docs-example:after {
538 | content: "Example";
539 | position: absolute;
540 | top: -1px;
541 | left: -1px;
542 | padding: 3px 7px;
543 | font-size: 12px;
544 | font-weight: bold;
545 | background-color: #f5f5f5;
546 | border: 1px solid #ddd;
547 | color: #9da0a4;
548 | -webkit-border-radius: 4px 0 4px 0;
549 | -moz-border-radius: 4px 0 4px 0;
550 | border-radius: 4px 0 4px 0;
551 | }
552 |
553 | /* Remove spacing between an example and it's code */
554 | .bs-docs-example + .prettyprint {
555 | margin-top: -20px;
556 | padding-top: 15px;
557 | }
558 |
559 | /* Tweak examples
560 | ------------------------- */
561 | .bs-docs-example > p:last-child {
562 | margin-bottom: 0;
563 | }
564 | .bs-docs-example .table,
565 | .bs-docs-example .progress,
566 | .bs-docs-example .well,
567 | .bs-docs-example .alert,
568 | .bs-docs-example .hero-unit,
569 | .bs-docs-example .pagination,
570 | .bs-docs-example .navbar,
571 | .bs-docs-example > .nav,
572 | .bs-docs-example blockquote {
573 | margin-bottom: 5px;
574 | }
575 | .bs-docs-example .pagination {
576 | margin-top: 0;
577 | }
578 | .bs-navbar-top-example,
579 | .bs-navbar-bottom-example {
580 | z-index: 1;
581 | padding: 0;
582 | height: 90px;
583 | overflow: hidden; /* cut the drop shadows off */
584 | }
585 | .bs-navbar-top-example .navbar-fixed-top,
586 | .bs-navbar-bottom-example .navbar-fixed-bottom {
587 | margin-left: 0;
588 | margin-right: 0;
589 | }
590 | .bs-navbar-top-example {
591 | -webkit-border-radius: 0 0 4px 4px;
592 | -moz-border-radius: 0 0 4px 4px;
593 | border-radius: 0 0 4px 4px;
594 | }
595 | .bs-navbar-top-example:after {
596 | top: auto;
597 | bottom: -1px;
598 | -webkit-border-radius: 0 4px 0 4px;
599 | -moz-border-radius: 0 4px 0 4px;
600 | border-radius: 0 4px 0 4px;
601 | }
602 | .bs-navbar-bottom-example {
603 | -webkit-border-radius: 4px 4px 0 0;
604 | -moz-border-radius: 4px 4px 0 0;
605 | border-radius: 4px 4px 0 0;
606 | }
607 | .bs-navbar-bottom-example .navbar {
608 | margin-bottom: 0;
609 | }
610 | form.bs-docs-example {
611 | padding-bottom: 19px;
612 | }
613 |
614 | /* Images */
615 | .bs-docs-example-images img {
616 | margin: 10px;
617 | display: inline-block;
618 | }
619 |
620 | /* Tooltips */
621 | .bs-docs-tooltip-examples {
622 | text-align: center;
623 | margin: 0 0 10px;
624 | list-style: none;
625 | }
626 | .bs-docs-tooltip-examples li {
627 | display: inline;
628 | padding: 0 10px;
629 | }
630 |
631 | /* Popovers */
632 | .bs-docs-example-popover {
633 | padding-bottom: 24px;
634 | background-color: #f9f9f9;
635 | }
636 | .bs-docs-example-popover .popover {
637 | position: relative;
638 | display: block;
639 | float: left;
640 | width: 260px;
641 | margin: 20px;
642 | }
643 |
644 |
645 |
646 | /* Responsive docs
647 | -------------------------------------------------- */
648 |
649 | /* Utility classes table
650 | ------------------------- */
651 | .responsive-utilities th small {
652 | display: block;
653 | font-weight: normal;
654 | color: #999;
655 | }
656 | .responsive-utilities tbody th {
657 | font-weight: normal;
658 | }
659 | .responsive-utilities td {
660 | text-align: center;
661 | }
662 | .responsive-utilities td.is-visible {
663 | color: #468847;
664 | background-color: #dff0d8 !important;
665 | }
666 | .responsive-utilities td.is-hidden {
667 | color: #ccc;
668 | background-color: #f9f9f9 !important;
669 | }
670 |
671 | /* Responsive tests
672 | ------------------------- */
673 | .responsive-utilities-test {
674 | margin-top: 5px;
675 | margin-left: 0;
676 | list-style: none;
677 | overflow: hidden; /* clear floats */
678 | }
679 | .responsive-utilities-test li {
680 | position: relative;
681 | float: left;
682 | width: 25%;
683 | height: 43px;
684 | font-size: 14px;
685 | font-weight: bold;
686 | line-height: 43px;
687 | color: #999;
688 | text-align: center;
689 | border: 1px solid #ddd;
690 | -webkit-border-radius: 4px;
691 | -moz-border-radius: 4px;
692 | border-radius: 4px;
693 | }
694 | .responsive-utilities-test li + li {
695 | margin-left: 10px;
696 | }
697 | .responsive-utilities-test span {
698 | position: absolute;
699 | top: -1px;
700 | left: -1px;
701 | right: -1px;
702 | bottom: -1px;
703 | -webkit-border-radius: 4px;
704 | -moz-border-radius: 4px;
705 | border-radius: 4px;
706 | }
707 | .responsive-utilities-test span {
708 | color: #468847;
709 | background-color: #dff0d8;
710 | border: 1px solid #d6e9c6;
711 | }
712 |
713 |
714 |
715 | /* Sidenav for Docs
716 | -------------------------------------------------- */
717 |
718 | .bs-docs-sidenav {
719 | width: 228px;
720 | margin: 30px 0 0;
721 | padding: 0;
722 | background-color: #fff;
723 | -webkit-border-radius: 6px;
724 | -moz-border-radius: 6px;
725 | border-radius: 6px;
726 | -webkit-box-shadow: 0 1px 4px rgba(0,0,0,.065);
727 | -moz-box-shadow: 0 1px 4px rgba(0,0,0,.065);
728 | box-shadow: 0 1px 4px rgba(0,0,0,.065);
729 | }
730 | .bs-docs-sidenav > li > a {
731 | display: block;
732 | width: 190px \9;
733 | margin: 0 0 -1px;
734 | padding: 8px 14px;
735 | border: 1px solid #e5e5e5;
736 | }
737 | .bs-docs-sidenav > li:first-child > a {
738 | -webkit-border-radius: 6px 6px 0 0;
739 | -moz-border-radius: 6px 6px 0 0;
740 | border-radius: 6px 6px 0 0;
741 | }
742 | .bs-docs-sidenav > li:last-child > a {
743 | -webkit-border-radius: 0 0 6px 6px;
744 | -moz-border-radius: 0 0 6px 6px;
745 | border-radius: 0 0 6px 6px;
746 | }
747 | .bs-docs-sidenav > .active > a {
748 | position: relative;
749 | z-index: 2;
750 | padding: 9px 15px;
751 | border: 0;
752 | text-shadow: 0 1px 0 rgba(0,0,0,.15);
753 | -webkit-box-shadow: inset 1px 0 0 rgba(0,0,0,.1), inset -1px 0 0 rgba(0,0,0,.1);
754 | -moz-box-shadow: inset 1px 0 0 rgba(0,0,0,.1), inset -1px 0 0 rgba(0,0,0,.1);
755 | box-shadow: inset 1px 0 0 rgba(0,0,0,.1), inset -1px 0 0 rgba(0,0,0,.1);
756 | }
757 | /* Chevrons */
758 | .bs-docs-sidenav .icon-chevron-right {
759 | float: right;
760 | margin-top: 2px;
761 | margin-right: -6px;
762 | opacity: .25;
763 | }
764 | .bs-docs-sidenav > li > a:hover {
765 | background-color: #f5f5f5;
766 | }
767 | .bs-docs-sidenav a:hover .icon-chevron-right {
768 | opacity: .5;
769 | }
770 | .bs-docs-sidenav .active .icon-chevron-right,
771 | .bs-docs-sidenav .active a:hover .icon-chevron-right {
772 | background-image: url(../img/glyphicons-halflings-white.png);
773 | opacity: 1;
774 | }
775 | .bs-docs-sidenav.affix {
776 | top: 40px;
777 | }
778 | .bs-docs-sidenav.affix-bottom {
779 | position: absolute;
780 | top: auto;
781 | bottom: 270px;
782 | }
783 |
784 |
785 |
786 |
787 | /* Responsive
788 | -------------------------------------------------- */
789 |
790 | /* Desktop large
791 | ------------------------- */
792 | @media (min-width: 1200px) {
793 | .bs-docs-container {
794 | max-width: 970px;
795 | }
796 | .bs-docs-sidenav {
797 | width: 258px;
798 | }
799 | .bs-docs-sidenav > li > a {
800 | width: 230px \9; /* Override the previous IE8-9 hack */
801 | }
802 | }
803 |
804 | /* Desktop
805 | ------------------------- */
806 | @media (max-width: 980px) {
807 | /* Unfloat brand */
808 | body > .navbar-fixed-top .brand {
809 | float: left;
810 | margin-left: 0;
811 | padding-left: 10px;
812 | padding-right: 10px;
813 | }
814 |
815 | /* Inline-block quick links for more spacing */
816 | .quick-links li {
817 | display: inline-block;
818 | margin: 5px;
819 | }
820 |
821 | /* When affixed, space properly */
822 | .bs-docs-sidenav {
823 | top: 0;
824 | margin-top: 30px;
825 | margin-right: 0;
826 | }
827 | }
828 |
829 | /* Tablet to desktop
830 | ------------------------- */
831 | @media (min-width: 768px) and (max-width: 980px) {
832 | /* Remove any padding from the body */
833 | body {
834 | padding-top: 0;
835 | }
836 | /* Widen masthead and social buttons to fill body padding */
837 | .jumbotron {
838 | margin-top: -20px; /* Offset bottom margin on .navbar */
839 | }
840 | /* Adjust sidenav width */
841 | .bs-docs-sidenav {
842 | width: 166px;
843 | margin-top: 20px;
844 | }
845 | .bs-docs-sidenav.affix {
846 | top: 0;
847 | }
848 | }
849 |
850 | /* Tablet
851 | ------------------------- */
852 | @media (max-width: 767px) {
853 | /* Remove any padding from the body */
854 | body {
855 | padding-top: 0;
856 | }
857 |
858 | /* Widen masthead and social buttons to fill body padding */
859 | .jumbotron {
860 | padding: 40px 20px;
861 | margin-top: -20px; /* Offset bottom margin on .navbar */
862 | margin-right: -20px;
863 | margin-left: -20px;
864 | }
865 | .masthead h1 {
866 | font-size: 90px;
867 | }
868 | .masthead p,
869 | .masthead .btn {
870 | font-size: 24px;
871 | }
872 | .marketing .span4 {
873 | margin-bottom: 40px;
874 | }
875 | .bs-docs-social {
876 | margin: 0 -20px;
877 | }
878 |
879 | /* Space out the show-grid examples */
880 | .show-grid [class*="span"] {
881 | margin-bottom: 5px;
882 | }
883 |
884 | /* Sidenav */
885 | .bs-docs-sidenav {
886 | width: auto;
887 | margin-bottom: 20px;
888 | }
889 | .bs-docs-sidenav.affix {
890 | position: static;
891 | width: auto;
892 | top: 0;
893 | }
894 |
895 | /* Unfloat the back to top link in footer */
896 | .footer {
897 | margin-left: -20px;
898 | margin-right: -20px;
899 | padding-left: 20px;
900 | padding-right: 20px;
901 | }
902 | .footer p {
903 | margin-bottom: 9px;
904 | }
905 | }
906 |
907 | /* Landscape phones
908 | ------------------------- */
909 | @media (max-width: 480px) {
910 | /* Remove padding above jumbotron */
911 | body {
912 | padding-top: 0;
913 | }
914 |
915 | /* Change up some type stuff */
916 | h2 small {
917 | display: block;
918 | }
919 |
920 | /* Downsize the jumbotrons */
921 | .jumbotron h1 {
922 | font-size: 45px;
923 | }
924 | .jumbotron p,
925 | .jumbotron .btn {
926 | font-size: 18px;
927 | }
928 | .jumbotron .btn {
929 | display: block;
930 | margin: 0 auto;
931 | }
932 |
933 | /* center align subhead text like the masthead */
934 | .subhead h1,
935 | .subhead p {
936 | text-align: center;
937 | }
938 |
939 | /* Marketing on home */
940 | .marketing h1 {
941 | font-size: 30px;
942 | }
943 | .marketing-byline {
944 | font-size: 18px;
945 | }
946 |
947 | /* center example sites */
948 | .example-sites {
949 | margin-left: 0;
950 | }
951 | .example-sites > li {
952 | float: none;
953 | display: block;
954 | max-width: 280px;
955 | margin: 0 auto 18px;
956 | text-align: center;
957 | }
958 | .example-sites .thumbnail > img {
959 | max-width: 270px;
960 | }
961 |
962 | /* Do our best to make tables work in narrow viewports */
963 | table code {
964 | white-space: normal;
965 | word-wrap: break-word;
966 | word-break: break-all;
967 | }
968 |
969 | /* Modal example */
970 | .modal-example .modal {
971 | position: relative;
972 | top: auto;
973 | right: auto;
974 | bottom: auto;
975 | left: auto;
976 | }
977 |
978 | /* Tighten up footer */
979 | .footer {
980 | padding-top: 20px;
981 | padding-bottom: 20px;
982 | }
983 | /* Unfloat the back to top in footer to prevent odd text wrapping */
984 | .footer .pull-right {
985 | float: none;
986 | }
987 | }
988 |
--------------------------------------------------------------------------------