Ciao a tutti,

ho integrato twitter nel mio sito tramite il widget, purtroppo però non permette di base di cambiare impostazioni quali il colore e il tipo di font; cercando su internet sono riuscito a personalizzarlo grazie a jquery. Il problema rimane solo per quanto riguarda il tipo di font, perché finché uso quelli standard non c'è problema, se voglio usarne però uno che ho caricato sul server ed ho integrato nei css grazie al comando font-face non me lo vede.

il javascript in questione è questo:

codice:
<script>

		$(window).load(function()
		{
		// Define the style variables
		var $background_color = "#transparent";
		var $font = "ringbearermedium";
		var $font_weight = "normal";
		var $border_color = "#transparent";
		var $border_radius = "0px";
		var $text_color = "#ffffff";
		var $link_color = "#ffff99";
		var $name_color = "#ffffff";
		var $subtext_color = "#ffffff"; // Colour of any small text
		var $sublink_color = "#ffff99"; // Colour of smaller links, eg: @user, date, expand/collapse links
		var $icon_color = "#transparent"; // Color of the reply/retweet/favourite icons
		var $icon_hover_color = "#transparent"; // Hover color the reply/retweet/favourite icons
		var $header_background = "#transparent";
		var $header_text_color = "#ffff99";
		var $follow_button_link_color = "#5ea9dd";
		var $footer_background = "#36b787";
		var $footer_tweetbox_background = "#2d936d";
		var $footer_tweetbox_textcolor = "#ffffff";
		var $footer_tweetbox_border ="0px";
		var $load_more_background ="#2d936d";
		var $load_more_text_color = "#ffffff";


		// Apply the styles
		$("iframe").contents().find('head').append('<style>.html, body, h1, h2, h3, blockquote, p, ol, ul, li, img, iframe, button, .tweet-box-button{font-family:'+$font+' !important;font-weight:'+$font_weight+' !important;} .timeline{border-radius: ' + $border_radius + '!important;} .thm-dark .retweet-credit,.h-feed, .stats strong{color:' + $text_color + ' !important;}a:not(.follow-button):not(.tweet-box-button):not(.expand):not(.u-url), .load-more{color:' + $link_color + ' ;} .follow-button{color:' + $follow_button_link_color + ' !important;} .timeline-header{background:' + $header_background + '; border-radius:' + $border_radius + ' ' + $border_radius + ' 0px 0px;} .timeline-header h1 a{color:' + $header_text_color + ' !important;} .timeline-footer{border-radius:0px 0px ' + $border_radius + ' ' + $border_radius + ' !important; background:' + $footer_background + ' !important;} .tweet-box-button{background-color:' + $footer_tweetbox_background + ' !important; color:' + $footer_tweetbox_textcolor + ' !important; border:' + $footer_tweetbox_border + ' !important;} .timeline .stream, .tweet-actions{background:' + $background_color + ' !important;} .tweet-actions{box-shadow:0 0 10px 5px' + $background_color + ' !important;} .ic-mask{background-color:' + $icon_color + ' !important;} a:hover .ic-mask, a:focus .ic-mask{background-color:' + $icon_hover_color + ' !important;} .p-name{color:'+$name_color+' !important;} .customisable-border{border-color:' + $border_color + ' !important;} span.p-nickname, .u-url, .expand{color:'+$sublink_color+' !important;} .load-more, .no-more-pane {background-color:' + $load_more_background + ' !important; color:' + $load_more_text_color + '!important;} .retweet-credit{color:' + $subtext_color + ' !important;}</style>');
		});


	</script>