From 203610630a5c2d077cbfb1d69e89c1e60d8b074e Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Tue, 30 Oct 2007 09:22:01 +0100 Subject: [PATCH] add 3pane theme --- functions.php | 45 ++++++++++++++++++----------- sanity_check.php | 2 +- schema/ttrss_schema_mysql.sql | 3 +- schema/ttrss_schema_pgsql.sql | 3 +- schema/versions/mysql/25.sql | 3 ++ schema/versions/pgsql/25.sql | 3 ++ themes/3pane/images/ttrss_logo.png | Bin 0 -> 6234 bytes themes/3pane/theme.css | 29 +++++++++++++++++++ tt-rss.js | 40 +++++++++++++++---------- 9 files changed, 93 insertions(+), 35 deletions(-) create mode 100644 schema/versions/mysql/25.sql create mode 100644 schema/versions/pgsql/25.sql create mode 100644 themes/3pane/images/ttrss_logo.png create mode 100644 themes/3pane/theme.css diff --git a/functions.php b/functions.php index ab03832b..53723273 100644 --- a/functions.php +++ b/functions.php @@ -2664,6 +2664,7 @@ } } + print ""; print ""; print ""; print ""; @@ -2707,6 +2708,7 @@ function print_runtime_info($link) { print ""; + if (ENABLE_UPDATE_DAEMON) { print ""; @@ -3659,23 +3661,26 @@ } */ print ""; - - if ($feed_site_url) { - if (!$bottom) { - $target = "target=\"_new\""; - } - print "". - truncate_string($feed_title,30).""; - } else { - print $feed_title; - } - if ($search) { - $search_q = "&q=$search&m=$match_on&smode=$search_mode"; - } + if ($_SESSION["theme"] != "3pane") { - if ($user_page_offset > 1) { - print " [$user_page_offset] "; + if ($feed_site_url) { + if (!$bottom) { + $target = "target=\"_new\""; + } + print "". + truncate_string($feed_title,30).""; + } else { + print $feed_title; + } + + if ($search) { + $search_q = "&q=$search&m=$match_on&smode=$search_mode"; + } + + if ($user_page_offset > 1) { + print " [$user_page_offset] "; + } } if (!$bottom) { @@ -4287,16 +4292,22 @@ $num_tags = 0; + if ($_SESSION["theme"] == "3pane") { + $tag_limit = 3; + } else { + $tag_limit = 6; + } + foreach ($tags as $tag) { $num_tags++; $tag_escaped = str_replace("'", "\\'", $tag); $tag_str = "$tag, "; - if ($num_tags == 6) { + if ($num_tags == $tag_limit) { $tags_str .= "..."; - } else if ($num_tags < 6) { + } else if ($num_tags < $tag_limit) { $tags_str .= $tag_str; } $f_tags_str .= $tag_str; diff --git a/sanity_check.php b/sanity_check.php index b9290b50..bff12e38 100644 --- a/sanity_check.php +++ b/sanity_check.php @@ -2,7 +2,7 @@ require_once "functions.php"; define('EXPECTED_CONFIG_VERSION', 11); - define('SCHEMA_VERSION', 24); + define('SCHEMA_VERSION', 25); if (!file_exists("config.php")) { print __("Fatal Error: You forgot to copy diff --git a/schema/ttrss_schema_mysql.sql b/schema/ttrss_schema_mysql.sql index 88f1080f..24041bb8 100644 --- a/schema/ttrss_schema_mysql.sql +++ b/schema/ttrss_schema_mysql.sql @@ -30,6 +30,7 @@ create table ttrss_themes(id integer not null primary key auto_increment, insert into ttrss_themes (theme_name, theme_path) values ('Old-skool', 'compat'); insert into ttrss_themes (theme_name, theme_path) values ('Graycube', 'graycube'); insert into ttrss_themes (theme_name, theme_path) values ('Default (Compact)', 'compact'); +insert into ttrss_themes (theme_name, theme_path) values ('Three-pane', '3pane'); create table ttrss_users (id integer primary key not null auto_increment, login varchar(120) not null unique, @@ -199,7 +200,7 @@ create table ttrss_tags (id integer primary key auto_increment, create table ttrss_version (schema_version int not null) TYPE=InnoDB; -insert into ttrss_version values (24); +insert into ttrss_version values (25); create table ttrss_prefs_types (id integer not null primary key, type_name varchar(100) not null) TYPE=InnoDB; diff --git a/schema/ttrss_schema_pgsql.sql b/schema/ttrss_schema_pgsql.sql index bb4c4537..c75e210f 100644 --- a/schema/ttrss_schema_pgsql.sql +++ b/schema/ttrss_schema_pgsql.sql @@ -27,6 +27,7 @@ create table ttrss_themes(id serial not null primary key, insert into ttrss_themes (theme_name, theme_path) values ('Old-skool', 'compat'); insert into ttrss_themes (theme_name, theme_path) values ('Graycube', 'graycube'); insert into ttrss_themes (theme_name, theme_path) values ('Default (Compact)', 'compact'); +insert into ttrss_themes (theme_name, theme_path) values ('Three-pane', '3pane'); create table ttrss_users (id serial not null primary key, login varchar(120) not null unique, @@ -178,7 +179,7 @@ create index ttrss_tags_owner_uid_index on ttrss_tags(owner_uid); create table ttrss_version (schema_version int not null); -insert into ttrss_version values (24); +insert into ttrss_version values (25); create table ttrss_prefs_types (id integer not null primary key, type_name varchar(100) not null); diff --git a/schema/versions/mysql/25.sql b/schema/versions/mysql/25.sql new file mode 100644 index 00000000..c3f3d5ea --- /dev/null +++ b/schema/versions/mysql/25.sql @@ -0,0 +1,3 @@ +insert into ttrss_themes (theme_name, theme_path) values ('Three-pane', '3pane'); + +update ttrss_version set schema_version = 25; diff --git a/schema/versions/pgsql/25.sql b/schema/versions/pgsql/25.sql new file mode 100644 index 00000000..c3f3d5ea --- /dev/null +++ b/schema/versions/pgsql/25.sql @@ -0,0 +1,3 @@ +insert into ttrss_themes (theme_name, theme_path) values ('Three-pane', '3pane'); + +update ttrss_version set schema_version = 25; diff --git a/themes/3pane/images/ttrss_logo.png b/themes/3pane/images/ttrss_logo.png new file mode 100644 index 0000000000000000000000000000000000000000..2cedc35edec27c94fd6d3f9836e07aafa89ada62 GIT binary patch literal 6234 zcmV-g7^UZlP)#00004b3#c}2nYxW zd`6pHRCt{2 ze0z9Q)w%a??b&;7$;>1n1abjFfB+&QdTbFdRXI}m@N~3at@dK==V`0<9Ia{lIiEex zxwWS)sJ(QE7jWCs%0!y3bD1IqM(4N1QK#3=)3;+iYWr8N@OZ~feWF$D)uB86DDxF!VED>RB*RDYg2iuhQN~MqRK81Nh@-`4nacTR3#7Sd*zpUG* zL;i;qhdULuC#;*=HI^pfz0l_)yt|kdW0Vtgp`1{24UqJ7l<^_N!G4)n_siVs+lO}} zegOfFeH}&xS+tnsyRn2snQVu2LgWI89x{Uejfpt_ANp%Br^ajMFF)= zJ1a}8bVAkf%4ET$4+ZL334rBr6jwqjmF&;hEt@g)~^i(*(?=~9ceLEuiX8CLdM!9m5+Xtik(tzLBldIhx zXo&7BDG*G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iT84&zMdq^y9{p>P;nuHnR&iinqGdu2_nKlS`W_a-B2g zX^fP?@0ka_@>`_C(S?6YYKJhtY zUV2y|;P;)96TBss>fo zGTqeIIbk@?TLXUIw7)_DfNx#xd;Z7IM*jJQqp7KjF)oNYSNZv@S-GHQAr$5{Xp3TUw)m*%{QYi`^6GV4eYf&_Z1hf zUSCP&mpI@w?Mkwd8ivsMY)oi*q65i+Z?jwbb^wNp;sL*}Cm51fzj;Dk*V3!qD%wzG z6PS}Rh(u61LDe}WIN`07N>7dP=^T&mZcK%ZW$HSTW0!|B5l>UY?#9$16FtY?9O@7E z4C@VjvTizN(R6H|xaK1h&E}nvq^5BgpJH_kXz`>%|23J6cY@p3c^?XfF z)=D;3BnYqr04FG%ld5wJ==}8S698&B!JpsVm@-{L)^+^en8!KZI?|;+31lCU(#U+( zVWpR@<99DLrA__AITQfV$?BzZoJgce(Jl51ou{;unvNY7Z0{H>+VPzD#~aK~p!C%4 zNts8EGcIBEtekc4xrXdMKO}bKcQmOIVOHHY!aDtXjdywHnfd9WEvhCvw9e#&ocq*0Pbf{hV z&)e5|1MiV)Zx8iM0N?_^r~Knnxn(*rvgjo;4bKYit0z?N7TgZ@-8rRVsWG?_NpdI} zp83cSr;cDqE-v#5=ZZFF3L3TcXfe>sPxH%DWNmJM-bPv%BV%igS!@s_BGiiZ=!PzEkg!Y9Cmf@y6(sSfFZ#SY-}U z5F#mR3HW`z)|?+97lI*K@VeNw1x`UQw(E%@T}~?RPGtH_#~E#m!H{h8xR}4dAqYlS zs(Vjf z`((Xa=lJ7$pweKXQ@k5CJ0mn_3>{|v%nE(I)07*qoM6N<$ Eg7TO-EC2ui literal 0 HcmV?d00001 diff --git a/themes/3pane/theme.css b/themes/3pane/theme.css new file mode 100644 index 00000000..0f2cada9 --- /dev/null +++ b/themes/3pane/theme.css @@ -0,0 +1,29 @@ +div.headlines_normal { + position : absolute; + border-width : 1px 1px 0px 0px; + right : 400px; + overflow : hidden; + bottom : 40px; + height : auto; +} + +#content-frame { + width : 400px; + right : 0px; + top : 85px; + left : auto; +} + +div.postHeader div.postDate { + text-align : left; + color : gray; + float : none; +} + +div.postHeader div.postDateRTL { + text-align : left; + color : gray; + float : none; +} + + diff --git a/tt-rss.js b/tt-rss.js index 1773e64a..617791ce 100644 --- a/tt-rss.js +++ b/tt-rss.js @@ -357,27 +357,37 @@ function resize_headlines() { if (!c_frame || !h_frame) return; - debug("resize_headlines"); + if (getInitParam("theme") == "3pane") { + debug("resize_headlines: HOR-mode"); - if (!is_msie()) { - h_frame.style.height = 30 + "%"; - c_frame.style.top = h_frame.offsetTop + h_frame.offsetHeight + 1 + "px"; - h_frame.style.height = h_frame.offsetHeight + "px"; - } else { - h_frame.style.height = document.documentElement.clientHeight * 0.3 + "px"; - c_frame.style.top = h_frame.offsetTop + h_frame.offsetHeight + 1 + "px"; + c_frame.style.width = '30%'; + h_frame.style.right = c_frame.offsetWidth - 1 + "px"; - var c_bottom = document.documentElement.clientHeight; + } else { + debug("resize_headlines: VER-mode"); - if (f_frame) { - c_bottom = f_frame.offsetTop; + if (!is_msie()) { + h_frame.style.height = 30 + "%"; + c_frame.style.top = h_frame.offsetTop + h_frame.offsetHeight + 1 + "px"; + h_frame.style.height = h_frame.offsetHeight + "px"; + } else { + h_frame.style.height = document.documentElement.clientHeight * 0.3 + "px"; + c_frame.style.top = h_frame.offsetTop + h_frame.offsetHeight + 1 + "px"; + + var c_bottom = document.documentElement.clientHeight; + + if (f_frame) { + c_bottom = f_frame.offsetTop; + } + + c_frame.style.height = c_bottom - (h_frame.offsetTop + + h_frame.offsetHeight + 1) + "px"; + h_frame.style.height = h_frame.offsetHeight + "px"; + } - c_frame.style.height = c_bottom - (h_frame.offsetTop + - h_frame.offsetHeight + 1) + "px"; - h_frame.style.height = h_frame.offsetHeight + "px"; - } + } function init_second_stage() { -- 2.39.5