trac750 Better CSS file organization and linking fore the FB app

This commit is contained in:
Zach Copley 2009-01-23 10:51:49 +00:00
parent 1e5ad33f72
commit 767c7d293d
4 changed files with 19 additions and 1499 deletions

View File

@ -95,21 +95,35 @@ class FacebookAction extends Action
function showStylesheets()
{
// Add a timestamp to the file so Facebook cache wont ignore our changes
$ts = filemtime(INSTALLDIR.'/theme/base/css/display.css');
$this->element('link', array('rel' => 'stylesheet',
'type' => 'text/css',
'href' => getFacebookBaseCSS()));
'href' => theme_path('css/display.css', 'base') . '?ts=' . $ts));
$theme = common_config('site', 'theme');
$ts = filemtime(INSTALLDIR. '/theme/' . $theme .'/css/display.css');
$this->element('link', array('rel' => 'stylesheet',
'type' => 'text/css',
'href' => getFacebookThemeCSS()));
'href' => theme_path('css/display.css', null) . '?ts=' . $ts));
$ts = filemtime(INSTALLDIR.'/theme/base/css/facebookapp.css');
$this->element('link', array('rel' => 'stylesheet',
'type' => 'text/css',
'href' => theme_path('css/facebookapp.css', 'base') . '?ts=' . $ts));
}
function showScripts()
{
// Add a timestamp to the file so Facebook cache wont ignore our changes
$ts = filemtime(INSTALLDIR.'/js/facebookapp.js');
$this->element('script', array('type' => 'text/javascript',
'src' => getFacebookJS()),
' ');
'src' => common_path('js/facebookapp.js') . '?ts=' . $ts));
}
/**

View File

@ -45,38 +45,6 @@ function getFacebook()
return new Facebook($apikey, $secret);
}
function startFBML($indent = true)
{
global $xw;
$xw = new XMLWriter();
$xw->openURI('php://output');
$xw->setIndent($indent);
}
function getFacebookBaseCSS()
{
# Add a timestamp to the CSS file so Facebook cache wont ignore our changes
$ts = filemtime(INSTALLDIR.'/theme/base/css/facebookapp.base.css');
$cssurl = theme_path('css/facebookapp.base.css', 'base') . "?ts=$ts";
return $cssurl;
}
function getFacebookThemeCSS()
{
# Add a timestamp to the CSS file so Facebook cache wont ignore our changes
$ts = filemtime(theme_file('css/facebookapp.theme.css'));
$cssurl = theme_path('css/facebookapp.theme.css') . "?ts=$ts";
return $cssurl;
}
function getFacebookJS() {
# Add a timestamp to the FBJS file so Facebook cache wont ignore our changes
$ts = filemtime(INSTALLDIR.'/js/facebookapp.js');
$jsurl = common_path('js/facebookapp.js') . "?ts=$ts";
return $jsurl;
}
function updateProfileBox($facebook, $flink, $notice) {
$fbaction = new FacebookAction($output='php://output', $indent=true, $facebook, $flink);
$fbaction->updateProfileBox($notice);

View File

@ -1,285 +0,0 @@
/* theme: identica */
html {
background-color:#ddd;
}
body {
font-family: "Lucida Sans Unicode", "Lucida Grande", sans-serif;
font-size:1em;
background-color:#ddd;
}
input, textarea, select, option {
font-family: "Lucida Sans Unicode", "Lucida Grande", sans-serif;
}
input, textarea, select {
border-color:#aaa;
}
input:focus, textarea:focus, select:focus {
border-color:#A9BF4F;
}
input.submit {
background-color:#A9BF4F;
color:#fff;
}
a {
color:#002E6E;
}
a:active {
background-color:#ddd;
}
.notice p.entry-content a:visited {
background-color:#fcfcfc;
border-radius:4px;
-moz-border-radius:4px;
-webkit-border-radius:4px;
}
.notice p.entry-content .vcard a {
background-color:#fcfffc;
border-radius:4px;
-moz-border-radius:4px;
-webkit-border-radius:4px;
}
#aside_primary {
background-color:#CEE1E9;
}
#form_notice textarea {
}
#form_notice label {
color:#88171A;
}
#notice_text-count {
color:#333;
}
#form_notice.warning #notice_text-count {
color:#000;
background-color:#A9BF4F;
}
#form_notice.warning #notice_data-text {
border-color:#A9BF4F;
}
#form_notice #notice_data-attach_view {
background-image:url(../images/icons/twotone/green/paper-clip.gif);
background-repeat:no-repeat;
background-position:0 45%;
background-color:transparent;
}
#site_nav_global_primary a {
}
#form_notice .form_actions input.submit {
}
#nav_register a {
background-color:#A9BF4F;
color:#fff;
text-decoration:none;
font-weight:bold;
padding:2px 4px;
}
#nav_login a {
}
#site_nav_local_views a {
border-color:#fff;
background-color:rgba(255, 255, 255, 0.2);
}
#site_nav_local_views a:hover {
background-color:rgba(255, 255, 255, 0.7);
}
#content,
#site_nav_local_views .current a {
background-color:#fff;
}
#page_notice .error {
background-color:#F7E8E8;
}
#page_notice .success {
background-color:#EFF3DC;
}
#export_data li a {
background-repeat:no-repeat;
background-position:0 45%;
}
#export_data li a.rss {
background-image:url(../../base/images/icons/icon_rss.jpg);
}
#export_data li a.atom {
background-image:url(../../base/images/icons/icon_atom.jpg);
}
#export_data li a.foaf {
background-image:url(../../base/images/icons/icon_foaf.gif);
}
#export_data li a.export_vcard {
background-image:url(../../base/images/icons/icon_vcard.gif);
}
/*user_actions*/
#user_actions li {
border-top-color:#eee;
}
#user_actions a {
color:#000;
}
#user_subscribe a,
#TB_window input.submit,
.form_user_subscribe input.submit {
background:#CEE1E9 url(../images/icons/twotone/green/shield.gif) 0 45% no-repeat;
}
.form_user_unsubscribe input.submit {
background-color:#647819;
color:#fff;
}
#user_send-a-message a {
background:url(../images/icons/twotone/green/quote.gif) 0 45% no-repeat;
}
.form_user_nudge input.submit {
background:url(../images/icons/twotone/green/mail.gif) 0 45% no-repeat;
}
.form_user_block input.submit {
background:url(../images/icons/twotone/green/against.gif) 0 45% no-repeat;
}
.user_tags .mark_hash {
color:#555;
}
.vcard .fn {
}
.vcard .fn:hover {
}
/* NOTICES */
.notices li.over {
background-color:#fcfcfc;
}
.notice div.entry-content a {
}
.notice div.entry-content a:hover {
}
.notice-data a span {
background-color:transparent;
background-repeat:no-repeat;
background-position:0 45%;
}
.notice_video .notice-data a span {
background-image:url(../images/icons/twotone/green/camera.gif);
}
.notice_audio .notice-data a span {
background-image:url(../images/icons/twotone/green/music.gif);
}
.notice_image .notice-data a span {
background-image:url(../images/icons/twotone/green/search.gif);
}
.notice_event .notice-data a span {
background-image:url(../images/icons/twotone/green/calendar.gif);
}
.notice_location .notice-data a span {
background-image:url(../images/icons/twotone/green/flag.gif);
}
.notice_document .notice-data a span {
background-image:url(../images/icons/twotone/green/document.gif);
}
.notice-options .notice_reply a,
.notice-options form input.submit {
background-color:transparent;
}
.notice-options .notice_reply a {
background:transparent url(../images/icons/twotone/green/reply.gif) no-repeat 0 45%;
}
.notice-options form.form_favor input.submit {
background:transparent url(../images/icons/twotone/green/favourite.gif) no-repeat 0 45%;
}
.notice-options form.form_disfavor input.submit {
background:transparent url(../images/icons/twotone/green/disfavourite.gif) no-repeat 0 45%;
}
.notice-options .notice_delete a {
background:transparent url(../images/icons/twotone/green/trash.gif) no-repeat 0 45%;
}
div.notice-options {
opacity:0.3;
}
div.entry-content {
color:#333;
}
div.notice-options a,
div.notice-options input {
font-family:sans-serif;
}
div.notice-options input {
color:#002E6E;
}
.notices li.hover {
background-color:#fcfcfc;
}
.notices li.hover div.entry-content,
.notices li.hover div.notice-options {
opacity:1;
}
.form_settings .form_note {
background-color:#A9BF4F;
}
/*END: NOTICES */
.pagination .nav_prev a,
.pagination .nav_next a {
background-repeat:no-repeat;
}
.pagination .nav_prev a {
background-image:url(../images/icons/twotone/green/arrow-left.gif);
background-position:0 45%;
}
.pagination .nav_next a {
background-image:url(../images/icons/twotone/green/arrow-right.gif);
background-position:100% 45%;
}
#home #intro #guide_steps li a {
border-color:#ccc;
color:#fff;
}
#home #intro #step_join-now a {
background-color:#f00;
}
#home #intro #step_start-a-group a {
background-color:#0f0;
}
#home #intro #step_create-a-community a {
background-color:#00f;
}

File diff suppressed because it is too large Load Diff