Skip to content

Commit

Permalink
Added extension icon and improved style
Browse files Browse the repository at this point in the history
  • Loading branch information
Frank Kohlhepp committed Mar 27, 2011
1 parent db4289f commit 8a0f10b
Show file tree
Hide file tree
Showing 6 changed files with 50 additions and 10 deletions.
12 changes: 6 additions & 6 deletions source/css/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,12 @@
box-shadow: inset -8px 0 30px -30px black;
}

#sidebar img {
position: absolute;
top: 12px;
left: 12px;
}

#sidebar h1 {
position: absolute;
top: 13px;
Expand Down Expand Up @@ -57,20 +63,14 @@
margin-left: 0;
margin-right: 0;
padding-right: 23px !important;
cursor: default !important;
}

#search-container input[type=search] {
width: 130px;
-webkit-user-select: auto;
-webkit-user-drag: auto;
}

#search-container input[type=search]:focus {
outline: auto;
cursor: auto;
-webkit-user-select: auto;
-webkit-user-drag: auto;
}

#content {
Expand Down
File renamed without changes.
Binary file added source/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 3 additions & 2 deletions source/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,10 @@
<!-- Stylesheets -->
<link rel="stylesheet" href="lib/default.css" media="screen">
<link rel="stylesheet" href="css/main.css" media="screen">
<link rel="stylesheet" href="css/tab-content.css" media="screen">
<link rel="stylesheet" href="css/setting.css" media="screen">

<!-- JavaScripts -->
<script src="lib/store.js"></script>
<script src="lib/mootools-core.js"></script>
<script src="js/classes/tab-creator.js"></script>
<script src="js/classes/setting-creator.js"></script>
Expand All @@ -18,7 +19,7 @@
</head>
<body class="fancy no-select">
<div id="sidebar">
<h1>Settings</h1>
<img src="icon.png" alt=""><h1>Settings</h1>
<div id="tab-container">
<div id="search-container" class="tab">
<input id="search" type="search" placeholder="Search...">
Expand Down
7 changes: 5 additions & 2 deletions source/lib/default.css
Original file line number Diff line number Diff line change
Expand Up @@ -281,9 +281,12 @@ caption {
text-shadow: black 0 -1px 0;
}

.no-select, .no-select * {
cursor: default;
.no-select {
-webkit-user-select: none;
cursor: default;
}

img.no-select, .no-select img {
-webkit-user-drag: none;
}

Expand Down
36 changes: 36 additions & 0 deletions source/lib/store.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
/*
// Copyright (c) 2011 Frank Kohlhepp
// https://github.com/frankkohlhepp/store-js
// License: MIT-license
*/
(function () {
this.Store = function (name) {
var storePrototype = {
"save": function () {
var stringifiedObj = JSON.stringify(this);
localStorage.setItem(name, stringifiedObj);

if (localStorage.getItem(name) !== stringifiedObj) {
throw "savingFailed";
}

return this;
},

"remove": function () {
localStorage.removeItem(name);
for (var key in this) {
if (this.hasOwnProperty(key)) {
delete this[key];
}
}

return this;
}
};

var store = JSON.parse(localStorage.getItem(name) || "{}");
store.__proto__ = storePrototype;
return store;
};
})();

0 comments on commit 8a0f10b

Please sign in to comment.