Files
intellecton/venv/lib/python3.12/site-packages/pymdownx/__pycache__/progressbar.cpython-312.pyc
T

153 lines
9.5 KiB
Plaintext
Raw Normal View History

Ë
ãóždZddlmZddlmZmZddlmcmZddl m
Z
ddl m Z dZ
d ZGd
d e
«ZGd d
e«ZGdde«ZdZy)al
Progress Bar.
pymdownx.progressbar
Simple plugin to add support for progress bars
```
/* No label */
[==30%]
/* Label */
[==30% MyLabel]
/* works with attr_list inline style */
[==50/200 MyLabel]{: .additional-class }
```
New line is not required before the progress bar but suggested unless in a table.
Can take percentages and divisions.
Floats are okay. Numbers must be positive. This is an experimental extension.
Functionality is subject to change.
Minimum Recommended Styling
(but you could add gloss, candy striping, animation, or anything else):
```
.progress {
display: block;
width: 300px;
margin: 10px 0;
height: 24px;
border: 1px solid #ccc;
-webkit-border-radius: 3px;
-moz-border-radius: 3px;
border-radius: 3px;
background-color: #F8F8F8;
position: relative;
box-shadow: inset -1px 1px 3px rgba(0, 0, 0, .1);
}
.progress-label {
position: absolute;
text-align: center;
font-weight: bold;
width: 100%; margin: 0;
line-height: 24px;
color: #333;
-webkit-font-smoothing: antialiased !important;
white-space: nowrap;
overflow: hidden;
}
.progress-bar {
height: 24px;
float: left;
border-right: 1px solid #ccc;
-webkit-border-radius: 3px;
-moz-border-radius: 3px;
border-radius: 3px;
background-color: #34c2e3;
box-shadow: inset 0 1px 0px rgba(255, 255, 255, .5);
}
For Level Colors
.progress-100plus .progress-bar {
background-color: #1ee038;
}
.progress-80plus .progress-bar {
background-color: #86e01e;
}
.progress-60plus .progress-bar {
background-color: #f2d31b;
}
.progress-40plus .progress-bar {
background-color: #f2b01e;
}
.progress-20plus .progress-bar {
background-color: #f27011;
}
.progress-0plus .progress-bar {
background-color: #f63a0f;
}
```
MIT license.
Copyright (c) 2014 - 2017 Isaac Muse <isaacmuse@gmail.com>
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.
é)Ú Extension)ÚInlineProcessorÚdequoteN)ÚAttrListTreeprocessoré)Úutilaé(?x)
\[={1,}\s* # Opening
(?:
(?P<percent>100(?:.0+)?|[1-9]?[0-9](?:\.\d+)?)% | # Percent
(?:(?P<frac_num>\d+(?:\.\d+)?)\s*/\s*(?P<frac_den>\d+(?:\.\d+)?)) # Fraction
)
(?P<title>\s+(?P<quote>['"]).*?(?P=quote))?\s* # Title
\] # Closing
(?P<attr_list>\{\:?([^\}]*)\})? # Optional attr list
zprogress-%dpluscóeZdZdZdZy)ÚProgressBarTreeProcessorz Used for AttrList compatibility.cóô|jrl|jj|j«}|rD|j||j d««|j|j «d|_yyy)z-Inline check for attributes at start of tail.rN)ÚtailÚ INLINE_REÚmatchÚ assign_attrsÚgroupÚend)ÚselfÚelemÚms úW/home/antigravity/intellecton/venv/lib/python3.12/site-packages/pymdownx/progressbar.pyÚrunzProgressBarTreeProcessor.run„s`ð 9Š9Ø×$ T§Y¡YÓ/ˆAÙØ×! $¨¯©°«
Ô ŸI™I a§e¡e£g hÐ/• ðð óN)Ú__name__Ú
__module__Ú __qualname__Ú__doc__r©rrr
r
s
Ù0rr
có"eZdZdZdZdZdZy)ÚProgressBarPatternz&Pattern handler for the progress bars.có2tj|||«y)ú Initialize.N)rÚ__init__)rÚpatternÚmds rr!zProgressBarPattern.__init__sô × Ñ   w°Õ3rc ózttdg|jjdd«j «z|z««}|j «t
jd«}|jddj|««t
j|d«}|jdd«|jdd |z«t
j|d
«}|jdd «||_
|C||_ d |jjvr$t|j«j|«|S)
zCreate the tag.ÚprogressÚ add_classesÚÚdivÚclassú ú progress-barÚstylez
width:%s%%Úpzprogress-labelÚ attr_list)ÚlistÚsetÚconfigÚgetÚsplitÚsortÚetreeÚElementÚjoinÚ
SubElementÚtextr r#Útreeprocessorsr
r) rÚwidthÚlabelr&ÚalistÚclassesÚelÚbarr-s rÚ
create_tagzProgressBarPattern.create_tags ôÜ Ø Ø  
¨rÓñó
ó
ˆð  ŒÜ
]‰]˜
!ˆØ
ˆw˜Ÿ Ó×јr 5ÓØ ˜Ô ˜¨Ñ × Ñ ˜S #Ó &ˆØ ˆˆŒØ Р؈BŒGؘdŸg™gׯ©Ó5°bÔˆ rcóJd}|jjdd«}|jjdd«}g}d}|jd«r7t|j |jd«j «««}|jd «r|jd «}|jd
«rt
|jd
««}nF t
|jd ««} t
|jd
««}
|