forked from mwunsch/thimble
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.php
116 lines (98 loc) · 3.22 KB
/
index.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
<!DOCTYPE html>
<html lang="en-US" id="thimblr">
<head>
<meta charset="utf-8" />
<title>Thimble</title>
<meta name="Copyright" content="Copyright (c) 2010 Mark Wunsch" />
<meta name="description" content="Thimble is a tool for easily developing Tumblr themes, built by Mark Wunsch and Olivier Jansen.">
<meta name="viewport" content="width=device-width">
<link type="text/css" rel="stylesheet" href="assets/css/style.css">
<script type="text/javascript" src="assets/js/jquery.js"></script>
<script type="text/javascript" src="assets/js/main.js"></script>
<script type="text/javascript">
$(document).ready(function(){
thimble.initialize();
});
</script>
</head>
<body>
<div class="sidemenu">
<form method="get" action="theme.php" id="theme-form">
<div class="title">
<input type="submit" value="Apply" id="submit" />
<input type="button" class="gray" value="Open Docs" onclick="window.open('http://www.tumblr.com/docs/en/custom_themes', '_blank')" />
</div>
<div class="menu-item">
<h3>Select theme</h3><br>
<select name="theme" id="theme-selector">
<?php
foreach (glob('themes/*.html') as $theme) {
$theme = basename($theme);
if (($theme !== '.') && ($theme !== '..')) {
echo '<option value="'.$theme.'">'.$theme.'</option>';
}
}
?>
</select>
</div>
<hr>
<div class="menu-item">
<h3>Select datasource</h3><br>
<select name="data" id="data-selector">
<option disabled="disabled">Imported blogs</option>
<?php
$files = glob('data/*.json');
usort($files, create_function('$a,$b', 'return filemtime($a) - filemtime($b);'));
foreach ($files as $data) {
$data = basename($data);
if (($data !== '.') && ($data !== '..')) {
echo '<option value="'.$data.'">'.$data.'</option>';
}
}
?>
<option disabled="disabled">YAML files</option>
<?php
foreach (glob('data/*.yml') as $data) {
$data = basename($data);
if (($data !== '.') && ($data !== '..')) {
echo '<option value="'.$data.'">'.$data.'</option>';
}
}
?>
</select>
</div>
<hr>
<div class="menu-item" id="appearance-selector">
<h3>Appearance</h3>
<div class="options"></div>
</div>
</form>
</div>
<div class="holder">
<div id="header">
<span class="logo">thimble</span>
<span class="menu-trigger">Settings</span>
<span class="import-trigger">Import a Blog</span>
</div>
<div class="popup">
<form id="import-form">
<h3>Import Tumblr blog</h3>
<div class="options">
<p class="text">This will import posts from a Tumblr blog and let you use it as a datasource.</p>
<p>
<span class="label">Blog domain or Tumblr username</span><input type="text" id="blogDomain" placeholder="staff.tumblr.com or staff">
</p>
<p class="button">
<span class="loader"></span>
<input type="button" value="Close" class="close import-trigger">
<input type="submit" value="Import blog" class="submit">
</p>
</div>
</form>
</div>
<div id="theme-container">
<iframe id="theme-preview" border="0" frameborder="0"></iframe>
</div>
</div>
</body>
</html>