diff --git a/.editorconfig b/.editorconfig deleted file mode 100644 index 021f717..0000000 --- a/.editorconfig +++ /dev/null @@ -1,13 +0,0 @@ -# EditorConfig is awesome: http://EditorConfig.org -root = true - -[*] -indent_style = tab -end_of_line = lf -trim_trailing_whitespace = true -insert_final_newline = true -charset = utf-8 - -[{bower.json,package.json,.travis.yml}] -indent_style = space -indent_size = 2 \ No newline at end of file diff --git a/.gitignore b/.gitignore deleted file mode 100644 index c940cd9..0000000 --- a/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -.idea -node_modules -bower_components diff --git a/.npmignore b/.npmignore deleted file mode 100644 index 99da7d8..0000000 --- a/.npmignore +++ /dev/null @@ -1,6 +0,0 @@ -* -!pictures/** -!index.html -!License.md -!Readme.md -!package.json diff --git a/Contributing.md b/Contributing.md deleted file mode 100644 index 8791460..0000000 --- a/Contributing.md +++ /dev/null @@ -1,34 +0,0 @@ -# Contributing to Shower - -You’re always welcome to contibute! There are seven repositories in Shower project: - -- [Core](https://github.com/shower/core) of Shower -- [Shower](https://github.com/shower/template) template -- [Ribbon](https://github.com/shower/ribbon) theme for Shower -- [Bright](https://github.com/shower/bright) theme for Shower -- [Jekyller](https://github.com/shower/jekyller) generator for Shower -- [Sho.io](https://github.com/shower/sho.io) online service -- [Shwr.me](https://github.com/shower/sho.io) service project - -The most important part of the project is the [Core](https://github.com/shower/core) repository, containing [shower.js](https://github.com/shower/core/blob/master/shower.js) file. - -## Issues - -Before contributing to Shower, please read through [Issues](https://github.com/shower/shower/issues) to see open bugs and feature requests. If you have any feature to add to Shower or found a bug and want to fix it, please make sure you file an issue first. - -## Process - -To contribute to Shower fork needed repository and start making changes. Don’t forget to add upstream link to original repository and keep your fork updated. Once you finished, send pull request back to original repository and supply clear description or link to existing issue. - -## Code style - -Please keep existing code style while contributing to Shower and be ready for code review by Shower maintainers. It’s strongly recommended to install [EditorConfig](http://editorconfig.org) extension to your editor and validate your JavaScript changes using [JSHint](http://jshint.com/). - -By historical reasons, Shower project is using tabs instead of spaces for code indentation. It’s not a big deal to keep this rule while contributing using you code editor options, even if your code style is 13.4 spaces. - -## Language - -English is the main language for Shower project. All discussions and commit messages should be in English, no matter if it’s good or bad. The second language of Shower is Russian. Offical Shower themes are always compatible with Cyrillic and Russian typography. All documentation to Shower is always localized to Russian. - ---- -If you have any questions, please ask [@shower_me](http://twitter.com/shower_me/) or file an [issue](https://github.com/shower/shower/issues/new). \ No newline at end of file diff --git a/EventEmitter.js b/EventEmitter.js new file mode 100644 index 0000000..39a04b0 --- /dev/null +++ b/EventEmitter.js @@ -0,0 +1,86 @@ +/** + * Constructs EventEmitter + * + * @constructor + * @this {EventEmitter} + */ + +function EventEmitter() { + /** @private */ this.__listeners = {}; + +/** + * Adds event listener + * + * + * @this {EventEmitter} + * @param {string} event + * @param {func} listener + */ + EventEmitter.prototype.on = function (event, listener) { + if (this.__listeners[event] === undefined) { + this.__listeners[event] = []; + } + this.__listeners[event].push(listener); + }; + +/** + * Removes event listener + * + * + * @this {EventEmitter} + * @param {string} event + * @param {func} listener + */ + EventEmitter.prototype.off = function (event, listener) { + if (this.__listeners[event] !== undefined) { + for (var i = 0; i < this.__listeners[event].length; i++) { + if (this.__listeners[event][i] === listener) + this.__listeners[event].splice(i,1); + } + } + }; + +/** + * Returns function to call in setTimeout + * + * @private + * @this {EventEmitter} + * @param {string} event + * @param {int} position + * @param {string} data Optional data + */ + EventEmitter.prototype.__returnFunction = function (event, position, data) { + return function () { + this.__listeners[event][position](data); + }.bind(this); + }; + +/** + * Emits event + * + * + * @this {EventEmitter} + * @param {string} event + * @param {string} data Optional data + */ + EventEmitter.prototype.emit = function (event, data) { + if (this.__listeners[event] !== undefined) { + for (var i = 0; i < this.__listeners[event].length; i++) { + setTimeout(this.__returnFunction(event, i, data), 0); + } + } + }; + +} + +var isNodeJS = function() { + if (typeof module !== 'undefined' && module.exports) { + return true; + } else { + return false; + } +}; + +if (isNodeJS()) { + exports.EventEmitter = EventEmitter; +} \ No newline at end of file diff --git a/Gruntfile.js b/Gruntfile.js deleted file mode 100644 index 8acd709..0000000 --- a/Gruntfile.js +++ /dev/null @@ -1,115 +0,0 @@ -module.exports = function(grunt) { - - require('load-grunt-tasks')(grunt); - - grunt.initConfig({ - bump: { - options: { - files: ['package.json', 'bower.json'], - commitFiles: ['package.json', 'bower.json'], - pushTo: 'origin' - } - }, - copy: { - prepare: { - files: [{ - src: [ - '**', - '!node_modules/**', - '!bower_components/**', - '!Contributing.md', - '!Gruntfile.js', - '!License.md', - '!Readme.md', - '!bower.json', - '!package.json' - ], - dest: 'temp/pres/' - },{ - expand: true, - cwd: 'node_modules/shower-core/', - src: [ - '**', - '!package.json', - '!Readme.md' - ], - dest: 'temp/pres/shower/' - },{ - expand: true, - cwd: 'node_modules/shower-ribbon/', - src: [ - '**', - '!package.json', - '!Readme.md' - ], - dest: 'temp/pres/shower/themes/ribbon/' - },{ - expand: true, - cwd: 'node_modules/shower-bright/', - src: [ - '**', - '!package.json', - '!Readme.md' - ], - dest: 'temp/pres/shower/themes/bright/' - }] - } - }, - replace: { - core: { - src: 'temp/pres/index.html', - overwrite: true, - replacements: [{ - from: /(node_modules|bower_components)\/shower-core/g, - to: 'shower' - },{ - from: /(node_modules|bower_components)\/shower-(ribbon|bright)/g, - to: 'shower/themes/$2' - }] - }, - themes: { - src: 'temp/pres/shower/themes/*/index.html', - overwrite: true, - replacements: [{ - from: '../shower-core', to: '../..' - }] - } - }, - 'gh-pages': { - options: { - base: 'temp/pres', - clone: 'temp/clone' - }, - src: ['**'] - }, - compress: { - shower: { - options: { - archive: 'archive.zip' - }, - files: [{ - expand: true, - cwd: 'temp/pres/', - src: '**', - dest: '.' - }] - } - }, - clean: ['temp'] - }); - - grunt.registerTask('publish', [ - 'copy', - 'replace', - 'gh-pages', - 'clean' - ]); - - grunt.registerTask('archive', [ - 'copy', - 'replace', - 'compress', - 'clean' - ]); - -}; diff --git a/License.md b/License.md deleted file mode 100644 index 0b07174..0000000 --- a/License.md +++ /dev/null @@ -1,21 +0,0 @@ -# The MIT License - -Copyright © 2010–2014 Vadim Makeev, http://pepelsbey.net/ - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - ---- - -# Лицензия MIT - -Copyright © 2010–2014 Вадим Макеев, http://pepelsbey.net/ - -Данная лицензия разрешает лицам, получившим копию данного программного обеспечения и сопутствующей документации (в дальнейшем именуемыми «Программное Обеспечение»), безвозмездно использовать Программное Обеспечение без ограничений, включая неограниченное право на использование, копирование, изменение, добавление, публикацию, распространение, сублицензирование и/или продажу копий Программного Обеспечения, также как и лицам, которым предоставляется данное Программное Обеспечение, при соблюдении следующих условий: - -Указанное выше уведомление об авторском праве и данные условия должны быть включены во все копии или значимые части данного Программного Обеспечения. - -ДАННОЕ ПРОГРАММНОЕ ОБЕСПЕЧЕНИЕ ПРЕДОСТАВЛЯЕТСЯ «КАК ЕСТЬ», БЕЗ КАКИХ-ЛИБО ГАРАНТИЙ, ЯВНО ВЫРАЖЕННЫХ ИЛИ ПОДРАЗУМЕВАЕМЫХ, ВКЛЮЧАЯ, НО НЕ ОГРАНИЧИВАЯСЬ ГАРАНТИЯМИ ТОВАРНОЙ ПРИГОДНОСТИ, СООТВЕТСТВИЯ ПО ЕГО КОНКРЕТНОМУ НАЗНАЧЕНИЮ И ОТСУТСТВИЯ НАРУШЕНИЙ ПРАВ. НИ В КАКОМ СЛУЧАЕ АВТОРЫ ИЛИ ПРАВООБЛАДАТЕЛИ НЕ НЕСУТ ОТВЕТСТВЕННОСТИ ПО ИСКАМ О ВОЗМЕЩЕНИИ УЩЕРБА, УБЫТКОВ ИЛИ ДРУГИХ ТРЕБОВАНИЙ ПО ДЕЙСТВУЮЩИМ КОНТРАКТАМ, ДЕЛИКТАМ ИЛИ ИНОМУ, ВОЗНИКШИМ ИЗ, ИМЕЮЩИМ ПРИЧИНОЙ ИЛИ СВЯЗАННЫМ С ПРОГРАММНЫМ ОБЕСПЕЧЕНИЕМ ИЛИ ИСПОЛЬЗОВАНИЕМ ПРОГРАММНОГО ОБЕСПЕЧЕНИЯ ИЛИ ИНЫМИ ДЕЙСТВИЯМИ С ПРОГРАММНЫМ ОБЕСПЕЧЕНИЕМ. \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..6d77353 --- /dev/null +++ b/README.md @@ -0,0 +1,2 @@ +nodejs +====== diff --git a/Readme.md b/Readme.md deleted file mode 100644 index ac98659..0000000 --- a/Readme.md +++ /dev/null @@ -1,8 +0,0 @@ -# Nodejs - -## Первое задание «Светофор» -Напишите работу движения трамвая на сервере. Оформите это в виде сервиса, который по запросу светофора (раз в n секунд) отвечает приближается трамвай или нет. -Светофор соответсвенно на это реагирует загоранием светофора -## Второе задание * -Необходимо реализовать работу светофора на сервере. Вынести в отдельный модуль, и экспортировать его в основной файл. - В основном файле создать объект светофор, запустить его работу. развернуть простой вебсервер - который отдает пользователю пришедшему на localhost:3000 текущее состояние светофора. Из-за приближения трамвая светофор горит зеленым 15 секунд \ No newline at end of file diff --git a/TrafficLight.js b/TrafficLight.js new file mode 100644 index 0000000..787abb9 --- /dev/null +++ b/TrafficLight.js @@ -0,0 +1,197 @@ +/** + * Constructs new TrafficLight object + * + * + * @this {TrafficLight} + * @constructor + * @param {int} redTime + * @param {int} yellowTime + * @param {int} greenTime + * @param {boolean} debug + */ + +function TrafficLight(redTime, yellowTime, greenTime, debug) { + /** @private */ this.__debug = debug; + /** @private */ this.__trammode = null; + /** @private */ this.__tramtimer = null; + /** @private */ this.__timer = null; + /** @private */ this.__tramstate = null; + /** @private */ this.__state = null; + /** @private */ this.__stateChangedTime = null; + /** @private */ this.__redTime = redTime; + /** @private */ this.__yellowTime = yellowTime; + /** @private */ this.__greenTime = greenTime; + /** @private */ this.__tramWaitTime = 3000; + /** @private */ this.__tramGreenTime = 10000; + /** @private */ this.__usefulCoefficient = 0.7; + + +/** + * Prints message to console if DEBUG is TRUE + * + * @private + * + */ + + TrafficLight.prototype.__debuglog = function (message) { + if (this.__debug) + console.log(message); + }; + + +/** + * Sets new timer for color changes and checks if the is only one timer + * + * @private + * @this {TrafficLight} + * @param {int} delay + * @param {func} func + * @param {string} data Optional data + */ + TrafficLight.prototype.__setnewtimer = function (delay, func) { + if (this.__timer) { + clearTimeout(this.__timer); + } + this.__stateChangedTime = new Date(); + this.__timer = setTimeout(func, delay); + }; + +/** + * Returns amount of time this color should be active + * + * @private + * @this {TrafficLight} + */ + TrafficLight.prototype.__currentStateTime = function () { + return this['__' + this.__state + 'Time']; + }; + +/** + * Changes color to red + * + * @this {TrafficLight} + */ + TrafficLight.prototype.toRed = function () { + this.__debuglog('Changed to red'); + this.__state = 'red'; + this.__setnewtimer(this.__redTime, function () { + this.toGreen(); + }.bind(this)); + }; + +/** + * Changes color to green + * + * @this {TrafficLight} + */ + TrafficLight.prototype.toGreen = function () { + this.__debuglog('Changed to green'); + this.__state = 'green'; + this.__setnewtimer(this.__greenTime, function () { + this.toYellow(); + }.bind(this)); + }; + +/** + * Changes color to yellow + * + * @this {TrafficLight} + */ + TrafficLight.prototype.toYellow = function () { + this.__debuglog('Changed to yellow'); + this.__state = 'yellow'; + this.__setnewtimer(this.__yellowTime, function () { + this.toRed(); + }.bind(this)); + }; + +/** + * Exits tram mode + * + * @private + * @this {TrafficLight} + */ + TrafficLight.prototype.__exittrammode = function () { + this.__debuglog('Exit tram mode'); + this.__tramstate = null; + this.__trammode = null; + if (new Date() - this.__stateChangedTime > this.__usefulCoefficient * this.__currentStateTime()) { + switch (this.__state) { + case 'red': this.toGreen(); break; + case 'yellow': this.toRed(); break; + case 'green': this.toYellow(); break; + } + } + }; + +/** + * Enters tram mode + * + * @private + * @this {TrafficLight} + */ + TrafficLight.prototype.__entertrammode = function () { + this.__debuglog('Entering tram mode'); + this.__trammode = 'using'; + this.__tramstate = 'green'; + this.__tramtimer = setTimeout(function () { + this.__exittrammode(); + }.bind(this), this.__tramGreenTime); + }; + +/** + * Tram mode enter callback for Tram event + * + * @private + * @this {TrafficLight} + */ + TrafficLight.prototype.__tramcallback = function (data) { + if (!this.__trammode) { + this.__debuglog('Handling tram event'); + this.__trammode = 'waiting'; + this.__tramtimer = setTimeout(function () { + this.__entertrammode(); + }.bind(this), this.__tramWaitTime); + } + }; + +/** + * Subscribes to Tram event of specified TrafficLight + * + * + * @this {TrafficLight} + * @param {object} event + */ + TrafficLight.prototype.tramsubscribe = function (event) { + event.on('tram', function() { + this.__tramcallback(); + }.bind(this)); + }; + + +/** + * Returns current state + * + * + * @this {TrafficLight} + */ + TrafficLight.prototype.state = function () { + if (this.__trammode == 'using') + return this.__tramstate; + return this.__state; + }; + + this.toGreen(); +} + +var isNodeJS = function() { + if (typeof module !== 'undefined' && module.exports) { + return true; + } else { + return false; + } +}; + +if (isNodeJS()) { + exports.TrafficLight = TrafficLight; +} \ No newline at end of file diff --git a/bower.json b/bower.json deleted file mode 100644 index fa5c2d9..0000000 --- a/bower.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "name": "shower", - "version": "1.0.15", - "license": "MIT", - "main": "index.html", - "ignore": [ - "*", - "!pictures/**", - "!index.html", - "!License.md", - "!Readme.md", - "!bower.json" - ], - "keywords": [ - "shower", - "presentation", - "template" - ], - "dependencies": { - "shower-bright": "~1.0.11", - "shower-core": "~1.0.7", - "shower-ribbon": "~1.0.11" - } -} diff --git a/css/default.min.css b/css/default.min.css deleted file mode 100644 index 6bffec6..0000000 --- a/css/default.min.css +++ /dev/null @@ -1 +0,0 @@ -.hljs{display:block;overflow-x:auto;padding:.5em;background:#f0f0f0;-webkit-text-size-adjust:none}.hljs,.hljs-subst,.hljs-tag .hljs-title,.nginx .hljs-title{color:black}.hljs-string,.hljs-title,.hljs-constant,.hljs-parent,.hljs-tag .hljs-value,.hljs-rules .hljs-value,.hljs-preprocessor,.hljs-pragma,.haml .hljs-symbol,.ruby .hljs-symbol,.ruby .hljs-symbol .hljs-string,.hljs-template_tag,.django .hljs-variable,.smalltalk .hljs-class,.hljs-addition,.hljs-flow,.hljs-stream,.bash .hljs-variable,.apache .hljs-tag,.apache .hljs-cbracket,.tex .hljs-command,.tex .hljs-special,.erlang_repl .hljs-function_or_atom,.asciidoc .hljs-header,.markdown .hljs-header,.coffeescript .hljs-attribute{color:#800}.smartquote,.hljs-comment,.hljs-annotation,.hljs-template_comment,.diff .hljs-header,.hljs-chunk,.asciidoc .hljs-blockquote,.markdown .hljs-blockquote{color:#888}.hljs-number,.hljs-date,.hljs-regexp,.hljs-literal,.hljs-hexcolor,.smalltalk .hljs-symbol,.smalltalk .hljs-char,.go .hljs-constant,.hljs-change,.lasso .hljs-variable,.makefile .hljs-variable,.asciidoc .hljs-bullet,.markdown .hljs-bullet,.asciidoc .hljs-link_url,.markdown .hljs-link_url{color:#080}.hljs-label,.hljs-javadoc,.ruby .hljs-string,.hljs-decorator,.hljs-filter .hljs-argument,.hljs-localvars,.hljs-array,.hljs-attr_selector,.hljs-important,.hljs-pseudo,.hljs-pi,.haml .hljs-bullet,.hljs-doctype,.hljs-deletion,.hljs-envvar,.hljs-shebang,.apache .hljs-sqbracket,.nginx .hljs-built_in,.tex .hljs-formula,.erlang_repl .hljs-reserved,.hljs-prompt,.asciidoc .hljs-link_label,.markdown .hljs-link_label,.vhdl .hljs-attribute,.clojure .hljs-attribute,.asciidoc .hljs-attribute,.lasso .hljs-attribute,.coffeescript .hljs-property,.hljs-phony{color:#88f}.hljs-keyword,.hljs-id,.hljs-title,.hljs-built_in,.css .hljs-tag,.hljs-javadoctag,.hljs-phpdoc,.hljs-dartdoc,.hljs-yardoctag,.smalltalk .hljs-class,.hljs-winutils,.bash .hljs-variable,.apache .hljs-tag,.hljs-type,.hljs-typename,.tex .hljs-command,.asciidoc .hljs-strong,.markdown .hljs-strong,.hljs-request,.hljs-status{font-weight:bold}.asciidoc .hljs-emphasis,.markdown .hljs-emphasis{font-style:italic}.nginx .hljs-built_in{font-weight:normal}.coffeescript .javascript,.javascript .xml,.lasso .markup,.tex .hljs-formula,.xml .javascript,.xml .vbscript,.xml .css,.xml .hljs-cdata{opacity:.5} \ No newline at end of file diff --git a/css/idea.min.css b/css/idea.min.css deleted file mode 100644 index 0438a8e..0000000 --- a/css/idea.min.css +++ /dev/null @@ -1 +0,0 @@ -pre code{display:block;padding:.5em;color:#000;background:#fff}pre .subst,pre .title{font-weight:normal;color:#000}pre .comment,pre .template_comment,pre .javadoc,pre .diff .header{color:#808080;font-style:italic}pre .annotation,pre .decorator,pre .preprocessor,pre .doctype,pre .pi,pre .chunk,pre .shebang,pre .apache .cbracket,pre .prompt,pre .http .title{color:#808000}pre .tag,pre .pi{background:#efefef}pre .tag .title,pre .id,pre .attr_selector,pre .pseudo,pre .literal,pre .keyword,pre .hexcolor,pre .css .function,pre .ini .title,pre .css .class,pre .list .title,pre .clojure .title,pre .nginx .title,pre .tex .command,pre .request,pre .status{font-weight:bold;color:#000080}pre .attribute,pre .rules .keyword,pre .number,pre .date,pre .regexp,pre .tex .special{font-weight:bold;color:#00f}pre .number,pre .regexp{font-weight:normal}pre .string,pre .value,pre .filter .argument,pre .css .function .params,pre .apache .tag{color:#008000;font-weight:bold}pre .symbol,pre .ruby .symbol .string,pre .char,pre .tex .formula{color:#000;background:#d0eded;font-style:italic}pre .phpdoc,pre .yardoctag,pre .javadoctag{text-decoration:underline}pre .variable,pre .envvar,pre .apache .sqbracket,pre .nginx .built_in{color:#660e7a}pre .addition{background:#baeeba}pre .deletion{background:#ffc8bd}pre .diff .change{background:#bccff9} \ No newline at end of file diff --git a/css/print.css b/css/print.css deleted file mode 100644 index 55857f6..0000000 --- a/css/print.css +++ /dev/null @@ -1,72 +0,0 @@ -/* - Ribbon theme for Shower HTML presentation template: github.com/pepelsbey/shower - Copyright © 2010–2012 Vadim Makeev, pepelsbey.net - Licensed under MIT license: github.com/pepelsbey/shower/wiki/License-En -*/ - -* { -webkit-print-color-adjust:exact } - -@page { - margin:0; - size:1024px 640px; - } - -/* List -------------------------------- */ -.list { - padding:0; - background:none; - } - -/* Caption */ -.list .caption { - display:none; - } - -/* Slide */ -.list .slide { - float:none; - margin:0; - -webkit-transform:none; - -moz-transform:none; - -ms-transform:none; - -o-transform:none; - transform:none; - } - .list .slide:before { - display:none; - } - .list .slide:after { - position:absolute; - bottom: 30px; - left: auto; - right: 30px; - color:#CCC; - text-shadow:none; - line-height:18px; - font-weight:normal; - font-size:25px; - } - -/* Cover */ -.list .slide.cover -{ - background:#000; - overflow: hidden; -} - -.list .slide.cover, -.list .slide.first, -.list .slide.null, -.list .slide.shout -{ - z-index:1; -} - -.list .slide.cover:after, -.list .slide.first:after, -.list .slide.null:after, -.list .slide.shout:after -{ - content:''; -} \ No newline at end of file diff --git a/css/screen.css b/css/screen.css deleted file mode 100644 index 71d0a91..0000000 --- a/css/screen.css +++ /dev/null @@ -1,829 +0,0 @@ -/* - Ribbon theme for Shower HTML presentation template: github.com/pepelsbey/shower - Copyright © 2010–2012 Vadim Makeev, pepelsbey.net - Licensed under MIT license: github.com/pepelsbey/shower/wiki/License-En -*/ -@import url(http://fonts.googleapis.com/css?family=PT+Sans|PT+Sans+Narrow|PT+Mono&subset=latin,cyrillic); -@import url(reset.css); -@import url(user.css); - -body -{ - counter-reset: paging; - font: 25px/2 'PT Sans', Arial; -} - -/* Slide -------------------------------- */ -.slide -{ - padding: 71px 120px 0; - width: 784px; - height: 569px; - background: #FFF; - color: #000; -} - -.slide:after -{ - position: absolute; - counter-increment: paging; - content: counter(paging, decimal-leading-zero); - line-height: 1; -} - -.slide.first, -.debug .slide.first -{ - -} - -.slide.first .yandex, -.slide.last .yandex -{ - width: 200px; -} - -.slide.null -{ - text-align: center; - line-height: 640px; -} - -.slide.null .yandex -{ - width: 60%; -} - -.slide.first h2 -{ - font-size: 90px; - - position: absolute; - top: 50%; - left: 120px; - - width: 550px; - - text-align: left; - line-height: 1; - - color: #000; - - -webkit-transform: translateY(-50%); - -moz-transform: translateY(-50%); - -ms-transform: translateY(-50%); - -o-transform: translateY(-50%); - transform: translateY(-50%); -} - -.slide.first .info -{ - position: absolute; - bottom: 50px; - left: 120px; - width: 450px; - font-size: 75%; -} - -.slide.first .info p -{ - margin: 0; -} - -/* Debug */ -.debug .slide -{ - background: url(../images/grid.png) no-repeat, #FFF; -} - -/* Header */ -.slide h2 -{ - margin: 0 0 37px; - font: bold 50px/50px Textbook, 'PT Sans', Arial; - position: relative; -} - -/* Text */ -.slide p -{ - margin: 0 0 30px; -} - -.slide p.note -{ - color: #999; -} - -.slide a -{ - border-bottom: 0.1em solid; - color: #0174A7; - text-decoration: none; -} - -.slide b, -.slide strong -{ - font-weight: bold; -} - -.slide i, -.slide em -{ - font-style: italic; -} - -.slide kbd, -.slide code, -.slide samp -{ - padding: 3px 8px; - -webkit-border-radius: 8px; - -moz-border-radius: 8px; - border-radius: 8px; - background: #FAFAA2; - color: #000; - -webkit-tab-size: 4; - -moz-tab-size: 4; - -o-tab-size: 4; - tab-size: 4; - line-height: 1; - font-family: 'PT Mono', monospace; -} - -/* Quote */ -.slide blockquote -{ - font-style: italic; -} - -.slide blockquote:before -{ - position: absolute; - margin: -16px 0 0 -80px; - color: #CCC; - font: 200px/1 Textbook, 'PT Sans', Arial; - content: '\201C'; -} - -.slide blockquote + figcaption -{ - margin: -30px 0 40px; - font-style: italic; - font-weight: bold; - text-align: right; -} - -/* Lists */ -.slide ol, -.slide ul -{ - margin: 0 0 30px; - counter-reset: list; -} - -.slide ul ul, -.slide ol ul, -.slide ol ol, -.slide ul ol -{ - margin: 0 0 0 39px; -} - -.slide ol li, -.slide ul li -{ - text-indent: -13px; -} - -.slide ol > li:before, -.slide ul > li:before -{ - display: inline-block; - width: 13px; -} - -.slide ol > li.red:before, -.slide ul > li.red:before -{ - color: #F00; -} - -.slide ol > li.green:before, -.slide ul > li.green:before -{ - color: #0F0; -} - -.slide ul > li:before -{ - content: '\25CF\00A0\00A0'; -} - -.slide ul ul > li:before, -.slide ol ul > li:before -{ - content: '– '; -} - -.slide ol > li:before -{ - counter-increment: list; - content: counter(list) '.\00A0'; -} - -.slide ol ol > li:before, -.slide ol ul > li:before, -.slide ul ul > li:before, -.slide ul ol > li:before -{ - color: #000; -} - -/* Double */ -.slide ol.double, -.slide ul.double -{ - margin-left: -25px; - -webkit-columns: 2; - -moz-columns: 2; - columns: 2; - -webkit-column-gap: 0; - -moz-column-gap: 0; - column-gap: 0; -} - -.slide ol.double li, -.slide ul.double li -{ - padding: 0 30px 0 1em; -} - -/* Code */ -.slide pre -{ - margin: 0 0 50px; - counter-reset: code; - white-space: normal; -} - -.slide pre code -{ - display: block; - padding: 0; - background: none; - white-space: pre; - line-height: 32px; - font-size: 20px; -} - -.slide pre code:before -{ - position: absolute; - margin: 0 0 0 -110px; - width: 100px; - color: #BBB; - text-align: right; - counter-increment: code; - content: counter(code, decimal-leading-zero) '.'; -} - -.slide pre mark -{ - margin: 0 -8px; - padding: 3px 8px; - border-radius: 8px; - background: rgba(236, 249, 0, .37); - color: #000; - font-style: normal; -} - -.slide pre .important -{ - margin: 0; - background: #C00; - color: #FFF; - font-weight: normal; -} - -.slide pre .comment -{ - margin: 0; - padding: 0; - background: none; - color: #999; -} - -/* Cover */ -.slide.cover -{ - background: #000; - overflow: hidden; -} - -.slide.cover.with-header h2 -{ - background: rgba(0, 0, 0, 0.6); - bottom: 5%; - color: #fff; - left: 0; - line-height: 250%; - margin: 0; - position: absolute; - text-align: center; - width: 100%; -} - -.slide.cover img, -.slide.cover svg, -.slide.cover video, -.slide.cover object -{ - position: absolute; - top: 0; - left: 0; - z-index: -1; - clip: rect(0, 1024px, 640px, 0); -} - -.slide.cover.w img, -.slide.cover.w svg, -.slide.cover.w video, -.slide.cover.w object -{ - width: 100%; -} - -.slide.cover.h img, -.slide.cover.h svg, -.slide.cover.h video, -.slide.cover.h object -{ - height: 100%; -} - -.slide.cover.c img, -.slide.cover.c svg, -.slide.cover.c video, -.slide.cover.c object -{ - left: 50%; - -webkit-transform: translateX(-50%); - -moz-transform: translateX(-50%); - -ms-transform: translateX(-50%); - -o-transform: translateX(-50%); - transform: translateX(-50%); -} - -.slide.cover.m img, -.slide.cover.m svg, -.slide.cover.m video, -.slide.cover.m object -{ - top: 50%; - -webkit-transform: translateY(-50%); - -moz-transform: translateY(-50%); - -ms-transform: translateY(-50%); - -o-transform: translateY(-50%); - transform: translateY(-50%); -} - -/* Shout */ -.slide.shout -{ - background-image: none; -} - -.slide.shout h2 -{ - position: absolute; - top: 50%; - left: 70px; - right: 70px; - text-align: left; - line-height: 1; - font-size: 80px; - -webkit-transform: translateY(-50%); - -moz-transform: translateY(-50%); - -ms-transform: translateY(-50%); - -o-transform: translateY(-50%); - transform: translateY(-50%); -} - -/* Place */ -.place -{ - position: absolute; -} - -.place.t, -.place.m, -.place.b -{ - left: 50%; - -webkit-transform: translateX(-50%); - -moz-transform: translateX(-50%); - -ms-transform: translateX(-50%); - -o-transform: translateX(-50%); - transform: translateX(-50%); -} - -.place.t -{ - top: 0; -} - -.place.b -{ - bottom: 0; -} - -.place.l, -.place.m, -.place.r -{ - top: 50%; - -webkit-transform: translateY(-50%); - -moz-transform: translateY(-50%); - -ms-transform: translateY(-50%); - -o-transform: translateY(-50%); - transform: translateY(-50%); -} - -.place.l -{ - left: 0; -} - -.place.m -{ - -webkit-transform: translate(-50%, -50%); - -moz-transform: translate(-50%, -50%); - -ms-transform: translate(-50%, -50%); - -o-transform: translate(-50%, -50%); - transform: translate(-50%, -50%); -} - -.place.r -{ - right: 0; - left: auto; -} - -.place.t.l, -.place.t.r, -.place.b.r, -.place.b.l -{ - -webkit-transform: none; - -moz-transform: none; - -ms-transform: none; - -o-transform: none; - transform: none; -} - -.place.t.l, -.place.t.r -{ - top: 0; -} - -.place.b.l, -.place.b.r -{ - top: auto; -} - -/* List -------------------------------- */ -.list -{ - padding: 80px 0 40px 100px; - background: #585A5E url(../images/linen.png); -} - -.list:after -{ - clear: both; - display: block; - content: ''; -} - -/* Caption */ -.list .caption -{ - margin: 0 0 50px; - color: #3C3D40; - text-shadow: 0 1px 1px #8D8E90; -} - -.list .caption h1 -{ - font: bold 50px/1 'PT Sans Narrow', sans-serif; -} - -.list .caption a -{ - color: #4B86C2; - text-shadow: 0 -1px 1px #1F3F60; - text-decoration: none; -} - -.list .caption a:hover -{ - color: #5ca4ed; -} - -/* Slide */ -.list .slide -{ - position: relative; - float: left; - margin: 0 -432px -220px 0; - -webkit-transform-origin: 0 0; - -moz-transform-origin: 0 0; - -ms-transform-origin: 0 0; - -o-transform-origin: 0 0; - transform-origin: 0 0; - -webkit-transform: scale(0.5); - -moz-transform: scale(0.5); - -ms-transform: scale(0.5); - -o-transform: scale(0.5); - transform: scale(0.5); -} - -.list .slide:before -{ - position: absolute; - top: 0; - left: 0; - z-index: -1; - width: 512px; - height: 320px; - box-shadow: 0 0 30px rgba(0, 0, 0, 0.005), 0 20px 50px rgba(42, 43, 45, 0.6); - border-radius: 2px; - content: ''; - -webkit-transform-origin: 0 0; - -moz-transform-origin: 0 0; - -ms-transform-origin: 0 0; - -o-transform-origin: 0 0; - transform-origin: 0 0; - -webkit-transform: scale(2); - -moz-transform: scale(2); - -ms-transform: scale(2); - -o-transform: scale(2); - transform: scale(2); -} - -.list .slide:after -{ - bottom: -100px; - left: 120px; - color: #3C3D40; - text-shadow: 0 2px 1px #8D8E90; - font-weight: bold; - font-size: 50px; -} - -.list .slide:hover:before -{ - box-shadow: 0 0 0 10px rgba(42, 43, 45, 0.3), 0 20px 50px rgba(42, 43, 45, 0.6); -} - -.list .slide:target:before -{ - box-shadow: 0 0 0 1px #305F8D, 0 0 0 10px #3C7CBD, 0 20px 50px rgba(42, 43, 45, 0.6); -} - -.list .slide:target:after -{ - text-shadow: 0 2px 1px rgba(42, 43, 45, 0.6); - color: #4B86C2; -} - -@media all and (max-width: 1304px) -{ - - .list .slide - { - margin: 0 -718px -400px 0; - -webkit-transform: scale(0.25); - -moz-transform: scale(0.25); - -ms-transform: scale(0.25); - -o-transform: scale(0.25); - transform: scale(0.25); - } - - .list .slide:before - { - width: 256px; - height: 160px; - -webkit-transform: scale(4); - -moz-transform: scale(4); - -ms-transform: scale(4); - -o-transform: scale(4); - transform: scale(4); - } - - .list .slide:after - { - bottom: -180px; - text-shadow: 0 4px 2px #8D8E90; - font-size: 100px; - } - - .list .slide:target:before - { - box-shadow: 0 0 0 1px #305F8D, 0 0 0 10px #3C7CBD, 0 20px 50px rgba(42, 43, 45, 0.6); - } - - .list .slide:target:after - { - text-shadow: 0 4px 2px rgba(42, 43, 45, 0.6); - } -} - -/* Full -------------------------------- */ -.full -{ - position: absolute; - top: 50%; - left: 50%; - overflow: hidden; - margin: -320px 0 0 -512px; - width: 1024px; - height: 640px; - background: #000; -} - -.full .caption -{ - display: none; -} - -.full .slide -{ - position: absolute; - top: 0; - left: 0; - visibility: hidden; -} - -.full .slide:after -{ - position: absolute; - left: 120px; - bottom: 60px; - color: #CCC; - line-height: 18px; - font-size: 25px; -} - -.full .slide:target -{ - visibility: visible; -} - -/* Next Lists */ -.full .slide li.next -{ - opacity: 0; -} - -.full .slide li.next.active -{ - opacity: 1; - -webkit-transition: opacity 0.5s linear; - -moz-transition: opacity 0.5s linear; - -ms-transition: opacity 0.5s linear; - -o-transition: opacity 0.5s linear; - transition: opacity 0.5s linear; -} - -/* Cover */ -.full .slide.cover, -.full .slide.first, -.full .slide.null, -.full .slide.shout -{ - z-index: 1; -} - -.full .slide.cover:after, -.full .slide.first:after, -.full .slide.null:after, -.full .slide.shout:after -{ - content: ''; -} - -/* Shout */ -{ - z-index: 1 -; -} -{ - content: '' -; -} - -/* Progress */ -.full .progress -{ - position: absolute; - right: 118px; - bottom: 40px; - left: 118px; -} - -.full .progress div -{ - width: 0; - height: 10px; - box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.4); - border-radius: 5px; - background: rgba(177, 177, 177, 0.4); - -webkit-transition: width 0.2s linear; - -moz-transition: width 0.2s linear; - -ms-transition: width 0.2s linear; - -o-transition: width 0.2s linear; - transition: width 0.2s linear; -} - -.first -{ - padding: 0; - width: 1024px; - height: 640px; -} - -.arrow -{ - padding: 71px 120px 0; - position: relative; - height: 569px; -} - -.arrow:after, -.arrow:before -{ - position: absolute; - - content: ''; - - right: 150px !important; - left: 0; - -} - -.arrow:after -{ - top: 0; - bottom: 50%; - - -webkit-transform: skewX(20deg); - transform: skewX(20deg); - border-right: 2px solid #888; -} - -.arrow:before -{ - top: 50% !important; - bottom: 0; - - -webkit-transform: skewX(340deg); - transform: skewX(340deg); - border-right: 2px solid #888; -} - -pre.small -{ - font-size: 16px; -} - -.slide pre.small code -{ - line-height: 30px; -} - -.full .slide:after -{ - bottom: 30px; - left: auto; - right: 30px; -} - -.full .progress -{ - left: 0; - bottom: 0; - right: 0; -} - -.full .progress div -{ - border-radius: 0; -} diff --git a/css/user.css b/css/user.css deleted file mode 100644 index a0efac6..0000000 --- a/css/user.css +++ /dev/null @@ -1,398 +0,0 @@ -.run-example { - font-size: 200%; -} - -.sandbox_type_fullscreen { - line-height: 0; - - position: absolute; - top: 0; - left: 0; - - width: 100%; - height: 100%; - margin: 0; - padding: 0; - - border: 0 none; -} - -.slide { - overflow: hidden; -} - -.ball { - position: relative; - - width: 100px; - height: 100px; - - border-radius: 50px; - background: #000; -} - -section.slide h2 { - display: inline-block; - - background: rgba(255,255,255,.7); -} - -section.slide.cover h2 { - margin-bottom: 37px; -} - -.slide.cover h2 { - position: absolute; - bottom: 0; -} - -.slide pre.l-10 code { - font-size: 70%; -} - -.slide pre.l-9 code { - font-size: 75%; -} - -.slide pre.l-8 code { - font-size: 90%; - line-height: 190%; -} - -.slide pre code.active, -.slide pre code span.active { - font-weight:normal; - - margin:0; - - color:#FFF; - background:#C00; -} - -.slide pre code span.active { - margin-left: -5px; - padding: 5px; - - border-radius: 8px; -} - -.slide pre.relative { - position: relative; -} - -.full .slide pre.next, -.full .slide img.next { - opacity:0; - } -.full .slide pre.next.active, -.full .slide img.next.active { - -webkit-transition:opacity 0.5s linear; - -moz-transition:opacity 0.5s linear; - -ms-transition:opacity 0.5s linear; - -o-transition:opacity 0.5s linear; - transition:opacity 0.5s linear; - - opacity:1; - } - -.slide pre.console { - font-family: 'PT Mono', monospace; - font-size: 120%; - line-height:1; - - position: absolute; - top: 0; - left: 0; - - display: none; - overflow-y: auto; - - box-sizing: border-box; - width: 100%; - height: 50%; - padding: 30px 0 0 30px; - - -moz-tab-size:4; - -o-tab-size:4; - tab-size:4; - - color:#fff; - -webkit-border-radius:0; - -moz-border-radius:0; - border-radius:0; - background: rgba(0,0,0,.8); - - -webkit-tab-size:4; -} - -.slide pre.console code::before { - content: ''; -} - -.slide pre.console code { - color:#fff; -} - -button.run { - font-size: 100%; - - position: absolute; - right: 100px; - bottom: 100px; - - padding: 5px 20px; -} - -button.run { - color: #4A4A4A; - border: 1px solid #B2B2B2; - border-top: 1px solid #C9C9C9; - border-bottom: 1px solid #8F8F8F; - background-color: #F1F1F1; - background-image: -moz-linear-gradient(100% 100% 90deg, #E0E0E0, #F6F6F6); - background-image: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#F6F6F6), to(#E0E0E0)); - -webkit-box-shadow: 0 1px 0 #C0C0C0, 0 2px 0 #BFBFBF, 0 3px 0 #BBBBBB, 0 4px 0 #B0B0B0, 0 5px 5px rgba(0,0,0,0.25), inset 0 0 2px 1px rgba(255,255,255,0.9); - -moz-box-shadow: 0 1px 0 #C0C0C0, 0 2px 0 #BFBFBF, 0 3px 0 #BBBBBB, 0 4px 0 #B0B0B0, 0 5px 5px rgba(0,0,0,0.25), inset 0 0 2px 1px rgba(255,255,255,0.9); - box-shadow: 0 1px 0 #C0C0C0, 0 2px 0 #BFBFBF, 0 3px 0 #BBBBBB, 0 4px 0 #B0B0B0, 0 5px 5px rgba(0,0,0,0.25), inset 0 0 2px 1px rgba(255,255,255,0.9); - text-shadow: 0 1px 0 white; -} -button.run:after { - background-image: -moz-linear-gradient(100% 100% 90deg, #8F8F8F, #C9C9C9); - background-image: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#C9C9C9), to(#8F8F8F)); -} -button.run:before { - background-image: -moz-linear-gradient(100% 100% 90deg, #8F8F8F, #C9C9C9); - background-image: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#C9C9C9), to(#8F8F8F)); -} -button.run:hover { - color: black; - -webkit-box-shadow: 0 1px 0 #C0C0C0, 0 2px 0 #BFBFBF, 0 3px 0 #BBBBBB, 0 4px 0 #B0B0B0, 0 5px 9px rgba(0,0,0,0.3), inset 0 0 2px 1px rgba(255,255,255,0.9); - -moz-box-shadow: 0 1px 0 #C0C0C0, 0 2px 0 #BFBFBF, 0 3px 0 #BBBBBB, 0 4px 0 #B0B0B0, 0 5px 9px rgba(0,0,0,0.3), inset 0 0 2px 1px rgba(255,255,255,0.9); - box-shadow: 0 1px 0 #C0C0C0, 0 2px 0 #BFBFBF, 0 3px 0 #BBBBBB, 0 4px 0 #B0B0B0, 0 5px 9px rgba(0,0,0,0.3), inset 0 0 2px 1px rgba(255,255,255,0.9); -} -button.run:active { - -webkit-box-shadow: 0 1px 0 #BBBBBB, 0 2px 0 #B0B0B0, 0 3px 5px rgba(0,0,0,0.25), inset 0 0 2px 1px rgba(255,255,255,0.9); - -moz-box-shadow: 0 1px 0 #BBBBBB, 0 2px 0 #B0B0B0, 0 3px 5px rgba(0,0,0,0.25), inset 0 0 2px 1px rgba(255,255,255,0.9); - box-shadow: 0 1px 0 #BBBBBB, 0 2px 0 #B0B0B0, 0 3px 5px rgba(0,0,0,0.25), inset 0 0 2px 1px rgba(255,255,255,0.9); -} -button.run.pressin:active { - background-image: -moz-linear-gradient(100% 100% 90deg, #F6F6F6, #E0E0E0); - background-image: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#E0E0E0), to(#F6F6F6)); -} - -.slide.last h2 { - position: absolute; - bottom: 50px; -} - -.slide.last .info { - position: absolute; - left: 50%; - - width: 50%; -} - -.slide.last .info .author { - margin: 0; -} - -.full .slide.last -{ - z-index:1; -} -.full .slide.last:after -{ - content:''; -} - -.slide.last .author.social { - margin-left: -118px; -} - -.slide.last .author.social a { - margin-left: 5px; - - border: none; -} - -.slide.last .author.social a img { - margin: 0; - padding: 0; - - vertical-align: middle; -} - -.slide.qr-code { - text-align: center; -} - -.slide.qr-code img { - height: 80%; - - -ms-interpolation-mode: nearest-neighbor; - - image-rendering: -moz-crisp-edges; - image-rendering: -o-crisp-edges; - image-rendering: -webkit-optimize-contrast; - image-rendering: crisp-edges; -} - -.slide.qr-code a { - font-family: 'PT Mono', monospace; - font-size: 80px; - line-height: 160%; - - position: absolute; - bottom: 0; - left: 0; - - display: block; - - width: 100%; - - text-align: center; - - color: #fff; - border: none; -} - -.slide.first h2 { - background: none; -} - -.slide .garmoshka .bellows { - z-index: 0; -} - -.mem-title { - font-size: 100px; - line-height: 100%; - - text-align: center; -} - -.slide pre .tag { - background: none; -} - -.slide.slide_type_console { - color: #fff; - background: #000; -} - -.slide.slide_type_console h2 { - font-family: "Courier New", monospace; - - background: none; -} - - -.hidden { - display: none; -} - - -img.img-cover{ - width: 100%; - margin-top: 100px; -} -.slide pre code { - line-height: 42px; -} -.slide>div { - padding-top: 90px; -} - -.slide ol{ - font-size: 30px; - - margin-top: 80px; -} - - -.cover h2 { - font-size:70px; - - margin:30px 0 0; - - text-align:center; - - color:#FFF; -} -.cover p { - font-size:20px; - font-style:italic; - - margin:10px 0 0; - - text-align:center; - - color:#FFF; -} -.cover p a { - color:#FFF; -} - - -.slide h2{ - position: absolute; - position: static; - top: 100px; - left: 0; - - margin: 0 0 37px; - padding: 0 !important; -} - -.cover img -{ - width: 100%; - - background-size: cover; -} - -.cover>div -{ - height: 550px; -} - -.image-cover -{ - width: 90%; -} - -ul.second li -{ - font-size: 20px; -} - -.small code -{ - font-size: 18px; -} - -h2.bottom -{ - line-height: 74px; - - top: auto; - right: 20px; - bottom: 100px; - left: auto; - - color: black; -} - -h2.normal -{ - font-weight: normal; -} - -a.bottom -{ - font-size: 35px; - - position: absolute; - right: 100px; - bottom: 200px; -} \ No newline at end of file diff --git a/first/AJAX.js b/first/AJAX.js new file mode 100644 index 0000000..44a65db --- /dev/null +++ b/first/AJAX.js @@ -0,0 +1,28 @@ +function requestFactory() { + var xhr = new XMLHttpRequest(); + if ("withCredentials" in xhr) { + return xhr; + } + + if (typeof XDomainRequest !== "undefined") { + return new XDomainRequest(); + } + return null; +} + + +function ajax(url, callback) { + var xhr = requestFactory(); + if (!xhr) { + throw new Error('CORS not supported'); + } + xhr.open('GET', url, true); + xhr.onreadystatechange = function() { + if (xhr.readyState == 4) { + if (xhr.status == 200) { + callback(xhr.responseText); + } + } + }; + xhr.send(); +} \ No newline at end of file diff --git a/first/additional.js b/first/additional.js new file mode 100644 index 0000000..26d9fe1 --- /dev/null +++ b/first/additional.js @@ -0,0 +1,17 @@ +function changeDOM() { + document.getElementById('colorParagraph').innerHTML = tl.state(); +} + +function checkTramAndEmit() { + ajax('http://127.0.0.1:3000/', function(res) { + if (res == 'true') { + emitter.emit('tram'); + } + }); +} + +tl = new TrafficLight(5000, 5000, 5000, true); +emitter = new EventEmitter(); +tl.tramsubscribe(emitter); +setInterval(checkTramAndEmit, 500); + diff --git a/first/trafficlights.html b/first/trafficlights.html new file mode 100644 index 0000000..4e3e39c --- /dev/null +++ b/first/trafficlights.html @@ -0,0 +1,16 @@ + +
+Yours Truly, Famous Inc.
-