Theming support

This commit is contained in:
benweet 2013-05-21 23:34:42 +01:00
parent 0ac99beaed
commit 1d186b9006
12 changed files with 664 additions and 564 deletions

View File

@ -93,6 +93,8 @@ lib/MathJax/jax/output/HTML-CSS/fonts/TeX/AMS/Regular/MiscTechnical.js
lib/MathJax/jax/output/HTML-CSS/fonts/TeX/AMS/Regular/PUA.js
lib/MathJax/jax/output/HTML-CSS/fonts/TeX/AMS/Regular/SpacingModLetters.js
lib/MathJax/jax/output/HTML-CSS/fonts/TeX/AMS/Regular/SuppMathOperators.js
themes/blue-gray/ajax-loader-blue-gray.gif
themes/blue-gray/blue-gray.css
NETWORK:

549
css/default.css Normal file
View File

@ -0,0 +1,549 @@
@media print {
@page {
margin: 25mm 25mm 25mm 25mm;
}
#wmd-preview {
padding: 0px;
margin: 0px;
}
#navbar {
display: none;
}
}
body {
background-color: #f5f5f5;
tab-size: 4;
}
.working {
cursor: progress;
}
.btn, .dropdown-menu {
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
-o-user-select: none;
user-select: none;
}
/*
Override Bootstrap
*/
div, span, a, ul, li, textarea, input, button {
background-image: none !important;
filter: none !important;
-webkit-box-shadow: none !important;
-moz-box-shadow: none !important;
box-shadow: none !important;
text-shadow: none !important;
}
.btn, .navbar-inner, #wmd-preview, .add-on {
border: none !important;
}
.dropdown-menu {
border: 1px solid #ddd !important;
text-align: left;
}
.dropdown-menu:before {
border-bottom-color: #ddd !important;
}
input,
select,
textarea,
.input-prepend .btn,
.input-prepend .add-on {
border: 1px solid #ddd !important;
}
.modal textarea:focus,
input[type="text"]:focus,
input[type="password"]:focus,
input[type="datetime"]:focus,
input[type="datetime-local"]:focus,
input[type="date"]:focus,
input[type="month"]:focus,
input[type="time"]:focus,
input[type="week"]:focus,
input[type="number"]:focus,
input[type="email"]:focus,
input[type="url"]:focus,
input[type="search"]:focus,
input[type="tel"]:focus,
input[type="color"]:focus,
.uneditable-input:focus
{
-webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(128, 128, 128, 0.6) !important;
-moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(128, 128, 128, 0.6) !important;
box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(128, 128, 128, 0.6) !important;
}
.help-block {
color: #999999;
font-size: 12px;
line-height: 17px;
}
.error {
border-color: #ff8661 !important;
-webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(255, 134, 97, 0.6) !important;
-moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(255, 134, 97, 0.6) !important;
box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(255, 134, 97, 0.6) !important;
}
.navbar-inner .btn {
background-color: #ddd;
}
.navbar-inner .btn:hover,
.navbar-inner .btn:focus,
.navbar-inner .btn:active,
.navbar-inner .btn.active,
.btn-group.open .btn.dropdown-toggle {
color: #333333;
background-color: #eee;
}
.nav .dropdown-toggle .caret,
.nav .dropdown-toggle:hover .caret,
.nav .dropdown-toggle:focus .caret {
border-top-color: #000;
border-bottom-color: #000;
}
.navbar .nav.hide {
display: none;
}
.navbar-inner .btn.disabled,
.navbar-inner .btn[disabled] {
color: #333333;
background-color: #ddd;
opacity: 0.3;
filter: alpha(opacity=30);
}
.dropdown-menu > li > a:hover,
.dropdown-menu > li > a:focus,
.dropdown-submenu:hover > a,
.dropdown-submenu:focus > a,
.dropdown-menu > .active > a,
.dropdown-menu > .active > a:hover,
.dropdown-menu > .active > a:focus {
background-color: #888;
}
.dropdown-menu > .disabled > a,
.dropdown-menu > .disabled > a:hover,
.dropdown-menu > .disabled > a:focus {
color: #bbb;
}
.btn-primary {
background-color: #777;
}
input[disabled], select[disabled], textarea[disabled], .input-prepend .add-on {
background-color: #f5f5f5;
}
input[readonly], select[readonly], textarea[readonly] {
background-color: transparent;
cursor: text;
}
.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active,
.btn-primary.active,
.btn-primary.disabled,
.btn-primary[disabled],
.btn-group.open .btn.btn-primary.dropdown-toggle {
color: #fff;
background-color: #888;
}
.btn-group {
margin-right: 10px;
}
.btn-group > .btn + .dropdown-toggle {
padding-right: 12px;
padding-left: 12px;
}
.navbar-inner {
background-color: #ddd !important;
}
code {
color: #333333 !important;
}
h1 {
margin: 30px 0 30px;
}
p, pre, blockquote {
margin: 0 0 20px;
}
hr {
border-top: 1px solid #ddd;
margin: 30px 0;
}
#file-selector {
max-height: 500px;
overflow-y: auto;
overflow-x: hidden;
}
#file-selector .stick {
padding: 10px 20px 0;
}
#file-title {
line-height: 23px;
padding: 9px 15px 11px;
}
#file-title i {
margin: 4px 5px 0;
}
.dropdown-menu i {
margin-right: 5px;
}
#navbar {
position: static;
}
#menu-bar {
margin: 0 15px 10px 15px;
}
#wmd-button-bar {
margin-left: 15px;
}
#wmd-input, #md-section-helper {
font-family: "Courier New", Courier, monospace;
resize: none;
border: none !important;
}
#wmd-preview {
overflow: auto;
}
.wmd-button-row {
margin: 10px 0;
height: 20px;
}
.wmd-spacer {
margin-right: 15px;
display: inline-block;
}
.wmd-prompt-background {
display: none;
}
.wmd-prompt-dialog {
border: 1px solid #999999;
background-color: #F5F5F5;
}
.wmd-prompt-dialog>div {
font-size: 0.8em;
font-family: arial, helvetica, sans-serif;
}
.wmd-prompt-dialog>form>input[type="text"] {
border: 1px solid #999999;
color: black;
}
.wmd-prompt-dialog>form>input[type="button"] {
border: 1px solid #888888;
font-family: trebuchet MS, helvetica, sans-serif;
font-size: 0.8em;
font-weight: bold;
}
.dropdown-menu .divider.with-text {
height: auto;
margin-bottom: 2px;
background-color: transparent;
border-top: 1px solid #e5e5e5;
color: #ccc;
font-variant: small-caps;
font-weight: bold;
padding-left: 20px;
cursor: default;
}
div.dropdown-menu {
padding: 5px 20px;
white-space: normal;
}
div.dropdown-menu p,
div.dropdown-menu blockquote {
margin: 10px 0;
}
div.dropdown-menu i {
margin-right: 0;
}
#link-container {
min-width: 210px;
}
#link-container .link-list {
margin-top: 10px;
}
.icon-link {
background-position: -72px -168px;
}
.icon-code {
width: 15px;
background-position: -384px -168px;
}
.icon-numbered-list {
background-position: -408px -168px;
}
.icon-hr {
background-position: -432px -168px;
}
.icon-undo {
background-position: -456px -168px;
}
.icon-stackedit {
background-image: url("../img/icons.png") !important;
width: 16px;
height: 16px;
background-position: -1px 0;
}
.icon-gdrive {
background-image: url("../img/icons.png") !important;
width: 16px;
height: 16px;
background-position: -19px 0;
}
.icon-dropbox {
background-image: url("../img/icons.png") !important;
width: 16px;
height: 16px;
background-position: -37px 0;
}
.icon-github,
.icon-gist {
background-image: url("../img/icons.png") !important;
width: 16px;
height: 16px;
background-position: -55px 0;
}
.icon-blogger {
background-image: url("../img/icons.png") !important;
width: 16px;
height: 16px;
background-position: -73px 0;
}
.icon-tumblr {
background-image: url("../img/icons.png") !important;
width: 16px;
height: 16px;
background-position: -91px 0;
}
.icon-wordpress {
background-image: url("../img/icons.png") !important;
width: 16px;
height: 16px;
background-position: -109px 0;
}
.icon-ssh {
background-image: url("../img/icons.png") !important;
width: 16px;
height: 16px;
background-position: -127px 0;
}
.working-indicator {
background-image: none;
width: 43px;
height: 11px;
background-position: 0 0;
margin: 14px 15px 0;
}
.working-indicator.show {
background-image: url("../img/ajax-loader.gif");
}
.ui-layout-toggler-north .caret, .ui-layout-toggler-south .caret {
margin-top: 5px;
}
.ui-layout-toggler-north-open .caret,.ui-layout-toggler-south-closed .caret
{
border-bottom: 5px solid #525252;
border-right: 5px solid transparent;
border-left: 5px solid transparent;
border-top: 0;
}
.ui-layout-toggler-north-closed .caret,.ui-layout-toggler-south-open .caret
{
border-top: 5px solid #525252;
border-right: 5px solid transparent;
border-left: 5px solid transparent;
border-bottom: 0;
}
.ui-layout-toggler-east .caret,.ui-layout-toggler-west .caret {
margin-top: 40px;
}
.ui-layout-toggler-east-open .caret,.ui-layout-toggler-west-closed .caret
{
border-bottom: 5px solid transparent;
border-top: 5px solid transparent;
border-left: 5px solid #525252;
border-right: 0;
}
.ui-layout-toggler-east-closed .caret,.ui-layout-toggler-west-opened .caret
{
border-bottom: 5px solid transparent;
border-top: 5px solid transparent;
border-right: 5px solid #525252;
border-left: 0;
}
/* Google picker */
.picker-dialog {
z-index: 1050 !important;
}
#modal-settings textarea {
height: 80px;
max-width: 206px;
}
.tooltip-inner {
text-align: left;
}
table {
margin-bottom: 20px;
}
table th,
table td {
padding: 8px;
line-height: 20px;
text-align: left;
vertical-align: top;
border-top: 1px solid #dddddd;
}
table th {
font-weight: bold;
}
table thead th {
vertical-align: bottom;
}
table caption + thead tr:first-child th,
table caption + thead tr:first-child td,
table colgroup + thead tr:first-child th,
table colgroup + thead tr:first-child td,
table thead:first-child tr:first-child th,
table thead:first-child tr:first-child td {
border-top: 0;
}
table tbody + tbody {
border-top: 2px solid #dddddd;
}
blockquote p {
margin-bottom: 0;
font-size: 17.5px;
font-weight: 300;
line-height: 1.25;
}
ul, ol {
margin-bottom: 20px;
}
blockquote p {
margin-bottom: 20px;
font-size: 14px;
line-height: 20px;
}
#md-section-helper {
position: absolute;
top: -100px;
height: 1px;
padding: 0 6px;
overflow-y: scroll;
z-index: -1;
}
.gecko #md-section-helper {
/* Firefox doesn't show the scrollbar if height is less than 40px */
height: 40px;
}
.opera #md-section-helper {
/* Opera needs to have the textarea in the viewport to evaluate size correctly */
top: 0;
}
/* Viewer */
.viewer #navbar {
position: fixed;
}
.viewer .navbar-inner {
background-color:rgba(215,215,215,0.75) !important;
}
.viewer #wmd-preview {
max-width: 1024px;
margin: 50px auto;
}
.viewer .btn-group {
margin-right: 0;
margin-left: 0;
}

View File

@ -1,553 +1,6 @@
@import url("bootstrap.css");
@import url("jgrowl.css");
@import url("prettify.css");
@import url("default.css");
@media print {
@page {
margin: 25mm 25mm 25mm 25mm;
}
#wmd-preview {
padding: 0px;
margin: 0px;
}
#navbar {
display: none;
}
}
body {
background-color: #f5f5f5;
tab-size: 4;
}
.working {
cursor: progress;
}
.btn, .dropdown-menu {
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
-o-user-select: none;
user-select: none;
}
/*
Override Bootstrap
*/
div, span, a, ul, li, textarea, input, button {
background-image: none !important;
filter: none !important;
-webkit-box-shadow: none !important;
-moz-box-shadow: none !important;
box-shadow: none !important;
text-shadow: none !important;
}
.btn, .navbar-inner, #wmd-preview, .add-on {
border: none !important;
}
.dropdown-menu {
border: 1px solid #ddd !important;
text-align: left;
}
.dropdown-menu:before {
border-bottom-color: #ddd !important;
}
input,
select,
textarea,
.input-prepend .btn,
.input-prepend .add-on {
border: 1px solid #ddd !important;
}
.modal textarea:focus,
input[type="text"]:focus,
input[type="password"]:focus,
input[type="datetime"]:focus,
input[type="datetime-local"]:focus,
input[type="date"]:focus,
input[type="month"]:focus,
input[type="time"]:focus,
input[type="week"]:focus,
input[type="number"]:focus,
input[type="email"]:focus,
input[type="url"]:focus,
input[type="search"]:focus,
input[type="tel"]:focus,
input[type="color"]:focus,
.uneditable-input:focus
{
-webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(128, 128, 128, 0.6) !important;
-moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(128, 128, 128, 0.6) !important;
box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(128, 128, 128, 0.6) !important;
}
.help-block {
color: #999999;
font-size: 12px;
line-height: 17px;
}
.error {
border-color: #ff8661 !important;
-webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(255, 134, 97, 0.6) !important;
-moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(255, 134, 97, 0.6) !important;
box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(255, 134, 97, 0.6) !important;
}
.navbar-inner .btn {
background-color: #ddd;
}
.navbar-inner .btn:hover,
.navbar-inner .btn:focus,
.navbar-inner .btn:active,
.navbar-inner .btn.active,
.btn-group.open .btn.dropdown-toggle {
color: #333333;
background-color: #eee;
}
.nav .dropdown-toggle .caret,
.nav .dropdown-toggle:hover .caret,
.nav .dropdown-toggle:focus .caret {
border-top-color: #000;
border-bottom-color: #000;
}
.navbar .nav.hide {
display: none;
}
.navbar-inner .btn.disabled,
.navbar-inner .btn[disabled] {
color: #333333;
background-color: #ddd;
opacity: 0.3;
filter: alpha(opacity=30);
}
.dropdown-menu > li > a:hover,
.dropdown-menu > li > a:focus,
.dropdown-submenu:hover > a,
.dropdown-submenu:focus > a,
.dropdown-menu > .active > a,
.dropdown-menu > .active > a:hover,
.dropdown-menu > .active > a:focus {
background-color: #888;
}
.dropdown-menu > .disabled > a,
.dropdown-menu > .disabled > a:hover,
.dropdown-menu > .disabled > a:focus {
color: #bbb;
}
.btn-primary {
background-color: #777;
}
input[disabled], select[disabled], textarea[disabled], .input-prepend .add-on {
background-color: #f5f5f5;
}
input[readonly], select[readonly], textarea[readonly] {
background-color: transparent;
cursor: text;
}
.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active,
.btn-primary.active,
.btn-primary.disabled,
.btn-primary[disabled],
.btn-group.open .btn.btn-primary.dropdown-toggle {
color: #fff;
background-color: #888;
}
.btn-group {
margin-right: 10px;
}
.btn-group > .btn + .dropdown-toggle {
padding-right: 12px;
padding-left: 12px;
}
.navbar-inner {
background-color: #ddd !important;
}
code {
color: #333333 !important;
}
h1 {
margin: 30px 0 30px;
}
p, pre, blockquote {
margin: 0 0 20px;
}
hr {
border-top: 1px solid #ddd;
margin: 30px 0;
}
#file-selector {
max-height: 500px;
overflow-y: auto;
overflow-x: hidden;
}
#file-selector .stick {
padding: 10px 20px 0;
}
#file-title {
line-height: 23px;
padding: 9px 15px 11px;
}
#file-title i {
margin: 4px 5px 0;
}
.dropdown-menu i {
margin-right: 5px;
}
#navbar {
position: static;
}
#menu-bar {
margin: 0 15px 10px 15px;
}
#wmd-button-bar {
margin-left: 15px;
}
#wmd-input, #md-section-helper {
font-family: "Courier New", Courier, monospace;
resize: none;
border: none !important;
}
#wmd-preview {
overflow: auto;
}
.wmd-button-row {
margin: 10px 0;
height: 20px;
}
.wmd-spacer {
margin-right: 15px;
display: inline-block;
}
.wmd-prompt-background {
display: none;
}
.wmd-prompt-dialog {
border: 1px solid #999999;
background-color: #F5F5F5;
}
.wmd-prompt-dialog>div {
font-size: 0.8em;
font-family: arial, helvetica, sans-serif;
}
.wmd-prompt-dialog>form>input[type="text"] {
border: 1px solid #999999;
color: black;
}
.wmd-prompt-dialog>form>input[type="button"] {
border: 1px solid #888888;
font-family: trebuchet MS, helvetica, sans-serif;
font-size: 0.8em;
font-weight: bold;
}
.dropdown-menu .divider.with-text {
height: auto;
margin-bottom: 2px;
background-color: transparent;
border-top: 1px solid #e5e5e5;
color: #ccc;
font-variant: small-caps;
font-weight: bold;
padding-left: 20px;
cursor: default;
}
div.dropdown-menu {
padding: 5px 20px;
white-space: normal;
}
div.dropdown-menu p,
div.dropdown-menu blockquote {
margin: 10px 0;
}
div.dropdown-menu i {
margin-right: 0;
}
#link-container {
min-width: 210px;
}
#link-container .link-list {
margin-top: 10px;
}
.icon-link {
background-position: -72px -168px;
}
.icon-code {
width: 15px;
background-position: -384px -168px;
}
.icon-numbered-list {
background-position: -408px -168px;
}
.icon-hr {
background-position: -432px -168px;
}
.icon-undo {
background-position: -456px -168px;
}
.icon-stackedit {
background-image: url("../img/icons.png") !important;
width: 16px;
height: 16px;
background-position: -1px 0;
}
.icon-gdrive {
background-image: url("../img/icons.png") !important;
width: 16px;
height: 16px;
background-position: -19px 0;
}
.icon-dropbox {
background-image: url("../img/icons.png") !important;
width: 16px;
height: 16px;
background-position: -37px 0;
}
.icon-github,
.icon-gist {
background-image: url("../img/icons.png") !important;
width: 16px;
height: 16px;
background-position: -55px 0;
}
.icon-blogger {
background-image: url("../img/icons.png") !important;
width: 16px;
height: 16px;
background-position: -73px 0;
}
.icon-tumblr {
background-image: url("../img/icons.png") !important;
width: 16px;
height: 16px;
background-position: -91px 0;
}
.icon-wordpress {
background-image: url("../img/icons.png") !important;
width: 16px;
height: 16px;
background-position: -109px 0;
}
.icon-ssh {
background-image: url("../img/icons.png") !important;
width: 16px;
height: 16px;
background-position: -127px 0;
}
.working-indicator {
background-image: none;
width: 43px;
height: 11px;
background-position: 0 0;
margin: 14px 15px 0;
}
.working-indicator.show {
background-image: url("../img/ajax-loader.gif");
}
.ui-layout-toggler-north .caret, .ui-layout-toggler-south .caret {
margin-top: 5px;
}
.ui-layout-toggler-north-open .caret,.ui-layout-toggler-south-closed .caret
{
border-bottom: 5px solid #525252;
border-right: 5px solid transparent;
border-left: 5px solid transparent;
border-top: 0;
}
.ui-layout-toggler-north-closed .caret,.ui-layout-toggler-south-open .caret
{
border-top: 5px solid #525252;
border-right: 5px solid transparent;
border-left: 5px solid transparent;
border-bottom: 0;
}
.ui-layout-toggler-east .caret,.ui-layout-toggler-west .caret {
margin-top: 40px;
}
.ui-layout-toggler-east-open .caret,.ui-layout-toggler-west-closed .caret
{
border-bottom: 5px solid transparent;
border-top: 5px solid transparent;
border-left: 5px solid #525252;
border-right: 0;
}
.ui-layout-toggler-east-closed .caret,.ui-layout-toggler-west-opened .caret
{
border-bottom: 5px solid transparent;
border-top: 5px solid transparent;
border-right: 5px solid #525252;
border-left: 0;
}
/* Google picker */
.picker-dialog {
z-index: 1050 !important;
}
#modal-settings textarea {
height: 80px;
max-width: 206px;
}
.tooltip-inner {
text-align: left;
}
table {
margin-bottom: 20px;
}
table th,
table td {
padding: 8px;
line-height: 20px;
text-align: left;
vertical-align: top;
border-top: 1px solid #dddddd;
}
table th {
font-weight: bold;
}
table thead th {
vertical-align: bottom;
}
table caption + thead tr:first-child th,
table caption + thead tr:first-child td,
table colgroup + thead tr:first-child th,
table colgroup + thead tr:first-child td,
table thead:first-child tr:first-child th,
table thead:first-child tr:first-child td {
border-top: 0;
}
table tbody + tbody {
border-top: 2px solid #dddddd;
}
blockquote p {
margin-bottom: 0;
font-size: 17.5px;
font-weight: 300;
line-height: 1.25;
}
ul, ol {
margin-bottom: 20px;
}
blockquote p {
margin-bottom: 20px;
font-size: 14px;
line-height: 20px;
}
#md-section-helper {
position: absolute;
top: -100px;
height: 1px;
padding: 0 6px;
overflow-y: scroll;
z-index: -1;
}
.gecko #md-section-helper {
/* Firefox doesn't show the scrollbar if height is less than 40px */
height: 40px;
}
.opera #md-section-helper {
/* Opera needs to have the textarea in the viewport to evaluate size correctly */
top: 0;
}
/* Viewer */
.viewer #navbar {
position: fixed;
}
.viewer .navbar-inner {
background-color:rgba(215,215,215,0.75) !important;
}
.viewer #wmd-preview {
max-width: 1024px;
margin: 50px auto;
}
.viewer .btn-group {
margin-right: 0;
margin-left: 0;
}

2
doc/theming.md Normal file
View File

@ -0,0 +1,2 @@
StackEdit theming guide
=======================

Binary file not shown.

Before

Width:  |  Height:  |  Size: 404 B

After

Width:  |  Height:  |  Size: 404 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

After

Width:  |  Height:  |  Size: 27 KiB

View File

@ -11,15 +11,18 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="msvalidate.01" content="5E47EE6F67B069C17E3CDD418351A612" />
<script>
// http://.../?debug to serve original CSS/JavaScript files for debug
var dep = "main-min";
var css = "css/main-min.css";
if (location.search.indexOf("debug") !== -1) {
dep = "main";
css = "css/main.css";
// Use http://.../?debug to serve original CSS/JavaScript files for debugging instead of minified
var suffix = "";
if (location.search.indexOf("debug") === -1) {
suffix = "-min";
}
document.write('<link href="' + css + '" rel="stylesheet">');
var require = { baseUrl : "js", deps : [ dep ] };
document.write('<link href="css/main' + suffix + '.css" rel="stylesheet">');
var theme = localStorage.theme;
if (theme) {
document
.write('<link href="themes/' + theme + '/' + theme + '.css" rel="stylesheet">');
}
var require = { baseUrl : "js", deps : [ "main" + suffix ] };
var viewerMode = false;
</script>
<script src="js/require.js"></script>
@ -546,6 +549,15 @@
</label>
</div>
</div>
<div class="control-group">
<label class="control-label" for="input-settings-theme">Theme</label>
<div class="controls">
<select id="input-settings-theme">
</select> <span class="help-block"><a target="_blank"
href="https://github.com/benweet/stackedit/blob/master/doc/theming.md">Create
your own theme...</a></span>
</div>
</div>
<div class="control-group">
<label class="control-label" for="input-settings-converter-type">Converter</label>
<div class="controls">

View File

@ -43,3 +43,8 @@ if(location.hostname.indexOf("benweet.github.io") === 0) {
GATEKEEPER_URL = "http://stackedit-gatekeeper.herokuapp.com/";
TUMBLR_PROXY_URL = "http://stackedit-tumblr-proxy.herokuapp.com/";
}
var THEME_LIST = {
"": "Default",
"blue-gray": "Blue-Gray"
};

View File

@ -241,6 +241,8 @@ define(
+ core.settings.layoutOrientation + "]").prop("checked", true);
// Scroll Link
$("#input-settings-scroll-link").prop("checked", core.settings.scrollLink);
// Theme
$("#input-settings-theme").val(localStorage.theme);
// Converter type
$("#input-settings-converter-type").val(core.settings.converterType);
// MathJax
@ -265,6 +267,8 @@ define(
// Layout orientation
newSettings.layoutOrientation = $(
"input:radio[name=radio-layout-orientation]:checked").prop("value");
// Theme
var theme = $("#input-settings-theme").val();
// Converter type
newSettings.converterType = $("#input-settings-converter-type").val();
// MathJax
@ -287,6 +291,7 @@ define(
if(!event.isPropagationStopped()) {
$.extend(core.settings, newSettings);
localStorage.settings = JSON.stringify(newSettings);
localStorage.theme = theme;
}
};
@ -796,6 +801,11 @@ define(
$.jGrowl.defaults.closeTemplate = '';
$.jGrowl.defaults.position = 'bottom-right';
// Load theme list
_.each(THEME_LIST, function(name, value) {
$("#input-settings-theme").append($('<option value="' + value + '">' + name + '</option>'));
});
// listen to online/offline events
$(window).on('offline', core.setOffline);
$(window).on('online', core.setOnline);

Binary file not shown.

After

Width:  |  Height:  |  Size: 404 B

View File

@ -0,0 +1,65 @@
body,
.btn,
.well,
.modal-footer,
pre,
input[disabled],
select[disabled],
textarea[disabled],
.input-prepend .add-on {
background-color: #f1f2f7;
}
.navbar-inner {
background-color: #ced5de !important;
}
.navbar-inner .btn {
background-color: #ced5de;
}
.btn:hover,
.navbar-inner .btn:hover,
.navbar-inner .btn:focus,
.navbar-inner .btn:active,
.navbar-inner .btn.active,
.btn-group.open .btn.dropdown-toggle {
background-color: #e1e6ed;
}
.btn-primary {
background-color: #80838a;
}
.btn-primary:hover {
background-color: #8e929a;
}
.navbar-inner .btn.disabled,
.navbar-inner .btn[disabled] {
background-color: #ced5de;
}
.navbar .nav > li > a {
color: #64656b;
}
.dropdown-menu > li > a:hover,
.dropdown-menu > li > a:focus,
.dropdown-submenu:hover > a,
.dropdown-submenu:focus > a,
.dropdown-menu > .active > a,
.dropdown-menu > .active > a:hover,
.dropdown-menu > .active > a:focus,
div.jGrowl div.jGrowl-notification {
background-color: #80838a;
}
.working-indicator.show {
background-image: url("ajax-loader-blue-gray.gif");
}
.viewer .navbar-inner {
background-color:rgba(195,203,214,0.75) !important;
}

View File

@ -11,15 +11,17 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="msvalidate.01" content="5E47EE6F67B069C17E3CDD418351A612" />
<script>
// http://.../?debug to serve original CSS/JavaScript files for debug
var dep = "main-min";
var css = "css/main-min.css";
if (location.search.indexOf("debug") !== -1) {
dep = "main";
css = "css/main.css";
// Use http://.../?debug to serve original CSS/JavaScript files for debugging instead of minified
var suffix = "";
if (location.search.indexOf("debug") === -1) {
suffix = "-min";
}
document.write('<link href="' + css + '" rel="stylesheet">');
var require = { baseUrl : "js", deps : [ dep ] };
document.write('<link href="css/main' + suffix + '.css" rel="stylesheet">');
var theme = localStorage.theme;
if(theme) {
document.write('<link href="themes/' + theme + '/' + theme + '.css" rel="stylesheet">');
}
var require = { baseUrl : "js", deps : [ "main" + suffix ] };
var viewerMode = true;
</script>
<script src="js/require.js"></script>