From c9e8b1e5c380904e479927e2f24754d8709f590e Mon Sep 17 00:00:00 2001 From: Meitar Moscovitz Date: Wed, 11 Feb 2009 03:03:16 +1100 Subject: Add streamlined mobile device-friendly styles when enabled in config. A new mobile-specific style sheet is added and loaded only if the `$config['site']['mobile']` configuration variable is set to true. --- theme/base/css/mobile.css | 48 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 theme/base/css/mobile.css (limited to 'theme/base/css') diff --git a/theme/base/css/mobile.css b/theme/base/css/mobile.css new file mode 100644 index 000000000..6cd717a4d --- /dev/null +++ b/theme/base/css/mobile.css @@ -0,0 +1,48 @@ +/** theme: base + * + * @package Laconica + * @author Meitar Moscovitz + * @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0 + * @link http://laconi.ca/ + */ + +/* Go linear. */ +#header, +#header address, +#site_nav_global_primary, +#anon_notice, +#site_nav_local_views .nav, +#core, +#content_inner, +#notices_primary, +.notice, +.notice .entry-title, +.notice div.entry-content, +.pagination, +.pagination .nav, +.aside .section { float: none; } + +/* And liquid. */ +#wrap { width: 95%; } + +body { font-size: 2em; } /* Make things bigger on smaller screens. */ + +#site_nav_global_primary, #site_nav_global_secondary { text-align: center; } + +.notice div.entry-content { margin-left: 0; } +address { margin: 0; } + +#anon_notice, #footer { clear: left; width: auto; font-size: .5em; } + +#content { padding: 18px 0; width: 100%; } +#content h1, #page_notice, #content_inner { padding: 0 18px; } +#content_inner { width: auto; } +.pagination .nav { overflow: auto; } + +#aside_primary { margin: 10px 0 0 0; border: none; padding: 0; width: 100%; } +#popular_notices { float: none; width: auto; } +/* Columns for supplemental info. */ +.aside .section { clear: none; padding: 9px; width: 45%; } +#top_groups_by_post { float: left; } +#featured_users { float: right; } +#export_data { display: none; } -- cgit v1.2.3-54-g00ecf From 07c6537898a7c839469b50121b6c6d63be07613c Mon Sep 17 00:00:00 2001 From: Meitar Moscovitz Date: Wed, 11 Feb 2009 23:35:58 +1100 Subject: Style the notice form and notices to better avoid need to scroll around. --- theme/base/css/mobile.css | 30 +++++++++++++++++++++++++++--- 1 file changed, 27 insertions(+), 3 deletions(-) (limited to 'theme/base/css') diff --git a/theme/base/css/mobile.css b/theme/base/css/mobile.css index 6cd717a4d..3d0455a67 100644 --- a/theme/base/css/mobile.css +++ b/theme/base/css/mobile.css @@ -12,31 +12,55 @@ #site_nav_global_primary, #anon_notice, #site_nav_local_views .nav, +#form_notice, +#form_notice .form_data li, #core, #content_inner, #notices_primary, .notice, .notice .entry-title, .notice div.entry-content, +.notice-options, +.notice .notice-options a, .pagination, .pagination .nav, .aside .section { float: none; } +.notice-options .notice_reply, +.notice-options .notice_delete, +.notice-options .form_favor, +.notice-options .form_disfavor { position: static; } + +#form_notice, +#anon_notice, +#content_inner, +#footer { width: auto; } + /* And liquid. */ #wrap { width: 95%; } -body { font-size: 2em; } /* Make things bigger on smaller screens. */ +/* Make things bigger on smaller screens. */ +body { font-size: 2em; } +.notices { font-size: 1.5em; } #site_nav_global_primary, #site_nav_global_secondary { text-align: center; } .notice div.entry-content { margin-left: 0; } address { margin: 0; } -#anon_notice, #footer { clear: left; width: auto; font-size: .5em; } +#anon_notice, #footer { clear: left; font-size: .5em; } + +#form_notice textarea { width: 80%; height: 5em; } +#form_notice .form_note { right: 20%; top: 6em; } +#form_notice .form_actions input.submit { width: auto; } #content { padding: 18px 0; width: 100%; } #content h1, #page_notice, #content_inner { padding: 0 18px; } -#content_inner { width: auto; } +.notices .entry-title, .notices div.entry-content { width: 90%; } +.notice .author .photo { height: 4.5em; width: 4.5em; } /* about double physical size; TODO: do this scaling better */ +.notice-options { position: absolute; top: 0; right: 0; padding-left: 7%; width: 3%; } +.notice-options .notice_delete a { float: left; } /* Works, but feels like it shouldn't. */ +/* TODO: Make the icons of the notice options bigger. Probably with mobile-specific images. */ .pagination .nav { overflow: auto; } #aside_primary { margin: 10px 0 0 0; border: none; padding: 0; width: 100%; } -- cgit v1.2.3-54-g00ecf From 3c8c0572efef97c25037545e1e971f0ce3cd7cc8 Mon Sep 17 00:00:00 2001 From: Sarven Capadisli Date: Wed, 11 Feb 2009 23:03:12 +0000 Subject: Ticket 1172. Capitalizing first character of each word to uppercase instead of putting all characters to uppercase. --- theme/base/css/display.css | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'theme/base/css') diff --git a/theme/base/css/display.css b/theme/base/css/display.css index 3b72d00ce..1ac63927d 100644 --- a/theme/base/css/display.css +++ b/theme/base/css/display.css @@ -22,7 +22,7 @@ line-height:1.65; position:relative; } h1,h2,h3,h4,h5,h6 { -text-transform:uppercase; +text-transform:capitalize; margin-bottom:7px; overflow:hidden; } @@ -43,7 +43,6 @@ font-weight:bold; legend { font-weight:bold; font-size:1.3em; -text-transform:uppercase; } input, textarea, select, option { padding:4px; -- cgit v1.2.3-54-g00ecf From 9c9b6790ce78296c0b182f03b5f6f2c035e43a7c Mon Sep 17 00:00:00 2001 From: Robin Millette Date: Mon, 16 Feb 2009 17:46:24 +0000 Subject: trac #201 Add flowplayer to enable multimedia playback capability. --- bin/flowplayer-3.0.5.swf | Bin 0 -> 92317 bytes bin/flowplayer.audio-3.0.3.swf | Bin 0 -> 2756 bytes bin/flowplayer.controls-3.0.3.swf | Bin 0 -> 15977 bytes js/flowplayer-3.0.5.min.js | 24 ++++++++++++++++++++++++ js/jquery.simplemodal-1.2.2.pack.js | 8 ++++++++ js/video.js | 9 +++++++++ lib/action.php | 26 ++++++++++++++++++++++++++ lib/util.php | 6 ++++++ theme/base/css/modal.css | 22 ++++++++++++++++++++++ theme/base/css/modal_ie.css | 16 ++++++++++++++++ theme/base/images/x.png | Bin 0 -> 1066 bytes 11 files changed, 111 insertions(+) create mode 100644 bin/flowplayer-3.0.5.swf create mode 100644 bin/flowplayer.audio-3.0.3.swf create mode 100644 bin/flowplayer.controls-3.0.3.swf create mode 100644 js/flowplayer-3.0.5.min.js create mode 100644 js/jquery.simplemodal-1.2.2.pack.js create mode 100644 js/video.js create mode 100644 theme/base/css/modal.css create mode 100644 theme/base/css/modal_ie.css create mode 100644 theme/base/images/x.png (limited to 'theme/base/css') diff --git a/bin/flowplayer-3.0.5.swf b/bin/flowplayer-3.0.5.swf new file mode 100644 index 000000000..05b64a032 Binary files /dev/null and b/bin/flowplayer-3.0.5.swf differ diff --git a/bin/flowplayer.audio-3.0.3.swf b/bin/flowplayer.audio-3.0.3.swf new file mode 100644 index 000000000..ef85f1bff Binary files /dev/null and b/bin/flowplayer.audio-3.0.3.swf differ diff --git a/bin/flowplayer.controls-3.0.3.swf b/bin/flowplayer.controls-3.0.3.swf new file mode 100644 index 000000000..09a27e8a9 Binary files /dev/null and b/bin/flowplayer.controls-3.0.3.swf differ diff --git a/js/flowplayer-3.0.5.min.js b/js/flowplayer-3.0.5.min.js new file mode 100644 index 000000000..b1c33150a --- /dev/null +++ b/js/flowplayer-3.0.5.min.js @@ -0,0 +1,24 @@ +/** + * flowplayer.js 3.0.5. The Flowplayer API + * + * Copyright 2009 Flowplayer Oy + * + * This file is part of Flowplayer. + * + * Flowplayer is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Flowplayer is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Flowplayer. If not, see . + * + * Version: 3.0.5 - Tue Feb 03 2009 13:14:17 GMT-0000 (GMT+00:00) + */ +(function(){function log(args){console.log("$f.fireEvent",[].slice.call(args));}function clone(obj){if(!obj||typeof obj!='object'){return obj;}var temp=new obj.constructor();for(var key in obj){if(obj.hasOwnProperty(key)){temp[key]=clone(obj[key]);}}return temp;}function each(obj,fn){if(!obj){return;}var name,i=0,length=obj.length;if(length===undefined){for(name in obj){if(fn.call(obj[name],name,obj[name])===false){break;}}}else{for(var value=obj[0];i1){var swf=arguments[1];var conf=(arguments.length==3)?arguments[2]:{};if(typeof arg=='string'){if(arg.indexOf(".")!=-1){var instances=[];each(select(arg),function(){instances.push(new Player(this,clone(swf),clone(conf)));});return new Iterator(instances);}else{var node=el(arg);return new Player(node!==null?node:arg,swf,conf);}}else if(arg){return new Player(arg,swf,conf);}}return null;};extend(window.$f,{fireEvent:function(id,evt,a0,a1,a2){var p=$f(id);return p?p._fireEvent(evt,a0,a1,a2):null;},addPlugin:function(name,fn){Player.prototype[name]=fn;return $f;},each:each,extend:extend});if(document.all){window.onbeforeunload=function(){$f("*").each(function(){if(this.isLoaded()){this.close();}});};}if(typeof jQuery=='function'){jQuery.prototype.flowplayer=function(params,conf){if(!arguments.length||typeof arguments[0]=='number'){var arr=[];this.each(function(){var p=$f(this);if(p){arr.push(p);}});return arguments.length?arr[arguments[0]]:new Iterator(arr);}return this.each(function(){$f(this,clone(params),conf?clone(conf):{});});};}})();(function(){var jQ=typeof jQuery=='function';function isDomReady(){if(domReady.done){return false;}var d=document;if(d&&d.getElementsByTagName&&d.getElementById&&d.body){clearInterval(domReady.timer);domReady.timer=null;for(var i=0;i';}var e=extend({},p);e.width=e.height=e.id=e.w3c=e.src=null;for(var k in e){if(e[k]!==null){html+='';}}var vars="";if(c){for(var key in c){if(c[key]!==null){vars+=key+'='+(typeof c[key]=='object'?asString(c[key]):c[key])+'&';}}vars=vars.substring(0,vars.length-1);html+='';}html+="";return html;}function Flash(root,opts,flashvars){var version=flashembed.getVersion();extend(this,{getContainer:function(){return root;},getConf:function(){return conf;},getVersion:function(){return version;},getFlashvars:function(){return flashvars;},getApi:function(){return root.firstChild;},getHTML:function(){return getHTML(opts,flashvars);}});var required=opts.version;var express=opts.expressInstall;var ok=!required||flashembed.isSupported(required);if(ok){opts.onFail=opts.version=opts.expressInstall=null;root.innerHTML=getHTML(opts,flashvars);}else if(required&&express&&flashembed.isSupported([6,65])){extend(opts,{src:express});flashvars={MMredirectURL:location.href,MMplayerType:'PlugIn',MMdoctitle:document.title};root.innerHTML=getHTML(opts,flashvars);}else{if(root.innerHTML.replace(/\s/g,'')!==''){}else{root.innerHTML="

Flash version "+required+" or greater is required

"+"

"+(version[0]>0?"Your version is "+version:"You have no flash plugin installed")+"

"+"

Download latest version from here

";}}if(!ok&&opts.onFail){var ret=opts.onFail.call(this);if(typeof ret=='string'){root.innerHTML=ret;}}}window.flashembed=function(root,conf,flashvars){if(typeof root=='string'){var el=document.getElementById(root);if(el){root=el;}else{domReady(function(){flashembed(root,conf,flashvars);});return;}}if(!root){return;}var opts={width:'100%',height:'100%',allowfullscreen:true,allowscriptaccess:'always',quality:'high',version:null,onFail:null,expressInstall:null,w3c:false};if(typeof conf=='string'){conf={src:conf};}extend(opts,conf);return new Flash(root,opts,flashvars);};extend(window.flashembed,{getVersion:function(){var version=[0,0];if(navigator.plugins&&typeof navigator.plugins["Shockwave Flash"]=="object"){var _d=navigator.plugins["Shockwave Flash"].description;if(typeof _d!="undefined"){_d=_d.replace(/^.*\s+(\S+\s+\S+$)/,"$1");var _m=parseInt(_d.replace(/^(.*)\..*$/,"$1"),10);var _r=/r/.test(_d)?parseInt(_d.replace(/^.*r(.*)$/,"$1"),10):0;version=[_m,_r];}}else if(window.ActiveXObject){try{var _a=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");}catch(e){try{_a=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");version=[6,0];_a.AllowScriptAccess="always";}catch(ee){if(version[0]==6){return;}}try{_a=new ActiveXObject("ShockwaveFlash.ShockwaveFlash");}catch(eee){}}if(typeof _a=="object"){_d=_a.GetVariable("$version");if(typeof _d!="undefined"){_d=_d.replace(/^\S+\s+(.*)$/,"$1").split(",");version=[parseInt(_d[0],10),parseInt(_d[2],10)];}}}return version;},isSupported:function(version){var now=flashembed.getVersion();var ret=(now[0]>version[0])||(now[0]==version[0]&&now[1]>=version[1]);return ret;},domReady:domReady,asString:asString,getHTML:getHTML});if(jQ){jQuery.prototype.flashembed=function(conf,flashvars){return this.each(function(){flashembed(this,conf,flashvars);});};}})(); \ No newline at end of file diff --git a/js/jquery.simplemodal-1.2.2.pack.js b/js/jquery.simplemodal-1.2.2.pack.js new file mode 100644 index 000000000..b5ad5c23a --- /dev/null +++ b/js/jquery.simplemodal-1.2.2.pack.js @@ -0,0 +1,8 @@ +/* + * SimpleModal 1.2.2 - jQuery Plugin + * http://www.ericmmartin.com/projects/simplemodal/ + * Copyright (c) 2008 Eric Martin + * Dual licensed under the MIT and GPL licenses + * Revision: $Id: jquery.simplemodal.js 181 2008-12-16 16:51:44Z emartin24 $ + */ +eval(function(p,a,c,k,e,r){e=function(c){return(c35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('(g($){m f=$.Q.1Q&&1a($.Q.1D)==6&&!10[\'2g\'],1f=$.Q.1Q&&!$.2a,w=[];$.y=g(a,b){I $.y.12.1n(a,b)};$.y.D=g(){$.y.12.D()};$.1P.y=g(a){I $.y.12.1n(3,a)};$.y.1O={V:29,1J:\'r-H\',1B:{},1z:\'r-n\',20:{},1Z:{},v:2t,D:1o,1T:\'\',X:\'r-D\',l:F,1g:K,1e:F,1d:F,1c:F};$.y.12={7:F,4:{},1n:g(a,b){8(3.4.j){I K}3.7=$.U({},$.y.1O,b);3.v=3.7.v;3.1w=K;8(J a==\'27\'){a=a 25 1A?a:$(a);8(a.1v().1v().23()>0){3.4.T=a.1v();8(!3.7.1g){3.4.21=a.2x(1o)}}}q 8(J a==\'2w\'||J a==\'1r\'){a=$(\'<1q/>\').2s(a)}q{2r(\'2q 2p: 2o j 2l: \'+J a);I K}3.4.j=a.11(\'r-j\').E(3.7.1Z);a=F;3.1S();3.1R();8($.1m(3.7.1d)){3.7.1d.1l(3,[3.4])}I 3},1S:g(){w=3.1k();8(f){3.4.x=$(\'\').E($.U(3.7.2b,{1j:\'1i\',V:0,l:\'1h\',A:w[0],z:w[1],v:3.7.v,L:0,B:0})).O(\'u\')}3.4.H=$(\'<1q/>\').1N(\'1M\',3.7.1J).11(\'r-H\').E($.U(3.7.1B,{1j:\'1i\',V:3.7.V/1b,A:w[0],z:w[1],l:\'1h\',B:0,L:0,v:3.7.v+1})).O(\'u\');3.4.n=$(\'<1q/>\').1N(\'1M\',3.7.1z).11(\'r-n\').E($.U(3.7.20,{1j:\'1i\',l:\'1h\',v:3.7.v+2})).1K(3.7.D?$(3.7.1T).11(3.7.X):\'\').O(\'u\');3.19();8(f||1f){3.18()}3.4.n.1K(3.4.j.1I())},1H:g(){m a=3;$(\'.\'+3.7.X).1G(\'1L.r\',g(e){e.28();a.D()});$(10).1G(\'1F.r\',g(){w=a.1k();a.19();8(f||1f){a.18()}q{a.4.x&&a.4.x.E({A:w[0],z:w[1]});a.4.H.E({A:w[0],z:w[1]})}})},1E:g(){$(\'.\'+3.7.X).1C(\'1L.r\');$(10).1C(\'1F.r\')},18:g(){m p=3.7.l;$.26([3.4.x||F,3.4.H,3.4.n],g(i,e){8(e){m a=\'k.u.17\',N=\'k.u.1W\',16=\'k.u.24\',S=\'k.u.1y\',R=\'k.u.1x\',15=\'k.u.22\',1t=\'k.P.17\',1s=\'k.P.1W\',C=\'k.P.1y\',G=\'k.P.1x\',s=e[0].2v;s.l=\'2u\';8(i<2){s.14(\'A\');s.14(\'z\');s.Z(\'A\',\'\'+16+\' > \'+a+\' ? \'+16+\' : \'+a+\' + "o"\');s.Z(\'z\',\'\'+15+\' > \'+N+\' ? \'+15+\' : \'+N+\' + "o"\')}q{m b,W;8(p&&p.1Y==1X){8(p[0]){m c=J p[0]==\'1r\'?p[0].1V():p[0].13(/o/,\'\');b=c.1U(\'%\')==-1?c+\' + (t = \'+G+\' ? \'+G+\' : \'+R+\') + "o"\':1a(c.13(/%/,\'\'))+\' * ((\'+1t+\' || \'+a+\') / 1b) + (t = \'+G+\' ? \'+G+\' : \'+R+\') + "o"\'}8(p[1]){m d=J p[1]==\'1r\'?p[1].1V():p[1].13(/o/,\'\');W=d.1U(\'%\')==-1?d+\' + (t = \'+C+\' ? \'+C+\' : \'+S+\') + "o"\':1a(d.13(/%/,\'\'))+\' * ((\'+1s+\' || \'+N+\') / 1b) + (t = \'+C+\' ? \'+C+\' : \'+S+\') + "o"\'}}q{b=\'(\'+1t+\' || \'+a+\') / 2 - (3.2n / 2) + (t = \'+G+\' ? \'+G+\' : \'+R+\') + "o"\';W=\'(\'+1s+\' || \'+N+\') / 2 - (3.2m / 2) + (t = \'+C+\' ? \'+C+\' : \'+S+\') + "o"\'}s.14(\'L\');s.14(\'B\');s.Z(\'L\',b);s.Z(\'B\',W)}}})},1k:g(){m a=$(10);m h=$.Q.2k&&$.Q.1D>\'9.5\'&&$.1P.2i<=\'1.2.6\'?k.P[\'17\']:a.A();I[h,a.z()]},19:g(){m a,B,1u=(w[0]/2)-((3.4.n.A()||3.4.j.A())/2),1p=(w[1]/2)-((3.4.n.z()||3.4.j.z())/2);8(3.7.l&&3.7.l.1Y==1X){a=3.7.l[0]||1u;B=3.7.l[1]||1p}q{a=1u;B=1p}3.4.n.E({B:B,L:a})},1R:g(){3.4.x&&3.4.x.Y();8($.1m(3.7.1e)){3.7.1e.1l(3,[3.4])}q{3.4.H.Y();3.4.n.Y();3.4.j.Y()}3.1H()},D:g(){8(!3.4.j){I K}8($.1m(3.7.1c)&&!3.1w){3.1w=1o;3.7.1c.1l(3,[3.4])}q{8(3.4.T){8(3.7.1g){3.4.j.1I().O(3.4.T)}q{3.4.j.M();3.4.21.O(3.4.T)}}q{3.4.j.M()}3.4.n.M();3.4.H.M();3.4.x&&3.4.x.M();3.4={}}3.1E()}}})(1A);',62,158,'|||this|dialog|||opts|if||||||||function|||data|document|position|var|container|px||else|simplemodal|||body|zIndex||iframe|modal|width|height|left|sl|close|css|null|st|overlay|return|typeof|false|top|remove|bcw|appendTo|documentElement|browser|bst|bsl|parentNode|extend|opacity|le|closeClass|show|setExpression|window|addClass|impl|replace|removeExpression|bsw|bsh|clientHeight|fixIE|setPosition|parseInt|100|onClose|onShow|onOpen|ieQuirks|persist|fixed|none|display|getDimensions|apply|isFunction|init|true|vCenter|div|number|cw|ch|hCenter|parent|occb|scrollTop|scrollLeft|containerId|jQuery|overlayCss|unbind|version|unbindEvents|resize|bind|bindEvents|hide|overlayId|append|click|id|attr|defaults|fn|msie|open|create|closeHTML|indexOf|toString|clientWidth|Array|constructor|dataCss|containerCss|orig|scrollWidth|size|scrollHeight|instanceof|each|object|preventDefault|50|boxModel|iframeCss|javascript|src|Close|title|XMLHttpRequest|modalCloseImg|jquery|class|opera|type|offsetWidth|offsetHeight|Unsupported|Error|SimpleModal|alert|html|1000|absolute|style|string|clone'.split('|'),0,{})) \ No newline at end of file diff --git a/js/video.js b/js/video.js new file mode 100644 index 000000000..936a6312e --- /dev/null +++ b/js/video.js @@ -0,0 +1,9 @@ +$('document').ready(function() { + $('a.media, a.mediamp3').append(' [PLAY]'); + $('a.mediamp3').html('').css('display', 'block').css('width', '224px').css('height','24px').flowplayer('../bin/flowplayer-3.0.5.swf'); + $('a.media').click(function() { + $('').attr('href', $(this).attr('href')).flowplayer('../bin/flowplayer-3.0.5.swf').modal({'closeHTML':''}); + return false; + }); +}); + diff --git a/lib/action.php b/lib/action.php index cd0db5399..79e8c9547 100644 --- a/lib/action.php +++ b/lib/action.php @@ -153,10 +153,17 @@ class Action extends HTMLOutputter // lawsuit { if (Event::handle('StartShowStyles', array($this))) { if (Event::handle('StartShowLaconicaStyles', array($this))) { + $this->element('link', array('rel' => 'stylesheet', 'type' => 'text/css', 'href' => theme_path('css/display.css', 'base') . '?version=' . LACONICA_VERSION, 'media' => 'screen, projection, tv')); + + + $this->element('link', array('rel' => 'stylesheet', + 'type' => 'text/css', + 'href' => theme_path('css/modal.css', 'base') . '?version=' . LACONICA_VERSION, + 'media' => 'screen, projection, tv')); $this->element('link', array('rel' => 'stylesheet', 'type' => 'text/css', 'href' => theme_path('css/display.css', null) . '?version=' . LACONICA_VERSION, @@ -196,6 +203,13 @@ class Action extends HTMLOutputter // lawsuit $this->element('script', array('type' => 'text/javascript', 'src' => common_path('js/jquery.form.js')), ' '); + + + $this->element('script', array('type' => 'text/javascript', + 'src' => common_path('js/jquery.simplemodal-1.2.2.pack.js')), + ' '); + + Event::handle('EndShowJQueryScripts', array($this)); } if (Event::handle('StartShowLaconicaScripts', array($this))) { @@ -205,6 +219,18 @@ class Action extends HTMLOutputter // lawsuit $this->element('script', array('type' => 'text/javascript', 'src' => common_path('js/util.js?version='.LACONICA_VERSION)), ' '); + + + $this->element('script', array('type' => 'text/javascript', + 'src' => common_path('js/flowplayer-3.0.5.min.js')), + ' '); + + $this->element('script', array('type' => 'text/javascript', + 'src' => common_path('js/video.js')), + ' '); + + + Event::handle('EndShowLaconicaScripts', array($this)); } Event::handle('EndShowScripts', array($this)); diff --git a/lib/util.php b/lib/util.php index b065c2d74..094b2750c 100644 --- a/lib/util.php +++ b/lib/util.php @@ -474,11 +474,17 @@ function common_replace_urls_callback($text, $callback) { function common_linkify($url) { // It comes in special'd, so we unspecial it before passing to the stringifying // functions + $ext = pathinfo($url, PATHINFO_EXTENSION); $url = htmlspecialchars_decode($url); + $video_ext = array('mp4', 'flv', 'avi', 'mpg', 'mp3', 'ogg'); $display = $url; $url = (!preg_match('#^([a-z]+://|(mailto|aim|tel):)#i', $url)) ? 'http://'.$url : $url; $attrs = array('href' => $url, 'rel' => 'external'); + + if (in_array($ext, $video_ext)) { + $attrs['class'] = 'media'; + } if ($longurl = common_longurl($url)) { $attrs['title'] = $longurl; diff --git a/theme/base/css/modal.css b/theme/base/css/modal.css new file mode 100644 index 000000000..985e4adfa --- /dev/null +++ b/theme/base/css/modal.css @@ -0,0 +1,22 @@ +/* + * SimpleModal Basic Modal Dialog + * http://www.ericmmartin.com/projects/simplemodal/ + * http://code.google.com/p/simplemodal/ + * + * Copyright (c) 2008 Eric Martin - http://ericmmartin.com + * + * Licensed under the MIT license: + * http://www.opensource.org/licenses/mit-license.php + * + * Revision: $Id: basic.css 162 2008-12-01 23:36:58Z emartin24 $ + * + */ + + +/* Overlay */ +#simplemodal-overlay {background-color:#000; cursor:wait;} + +/* Container */ +#simplemodal-container {height:240px; width:320px; background-color:#fff; border:3px solid #ccc;} +#simplemodal-container a.modalCloseImg {background:url(../images/x.png) no-repeat; width:25px; height:29px; display:inline; z-index:3200; position:absolute; top:-15px; right:-18px; cursor:pointer;} +#simplemodal-container #basicModalContent {padding:8px;} diff --git a/theme/base/css/modal_ie.css b/theme/base/css/modal_ie.css new file mode 100644 index 000000000..eab4637c0 --- /dev/null +++ b/theme/base/css/modal_ie.css @@ -0,0 +1,16 @@ +/* + * SimpleModal Basic Modal Dialog + * http://www.ericmmartin.com/projects/simplemodal/ + * http://code.google.com/p/simplemodal/ + * + * Copyright (c) 2008 Eric Martin - http://ericmmartin.com + * + * Licensed under the MIT license: + * http://www.opensource.org/licenses/mit-license.php + * + * Revision: $Id: basic_ie.css 162 2008-12-01 23:36:58Z emartin24 $ + * + */ + +/* IE 6 hacks*/ +#simplemodal-container a.modalCloseImg {background:none; right:-14px; width:22px; height:26px; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='../images/x.png',sizingMethod='scale');} diff --git a/theme/base/images/x.png b/theme/base/images/x.png new file mode 100644 index 000000000..c11f7af69 Binary files /dev/null and b/theme/base/images/x.png differ -- cgit v1.2.3-54-g00ecf From 6440f4cecdf507d49db015bbf4303e50eaadbe13 Mon Sep 17 00:00:00 2001 From: Sarven Capadisli Date: Mon, 16 Feb 2009 22:39:57 +0000 Subject: Removed transformation effects from h1-h6 (except in aside) --- theme/base/css/display.css | 1 - 1 file changed, 1 deletion(-) (limited to 'theme/base/css') diff --git a/theme/base/css/display.css b/theme/base/css/display.css index 1ac63927d..5ce5ac884 100644 --- a/theme/base/css/display.css +++ b/theme/base/css/display.css @@ -22,7 +22,6 @@ line-height:1.65; position:relative; } h1,h2,h3,h4,h5,h6 { -text-transform:capitalize; margin-bottom:7px; overflow:hidden; } -- cgit v1.2.3-54-g00ecf From 8fc7f5204e7ed07b9450b7650bce6317ea8e79ae Mon Sep 17 00:00:00 2001 From: Sarven Capadisli Date: Thu, 19 Feb 2009 02:55:04 +0000 Subject: Minor CSS cleanup. --- theme/base/css/display.css | 2 -- 1 file changed, 2 deletions(-) (limited to 'theme/base/css') diff --git a/theme/base/css/display.css b/theme/base/css/display.css index 5ce5ac884..b5796374e 100644 --- a/theme/base/css/display.css +++ b/theme/base/css/display.css @@ -27,7 +27,6 @@ overflow:hidden; } h1 { font-size:1.4em; -line-height:1; margin-bottom:18px; } h2 { font-size:1.3em; } @@ -365,7 +364,6 @@ margin-right:4px; #wrap { margin:0 auto; -width:71.714em; width:1003px; overflow:hidden; } -- cgit v1.2.3-54-g00ecf From 85694e3fa6669e3d59155e32f2cc2f8df3b9f89c Mon Sep 17 00:00:00 2001 From: Sarven Capadisli Date: Fri, 20 Feb 2009 23:54:17 +0000 Subject: Minor positioning: using absolute right instead of left --- theme/base/css/display.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'theme/base/css') diff --git a/theme/base/css/display.css b/theme/base/css/display.css index b5796374e..be124f433 100644 --- a/theme/base/css/display.css +++ b/theme/base/css/display.css @@ -900,7 +900,7 @@ left:0; left:29px; } .notice-options .notice_delete { -left:76px; +right:0; } .notice-options .notice_reply dt { display:none; -- cgit v1.2.3-54-g00ecf From d30590de23f2b9a138ec6923016c4e9af6b9a989 Mon Sep 17 00:00:00 2001 From: Sarven Capadisli Date: Tue, 24 Feb 2009 04:31:31 +0000 Subject: Print stylesheet --- lib/action.php | 4 ++++ theme/base/css/print.css | 28 ++++++++++++++++++++++++++++ 2 files changed, 32 insertions(+) create mode 100644 theme/base/css/print.css (limited to 'theme/base/css') diff --git a/lib/action.php b/lib/action.php index 455ebeff0..dd7dd44e7 100644 --- a/lib/action.php +++ b/lib/action.php @@ -173,6 +173,10 @@ class Action extends HTMLOutputter // lawsuit // TODO: "handheld" CSS for other mobile devices 'media' => 'only screen and (max-device-width: 480px)')); // Mobile WebKit } + $this->element('link', array('rel' => 'stylesheet', + 'type' => 'text/css', + 'href' => theme_path('css/print.css', 'base') . '?version=' . LACONICA_VERSION, + 'media' => 'print')); Event::handle('EndShowLaconicaStyles', array($this)); } if (Event::handle('StartShowUAStyles', array($this))) { diff --git a/theme/base/css/print.css b/theme/base/css/print.css new file mode 100644 index 000000000..cf3ac0391 --- /dev/null +++ b/theme/base/css/print.css @@ -0,0 +1,28 @@ +body { font-size:12pt; } +a:after { background-color:#fff; } +a:not([href^="#"]):after { content:" ( "attr(href)" ) "; } +a:not([href^="http:"]):after { content: " ( http://identi.ca/"attr(href)" ) "; } +a[href^="/"]:after { content: " ( http://identi.ca" attr(href) " ) "; } + +img { border:none; } +p { orphans: 2; widows: 1; } + +#site_nav_global_primary, +#site_nav_local_views, +#form_notice, +.pagination, +#site_nav_global_secondary, +.entity_actions, +.notice-options, +#aside_primary { +display:none; +} + +.timestamp dt, .timestamp dd, +.device dt, .device dd { +display:inline; +} + +.notices li { +margin-bottom:18px; +} -- cgit v1.2.3-54-g00ecf From 240ea969214fe3d18c96d0f9ba1d2b5af63aa54d Mon Sep 17 00:00:00 2001 From: Sarven Capadisli Date: Tue, 24 Feb 2009 05:09:23 +0000 Subject: Print stylesheet - Added license and cleanup --- theme/base/css/print.css | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) (limited to 'theme/base/css') diff --git a/theme/base/css/print.css b/theme/base/css/print.css index cf3ac0391..2da3e5e44 100644 --- a/theme/base/css/print.css +++ b/theme/base/css/print.css @@ -1,8 +1,14 @@ -body { font-size:12pt; } +/** theme: base + * + * @package Laconica + * @author Sarven Capadisli + * @copyright 2009 Control Yourself, Inc. + * @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0 + * @link http://laconi.ca/ + */ + a:after { background-color:#fff; } a:not([href^="#"]):after { content:" ( "attr(href)" ) "; } -a:not([href^="http:"]):after { content: " ( http://identi.ca/"attr(href)" ) "; } -a[href^="/"]:after { content: " ( http://identi.ca" attr(href) " ) "; } img { border:none; } p { orphans: 2; widows: 1; } @@ -14,7 +20,8 @@ p { orphans: 2; widows: 1; } #site_nav_global_secondary, .entity_actions, .notice-options, -#aside_primary { +#aside_primary, +.form_subcription_edit .submit { display:none; } @@ -23,6 +30,7 @@ display:none; display:inline; } +.profiles li, .notices li { margin-bottom:18px; } -- cgit v1.2.3-54-g00ecf From 0a96edac9cd553cc0d1fa32defb80582699bcdd2 Mon Sep 17 00:00:00 2001 From: Sarven Capadisli Date: Sat, 28 Feb 2009 23:10:40 +0000 Subject: Slightly toned down the text-shadow on navigation --- theme/base/css/display.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'theme/base/css') diff --git a/theme/base/css/display.css b/theme/base/css/display.css index be124f433..c741ed4cb 100644 --- a/theme/base/css/display.css +++ b/theme/base/css/display.css @@ -297,7 +297,7 @@ padding:4px 11px; border-width:1px; border-style:solid; border-bottom:0; -text-shadow: 4px 4px 4px #ddd; +text-shadow: 2px 2px 2px #ddd; font-weight:bold; } #site_nav_local_views .nav { -- cgit v1.2.3-54-g00ecf From 8b9e559167e27c490648cc55c4f617c2e9122a18 Mon Sep 17 00:00:00 2001 From: Sarven Capadisli Date: Mon, 2 Mar 2009 00:06:29 +0000 Subject: Updated typography and layout --- theme/base/css/mobile.css | 160 ++++++++++++++++++++++++++++++++++------------ 1 file changed, 119 insertions(+), 41 deletions(-) (limited to 'theme/base/css') diff --git a/theme/base/css/mobile.css b/theme/base/css/mobile.css index 3d0455a67..eee98317c 100644 --- a/theme/base/css/mobile.css +++ b/theme/base/css/mobile.css @@ -2,14 +2,21 @@ * * @package Laconica * @author Meitar Moscovitz + * @author Sarven Capadisli * @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0 * @link http://laconi.ca/ */ -/* Go linear. */ +body { +font-size:2.5em; +} + +#wrap { +width:95%; +} + #header, #header address, -#site_nav_global_primary, #anon_notice, #site_nav_local_views .nav, #form_notice, @@ -24,49 +31,120 @@ .notice .notice-options a, .pagination, .pagination .nav, -.aside .section { float: none; } +.aside .section { +float:none; +} .notice-options .notice_reply, .notice-options .notice_delete, .notice-options .form_favor, -.notice-options .form_disfavor { position: static; } +.notice-options .form_disfavor { +position:static; +} #form_notice, #anon_notice, -#content_inner, -#footer { width: auto; } - -/* And liquid. */ -#wrap { width: 95%; } - -/* Make things bigger on smaller screens. */ -body { font-size: 2em; } -.notices { font-size: 1.5em; } - -#site_nav_global_primary, #site_nav_global_secondary { text-align: center; } - -.notice div.entry-content { margin-left: 0; } -address { margin: 0; } - -#anon_notice, #footer { clear: left; font-size: .5em; } - -#form_notice textarea { width: 80%; height: 5em; } -#form_notice .form_note { right: 20%; top: 6em; } -#form_notice .form_actions input.submit { width: auto; } - -#content { padding: 18px 0; width: 100%; } -#content h1, #page_notice, #content_inner { padding: 0 18px; } -.notices .entry-title, .notices div.entry-content { width: 90%; } -.notice .author .photo { height: 4.5em; width: 4.5em; } /* about double physical size; TODO: do this scaling better */ -.notice-options { position: absolute; top: 0; right: 0; padding-left: 7%; width: 3%; } -.notice-options .notice_delete a { float: left; } /* Works, but feels like it shouldn't. */ -/* TODO: Make the icons of the notice options bigger. Probably with mobile-specific images. */ -.pagination .nav { overflow: auto; } - -#aside_primary { margin: 10px 0 0 0; border: none; padding: 0; width: 100%; } -#popular_notices { float: none; width: auto; } -/* Columns for supplemental info. */ -.aside .section { clear: none; padding: 9px; width: 45%; } -#top_groups_by_post { float: left; } -#featured_users { float: right; } -#export_data { display: none; } +#footer, +#form_notice .form_actions input.submit { +width:auto; +} + +.form_settings label { +width:25%; +} +.form_settings .form_data p.form_guide { +margin-left:26%; +} + +#site_nav_global_primary { +width:75%; +} + +.entity_profile { +width:65%; +} +.entity_actions { +margin-left:0; +} + +#form_notice, +#anon_notice { +clear:both; +} + +#content, +#aside_primary { +width:96%; +padding-left:2%; +padding-right:2%; +} + +#site_notice { +position:static; +float:right; +clear:right; +width:75%; +margin-right:0; +margin-bottom:11px; +} + +.notices { +font-size:1.5em; +} + +#form_notice textarea { +width:80%; +height:5em; +} +#form_notice .form_note { +right:20%; +top:6em; +} + + +.vcard .photo, +.section .vcard .photo { +margin-right:18px; +} +.notice, +.profile { +margin-bottom:18px; +} + +.notices .entry-title, +.notices div.entry-content { +width:90%; +} +.notice div.entry-content { +margin-left:0; +} + +.notice .author .photo { +height:4.5em; +width:4.5em; +} +.notice-options { +position:absolute; +top:0; +right:0; +padding-left:7%; +width:3%; +} + +.notice-options .notice_delete a { +float:left; +} +.pagination .nav { +overflow:auto; +} + +#export_data { +display:none; +} + +#site_nav_local_views li { +margin-right:4px; +} +#site_nav_local_views a { +padding:18px 11px; +} -- cgit v1.2.3-54-g00ecf