diff --git a/.gitmodules b/.gitmodules index d0d9ca48c5..8c0e8c6fc0 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,18 +1,6 @@ -[submodule "public/vendor/bootstrap-datepicker"] - path = public/vendor/bootstrap-datepicker - url = https://github.com/eternicode/bootstrap-datepicker.git -[submodule "public/vendor/bootstrap-growl"] - path = public/vendor/bootstrap-growl - url = https://github.com/ifightcrime/bootstrap-growl.git -[submodule "public/vendor/bootstrap"] - path = public/vendor/bootstrap - url = https://github.com/twitter/bootstrap.git [submodule "public/vendor/github-buttons"] path = public/vendor/github-buttons url = https://github.com/mdo/github-buttons.git -[submodule "public/vendor/jquery-cookie"] - path = public/vendor/jquery-cookie - url = https://github.com/carhartl/jquery-cookie.git [submodule "public/vendor/jquery-ui"] path = public/vendor/jquery-ui url = https://github.com/jquery/jquery-ui.git diff --git a/CHANGELOG.md b/CHANGELOG.md index 5f1508613a..548a42291f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,2 +1,9 @@ -3/3/2013 +## 3/21/2013 + * New Design: https://github.com/lefnire/habitrpg/issues/585 + * Toggle helm visible: https://trello.com/card/toggle-helm-visible/50e5d3684fe3a7266b0036d6/153 + * Toggle Header: https://trello.com/card/toggle-header/50e5d3684fe3a7266b0036d6/241 + * Deletable Accounts: https://trello.com/card/deletable-accounts/50e5d3684fe3a7266b0036d6/69 + * Undo Button: https://trello.com/card/undo-button/50e5d3684fe3a7266b0036d6/20 + +## 3/3/2013 * Add custom day start: https://trello.com/card/custom-day-start/50e5d3684fe3a7266b0036d6/15 \ No newline at end of file diff --git a/public/css/docs.css b/public/css/docs.css new file mode 100644 index 0000000000..af65540928 --- /dev/null +++ b/public/css/docs.css @@ -0,0 +1,1067 @@ +/* Add additional stylesheets below +-------------------------------------------------- */ +/* + Bootstrap's documentation styles + Special styles for presenting Bootstrap's documentation and examples +*/ + + + +/* Body and structure +-------------------------------------------------- */ + +body { + position: relative; + padding-top: 40px; +} + +/* Code in headings */ +h3 code { + font-size: 14px; + font-weight: normal; +} + + + +/* Tweak navbar brand link to be super sleek +-------------------------------------------------- */ + +body > .navbar { + font-size: 13px; +} + +/* Change the docs' brand */ +body > .navbar .brand { + padding-right: 0; + padding-left: 0; + margin-left: 20px; + float: right; + font-weight: bold; + color: #000; + text-shadow: 0 1px 0 rgba(255,255,255,.1), 0 0 30px rgba(255,255,255,.125); + -webkit-transition: all .2s linear; + -moz-transition: all .2s linear; + transition: all .2s linear; +} +body > .navbar .brand:hover { + text-decoration: none; + text-shadow: 0 1px 0 rgba(255,255,255,.1), 0 0 30px rgba(255,255,255,.4); +} + + +/* Sections +-------------------------------------------------- */ + +/* padding for in-page bookmarks and fixed navbar */ +section { + padding-top: 30px; +} +section > .page-header, +section > .lead { + color: #5a5a5a; +} +section > ul li { + margin-bottom: 5px; +} + +/* Separators (hr) */ +.bs-docs-separator { + margin: 40px 0 39px; +} + +/* Faded out hr */ +hr.soften { + height: 1px; + margin: 70px 0; + background-image: -webkit-linear-gradient(left, rgba(0,0,0,0), rgba(0,0,0,.1), rgba(0,0,0,0)); + background-image: -moz-linear-gradient(left, rgba(0,0,0,0), rgba(0,0,0,.1), rgba(0,0,0,0)); + background-image: -ms-linear-gradient(left, rgba(0,0,0,0), rgba(0,0,0,.1), rgba(0,0,0,0)); + background-image: -o-linear-gradient(left, rgba(0,0,0,0), rgba(0,0,0,.1), rgba(0,0,0,0)); + border: 0; +} + + + +/* Jumbotrons +-------------------------------------------------- */ + +/* Base class +------------------------- */ +.jumbotron { + position: relative; + padding: 40px 0; + color: #fff; + text-align: center; + text-shadow: 0 1px 3px rgba(0,0,0,.4), 0 0 30px rgba(0,0,0,.075); + background: #020031; /* Old browsers */ + background: -moz-linear-gradient(45deg, #020031 0%, #6d3353 100%); /* FF3.6+ */ + background: -webkit-gradient(linear, left bottom, right top, color-stop(0%,#020031), color-stop(100%,#6d3353)); /* Chrome,Safari4+ */ + background: -webkit-linear-gradient(45deg, #020031 0%,#6d3353 100%); /* Chrome10+,Safari5.1+ */ + background: -o-linear-gradient(45deg, #020031 0%,#6d3353 100%); /* Opera 11.10+ */ + background: -ms-linear-gradient(45deg, #020031 0%,#6d3353 100%); /* IE10+ */ + background: linear-gradient(45deg, #020031 0%,#6d3353 100%); /* W3C */ + filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#020031', endColorstr='#6d3353',GradientType=1 ); /* IE6-9 fallback on horizontal gradient */ + -webkit-box-shadow: inset 0 3px 7px rgba(0,0,0,.2), inset 0 -3px 7px rgba(0,0,0,.2); + -moz-box-shadow: inset 0 3px 7px rgba(0,0,0,.2), inset 0 -3px 7px rgba(0,0,0,.2); + box-shadow: inset 0 3px 7px rgba(0,0,0,.2), inset 0 -3px 7px rgba(0,0,0,.2); +} +.jumbotron h1 { + font-size: 80px; + font-weight: bold; + letter-spacing: -1px; + line-height: 1; +} +.jumbotron p { + font-size: 24px; + font-weight: 300; + line-height: 1.25; + margin-bottom: 30px; +} + +/* Link styles (used on .masthead-links as well) */ +.jumbotron a { + color: #fff; + color: rgba(255,255,255,.5); + -webkit-transition: all .2s ease-in-out; + -moz-transition: all .2s ease-in-out; + transition: all .2s ease-in-out; +} +.jumbotron a:hover { + color: #fff; + text-shadow: 0 0 10px rgba(255,255,255,.25); +} + +/* Download button */ +.masthead .btn { + padding: 19px 24px; + font-size: 24px; + font-weight: 200; + color: #fff; /* redeclare to override the `.jumbotron a` */ + border: 0; + -webkit-border-radius: 6px; + -moz-border-radius: 6px; + border-radius: 6px; + -webkit-box-shadow: inset 0 1px 0 rgba(255,255,255,.1), 0 1px 5px rgba(0,0,0,.25); + -moz-box-shadow: inset 0 1px 0 rgba(255,255,255,.1), 0 1px 5px rgba(0,0,0,.25); + box-shadow: inset 0 1px 0 rgba(255,255,255,.1), 0 1px 5px rgba(0,0,0,.25); + -webkit-transition: none; + -moz-transition: none; + transition: none; +} +.masthead .btn:hover { + -webkit-box-shadow: inset 0 1px 0 rgba(255,255,255,.1), 0 1px 5px rgba(0,0,0,.25); + -moz-box-shadow: inset 0 1px 0 rgba(255,255,255,.1), 0 1px 5px rgba(0,0,0,.25); + box-shadow: inset 0 1px 0 rgba(255,255,255,.1), 0 1px 5px rgba(0,0,0,.25); +} +.masthead .btn:active { + -webkit-box-shadow: inset 0 2px 4px rgba(0,0,0,.1), 0 1px 0 rgba(255,255,255,.1); + -moz-box-shadow: inset 0 2px 4px rgba(0,0,0,.1), 0 1px 0 rgba(255,255,255,.1); + box-shadow: inset 0 2px 4px rgba(0,0,0,.1), 0 1px 0 rgba(255,255,255,.1); +} + + +/* Pattern overlay +------------------------- */ +.jumbotron .container { + position: relative; + z-index: 2; +} +.jumbotron:after { + content: ''; + display: block; + position: absolute; + top: 0; + right: 0; + bottom: 0; + left: 0; + background: url(../img/bs-docs-masthead-pattern.png) repeat center center; + opacity: .4; +} +@media +only screen and (-webkit-min-device-pixel-ratio: 2), +only screen and ( min--moz-device-pixel-ratio: 2), +only screen and ( -o-min-device-pixel-ratio: 2/1) { + + .jumbotron:after { + background-size: 150px 150px; + } + +} + +/* Masthead (docs home) +------------------------- */ +.masthead { + padding: 70px 0 80px; + margin-bottom: 0; + color: #fff; +} +.masthead h1 { + font-size: 120px; + line-height: 1; + letter-spacing: -2px; +} +.masthead p { + font-size: 40px; + font-weight: 200; + line-height: 1.25; +} + +/* Textual links in masthead */ +.masthead-links { + margin: 0; + list-style: none; +} +.masthead-links li { + display: inline; + padding: 0 10px; + color: rgba(255,255,255,.25); +} + +/* Social proof buttons from GitHub & Twitter */ +.bs-docs-social { + padding: 15px 0; + text-align: center; + background-color: #f5f5f5; + border-top: 1px solid #fff; + border-bottom: 1px solid #ddd; +} + +/* Quick links on Home */ +.bs-docs-social-buttons { + margin-left: 0; + margin-bottom: 0; + padding-left: 0; + list-style: none; +} +.bs-docs-social-buttons li { + display: inline-block; + padding: 5px 8px; + line-height: 1; + *display: inline; + *zoom: 1; +} + +/* Subhead (other pages) +------------------------- */ +.subhead { + text-align: left; + border-bottom: 1px solid #ddd; +} +.subhead h1 { + font-size: 60px; +} +.subhead p { + margin-bottom: 20px; +} +.subhead .navbar { + display: none; +} + + + +/* Marketing section of Overview +-------------------------------------------------- */ + +.marketing { + text-align: center; + color: #5a5a5a; +} +.marketing h1 { + margin: 60px 0 10px; + font-size: 60px; + font-weight: 200; + line-height: 1; + letter-spacing: -1px; +} +.marketing h2 { + font-weight: 200; + margin-bottom: 5px; +} +.marketing p { + font-size: 16px; + line-height: 1.5; +} +.marketing .marketing-byline { + margin-bottom: 40px; + font-size: 20px; + font-weight: 300; + line-height: 1.25; + color: #999; +} +.marketing-img { + display: block; + margin: 0 auto 30px; + max-height: 145px; +} + + + +/* Footer +-------------------------------------------------- */ + +.footer { + text-align: center; + padding: 30px 0; + margin-top: 70px; + border-top: 1px solid #e5e5e5; + background-color: #f5f5f5; +} +.footer p { + margin-bottom: 0; + color: #777; +} +.footer-links { + margin: 10px 0; +} +.footer-links li { + display: inline; + padding: 0 2px; +} +.footer-links li:first-child { + padding-left: 0; +} + + + +/* Special grid styles +-------------------------------------------------- */ + +.show-grid { + margin-top: 10px; + margin-bottom: 20px; +} +.show-grid [class*="span"] { + background-color: #eee; + text-align: center; + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; + min-height: 40px; + line-height: 40px; +} +.show-grid [class*="span"]:hover { + background-color: #ddd; +} +.show-grid .show-grid { + margin-top: 0; + margin-bottom: 0; +} +.show-grid .show-grid [class*="span"] { + margin-top: 5px; +} +.show-grid [class*="span"] [class*="span"] { + background-color: #ccc; +} +.show-grid [class*="span"] [class*="span"] [class*="span"] { + background-color: #999; +} + + + +/* Mini layout previews +-------------------------------------------------- */ +.mini-layout { + border: 1px solid #ddd; + -webkit-border-radius: 6px; + -moz-border-radius: 6px; + border-radius: 6px; + -webkit-box-shadow: 0 1px 2px rgba(0,0,0,.075); + -moz-box-shadow: 0 1px 2px rgba(0,0,0,.075); + box-shadow: 0 1px 2px rgba(0,0,0,.075); +} +.mini-layout, +.mini-layout .mini-layout-body, +.mini-layout.fluid .mini-layout-sidebar { + height: 300px; +} +.mini-layout { + margin-bottom: 20px; + padding: 9px; +} +.mini-layout div { + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; +} +.mini-layout .mini-layout-body { + background-color: #dceaf4; + margin: 0 auto; + width: 70%; +} +.mini-layout.fluid .mini-layout-sidebar, +.mini-layout.fluid .mini-layout-header, +.mini-layout.fluid .mini-layout-body { + float: left; +} +.mini-layout.fluid .mini-layout-sidebar { + background-color: #bbd8e9; + width: 20%; +} +.mini-layout.fluid .mini-layout-body { + width: 77.5%; + margin-left: 2.5%; +} + + + +/* Download page +-------------------------------------------------- */ + +.download .page-header { + margin-top: 36px; +} +.page-header .toggle-all { + margin-top: 5px; +} + +/* Space out h3s when following a section */ +.download h3 { + margin-bottom: 5px; +} +.download-builder input + h3, +.download-builder .checkbox + h3 { + margin-top: 9px; +} + +/* Fields for variables */ +.download-builder input[type=text] { + margin-bottom: 9px; + font-family: Menlo, Monaco, "Courier New", monospace; + font-size: 12px; + color: #d14; +} +.download-builder input[type=text]:focus { + background-color: #fff; +} + +/* Custom, larger checkbox labels */ +.download .checkbox { + padding: 6px 10px 6px 25px; + font-size: 13px; + line-height: 18px; + color: #555; + background-color: #f9f9f9; + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; + cursor: pointer; +} +.download .checkbox:hover { + color: #333; + background-color: #f5f5f5; +} +.download .checkbox small { + font-size: 12px; + color: #777; +} + +/* Variables section */ +#variables label { + margin-bottom: 0; +} + +/* Giant download button */ +.download-btn { + margin: 36px 0 108px; +} +#download p, +#download h4 { + max-width: 50%; + margin: 0 auto; + color: #999; + text-align: center; +} +#download h4 { + margin-bottom: 0; +} +#download p { + margin-bottom: 18px; +} +.download-btn .btn { + display: block; + width: auto; + padding: 19px 24px; + margin-bottom: 27px; + font-size: 30px; + line-height: 1; + text-align: center; + -webkit-border-radius: 6px; + -moz-border-radius: 6px; + border-radius: 6px; +} + + + +/* Misc +-------------------------------------------------- */ + +/* Make tables spaced out a bit more */ +h2 + table, +h3 + table, +h4 + table, +h2 + .row { + margin-top: 5px; +} + +/* Example sites showcase */ +.example-sites { + xmargin-left: 20px; +} +.example-sites img { + max-width: 100%; + margin: 0 auto; +} + +.scrollspy-example { + height: 200px; + overflow: auto; + position: relative; +} + + +/* Fake the :focus state to demo it */ +.focused { + border-color: rgba(82,168,236,.8); + -webkit-box-shadow: inset 0 1px 3px rgba(0,0,0,.1), 0 0 8px rgba(82,168,236,.6); + -moz-box-shadow: inset 0 1px 3px rgba(0,0,0,.1), 0 0 8px rgba(82,168,236,.6); + box-shadow: inset 0 1px 3px rgba(0,0,0,.1), 0 0 8px rgba(82,168,236,.6); + outline: 0; +} + +/* For input sizes, make them display block */ +.docs-input-sizes select, +.docs-input-sizes input[type=text] { + display: block; + margin-bottom: 9px; +} + +/* Icons +------------------------- */ +.the-icons { + margin-left: 0; + list-style: none; +} +.the-icons li { + float: left; + width: 25%; + line-height: 25px; +} +.the-icons i:hover { + background-color: rgba(255,0,0,.25); +} + +/* Example page +------------------------- */ +.bootstrap-examples h4 { + margin: 10px 0 5px; +} +.bootstrap-examples p { + font-size: 13px; + line-height: 18px; +} +.bootstrap-examples .thumbnail { + margin-bottom: 9px; + background-color: #fff; +} + + + +/* Bootstrap code examples +-------------------------------------------------- */ + +/* Base class */ +.bs-docs-example { + position: relative; + margin: 15px 0; + padding: 39px 19px 14px; + *padding-top: 19px; + background-color: #fff; + border: 1px solid #ddd; + -webkit-border-radius: 4px; + -moz-border-radius: 4px; + border-radius: 4px; +} + +/* Echo out a label for the example */ +.bs-docs-example:after { + content: "Example"; + position: absolute; + top: -1px; + left: -1px; + padding: 3px 7px; + font-size: 12px; + font-weight: bold; + background-color: #f5f5f5; + border: 1px solid #ddd; + color: #9da0a4; + -webkit-border-radius: 4px 0 4px 0; + -moz-border-radius: 4px 0 4px 0; + border-radius: 4px 0 4px 0; +} + +/* Remove spacing between an example and it's code */ +.bs-docs-example + .prettyprint { + margin-top: -20px; + padding-top: 15px; +} + +/* Tweak examples +------------------------- */ +.bs-docs-example > p:last-child { + margin-bottom: 0; +} +.bs-docs-example .table, +.bs-docs-example .progress, +.bs-docs-example .well, +.bs-docs-example .alert, +.bs-docs-example .hero-unit, +.bs-docs-example .pagination, +.bs-docs-example .navbar, +.bs-docs-example > .nav, +.bs-docs-example blockquote { + margin-bottom: 5px; +} +.bs-docs-example .pagination { + margin-top: 0; +} +.bs-navbar-top-example, +.bs-navbar-bottom-example { + z-index: 1; + padding: 0; + height: 90px; + overflow: hidden; /* cut the drop shadows off */ +} +.bs-navbar-top-example .navbar-fixed-top, +.bs-navbar-bottom-example .navbar-fixed-bottom { + margin-left: 0; + margin-right: 0; +} +.bs-navbar-top-example { + -webkit-border-radius: 0 0 4px 4px; + -moz-border-radius: 0 0 4px 4px; + border-radius: 0 0 4px 4px; +} +.bs-navbar-top-example:after { + top: auto; + bottom: -1px; + -webkit-border-radius: 0 4px 0 4px; + -moz-border-radius: 0 4px 0 4px; + border-radius: 0 4px 0 4px; +} +.bs-navbar-bottom-example { + -webkit-border-radius: 4px 4px 0 0; + -moz-border-radius: 4px 4px 0 0; + border-radius: 4px 4px 0 0; +} +.bs-navbar-bottom-example .navbar { + margin-bottom: 0; +} +form.bs-docs-example { + padding-bottom: 19px; +} + +/* Images */ +.bs-docs-example-images img { + margin: 10px; + display: inline-block; +} + +/* Tooltips */ +.bs-docs-tooltip-examples { + text-align: center; + margin: 0 0 10px; + list-style: none; +} +.bs-docs-tooltip-examples li { + display: inline; + padding: 0 10px; +} + +/* Popovers */ +.bs-docs-example-popover { + padding-bottom: 24px; + background-color: #f9f9f9; +} +.bs-docs-example-popover .popover { + position: relative; + display: block; + float: left; + width: 260px; + margin: 20px; +} + +/* Dropdowns */ +.bs-docs-example-submenus { + min-height: 180px; +} +.bs-docs-example-submenus > .pull-left + .pull-left { + margin-left: 20px; +} +.bs-docs-example-submenus .dropup > .dropdown-menu, +.bs-docs-example-submenus .dropdown > .dropdown-menu { + display: block; + position: static; + margin-bottom: 5px; + *width: 180px; +} + + + +/* Responsive docs +-------------------------------------------------- */ + +/* Utility classes table +------------------------- */ +.responsive-utilities th small { + display: block; + font-weight: normal; + color: #999; +} +.responsive-utilities tbody th { + font-weight: normal; +} +.responsive-utilities td { + text-align: center; +} +.responsive-utilities td.is-visible { + color: #468847; + background-color: #dff0d8 !important; +} +.responsive-utilities td.is-hidden { + color: #ccc; + background-color: #f9f9f9 !important; +} + +/* Responsive tests +------------------------- */ +.responsive-utilities-test { + margin-top: 5px; + margin-left: 0; + list-style: none; + overflow: hidden; /* clear floats */ +} +.responsive-utilities-test li { + position: relative; + float: left; + width: 25%; + height: 43px; + font-size: 14px; + font-weight: bold; + line-height: 43px; + color: #999; + text-align: center; + border: 1px solid #ddd; + -webkit-border-radius: 4px; + -moz-border-radius: 4px; + border-radius: 4px; +} +.responsive-utilities-test li + li { + margin-left: 10px; +} +.responsive-utilities-test span { + position: absolute; + top: -1px; + left: -1px; + right: -1px; + bottom: -1px; + -webkit-border-radius: 4px; + -moz-border-radius: 4px; + border-radius: 4px; +} +.responsive-utilities-test span { + color: #468847; + background-color: #dff0d8; + border: 1px solid #d6e9c6; +} + + + +/* Sidenav for Docs +-------------------------------------------------- */ + +.bs-docs-sidenav { + width: 228px; + margin: 30px 0 0; + padding: 0; + background-color: #fff; + -webkit-border-radius: 6px; + -moz-border-radius: 6px; + border-radius: 6px; + -webkit-box-shadow: 0 1px 4px rgba(0,0,0,.065); + -moz-box-shadow: 0 1px 4px rgba(0,0,0,.065); + box-shadow: 0 1px 4px rgba(0,0,0,.065); +} +.bs-docs-sidenav > li > a { + display: block; + width: 190px \9; + margin: 0 0 -1px; + padding: 8px 14px; + border: 1px solid #e5e5e5; +} +.bs-docs-sidenav > li:first-child > a { + -webkit-border-radius: 6px 6px 0 0; + -moz-border-radius: 6px 6px 0 0; + border-radius: 6px 6px 0 0; +} +.bs-docs-sidenav > li:last-child > a { + -webkit-border-radius: 0 0 6px 6px; + -moz-border-radius: 0 0 6px 6px; + border-radius: 0 0 6px 6px; +} +.bs-docs-sidenav > .active > a { + position: relative; + z-index: 2; + padding: 9px 15px; + border: 0; + text-shadow: 0 1px 0 rgba(0,0,0,.15); + -webkit-box-shadow: inset 1px 0 0 rgba(0,0,0,.1), inset -1px 0 0 rgba(0,0,0,.1); + -moz-box-shadow: inset 1px 0 0 rgba(0,0,0,.1), inset -1px 0 0 rgba(0,0,0,.1); + box-shadow: inset 1px 0 0 rgba(0,0,0,.1), inset -1px 0 0 rgba(0,0,0,.1); +} +/* Chevrons */ +.bs-docs-sidenav .icon-chevron-right { + float: right; + margin-top: 2px; + margin-right: -6px; + opacity: .25; +} +.bs-docs-sidenav > li > a:hover { + background-color: #f5f5f5; +} +.bs-docs-sidenav a:hover .icon-chevron-right { + opacity: .5; +} +.bs-docs-sidenav .active .icon-chevron-right, +.bs-docs-sidenav .active a:hover .icon-chevron-right { + background-image: url(../img/glyphicons-halflings-white.png); + opacity: 1; +} +.bs-docs-sidenav.affix { + top: 40px; +} +.bs-docs-sidenav.affix-bottom { + position: absolute; + top: auto; + bottom: 270px; +} + + + + +/* Responsive +-------------------------------------------------- */ + +/* Desktop large +------------------------- */ +@media (min-width: 1200px) { + .bs-docs-container { + max-width: 970px; + } + .bs-docs-sidenav { + width: 258px; + } + .bs-docs-sidenav > li > a { + width: 230px \9; /* Override the previous IE8-9 hack */ + } +} + +/* Desktop +------------------------- */ +@media (max-width: 980px) { + /* Unfloat brand */ + body > .navbar-fixed-top .brand { + float: left; + margin-left: 0; + padding-left: 10px; + padding-right: 10px; + } + + /* Inline-block quick links for more spacing */ + .quick-links li { + display: inline-block; + margin: 5px; + } + + /* When affixed, space properly */ + .bs-docs-sidenav { + top: 0; + width: 218px; + margin-top: 30px; + margin-right: 0; + } +} + +/* Tablet to desktop +------------------------- */ +@media (min-width: 768px) and (max-width: 979px) { + /* Remove any padding from the body */ + body { + padding-top: 0; + } + /* Widen masthead and social buttons to fill body padding */ + .jumbotron { + margin-top: -20px; /* Offset bottom margin on .navbar */ + } + /* Adjust sidenav width */ + .bs-docs-sidenav { + width: 166px; + margin-top: 20px; + } + .bs-docs-sidenav.affix { + top: 0; + } +} + +/* Tablet +------------------------- */ +@media (max-width: 767px) { + /* Remove any padding from the body */ + body { + padding-top: 0; + } + + /* Widen masthead and social buttons to fill body padding */ + .jumbotron { + padding: 40px 20px; + margin-top: -20px; /* Offset bottom margin on .navbar */ + margin-right: -20px; + margin-left: -20px; + } + .masthead h1 { + font-size: 90px; + } + .masthead p, + .masthead .btn { + font-size: 24px; + } + .marketing .span4 { + margin-bottom: 40px; + } + .bs-docs-social { + margin: 0 -20px; + } + + /* Space out the show-grid examples */ + .show-grid [class*="span"] { + margin-bottom: 5px; + } + + /* Sidenav */ + .bs-docs-sidenav { + width: auto; + margin-bottom: 20px; + } + .bs-docs-sidenav.affix { + position: static; + width: auto; + top: 0; + } + + /* Unfloat the back to top link in footer */ + .footer { + margin-left: -20px; + margin-right: -20px; + padding-left: 20px; + padding-right: 20px; + } + .footer p { + margin-bottom: 9px; + } +} + +/* Landscape phones +------------------------- */ +@media (max-width: 480px) { + /* Remove padding above jumbotron */ + body { + padding-top: 0; + } + + /* Change up some type stuff */ + h2 small { + display: block; + } + + /* Downsize the jumbotrons */ + .jumbotron h1 { + font-size: 45px; + } + .jumbotron p, + .jumbotron .btn { + font-size: 18px; + } + .jumbotron .btn { + display: block; + margin: 0 auto; + } + + /* center align subhead text like the masthead */ + .subhead h1, + .subhead p { + text-align: center; + } + + /* Marketing on home */ + .marketing h1 { + font-size: 30px; + } + .marketing-byline { + font-size: 18px; + } + + /* center example sites */ + .example-sites { + margin-left: 0; + } + .example-sites > li { + float: none; + display: block; + max-width: 280px; + margin: 0 auto 18px; + text-align: center; + } + .example-sites .thumbnail > img { + max-width: 270px; + } + + /* Do our best to make tables work in narrow viewports */ + table code { + white-space: normal; + word-wrap: break-word; + word-break: break-all; + } + + /* Examples: dropdowns */ + .bs-docs-example-submenus > .pull-left { + float: none; + clear: both; + } + .bs-docs-example-submenus > .pull-left, + .bs-docs-example-submenus > .pull-left + .pull-left { + margin-left: 0; + } + .bs-docs-example-submenus p { + margin-bottom: 0; + } + .bs-docs-example-submenus .dropup > .dropdown-menu, + .bs-docs-example-submenus .dropdown > .dropdown-menu { + margin-bottom: 10px; + float: none; + max-width: 180px; + } + + /* Examples: modal */ + .modal-example .modal { + position: relative; + top: auto; + right: auto; + bottom: auto; + left: auto; + } + + /* Tighten up footer */ + .footer { + padding-top: 20px; + padding-bottom: 20px; + } +} diff --git a/public/img/sprites/Mount-Bear-Base.png b/public/img/sprites/Mount-Bear-Base.png deleted file mode 100644 index 94743baffb..0000000000 Binary files a/public/img/sprites/Mount-Bear-Base.png and /dev/null differ diff --git a/public/img/sprites/Mount-Lion-Base.png b/public/img/sprites/Mount-Lion-Base.png deleted file mode 100644 index 5ea6c224b3..0000000000 Binary files a/public/img/sprites/Mount-Lion-Base.png and /dev/null differ diff --git a/public/img/sprites/Mount-Panda-Base.png b/public/img/sprites/Mount-Panda-Base.png deleted file mode 100644 index 859d51898c..0000000000 Binary files a/public/img/sprites/Mount-Panda-Base.png and /dev/null differ diff --git a/public/img/sprites/Mount-PolarBear-Base.png b/public/img/sprites/Mount-PolarBear-Base.png deleted file mode 100644 index 8653816cfc..0000000000 Binary files a/public/img/sprites/Mount-PolarBear-Base.png and /dev/null differ diff --git a/public/img/sprites/Mount-SpriteSheet.png b/public/img/sprites/Mount-SpriteSheet.png new file mode 100644 index 0000000000..4b025ef899 Binary files /dev/null and b/public/img/sprites/Mount-SpriteSheet.png differ diff --git a/public/img/sprites/Mount-Tiger-Base.png b/public/img/sprites/Mount-Tiger-Base.png deleted file mode 100644 index 2cccf0ba2e..0000000000 Binary files a/public/img/sprites/Mount-Tiger-Base.png and /dev/null differ diff --git a/public/img/sprites/Mounts.css b/public/img/sprites/Mounts.css new file mode 100644 index 0000000000..314d83f408 --- /dev/null +++ b/public/img/sprites/Mounts.css @@ -0,0 +1,11 @@ +Mount_Head_Lion, Mount_Body_Lion, Mount_Head_PolarBear, Mount_Body_PolarBear, Mount_Head_Panda, Mount_Body_Panda, Mount_Head_Tiger, Mount_Body_Tiger, Mount_Head_Bear, Mount_Body_Bear {background: url(Mount-SpriteSheet.png) no-repeat} +Mount_Head_Lion {background-position: 0 0; width: 105px; height: 123px} +Mount_Body_Lion {background-position: -105 0; width: 105px; height: 123px} +Mount_Head_PolarBear {background-position: -210 0; width: 105px; height: 123px} +Mount_Body_PolarBear {background-position: -315 0; width: 105px; height: 123px} +Mount_Head_Panda {background-position: -420 0; width: 105px; height: 123px} +Mount_Body_Panda {background-position: -525 0; width: 105px; height: 123px} +Mount_Head_Tiger {background-position: -630 0; width: 105px; height: 123px} +Mount_Body_Tiger {background-position: -735 0; width: 105px; height: 123px} +Mount_Head_Bear {background-position: -840 0; width: 105px; height: 123px} +Mount_Body_Bear {background-position: -945 0; width: 105px; height: 123px} \ No newline at end of file diff --git a/public/img/sprites/PetEggs.css b/public/img/sprites/PetEggs.css index 347891779d..c81fa53424 100644 --- a/public/img/sprites/PetEggs.css +++ b/public/img/sprites/PetEggs.css @@ -1,17 +1,10 @@ -#PetEggs { - /* egg sprite size */ - width: 48px; - height: 51px; - /* link to sprite sheet image */ - background-image: url(Egg_Sprite_Sheet.png); -} -/* defines where in the sheet the eggs are */ -.WolfEgg{background-position: 0px 0px;} -.TigerEgg{background-position: 0px -51px;} -.PolarBearEgg{background-position: 0px -102px;} -.PandaEgg{background-position: 0px -153px;} -.LionEgg{background-position: 0px -204px;} -.FlyingPigEgg{background-position: 0px -255px;} -.DrakeEgg{background-position: 0px -306px;} -.CactusEgg{background-position: 0px -357px;} -.BearEgg{background-position: 0px -408px;} \ No newline at end of file +Pet_Egg_Wolf, Pet_Egg_Tiger, Pet_Egg_PolarBear, Pet_Egg_Panda, Pet_Egg_Lion, Pet_Egg_FlyingPig, Pet_Egg_Drake, Pet_Egg_Cactus, Pet_Egg_Bear {background: url(Egg_Sprite_Sheet.png) no-repeat} +Pet_Egg_Wolf {background-position: 0 0; width: 48px; height: 51px} +Pet_Egg_Tiger {background-position: 0 -51; width: 48px; height: 51px} +Pet_Egg_PolarBear{background-position: 0 -102; width: 48px; height: 51px} +Pet_Egg_Panda {background-position: 0 -153; width: 48px; height: 51px} +Pet_Egg_Lion {background-position: 0 -204; width: 48px; height: 51px} +Pet_Egg_FlyingPig {background-position: 0 -255; width: 48px; height: 51px} +Pet_Egg_Drake {background-position: 0 -306; width: 48px; height: 51px} +Pet_Egg_Cactus {background-position: 0 -357; width: 48px; height: 51px} +Pet_Egg_Bear {background-position: 0 -408; width: 48px; height: 51px} \ No newline at end of file diff --git a/public/vendor/bootstrap b/public/vendor/bootstrap deleted file mode 160000 index eb24718add..0000000000 --- a/public/vendor/bootstrap +++ /dev/null @@ -1 +0,0 @@ -Subproject commit eb24718add4dd36fe92fdbdb79e6ff4ce5919300 diff --git a/public/vendor/bootstrap-datepicker b/public/vendor/bootstrap-datepicker deleted file mode 160000 index 3f12c74bcd..0000000000 --- a/public/vendor/bootstrap-datepicker +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 3f12c74bcd5a0d6763951ce14450c8727b661bc9 diff --git a/public/vendor/bootstrap-growl b/public/vendor/bootstrap-growl deleted file mode 160000 index c033de329b..0000000000 --- a/public/vendor/bootstrap-growl +++ /dev/null @@ -1 +0,0 @@ -Subproject commit c033de329bb1b21e4175e2a53efd844b664d27c8 diff --git a/public/vendor/jquery-cookie b/public/vendor/jquery-cookie deleted file mode 160000 index cefb0c3999..0000000000 --- a/public/vendor/jquery-cookie +++ /dev/null @@ -1 +0,0 @@ -Subproject commit cefb0c399960553edae76f91f9fc5470a1c3bc04 diff --git a/src/app/character.coffee b/src/app/character.coffee index 7595f386d4..9478e09768 100644 --- a/src/app/character.coffee +++ b/src/app/character.coffee @@ -61,14 +61,8 @@ module.exports.app = (appExports, model) -> batch.commit() browser.resetDom(model) - appExports.closeAlgosNotification = (e, el) -> - user.set('flags.algosNotification', 'hide') - - appExports.closeOnliesNotification = (e, el) -> - user.set('flags.onliesNotification', 'hide') - - appExports.closePriorityNotification = (e, el) -> - user.set('flags.priorityNotification', 'hide') + appExports.closeNewStuff = (e, el) -> + user.set('flags.newStuff', 'hide') appExports.customizeGender = (e, el) -> user.set 'preferences.gender', $(el).attr('data-value') diff --git a/src/app/profile.coffee b/src/app/profile.coffee index d2b78d0aea..1a84de042e 100644 --- a/src/app/profile.coffee +++ b/src/app/profile.coffee @@ -20,6 +20,6 @@ module.exports.app = (appExports, model) -> appExports.profileChangeActive = (e, el) -> uid = $(el).attr('data-uid') model.ref '_profileActive', model.at("users.#{uid}") - model.set '_profileActiveMain', model.get('_user.id') == uid + model.set '_profileActiveMain', user.get('id') is uid model.set '_profileActiveUsername', character.username model.get('_profileActive.auth') diff --git a/src/server/api.coffee b/src/server/api.coffee index d5ea019f8e..3ba6227217 100644 --- a/src/server/api.coffee +++ b/src/server/api.coffee @@ -54,6 +54,9 @@ router.get '/user', auth, (req, res) -> user.stats.maxHealth = 50 delete user.apiToken + if user.auth + delete user.auth.hashed_password + delete user.auth.salt res.json user @@ -184,8 +187,12 @@ scoreTask = (req, res, next) -> delta = scoring.score(model, taskId, direction) result = model.get ('_user.stats') result.delta = delta - res.send(result) + res.json result +### + POST /user/tasks/:taskId/:direction +### +router.post '/user/task/:taskId/:direction', auth, scoreTask router.post '/user/tasks/:taskId/:direction', auth, scoreTask module.exports = router diff --git a/styles/app/alerts.styl b/styles/app/alerts.styl index 4cf63147c9..9e1579c771 100644 --- a/styles/app/alerts.styl +++ b/styles/app/alerts.styl @@ -1,3 +1,19 @@ +.new-stuff + position: fixed + text-align: center + top: 0 + left: 0 + width: 100% + height: 0 + z-index: 1010 + +.new-stuff> .alert + border-top: 0 + border-radius: 0 0 4px 4px + padding-right: 14px + display: inline-block + + // variables gpColor = #FBEFC0 diff --git a/styles/app/index.styl b/styles/app/index.styl index fefd934fc2..008f8a3f29 100644 --- a/styles/app/index.styl +++ b/styles/app/index.styl @@ -10,10 +10,8 @@ @import "./helpers.styl"; @import "./responsive.styl"; @import "./header.styl"; - @import "./scrollbars.styl"; -@import "../../public/vendor/bootstrap-datepicker/css/datepicker.css"; // fix exploding to very wide for some reason .datepicker diff --git a/test/api.mocha.coffee b/test/api.mocha.coffee index e243322bd9..ce25d0f99d 100644 --- a/test/api.mocha.coffee +++ b/test/api.mocha.coffee @@ -271,3 +271,16 @@ describe 'API', -> expect(res.statusCode).to.be 400 expect(res.body.err).to.be 'No task found.' done() + + it 'POST /api/v1/user/task/:id/up', (done) -> + tid = currentUser.habitIds[0] + request.post("#{baseURL}/user/task/#{tid}/up") + .set('Accept', 'application/json') + .set('X-API-User', currentUser.id) + .set('X-API-Key', currentUser.apiToken) + .send({}) + .end (res) -> + expect(res.body.err).to.be undefined + expect(res.statusCode).to.be 200 + expect(res.body).to.eql { gp: 1, exp: 7.5, lvl: 1, hp: 50, delta: 1 } + done() diff --git a/views/app/alerts.html b/views/app/alerts.html index 0c16ba0e70..ee1fbc0a15 100644 --- a/views/app/alerts.html +++ b/views/app/alerts.html @@ -1,32 +1,16 @@ - + + {#if equal(_user.flags.newStuff,'show')} +
+

+ New Stuff! +

+ +
+ {/} + + {#if _flash.error}
    {#each _flash.error as :error}
  • {:error}
  • {/}
- {/} - - {#if equal(_user.flags.algosNotification,'show')} -
- -

New features! Custom day start, new and better algorithms, authentication enhancements. See details here. -  "Hey, I had more Exp before this roll-out!" Restore your Exp here.

-
- {/} - - {#if equal(_user.flags.onliesNotification, 'show')} -
- -

- "Onlies" now gain / lose value just like other habits, and are reset back to 0 at the beginning of each day. -  See details here, and -  chime in with your recommendations on this mechanic. -

-
- {/} - - {#if equal(_user.flags.priorityNotification, 'show')} -
- -

New Feature: Priority Multiplier! You can now multiply "more important" tasks on a 1x, 1.5x, or 2x scale. See details.

-
{/} \ No newline at end of file diff --git a/views/app/avatar.html b/views/app/avatar.html index ad71c1d614..be1146b4ac 100644 --- a/views/app/avatar.html +++ b/views/app/avatar.html @@ -1,20 +1,18 @@ {#if _profileActiveMain} - {#with _user.preferences} - + -
-
- -
- -
+
+
+
- {/} + +
+
{else} {/} @@ -29,9 +27,20 @@ data-level="{@profile.stats.lvl}" data-checkpet="{#if @profile.items.pet}hasPet{/}" data-checkuser="{#if equal(@profile.id, _user.id)}isUser{/}" - data-toggle='modal' data-target='#avatar-modal' data-uid="{@profile.id}" x-bind="click:profileChangeActive"> + data-toggle='modal' data-target='#avatar-modal' data-uid="{@profile.id}" x-bind="click:profileChangeActive" + rel="popover" data-title="{{username(@profile.auth)}}" data-placement="bottom" data-trigger="hover" data-html="true" data-content=" +
+
+
+
+
+
+
+
GP: {{floor(@profile.stats.gp)}}
+
+ ">
- {#unless @minimal}{#if @profile.items.pet}{/}{/} + {#if and(@profile.items.pet, not(@minimal))}{/} {#with @profile.preferences as :p} @@ -45,8 +54,6 @@ {/}
- {{#unless @minimal}} - {{/}} @@ -56,101 +63,103 @@ - - -
  • - - - - - - -
  • - - -
  • - - - - - - -
  • - - -
  • - - - - - - - -
  • -
    - - {#if equal(_user.preferences.gender, 'f')} + {#with _user.preferences as :p} +
  • - - - + + + + + + +
  • + + +
  • + + + + + + +
  • + + +
  • + + + + + +
  • + + {#if equal(_user.preferences.gender, 'f')} + +
  • + + + + +
  • +
    + {/} {/}
    - {#if _profileEditing} - {#if _profileActiveMain} - Save - -
    - -
    - -
    + {#if and(_profileEditing, _profileActiveMain)} + Save + +
    + +
    +
    +
    -
    - -
    - -
    +
    + +
    +
    +
    -
    - -
    - -
    +
    + +
    +
    +
    -
    - -
    -
    - -
    -
    -
      - {#each _user.profile.websites as :website} - -
    • {:website}
    • - {/} -
    - +
    + +
    +
    + +
    - Save - {/} +
      + {#each _user.profile.websites as :website} + +
    • {:website}
    • + {/} +
    + +
    + Save {else}

    - {#if _profileActive.profile.name}{_profileActive.profile.name} - {else}{username(_profileActive.auth)} + {#if _profileActive.profile.name} + {_profileActive.profile.name} + {else} + {username(_profileActive.auth)} {/} {#if _profileActiveMain}Edit{/}

    @@ -163,7 +172,7 @@ {#if _profileActive.profile.websites}
      {#each _profileActive.profile.websites as :website} -
    • {:website}
    • +
    • {:website}
    • {/}
    {/} diff --git a/views/app/footer.html b/views/app/footer.html index 45c7412873..52f82334c9 100644 --- a/views/app/footer.html +++ b/views/app/footer.html @@ -19,7 +19,7 @@
    diff --git a/views/app/header.html b/views/app/header.html index 58a837c90d..fcd7af47a6 100644 --- a/views/app/header.html +++ b/views/app/header.html @@ -41,5 +41,6 @@
    {{/}} {{/}} + {/} \ No newline at end of file diff --git a/views/app/index.html b/views/app/index.html index e76535e8c2..38029dd15d 100644 --- a/views/app/index.html +++ b/views/app/index.html @@ -21,10 +21,13 @@ + + +
    {#if _undo}Undo{/} @@ -37,7 +40,7 @@
    - +
    diff --git a/views/app/rewards.html b/views/app/rewards.html index 340882a36b..da0eadecf4 100644 --- a/views/app/rewards.html +++ b/views/app/rewards.html @@ -1,3 +1,87 @@ + +
    +
    + + + {#unless _view.activeTabPets} +
    + {gold(_user.stats.gp)} + +
    +
    + {silver(_user.stats.gp)} + +
    + + {else} + + {/} +
    +

    Rewards

    + + + {#if equal(_user.flags.petsEnabled,true)} +
    +
    +
    + +
    + + +
    + {#with _view.items.pets as :pets} + + + {#with :pets[0]}{/} + {#with :pets[1]}{/} + {#with :pets[2]}{/} + {#with :pets[3]}{/} + + + {#with :pets[4]}{/} + {#with :pets[5]}{/} + {#with :pets[6]}{/} + {#with :pets[7]}{/} + + + {#with :pets[8]}{/} + {#with :pets[9]}{/} + {#with :pets[10]}{/} + {#with :pets[11]}{/} + + + {#with :pets[12]}{/} + {#with :pets[13]}{/} + {#with :pets[14]}{/} + {#with :pets[15]}{/} + + + {#with :pets[16]}{/} + +
    + {/} +
    + +
    + + +
    + + + {else} + + {/} +
    +
    + + @@ -21,7 +105,7 @@ {/} - + @@ -35,8 +119,7 @@ - {#unless :item.hide} -
  • +
  • @@ -56,5 +139,4 @@

    {:item.text}

    -
  • - {/} \ No newline at end of file + \ No newline at end of file diff --git a/views/app/settings.html b/views/app/settings.html index 50c2bdeca4..aa1cd71744 100644 --- a/views/app/settings.html +++ b/views/app/settings.html @@ -149,4 +149,4 @@ {/} -
    \ No newline at end of file +
    diff --git a/views/app/tasks.html b/views/app/tasks.html index 3bb6233f0d..8490085e71 100644 --- a/views/app/tasks.html +++ b/views/app/tasks.html @@ -54,87 +54,8 @@
    -
    -
    - - - {#unless _view.activeTabPets} -
    - {gold(_user.stats.gp)} - -
    -
    - {silver(_user.stats.gp)} - -
    - - {else} - - {/} -
    -

    Rewards

    + - - {#if equal(_user.flags.petsEnabled,true)} -
    -
    -
    - -
    - - -
    - {#with _view.items.pets as :pets} - - - {#with :pets[0]}{/} - {#with :pets[1]}{/} - {#with :pets[2]}{/} - {#with :pets[3]}{/} - - - {#with :pets[4]}{/} - {#with :pets[5]}{/} - {#with :pets[6]}{/} - {#with :pets[7]}{/} - - - {#with :pets[8]}{/} - {#with :pets[9]}{/} - {#with :pets[10]}{/} - {#with :pets[11]}{/} - - - {#with :pets[12]}{/} - {#with :pets[13]}{/} - {#with :pets[14]}{/} - {#with :pets[15]}{/} - - - {#with :pets[16]}{/} - -
    - {/} -
    - -
    - - -
    - - - {else} - - {/} -
    -
    diff --git a/views/static/extensions.html b/views/static/extensions.html index e2623c0b4c..4724e1ed46 100644 --- a/views/static/extensions.html +++ b/views/static/extensions.html @@ -36,8 +36,16 @@

    Python command line app for HabitRPG (http://habitrpg.com)

    PHP API

    A PHP class for the HabitRPG API. Will be expanded when more features become available in the API.

    + +

    WebService::HabitRPG — Perl API

    +

    A full-featured Perl interface for HabitRPG. Development versions are available on github. + +

    hrpg - HabitRPG command line client

    +

    Command-line client for HabitRPG. Supports viewing status, listing tasks by types, creation of new types, incrementing/decrementing of tasks, API debugging, and more.

    +

    Suggest an Add-on / Extension

    +

    Email me to have something listed here

    - \ No newline at end of file + diff --git a/views/static/front.html b/views/static/front.html index c3552dfda1..9eea14a5e1 100644 --- a/views/static/front.html +++ b/views/static/front.html @@ -21,7 +21,7 @@
    -

    +

    diff --git a/views/static/head.html b/views/static/head.html index dc023c56b7..2fdd534a96 100644 --- a/views/static/head.html +++ b/views/static/head.html @@ -6,7 +6,7 @@ - +