mirror of
https://github.com/explosion/spaCy.git
synced 2024-11-12 04:38:28 +03:00
49cee4af92
* Integrate Python kernel via Binder * Add live model test for languages with examples * Update docs and code examples * Adjust margin (if not bootstrapped) * Add binder version to global config * Update terminal and executable code mixins * Pass attributes through infobox and section * Hide v-cloak * Fix example * Take out model comparison for now * Add meta text for compat * Remove chart.js dependency * Tidy up and simplify JS and port big components over to Vue * Remove chartjs example * Add Twitter icon * Add purple stylesheet option * Add utility for hand cursor (special cases only) * Add transition classes * Add small option for section * Add thumb object for small round thumbnail images * Allow unset code block language via "none" value (workaround to still allow unset language to default to DEFAULT_SYNTAX) * Pass through attributes * Add syntax highlighting definitions for Julia, R and Docker * Add website icon * Remove user survey from navigation * Don't hide GitHub icon on small screens * Make top navigation scrollable on small screens * Remove old resources page and references to it * Add Universe * Add helper functions for better page URL and title * Update site description * Increment versions * Update preview images * Update mentions of resources * Fix image * Fix social images * Fix problem with cover sizing and floats * Add divider and move badges into heading * Add docstrings * Reference converting section * Add section on converting word vectors * Move converting section to custom section and fix formatting * Remove old fastText example * Move extensions content to own section Keep weird ID to not break permalinks for now (we don't want to rewrite URLs if not absolutely necessary) * Use better component example and add factories section * Add note on larger model * Use better example for non-vector * Remove similarity in context section Only works via small models with tensors so has always been kind of confusing * Add note on init-model command * Fix lightning tour examples and make excutable if possible * Add spacy train CLI section to train * Fix formatting and add video * Fix formatting * Fix textcat example description (resolves #2246) * Add dummy file to try resolve conflict * Delete dummy file * Tidy up [ci skip] * Ensure sufficient height of loading container * Add loading animation to universe * Update Thebelab build and use better startup message * Fix asset versioning * Fix typo [ci skip] * Add note on project idea label
194 lines
4.1 KiB
Sass
194 lines
4.1 KiB
Sass
//- 💫 CSS > COMPONENTS > CODE
|
|
|
|
//- Code block
|
|
|
|
.c-code-block,
|
|
.thebelab-cell
|
|
background: $color-front
|
|
color: darken($color-back, 20)
|
|
padding: 0.75em 0
|
|
border-radius: $border-radius
|
|
overflow: auto
|
|
width: 100%
|
|
max-width: 100%
|
|
white-space: pre
|
|
direction: ltr
|
|
|
|
.c-code-block--has-icon
|
|
padding: 0
|
|
display: flex
|
|
border-top-left-radius: 0
|
|
border-bottom-left-radius: 0
|
|
|
|
.c-code-block__icon
|
|
padding: 0 0 0 1rem
|
|
display: flex
|
|
justify-content: center
|
|
align-items: center
|
|
|
|
&.c-code-block__icon--border
|
|
border-left: 6px solid
|
|
|
|
//- Code block content
|
|
|
|
.c-code-block__content,
|
|
.thebelab-input,
|
|
.jp-OutputArea
|
|
display: block
|
|
font: normal normal 1.1rem/#{1.9} $font-code
|
|
padding: 1em 2em
|
|
|
|
.c-code-block__content[data-prompt]:before,
|
|
content: attr(data-prompt)
|
|
margin-right: 0.65em
|
|
display: inline-block
|
|
vertical-align: middle
|
|
opacity: 0.5
|
|
|
|
//- Thebelab
|
|
|
|
[data-executable]
|
|
margin-bottom: 0
|
|
|
|
.thebelab-input.thebelab-input
|
|
padding: 3em 2em 1em
|
|
|
|
.jp-OutputArea
|
|
&:not(:empty)
|
|
padding: 2rem 2rem 1rem
|
|
border-top: 1px solid $color-dark
|
|
margin-top: 2rem
|
|
|
|
.entities, svg
|
|
white-space: initial
|
|
font-family: inherit
|
|
|
|
.entities
|
|
font-size: 1.35rem
|
|
|
|
.jp-OutputArea pre
|
|
font: inherit
|
|
|
|
.jp-OutputPrompt.jp-OutputArea-prompt
|
|
padding-top: 0.5em
|
|
margin-right: 1rem
|
|
font-family: inherit
|
|
font-weight: bold
|
|
|
|
.thebelab-run-button
|
|
@extend .u-text-label, .u-text-label--dark
|
|
|
|
.thebelab-wrapper
|
|
position: relative
|
|
|
|
.thebelab-wrapper__text
|
|
@include position(absolute, top, right, 1.25rem, 1.25rem)
|
|
color: $color-subtle-dark
|
|
z-index: 10
|
|
|
|
//- Code
|
|
|
|
code, .CodeMirror, .jp-RenderedText, .jp-OutputArea
|
|
-webkit-font-smoothing: subpixel-antialiased
|
|
-moz-osx-font-smoothing: auto
|
|
|
|
|
|
//- Inline code
|
|
|
|
*:not(a):not(.c-code-block) > code
|
|
color: $color-dark
|
|
|
|
*:not(.c-code-block) > code
|
|
font-size: 90%
|
|
background-color: $color-subtle-light
|
|
padding: 0.2rem 0.4rem
|
|
border-radius: 0.25rem
|
|
font-family: $font-code
|
|
margin: 0
|
|
box-decoration-break: clone
|
|
white-space: nowrap
|
|
|
|
.c-aside__content &
|
|
background: lighten($color-front, 10)
|
|
color: $color-back
|
|
text-shadow: none
|
|
|
|
|
|
//- Syntax Highlighting (Prism)
|
|
|
|
[class*="language-"] .token
|
|
&.comment, &.prolog, &.doctype, &.cdata, &.punctuation
|
|
color: map-get($syntax-highlighting, comment)
|
|
|
|
&.property, &.tag, &.constant, &.symbol, &.deleted
|
|
color: map-get($syntax-highlighting, tag)
|
|
|
|
&.boolean, &.number
|
|
color: map-get($syntax-highlighting, number)
|
|
|
|
&.selector, &.attr-name, &.string, &.char, &.builtin, &.inserted
|
|
color: map-get($syntax-highlighting, selector)
|
|
|
|
@at-root .language-css .token.string,
|
|
&.operator, &.entity, &.url, &.variable
|
|
color: map-get($syntax-highlighting, operator)
|
|
|
|
&.atrule, &.attr-value, &.function
|
|
color: map-get($syntax-highlighting, function)
|
|
|
|
&.regex, &.important
|
|
color: map-get($syntax-highlighting, regex)
|
|
|
|
&.keyword
|
|
color: map-get($syntax-highlighting, keyword)
|
|
|
|
&.italic
|
|
font-style: italic
|
|
|
|
//- Syntax Highlighting (CodeMirror)
|
|
|
|
.CodeMirror.cm-s-default
|
|
background: $color-front
|
|
color: darken($color-back, 20)
|
|
|
|
.CodeMirror-selected
|
|
background: $color-theme
|
|
color: $color-back
|
|
|
|
.CodeMirror-cursor
|
|
border-left-color: currentColor
|
|
|
|
.cm-variable-2
|
|
color: inherit
|
|
font-style: italic
|
|
|
|
.cm-comment
|
|
color: map-get($syntax-highlighting, comment)
|
|
|
|
.cm-keyword, .cm-builtin
|
|
color: map-get($syntax-highlighting, keyword)
|
|
|
|
.cm-operator
|
|
color: map-get($syntax-highlighting, operator)
|
|
|
|
.cm-string
|
|
color: map-get($syntax-highlighting, selector)
|
|
|
|
.cm-number
|
|
color: map-get($syntax-highlighting, number)
|
|
|
|
.cm-def
|
|
color: map-get($syntax-highlighting, function)
|
|
|
|
//- Syntax highlighting (Jupyter)
|
|
|
|
.jp-RenderedText pre
|
|
.ansi-cyan-fg
|
|
color: map-get($syntax-highlighting, function)
|
|
|
|
.ansi-green-fg
|
|
color: $color-green
|
|
|
|
.ansi-red-fg
|
|
color: map-get($syntax-highlighting, operator)
|