Browse files

pretty buttons, by kevin ngo

  • Loading branch information...
1 parent 39ee050 commit b2d19d60a1b979e8997a3a27bfc81737fcd47f59 Kevin Ngo committed Nov 7, 2012
View
2 cyder/base/templates/base/base.html
@@ -70,7 +70,7 @@
<div class="content">
<h1 id="title">{{ self.title() }}</h1>
- {% block action_bar %}{% endblock %}
+ <span id="action-bar" class="c">{% block action_bar %}{% endblock %}</span>
{% block content %}{% endblock %}
</div>
</div>
View
6 cyder/cydns/templates/cydns/cydns_list_record.html
@@ -13,9 +13,9 @@
{% endblock %}
{% block action_bar %}
- <input type="button" id="record-create" value="Create {{ a_or_an(record_type) }} {{ record_type|prettify_record_type }}">
- <input type="button" id="record-search" value="Update {{ a_or_an(record_type) }} {{ record_type|prettify_record_type }}">
- <input type="button" id="record-search-soa" value="View BIND File">
+ <a class="btn" id="record-create">Create {{ a_or_an(record_type) }} {{ record_type|prettify_record_type }}</a>
+ <a class="btn" id="record-search">Update {{ a_or_an(record_type) }} {{ record_type|prettify_record_type }}</a>
+ <a class="btn" id="record-search-soa">View BIND File</a>
{% endblock %}
{% block form %}
View
38 media/css/base.scss
@@ -42,6 +42,35 @@ input[type="text"] {
color: $light-gray;
}
+a.btn {
+ background: $light-gray;
+ border-radius: 5px;
+ bottom: 0;
+ color: $dark-gray;
+ font-weight: normal;
+ margin-right: 5px;
+ padding: 5px 10px;
+ position: relative;
+ text-decoration: none;
+ right: 0;
+ transition: .5s .1s;
+ &:hover {
+ @include box-shadow(2px 2px 3px $dark-gray);
+ background: lighten($light-gray, 5%);
+ bottom: 2px;
+ color: $dark-gray;
+ cursor: pointer;
+ right: 2px;
+ }
+ &:active {
+ @include box-shadow(none);
+ background: darken($light-gray, 10%);
+ bottom: 0;
+ right: 0;
+ transition: .03s 0s;
+ }
+}
+
.center {
text-align: center;
}
@@ -239,6 +268,15 @@ div#header {
}
}
+#title {
+ display: inline;
+}
+
+#action-bar {
+ float: right;
+ margin-top: 5px;
+}
+
/* Table */
table {
&.tablesorter {
View
6 media/js/application.js
@@ -15,13 +15,13 @@ function add_tablesorter(table) {
});
}
-$(document).ready(function(){
+$(document).ready(function() {
$('input, select').mouseover(function(){
$(this).next('span.helptext').toggle();
- });
- $('input, select').mouseout(function(){
+ }).mouseout(function() {
$(this).next('span.helptext').toggle();
});
+
$('.submit-on-change').change(function() {
this.form.submit();
});

0 comments on commit b2d19d6

Please sign in to comment.