2
import space_logo from "./images/spaces.svg";
3
import { _ } from "svelte-i18n";
4
export let wrapper: HTMLDivElement;
5
export let version: string;
6
export let initial_height: string;
7
export let is_embed: boolean;
9
export let space: string | null;
10
export let display: boolean;
11
export let info: boolean;
12
export let loaded: boolean;
17
class:app={!display && !is_embed}
18
class:embed-container={display}
19
class:with-info={info}
20
class="gradio-container gradio-container-{version}"
21
style:min-height={loaded ? "initial" : initial_height}
22
style:flex-grow={!display ? "1" : "auto"}
28
{#if display && space && info}
31
<a href="https://huggingface.co/spaces/{space}" class="title">{space}</a
35
{$_("common.built_with")}
36
<a class="gradio" href="https://gradio.app">Gradio</a>.
39
{$_("common.hosted_on")}
40
<a class="hf" href="https://huggingface.co/spaces"
41
><span class="space-logo">
42
<img src={space_logo} alt="Hugging Face Space" />
54
flex-direction: column;
58
color: var(--button-secondary-text-color);
62
margin: var(--size-4) 0px;
63
border: 1px solid var(--button-secondary-border-color);
64
border-radius: var(--embed-radius);
68
padding-bottom: var(--size-7);
71
.embed-container > .main {
72
padding: var(--size-4);
78
flex-direction: column;
84
padding: var(--size-4) var(--size-8);
89
@media (--screen-sm) {
94
@media (--screen-md) {
99
@media (--screen-lg) {
104
@media (--screen-xl) {
109
@media (--screen-xxl) {
119
justify-content: flex-start;
120
border-top: 1px solid var(--button-secondary-border-color);
121
padding: var(--size-1) var(--size-5);
123
color: var(--body-text-color-subdued);
124
font-size: var(--text-md);
129
word-wrap: break-word;
132
word-break: keep-all;
135
.info > span:nth-child(1) {
138
max-width: max-content;
140
color: var(--body-text-color);
141
text-overflow: ellipsis;
145
.info > span:nth-child(2) {
149
.info > span:nth-child(2),
150
.info > span:nth-child(3) {
154
.info > span:nth-child(3) {
155
align-self: flex-end;
156
justify-self: flex-end;
161
.info > span:nth-child(1) {
169
background: var(--button-secondary-background-fill);
174
color: var(--body-text-color);
178
font-size: var(--text-sm);
179
font-family: var(--font-mono);
187
display: inline-block;
193
text-decoration: underline;