1
0
mirror of https://github.com/gnosygnu/xowa.git synced 2026-03-02 03:49:30 +00:00
This commit is contained in:
gnosygnu
2015-03-01 21:59:12 -05:00
parent f495595da4
commit d279c70606
346 changed files with 3516 additions and 2970 deletions

View File

@@ -0,0 +1,23 @@
/*
XOWA: the XOWA Offline Wiki Application
Copyright (C) 2012 gnosygnu@gmail.com
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation, either version 3 of the
License, or (at your option) any later version.
This program 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 Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package gplx.xowa; import gplx.*;
public interface Xoa_page {
Xoa_ttl Ttl();
Xoa_url Url();
void Xtn_gallery_packed_exists_y_();
}

View File

@@ -18,15 +18,16 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
package gplx.xowa; import gplx.*;
import gplx.xowa.gui.*; import gplx.xowa.gui.views.*; import gplx.xowa.html.*; import gplx.xowa.pages.*;
import gplx.xowa.files.*; import gplx.xowa.xtns.cite.*; import gplx.xowa.xtns.wdatas.*; import gplx.xowa.parsers.lnkis.redlinks.*; import gplx.xowa.html.tocs.*;
import gplx.xowa.html.modules.popups.*; import gplx.xowa.hdumps.pages.*; import gplx.xowa.xtns.wdatas.pfuncs.*;
public class Xoae_page {
import gplx.xowa.html.modules.popups.*; import gplx.xowa.html.hdumps.pages.*; import gplx.xowa.xtns.wdatas.pfuncs.*;
public class Xoae_page implements Xoa_page {
Xoae_page(Xowe_wiki wiki, Xoa_ttl ttl) {
this.wiki = wiki; this.ttl = ttl;
this.lang = wiki.Lang(); // default to wiki.lang; can be override later by wikitext
hdr_mgr = new Xow_hdr_mgr(this, Xoa_app_.Utl_encoder_mgr());
hdr_mgr = new Xow_hdr_mgr(this, Xoa_app_.Utl__encoder_mgr());
redlink_lnki_list = new Xopg_redlink_lnki_list(ttl.Ns().Id_module());
Ttl_(ttl);
} Xoae_page() {} // called by Null
public void Xtn_gallery_packed_exists_y_() {html_data.Xtn_imap_exists_y_();}
public Xow_wiki Wiki() {return wiki;}
public Xoa_ttl Ttl() {return ttl;} public Xoae_page Ttl_(Xoa_ttl v) {ttl = v; url.Wiki_bry_(wiki.Domain_bry()).Page_bry_(v.Full_url()); return this;} private Xoa_ttl ttl;
public Xoa_url Url() {return url;} public Xoae_page Url_(Xoa_url v) {url = v; return this;} private Xoa_url url = Xoa_url.blank_();

View File

@@ -57,7 +57,7 @@ public class Xoh_file_main_wkr implements Bry_fmtr_arg {
alts.Ctor(xfer_itm, opt);
Xof_ext ext = xfer_itm.Lnki_ext();
if (ext.Id_is_thumbable_img())
opt.Html_main_img().Bld_bfr_many(bfr, xfer_itm.Orig_w(), xfer_itm.Orig_h(), xfer_itm.Html_orig_src(), file_size_bry, ext.Mime_type(), elem_id_val, xfer_itm.Html_w(), xfer_itm.Html_h(), xfer_itm.Html_view_src(), ttl.Full_txt(), Xoa_app_.Utl_encoder_mgr().Url().Encode(ttl.Page_url()), alts);
opt.Html_main_img().Bld_bfr_many(bfr, xfer_itm.Orig_w(), xfer_itm.Orig_h(), xfer_itm.Html_orig_src(), file_size_bry, ext.Mime_type(), elem_id_val, xfer_itm.Html_w(), xfer_itm.Html_h(), xfer_itm.Html_view_src(), ttl.Full_txt(), Xoa_app_.Utl__encoder_mgr().Url().Encode(ttl.Page_url()), alts);
else if (ext.Id_is_video()) // NOTE: video must precede audio else File:***.ogg will not show thumbs
opt.Html_main_vid().Bld_bfr_many(bfr, elem_id_val, xfer_itm.Html_view_src(), Atr_class_image, ttl.Page_db(), xfer_itm.Html_view_src(), xfer_itm.Html_w(), xfer_itm.Html_h(), Bry_.Empty, xfer_itm.Html_orig_src(), xfer_itm.Html_w(), xfer_itm.Html_w(), play_btn_icon);
else if (ext.Id_is_audio())