Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MarkdownAIO #82

Closed
wants to merge 41 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
6e96a4e
add dashdown
AnnMarieW Jan 24, 2022
2639145
add dashdown docs
AnnMarieW Jan 24, 2022
d444888
updated demo
AnnMarieW Jan 25, 2022
56a362f
updated demo
AnnMarieW Jan 25, 2022
ff884d8
updated demo
AnnMarieW Jan 25, 2022
6432391
Merge branch 'main' of https://github.com/plotly/dash-labs into dashdown
AnnMarieW Jan 26, 2022
df3ff37
updated demo
AnnMarieW Jan 26, 2022
1d20967
fixed merge conflicts in #78
AnnMarieW Jan 29, 2022
116cfc3
Merge branch 'main' of https://github.com/plotly/dash-labs into dashdown
AnnMarieW Jan 29, 2022
93e179c
change default of exec_code to False
AnnMarieW Jan 29, 2022
46b6e1a
Change to MarkdownAIO from dashdown
AnnMarieW Jan 29, 2022
9e0e49f
Updated demo app
AnnMarieW Jan 30, 2022
06ca65b
added viewport meta tag to pages
AnnMarieW Jan 31, 2022
d6f6eda
updated demo
AnnMarieW Jan 31, 2022
e9e7794
updated demo
AnnMarieW Jan 31, 2022
30d111d
Update dash_labs/dashdown.py
AnnMarieW Feb 2, 2022
2720cb8
Update dash_labs/dashdown.py
AnnMarieW Feb 2, 2022
fdf5ae5
Update after review - part 1
AnnMarieW Feb 3, 2022
5ee92f9
Merge remote-tracking branch 'origin/MarkdownAIO' into MarkdownAIO
AnnMarieW Feb 3, 2022
2838587
reformat demo app
AnnMarieW Feb 4, 2022
7dda694
cleanu-p
AnnMarieW Feb 4, 2022
335abd0
Merge branch 'main' of https://github.com/plotly/dash-labs into Markd…
AnnMarieW Feb 4, 2022
9b65dc2
changed to yaml front matter
AnnMarieW Feb 7, 2022
cdabb82
changed to dangerously_use_exec
AnnMarieW Feb 8, 2022
6bb801f
added stylesheet
AnnMarieW Feb 9, 2022
87a22cf
cleanup
AnnMarieW Feb 11, 2022
30bf6f5
allow functions for title and description
AnnMarieW Feb 11, 2022
ec6c4ad
add live demo of advanced features
AnnMarieW Feb 11, 2022
5a817d4
clean-up
AnnMarieW Feb 11, 2022
3a96213
Updated docs
AnnMarieW Feb 14, 2022
3636b0f
Updated docs
AnnMarieW Feb 15, 2022
e11a09b
Updated docs
AnnMarieW Feb 15, 2022
782dfc4
Prevent MarkdownAIO from being used in callbacks
AnnMarieW Feb 16, 2022
4863f8b
Update docs
AnnMarieW Feb 16, 2022
32ddef1
Update docs
AnnMarieW Feb 16, 2022
ffb6b39
temp commit
AnnMarieW Feb 19, 2022
1d2e24d
Updated demo added theme switch example
AnnMarieW Mar 8, 2022
339338b
Undo prevent MarkdownAIO from being used in callbacks
AnnMarieW Mar 17, 2022
93c6e1f
black
AnnMarieW Mar 17, 2022
fd1f590
Merge branch 'main' of https://github.com/plotly/dash-labs into Markd…
AnnMarieW May 10, 2022
ddda46b
update for v1.0.6
AnnMarieW May 10, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ The documentation for Dash Labs can be found in the [docs/](./docs/) directory.


### Multi-Page App Docs

See the [online docs](https://dashlabs.pythonanywhere.com/) made with 'pages/' and the new feature coming soon to dash-labs: `MarkdownAIO` - Markdown that runs code!

_New in dash-labs>=1.0.0:_
- [08-MultiPageDashApp.md](https://github.com/plotly/dash-labs/blob/main/docs/08-MultiPageDashApp.md)
- Overview, quickstart apps, reference for the `pages` plug-in
Expand Down
2 changes: 2 additions & 0 deletions dash_labs/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
from . import plugins
from .version import __version__
from .dashdown import MarkdownAIO
from dash_labs import css

from . util import print_registry
76 changes: 76 additions & 0 deletions dash_labs/assets/markdownaio.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@

/* styles code in MarkdownAIO with the StackOverflow Light theme */
.maio-code pre code.hljs{display:block;overflow-x:auto;padding:1em}code.hljs{padding:3px 5px}/*!
Theme: StackOverflow Light
Description: Light theme as used on stackoverflow.com
Author: stackoverflow.com
Maintainer: @Hirse
Website: https://github.com/StackExchange/Stacks
License: MIT
Updated: 2021-05-15

Updated for @stackoverflow/stacks v0.64.0
Code Blocks: /blob/v0.64.0/lib/css/components/_stacks-code-blocks.less
Colors: /blob/v0.64.0/lib/css/exports/_stacks-constants-colors.less
*/
.maio-code .hljs{color:#2f3337;background:#f6f6f6}.hljs-subst{color:#2f3337}.hljs-comment{color:#656e77}.hljs-attr,.hljs-doctag,.hljs-keyword,.hljs-meta .hljs-keyword,.hljs-section,.hljs-selector-tag{color:#015692}.hljs-attribute{color:#803378}.hljs-name,.hljs-number,.hljs-quote,.hljs-selector-id,.hljs-template-tag,.hljs-type{color:#b75501}.hljs-selector-class{color:#015692}.hljs-link,.hljs-regexp,.hljs-selector-attr,.hljs-string,.hljs-symbol,.hljs-template-variable,.hljs-variable{color:#54790d}.hljs-meta,.hljs-selector-pseudo{color:#015692}.hljs-built_in,.hljs-literal,.hljs-title{color:#b75501}.hljs-bullet,.hljs-code{color:#535a60}.hljs-meta .hljs-string{color:#54790d}.hljs-deletion{color:#c02d2e}.hljs-addition{color:#2f6f44}.hljs-emphasis{font-style:italic}.hljs-strong{font-weight:700}


.maio-clipboard {
right: 0;
position: absolute;
top: 0;
background-color: #f6f6f6;
color: #2f3337;
padding: 4px;
}

/* app output container for executed code */
.maio-app {
padding: 10px;
border: 1px solid rgba(100, 100, 100, 0.4);
}

/* placeholder for the code container */
.maio-code {
}

.maio-text {
margin-bottom : 50px;
}


/* Responsive layout - makes a one column layout instead of a two-column layout */
.maio-grid-container {
display: grid;
gap: 1em;
grid-template-columns: repeat(auto-fit, minmax(35em, 1fr));
}



/* styles code in MarkdownAIO with the StackOverflow Dark theme */
.maio-dark pre code.hljs{display:block;overflow-x:auto;padding:1em}code.hljs{padding:3px 5px}/*!
Theme: StackOverflow Dark
Description: Dark theme as used on stackoverflow.com
Author: stackoverflow.com
Maintainer: @Hirse
Website: https://github.com/StackExchange/Stacks
License: MIT
Updated: 2021-05-15

Updated for @stackoverflow/stacks v0.64.0
Code Blocks: /blob/v0.64.0/lib/css/components/_stacks-code-blocks.less
Colors: /blob/v0.64.0/lib/css/exports/_stacks-constants-colors.less
*/
.maio-dark .hljs{color:#fff;background:#1c1b1b}.hljs-subst{color:#fff}.hljs-comment{color:#999}.hljs-attr,.hljs-doctag,.hljs-keyword,.hljs-meta .hljs-keyword,.hljs-section,.hljs-selector-tag{color:#88aece}.hljs-attribute{color:#c59bc1}.hljs-name,.hljs-number,.hljs-quote,.hljs-selector-id,.hljs-template-tag,.hljs-type{color:#f08d49}.hljs-selector-class{color:#88aece}.hljs-link,.hljs-regexp,.hljs-selector-attr,.hljs-string,.hljs-symbol,.hljs-template-variable,.hljs-variable{color:#b5bd68}.hljs-meta,.hljs-selector-pseudo{color:#88aece}.hljs-built_in,.hljs-literal,.hljs-title{color:#f08d49}.hljs-bullet,.hljs-code{color:#ccc}.hljs-meta .hljs-string{color:#b5bd68}.hljs-deletion{color:#de7176}.hljs-addition{color:#76c490}.hljs-emphasis{font-style:italic}.hljs-strong{font-weight:700}


.maio-dark-clipboard {
right: 0;
position: absolute;
top: 0;
background-color: #1c1b1b;
color: white;
padding: 4px;
}
12 changes: 12 additions & 0 deletions dash_labs/css.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#

# import version us this to automatically update the verson
#
# example from my library of hosing a css file
# dbc_css = ("https://cdn.jsdelivr.net/gh/AnnMarieW/[email protected]/dbc.min.css")


# markdownaio =f"https://cdn.jsdelivr.net/gh/AnnMarieW/[email protected]/dbc.min.css"

# how to use in an app
# app = dash.Dash(__name__, external_stylesheets=[dl.css.markdownaio])
Loading