예제 #1
0
def all_stories() -> Tuple[Story, ...]:
    story0 = Story(
        component=FaviconSet,
        props=dict(
            favicons=dataclasses.replace(theme_config.favicons),
            pathto=fake_pathto,
        ),
    )
    story1 = Story(
        component=FaviconSet,
        props=dict(
            favicons=no_shortcut,
            pathto=fake_pathto,
        ),
    )
    story2 = Story(
        component=FaviconSet,
        props=dict(
            favicons=no_sizes,
            pathto=fake_pathto,
        ),
    )
    story3 = Story(component=FaviconSet, usage=html('<{FaviconSet} />'))

    return story0, story1, story2, story3
예제 #2
0
def all_stories() -> Tuple[Story, ...]:
    story0 = Story(
        component=Donate,
        props=dict(
            donate_url=theme_config.donate_url,
            opencollective=theme_config.opencollective,
            opencollective_button_color=theme_config.opencollective_button_color,
            project=sphinx_config.project,
            tidelift_url=theme_config.tidelift_url,
        ),
    )
    story1 = Story(
        component=Donate,
        props=dict(
            donate_url='someurl',
            opencollective=theme_config.opencollective,
            opencollective_button_color=theme_config.opencollective_button_color,
            project=sphinx_config.project,
            tidelift_url=theme_config.tidelift_url,
        ),
    )
    story2 = Story(
        component=Donate,
        usage=html('<{Donate} />')
    )
    story3 = Story(
        component=Donate,
        usage=html(
            '<{Donate} donate_url="donate.com" opencollective="opencollective.com" tidelift_url="tidelift.com"  />')
    )

    return story0, story1, story2, story3
예제 #3
0
def all_stories() -> Tuple[Story, ...]:
    story0 = Story(
        component=LocalToc,
        props=dict(
            display_toc=page_context.display_toc,
            master_doc=sphinx_config.master_doc,
            pathto=page_context.pathto,
            toc=page_context.toc,
        ),
    )
    story1 = Story(
        component=LocalToc,
        props=dict(
            display_toc=False,
            master_doc=sphinx_config.master_doc,
            pathto=page_context.pathto,
            toc=page_context.toc,
        ),
    )
    story2 = Story(
        component=LocalToc,
        usage=html('<{LocalToc} />')
    )

    return story0, story1, story2
예제 #4
0
def all_stories() -> Tuple[Story, ...]:
    story0 = Story(component=Head,
                   props=dict(
                       extrahead=None,
                       pathto=fake_pathto,
                   ))

    story1 = Story(component=Head,
                   props=dict(
                       extrahead=extrahead,
                       pathto=fake_pathto,
                   ))

    story2 = Story(component=Head,
                   scannables=(
                       canonical_link,
                       cssfiles,
                       faviconset,
                       jsfiles,
                       linktags,
                       title,
                   ),
                   usage=html('<{Head} />'))

    return story0, story1, story2
예제 #5
0
def all_stories() -> Tuple[Story, ...]:
    story0 = Story(
        component=AboutTravisButton,
        props=dict(
            travis_button=theme_config.travis_button,
            travis_path=theme_config.travis_path,
            github_repo=theme_config.github_repo,
            github_user=theme_config.github_user,
            badge_branch=theme_config.badge_branch,
        ),
    )
    story1 = Story(
        component=AboutTravisButton,
        props=dict(
            travis_button=True,
            travis_path=theme_config.travis_path,
            github_repo='thisrepo',
            github_user='******',
            badge_branch=theme_config.badge_branch,
        ),
    )
    story2 = Story(component=AboutTravisButton,
                   usage=html('<{AboutTravisButton} />'))
    story3 = Story(
        component=AboutTravisButton,
        usage=html(
            '<{AboutTravisButton} travis_button={True} github_repo="thisrepo" github_user="******" />'
        ))

    return story0, story1, story2, story3
예제 #6
0
def all_stories() -> Tuple[Story, ...]:
    story0 = Story(component=BaseLayout,
                   props=dict(
                       language='EN',
                       extrahead=None,
                   ))

    story1 = Story(component=BaseLayout,
                   plugins=(themabaster, ),
                   singletons=(
                       (sc, SphinxConfig),
                       (html_config, HTMLConfig),
                       (page_context, PageContext),
                       (theme_config, ThemeConfig),
                   ),
                   usage=html('<{BaseLayout} />'))

    story2 = Story(component=BaseLayout,
                   plugins=(themabaster, ),
                   singletons=(
                       (sc, SphinxConfig),
                       (html_config, HTMLConfig),
                       (page_context, PageContext),
                       (theme_config, ThemeConfig),
                   ),
                   usage=html('<{BaseLayout} doctype={doctype} />'))

    return story0, story1, story2
예제 #7
0
def all_stories() -> Tuple[Story, ...]:
    story0 = Story(
        component=AboutGitHubButton,
        props=dict(
            github_button=theme_config.github_button,
            github_repo=theme_config.github_repo,
            github_user=theme_config.github_user,
            github_type=theme_config.github_type,
            github_count=theme_config.github_count,
        ),
    )
    story1 = Story(
        component=AboutGitHubButton,
        props=dict(
            github_button=True,
            github_repo='repo',
            github_user='******',
            github_count='true',
            github_type='watch',
        ),
    )
    story2 = Story(component=AboutGitHubButton,
                   usage=html('<{AboutGitHubButton} />'))

    story3 = Story(
        component=AboutGitHubButton,
        usage=html(
            '<{AboutGitHubButton} github_button={True} github_repo="thisrepo" github_user="******" /> '
        ))

    return story0, story1, story2, story3
예제 #8
0
def all_stories() -> Tuple[Story, ...]:
    story0 = Story(component=Content, )

    story1 = Story(component=Content,
                   scannables=(relbar1, ),
                   usage=html(f'<{Content} />'))

    return story0, story1
예제 #9
0
def all_stories() -> Tuple[Story, ...]:
    story0 = Story(component=Body, )

    story1 = Story(component=Body,
                   plugins=(themabaster, ),
                   usage=html('<{Body} />'))

    return story0, story1
예제 #10
0
def all_stories() -> Tuple[Story, ...]:
    story0 = Story(
        component=Sidebar1,
        props=dict(),
    )
    story1 = Story(component=Sidebar1, usage=html('<{Sidebar1} />'))

    return story0, story1
예제 #11
0
def all_stories() -> Tuple[Story, ...]:
    story0 = Story(
        component=Header,
        props=dict(),
    )
    story1 = Story(component=Header, usage=html('<{Header} />'))

    return story0, story1
예제 #12
0
def all_stories() -> Tuple[Story, ...]:
    story0 = Story(
        component=HelloWorld,
        props=dict(name='Nullster', title='Story Site'),
    )
    story1 = Story(component=HelloWorld,
                   usage=html('<{HelloWorld} name="Nullster" />'))

    return story0, story1
예제 #13
0
def all_stories() -> Tuple[Story, ...]:
    story0 = Story(component=Relbar2,
                   props=dict(
                       show_relbar_bottom=True,
                       show_relbars=True,
                   ),
                   scannables=(rellink_markup, ))
    story1 = Story(component=Relbar2, usage=html('<{Relbar2} />'))

    return story0, story1
예제 #14
0
def all_stories() -> Tuple[Story, ...]:
    story0 = Story(
        component=Favicon,
        props=dict(href='someicon.png'),
    )
    story1 = Story(
        component=Favicon,
        usage=html('<{Favicon} />')
    )

    return story0, story1
예제 #15
0
def all_stories() -> Tuple[Story, ...]:
    story0 = Story(
        component=JSFiles,
        props=dict(
            site_files=html_config.js_files,
            theme_files=theme_config.js_files,
            page_files=page_context.js_files,
        ),
    )
    story1 = Story(component=JSFiles, usage=html('<{JSFiles} />'))

    return story0, story1
예제 #16
0
def all_stories() -> Tuple[Story, ...]:
    story0 = Story(
        component=Linktags,
        props=dict(
            hasdoc=fake_hasdoc,
            pathto=fake_pathto,
            links=links,
        ),
    )
    story1 = Story(component=Linktags, usage=html('<{Linktags} />'))

    return story0, story1
예제 #17
0
def all_stories() -> Tuple[Story, ...]:
    story0 = Story(
        component=Relations,
        props=dict(
            master_doc=sphinx_config.master_doc,
            pathto=page_context.pathto,
            toctree=page_context.toctree,
        ),
    )
    story1 = Story(component=Relations, usage=html('<{Relations} />'))

    return story0, story1
예제 #18
0
def all_stories() -> Tuple[Story, ...]:
    story0 = Story(
        component=Sidebar2,
        props=dict(sidebars=theme_config.sidebars, ),
    )
    story1 = Story(
        component=Sidebar2,
        props=dict(sidebars=tuple(), ),
    )
    story2 = Story(component=Sidebar2,
                   scannables=(localtoc, relations, sourcelink, searchbox),
                   usage=html('<{Sidebar2} />'))

    return story0, story1, story2
예제 #19
0
def all_stories() -> Tuple[Story, ...]:
    story0 = Story(
        component=Navigation,
        props=dict(
            master_doc=sphinx_config.master_doc,
            pathto=page_context.pathto,
            sidebar_collapse=theme_config.sidebar_collapse,
            sidebar_includehidden=theme_config.sidebar_includehidden,
            toctree=page_context.toctree,
        ),
    )
    story1 = Story(component=Navigation, usage=html('<{Navigation} />'))

    return story0, story1
예제 #20
0
def all_stories() -> Tuple[Story, ...]:
    story0 = Story(
        component=SearchBox,
        props=dict(
            builder=page_context.builder,
            pagename=page_context.pagename,
            pathto=page_context.pathto,
        ),
    )
    story1 = Story(
        component=SearchBox,
        usage=html('<{SearchBox} />')
    )

    return story0, story1
예제 #21
0
def all_stories() -> Tuple[Story, ...]:
    story0 = Story(
        component=RellinkMarkup,
        props=dict(previous=Link(
            title='Previous',
            link='/previous/',
        ),
                   next=Link(
                       title='Next',
                       link='/next/',
                   )),
    )
    story1 = Story(component=RellinkMarkup, usage=html('<{RellinkMarkup} />'))

    return story0, story1
예제 #22
0
def all_stories() -> Tuple[Story, ...]:
    story0 = Story(
        component=Title,
        props=dict(resource_title='Themabaster', site_title='Story Site'),
    )
    story1 = Story(
        component=Title,
        props=dict(resource_title='<h1>Some Page</h1>', site_title=None),
    )
    story2 = Story(
        component=Title,
        props=dict(resource_title='Themabaster', site_title='Story Site'),
    )
    story3 = Story(component=Title, usage=html('<{Title} site_title="XYZ" />'))

    return story0, story1, story2, story3
예제 #23
0
def all_stories() -> Tuple[Story, ...]:
    story0 = Story(
        component=SourceLink,
        props=dict(
            show_sourcelink=True,
            has_source=True,
            pathto=page_context.pathto,
            sourcename='thispage.md',
        ),
    )
    story1 = Story(
        component=SourceLink,
        usage=html('<{SourceLink} />')
    )

    return story0, story1
예제 #24
0
def all_stories() -> Tuple[Story, ...]:
    story0 = Story(
        component=NavigationExtraLinks,
        props=dict(extra_nav_links=theme_config.extra_nav_links, ),
    )
    story1 = Story(
        component=NavigationExtraLinks,
        props=dict(extra_nav_links=(
            Link(title='First Link', link='link1.com'),
            Link(title='Second Link', link='link2.com'),
        )),
    )
    story2 = Story(component=NavigationExtraLinks,
                   usage=html('<{NavigationExtraLinks} />'))

    return story0, story1, story2
예제 #25
0
def all_stories() -> Tuple[Story, ...]:
    story0 = Story(
        component=Document,
        props=dict(
            body=Markup('<p>Some content</p>'),
            nosidebar=False,
        ),
    )

    story1 = Story(component=Document,
                   scannables=(
                       relbar1,
                       relbar2,
                   ),
                   usage=html('<{Document} />'))

    return story0, story1
예제 #26
0
def all_stories() -> Tuple[Story, ...]:
    story0 = Story(
        component=Footer,
        props=dict(
            copyright='Bazinga',
            has_source=True,
            pathto=fake_pathto,
            show_powered_by=True,
            show_copyright=True,
            show_sourcelink=True,
            sourcename='',
        ),
    )

    story1 = Story(component=Footer, usage=html('<{Footer} />'))

    return story0, story1
예제 #27
0
def all_stories() -> Tuple[Story, ...]:
    story0 = Story(
        component=AboutDescription,
        props=dict(
            description=theme_config.description
        ),
    )
    story1 = Story(
        component=AboutDescription,
        props=dict(
            description='Some Project'
        ),
        usage=html('<{AboutDescription} />')
    )
    story2 = Story(
        component=AboutDescription,
        usage=html('<{AboutDescription} />')
    )

    return story0, story1, story2
예제 #28
0
def all_stories() -> Tuple[Story, ...]:
    story0 = Story(
        component=AboutLogo,
        props=dict(
            logo='site_logo.png',
            master_doc=sphinx_config.master_doc,
            pathto=page_context.pathto,
        ),
    )
    story1 = Story(
        component=AboutLogo,
        props=dict(
            logo=None,
            master_doc=sphinx_config.master_doc,
            pathto=page_context.pathto,
        ),
    )
    story2 = Story(
        component=AboutLogo,
        usage=html('<{AboutLogo} logo="site_logo.png" />')
    )

    return story0, story1, story2
예제 #29
0
def all_stories() -> Tuple[Story, ...]:
    story0 = Story(
        component=CanonicalLink,
        props=dict(
            baseurl='https://somewhere.com/mysite',
            file_suffix='.html',
            pagename='somedoc',
        ),
    )
    story1 = Story(
        component=CanonicalLink,
        props=dict(
            baseurl=None,
            file_suffix='.html',
            pagename='somedoc',
        ),
    )
    story2 = Story(
        component=CanonicalLink,
        usage=html('<{CanonicalLink} baseurl="https://somewhere.com/mysite" />')
    )

    return story0, story1, story2
예제 #30
0
def all_stories() -> Tuple[Story, ...]:
    story0 = Story(component=About, )
    story1 = Story(component=About, usage=html('<{About} />'))

    return story0, story1