Skip to main content
Create new
Introduction
Reactivity
Props
Logic
Events
Bindings
Lifecycle
Stores
Motion
Transitions
Animations
Easing
SVG
Actions
Classes
Component composition
Context API
Special elements
Module context
Debugging
7GUIs
Miscellaneous
App.svelte
Footer.svelte
Header.svelte
SortBtn.svelte
Table.svelte
Tbody.svelte
Th.svelte
Thead.svelte
<script>
import Header from './Header.svelte'
import Table from './Table.svelte'
import Footer from './Footer.svelte'

export var key = 'AIzaSyA3TXkBfYXsotsjOk0kW6rctz3JOL52Uec'
export var lang = 'en'

var tableData = {}

getData()

function getData () {
var spreadsheetId = '16cflYHEYotn2cPK_jTcLnbyaKlUxp-KOwG0NCWQ--lI'
var url = 'https://sheets.googleapis.com/v4/spreadsheets/' + spreadsheetId + '/values/' + lang + '!A1:F?key=' + key
var request = new XMLHttpRequest();

request.open('GET', url, true);
request.onload = function() {
if (request.status >= 200 && request.status < 400) {
var data = JSON.parse(request.responseText)
if (data.values) {
tableData = {
header: data.values.slice(0,1)[0],
footer: data.values.slice(1,2)[0],
thead: data.values.slice(2,4),
tbody: data.values.slice(4)
}
}
} else {
console.warn(request.status)
}
}
request.send();
}
loading Svelte compiler...
/* Select a component to see its compiled code */
result = svelte.compile(source, {
generate: ,
});
/* Select a component to see its compiled code */