From 8fa4bab1dfd166fd567f2b1a3910f0628c6278e7 Mon Sep 17 00:00:00 2001
From: raylu
Date: Sat, 16 Jul 2011 23:29:34 -0700
Subject: form styling
---
webroot/css/base.css | 17 ++++-------------
webroot/css/search.css | 8 ++++----
webroot/css/themes/light.css | 22 ++++++++++++++++++++++
3 files changed, 30 insertions(+), 17 deletions(-)
(limited to 'webroot/css')
diff --git a/webroot/css/base.css b/webroot/css/base.css
index 29fd2c3..da366c6 100644
--- a/webroot/css/base.css
+++ b/webroot/css/base.css
@@ -243,13 +243,16 @@ body.ie7 form, body.ie8 {
form p {
margin-bottom:15px;
}
-form input, form textarea {
+form input, form textarea, form select {
padding: 7px 5px;
border: 1px solid #ccc;
border-radius: 3px;
-moz-border-radius: 3px;
-webkit-border-radius: 3px;
}
+form select {
+ padding: 6px 5px;
+}
input[type="button"], input[type="submit"], button {
padding: 6px 5px; /* looks high in FF at inherited 7 5 */
line-height: 18px; /* looks small in webkit at 6 5 */
@@ -257,24 +260,12 @@ input[type="button"], input[type="submit"], button {
display: inline-block;
font-weight: 700;
outline: none;
- background: #ddd;
color: #444;
text-shadow: 0 -1px 0 #eee;
border-radius: 3px;
-moz-border-radius: 3px;
-webkit-border-radius: 3px;
}
-input[type="button"]:hover, input[type="submit"]:hover, button:hover {
- background: #eee;
-}
-form select {
- padding: 6px 5px;
- border: 1px solid #ccc;
- border-radius: 3px;
- -moz-border-radius: 3px;
- -webkit-border-radius: 3px;
- background-color: #eee;
-}
div#login {
text-align: center;
diff --git a/webroot/css/search.css b/webroot/css/search.css
index ff9907e..20ea164 100644
--- a/webroot/css/search.css
+++ b/webroot/css/search.css
@@ -16,13 +16,13 @@ p.more a {
border-radius: 3px;
background: #ddd;
background: -moz-linear-gradient(top, #ddd, #bbb);
- background: -webkit-linear-gradient(top, rgba(255,255,255,1), rgba(255,255,255,0));
- filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#ffffff00', GradientType=1);
+ background: -webkit-linear-gradient(top, #ddd, #bbb);
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#dddddd', endColorstr='#bbbbbb');
color: #111;
}
p.more a:hover {
background: #eee;
background: -moz-linear-gradient(top, #eee, #ccc);
- background: -webkit-linear-gradient(top, rgba(255,255,255,1), rgba(255,255,255,0));
- filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#ffffff00', GradientType=1);
+ background: -webkit-linear-gradient(top, #eee, #ccc);
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#eeeeee', endColorstr='#cccccc');
}
diff --git a/webroot/css/themes/light.css b/webroot/css/themes/light.css
index b3b95ae..677557a 100644
--- a/webroot/css/themes/light.css
+++ b/webroot/css/themes/light.css
@@ -48,6 +48,28 @@ a.gradient:hover {
color: #fff;
}
+form input, form textarea, form select {
+ background: #f7f7f7;
+ background: -moz-linear-gradient(top, #eee, #fff);
+ background: -webkit-linear-gradient(top, #eee, #fff);
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#eee', endColorstr='#fff');
+}
+input[type="button"], input[type="submit"], button {
+ background: #ddd;
+ background: -moz-linear-gradient(top, #ddd, #eee);
+ background: -webkit-linear-gradient(top, #ddd, #eee);
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ddd', endColorstr='#eee');
+}
+form input:focus, form textarea:focus, select:focus {
+ border-color: #88c;
+}
+input[type="button"]:hover, input[type="submit"]:hover, button:hover {
+ background: #eee;
+ background: -moz-linear-gradient(top, #e0e0e0, #f7f7f7);
+ background: -webkit-linear-gradient(top, #e0e0e0, #f7f7f7);
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#e0e0e0', endColorstr='#f7f7f7');
+}
+
footer {
color: #666;
}
--
cgit v1.2.3
From 384834c9fb85d3a408c60dd38e8d1474116793ad Mon Sep 17 00:00:00 2001
From: raylu
Date: Sun, 17 Jul 2011 16:41:22 -0700
Subject: some anime view styling
---
controllers/AnimeController.php | 18 +++++--
views/anime/view.html.php | 117 +++++++++++++++++++++++-----------------
views/layouts/default.html.php | 4 +-
webroot/css/base.css | 6 ++-
webroot/css/view.css | 21 ++++++++
5 files changed, 110 insertions(+), 56 deletions(-)
create mode 100644 webroot/css/view.css
(limited to 'webroot/css')
diff --git a/controllers/AnimeController.php b/controllers/AnimeController.php
index bd29116..09c0828 100644
--- a/controllers/AnimeController.php
+++ b/controllers/AnimeController.php
@@ -16,10 +16,22 @@ class AnimeController extends \lithium\action\Controller {
public function view($id = null)
{
- if (is_numeric($id)) {
- return Anime::search($id, null, 'special_id');
+ if (is_numeric($id))
+ {
+ $data = Anime::search($id, null, 'special_id');
+ $related = $data['anime']->related;
+ $str = '';
+ for ($i = 0; $i < count($related); $i++)
+ {
+ if ($i > 0) $str .= ', ';
+ $ra = Anime::search($related[$i], null, 'special_id');
+ $str .= '' . $ra['anime']->title . ' ';
+ }
+ $data['related'] = $str;
+ return $data;
}
- else {
+ else
+ {
return $this->redirect(array('controller' => 'search','q' => array('search' => $id)));
}
diff --git a/views/anime/view.html.php b/views/anime/view.html.php
index 4a3b8c9..1b0eb0c 100644
--- a/views/anime/view.html.php
+++ b/views/anime/view.html.php
@@ -1,58 +1,77 @@
-= $content->title ?>
+styles($this->html->style('view'));
+?>
+
+= $anime->title ?>
-
+
-
-
-
-
-
-
Synopsis
-
-= $content->synopsis ?>
+
+MAL Stats
+
+Score: = $anime->mal_score ?>
+Votes: = $anime->mal_score_voted ?>
+Ranked: = $anime->mal_rank ?>
+Popularity: = $anime->mal_popularity ?>
+Members: = $anime->mal_score ?>
+
+
+
-
Related Animes
-
+
Synopsis
+
+
+
= $anime->synopsis ?>
-
Characters And VA's
-
-cast as $char): ?>
+
Characters and VA's
+
+
+cast as $char): ?>
= $char->character ?>
= $char->role ?>
Played by:
@@ -65,4 +84,4 @@ Played by:
-
\ No newline at end of file
+
diff --git a/views/layouts/default.html.php b/views/layouts/default.html.php
index 9464d80..9313414 100644
--- a/views/layouts/default.html.php
+++ b/views/layouts/default.html.php
@@ -69,9 +69,9 @@ use \lithium\security\Auth;
-
+
-
-
-Synopsis
-
-
-= $anime->synopsis ?>
-Characters and VA's
-
-
+
+
+Cast ↓
+
+
cast as $char): ?>
-= $char->character ?>
-= $char->role ?>
-Played by:
+
+
+ = $char->character ?>
+
+
people)): ?>
people as $actor): ?>
- = $actor->name ?>
- = $actor->language ?>
+
+
+ = $actor->name ?>
+ = $actor->language ?>
+
-
-
-
+
+
+Cast ↑
+
+
+
+
+
+Synopsis
+
+
+= $anime->synopsis ?>
diff --git a/webroot/css/view.css b/webroot/css/view.css
index c973201..4b0a9a1 100644
--- a/webroot/css/view.css
+++ b/webroot/css/view.css
@@ -6,11 +6,38 @@ aside#img {
width: 225px;
}
-section {
+section#info {
float: left;
width: 470px;
}
+section#cast {
+ float: left;
+ width: 620px;
+}
+section#cast p {
+ margin: 0;
+}
+section#cast table {
+ table-layout: fixed;
+ display: none;
+}
+section#cast td {
+ padding: 3px;
+}
+section#cast td:nth-child(1) {
+ width: 60px;
+}
+section#cast td:nth-child(2) {
+ width: 250px;
+}
+section#cast td:nth-child(3) {
+ width: 200px;
+}
+section#cast #castlink {
+ display: none;
+}
+
aside#malstats {
float: right;
width: 150px;
diff --git a/webroot/js/functions.js b/webroot/js/functions.js
index 510b0cf..86f3f3c 100644
--- a/webroot/js/functions.js
+++ b/webroot/js/functions.js
@@ -10,8 +10,22 @@ jQuery(document).ready(function($) {
$('form [title]').tipsy({fade: true, trigger: 'focus', gravity: 'w'});
setTimeout(function() {
- $(".flash-message").fadeOut("slow", function () {
- $(".flash-message").remove();
+ $('.flash-message').fadeOut('slow', function () {
+ $('.flash-message').remove();
});
}, 2000);
});
+
+function toggleCast() {
+ var table = $('#cast table');
+ if (table.css('display') == 'inline') {
+ table.css('display', 'none');
+ $('#cast > p > a').text('Cast ↓');
+ $('#castlink').css('display', 'none');
+ } else {
+ table.css('display', 'inline');
+ $('#cast > p > a').text('Cast ↑');
+ $('#castlink').css('display', 'inline');
+ }
+ return false;
+}
--
cgit v1.2.3