Skip to content

Commit 3c05fa5

Browse files
committed
added basic styling
1 parent 55dff4f commit 3c05fa5

10 files changed

+85
-8
lines changed

index.html

+1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
<script src="javascript/package.js" type="text/javascript"></script>
77

88
<!-- <link href="enyo.css" rel="stylesheet" type="text/css" /> -->
9+
<link href="style/main.css" rel="stylesheet" type="text/css" />
910
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
1011

1112
</style>

javascript/kinds/AddTorrentPref.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,11 @@ enyo.kind({
33
kind: enyo.Control,
44
tag: "div",
55
content: "AddTorrentPref",
6+
classes: "addTorrentPref",
67

78
components: [
89
{ name: "downloadPath", kind: "SelectFolderInput" },
9-
{ name: "link", kind: enyo.Input, placeholder: "URL to torrent" },
10+
{ name: "link", kind: enyo.Input, placeholder: "URL to torrent", type: "text" },
1011
{ kind: enyo.Button, content: "Add torrent", ontap: "addTorrentTap" }
1112
],
1213

javascript/kinds/App.js

+2-4
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,12 @@ enyo.kind({
33
kind: enyo.Control,
44
tag: "div",
55

6-
published: {
7-
plugins: []
8-
},
6+
classes: "app",
97

108
components: [
119
{ name: "smallLoading", kind: "SmallLoading", showing: false },
1210
{ name: "toolbar", kind: "Toolbar" },
13-
{ name: "torrentsList", kind: "TorrentTable" },
11+
{ name: "torrentTable", kind: "TorrentTableHolder" },
1412
{ name: "preferenceHolder", kind: "PreferenceHolder", showing: false },
1513
{ name: "detailsHolder", kind: "DetailsHolder" }
1614
//{ kind: enyo.Signals, onkeydown: "keydown", onkeyup: "keyup" }

javascript/kinds/DetailsHolder.js

+6-1
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,20 @@
1+
console.log(enyo);
12
enyo.kind({
23
name: "DetailsHolder",
34
kind: enyo.Control,
45
tag: "div",
56

6-
content: "detailsholder",
7+
classes: "detailsHolder",
78

89
components: [
910
/* Maybe add some tabs */
1011
{ name: "holder", tag: "div" }
1112
],
1213

14+
published: {
15+
torrent: null
16+
},
17+
1318
handlers: {
1419
onShowDetails: "showDetails",
1520
onUpdate: "update"

javascript/kinds/SelectFolderInput.js

+3-2
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,10 @@ enyo.kind({
77
},
88

99
components: [
10-
{ name: "path", kind: enyo.Input },
10+
{ name: "path", kind: enyo.Input, type: "text" },
1111
{ name: "browse", kind: enyo.Button, content: "...", ontap: "browseTap" },
12-
{ name: "browser", tag: "ul", content: "loading", showing: false }
12+
{ tag: "br" },
13+
{ name: "browser", tag: "ul", content: "loading", showing: false, classes: "browser" }
1314
],
1415

1516
create: function( ) {

javascript/kinds/Toolbar.js

+2
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ enyo.kind({
33
kind: enyo.Control,
44
tag: "div",
55

6+
classes: "toolbar",
7+
68
components: [
79
{ kind: "AddTorrentToolbarButton" },
810
{ kind: "StartTorrentToolbarButton" },

javascript/kinds/Torrent.js

+2
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ enyo.kind({
55
kind: enyo.Control,
66
tag: "tr",
77

8+
classes: "torrent",
9+
810
components: [
911
{ name: "status", kind: "TorrentTableBodyCell" },
1012
{ name: "torrentName", kind: "TorrentTableBodyCell" },

javascript/kinds/TorrentTable.js

+2
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ enyo.kind({
33
kind: enyo.Control,
44
tag: "table",
55

6+
classes: "torrentTable",
7+
68
components: [
79
{ kind: "TorrentTableHead" }
810
],

javascript/kinds/package.js

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ enyo.depends(
44
"Torrent.js",
55
"TorrentTableHead.js",
66
"TorrentTable.js",
7+
"TorrentTableHolder.js",
78
"SelectFolderInput.js",
89
"SmallLoading.js",
910
"AddTorrentPref.js",

style/main.css

+64
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
body {
2+
margin: 0;
3+
padding: 0;
4+
}
5+
6+
7+
8+
/**** Toolbar ****/
9+
.toolbar {
10+
border: 1px solid #000;
11+
}
12+
13+
/**** TorrentTableHolder ****/
14+
.torrentTableHolder {
15+
width 80%;
16+
height: 300px;
17+
overflow: auto;
18+
}
19+
20+
/**** Torrent ****/
21+
.torrent {
22+
width: 100px;
23+
overflow: hidden;
24+
}
25+
26+
/**** DetailsHolder ****/
27+
.detailsHolder {
28+
border: 1px solid #0F0;
29+
}
30+
31+
/**** AddTorrentPref ****/
32+
.addTorrentPref {
33+
border: 1px solid #000;
34+
background-color: #CCC;
35+
position: absolute;
36+
height: 200px;
37+
width: 400px;
38+
left: 50%;
39+
margin-left: -200px;
40+
top: 100px;
41+
}
42+
43+
.addTorrentPref input[type="text"] {
44+
width: 70%;
45+
margin-left: 10px;
46+
}
47+
48+
/**** SelectFolderInput ****/
49+
.browser {
50+
position: absolute;
51+
top: 25px;
52+
left: 10px;
53+
height: 200px;
54+
width: 300px;
55+
background-color: #CCC;
56+
border: 1px solid #000;
57+
overflow: auto;
58+
margin: 0;
59+
padding: 0;
60+
}
61+
62+
.browser li {
63+
margin-left: 5px;
64+
}

0 commit comments

Comments
 (0)