📄 un_css.pas
字号:
SHtmlFile.SaveToFile(ExtractFilePath(Application.ExeName)+'Temp.htm');
FMRss.WebBrowser1.Navigate(ExtractFilePath(Application.ExeName)+'Temp.htm');
SHtmlFile.Free;
end;
procedure SaveTempHTML8(A8, B8, C8, D8: TstringList;
TitleName8: string; Counts8: integer);
var
SHtmlFile:TStringList;
i:integer;
begin
SHtmlFile:=TStringList.Create ;
SHtmlFile.Clear;
SHtmlFile.Add('<html><head><title></title><meta http-equiv="Content-Type" content="text/html; charset=gb2312">');
SHtmlFile.Add('<style type="text/css">');
SHtmlFile.Add(' td,p,li,input,select,div,span {font-size:12px;}');
SHtmlFile.Add(' table,td,img,div,span{border: none;margin: 0px 0px 0px 0px;padding: 0px 0px 0px 0px;}');
SHtmlFile.Add(' .f10 {font-size: 10px;}');
SHtmlFile.Add(' .f12 {font-size: 12px;}');
SHtmlFile.Add(' .f14 {font-size: 14px;}');
SHtmlFile.Add(' .f16 {font-size: 16px;}');
SHtmlFile.Add(' .lh17 {line-height:17px;}');
SHtmlFile.Add(' .lh19 {line-height:19px;}');
SHtmlFile.Add(' A:link {color:#00f;}');
SHtmlFile.Add(' A:visited {color:#800080;}');
SHtmlFile.Add(' A:active {color:#f00;}');
SHtmlFile.Add(' A:hover {color:#f00;}');
SHtmlFile.Add(' .tree a:link {text-decoration: none;color:#010099;font-weight:bold;}');
SHtmlFile.Add(' .tree a:visited {text-decoration: none;color:#010099;font-weight:normal;}');
SHtmlFile.Add(' .tree a:active,.tree a:hover {text-decoration: underline;color:#f00;}');
SHtmlFile.Add(' .tree {color:#222;line-height:19px;width:96%;text-align:left;padding:5px 10px 5px 10px;}');
SHtmlFile.Add(' .tree #channel{font-size:16px;font-weight:bold;color:#000098;padding:5px 0 10px 20px;;margin-bottom:15px;clear:both;border-bottom:6px double #000098;}');
SHtmlFile.Add(' .tree #block{clear:both;margin-top:15px;margin-bottom:15px;}');
SHtmlFile.Add(' .tree #title{font-weight:bold;font-size:14px;padding-bottom:5px;padding-top:3px;margin-bottom:3px;} ');
SHtmlFile.Add(' .tree #author{color:#808080;padding-left:7px;}');
SHtmlFile.Add(' .tree #time{color:#808080;padding-left:7px;}');
SHtmlFile.Add(' .tree #readall{font-weight:bold;color:#010099;padding-left:7px;}');
SHtmlFile.Add(' .tree #readall a{text-decoration:underline;font-weight:bold;}');
SHtmlFile.Add(' .tree #description{float:right;}');
SHtmlFile.Add(' .headline{float:left;margin-right:10px;border:1px solid #7A7DCC;;padding:5px 5px 5px 5px;width:49%;background-color:#D9EDFF;}');
SHtmlFile.Add('</style></head>');
SHtmlFile.Add('<body bgcolor=#F6FBFF topmargin=5 marginheight=5 leftmargin=5 marginwidth=5>');
SHtmlFile.Add('<center>');
SHtmlFile.Add('<div id='''+'list'''+' class='''+'tree'''+'>');
if TitleName8<>'' then
SHtmlFile.Add(' <div id='''+'channel'''+'>'+TitleName8+'</div>');
for i:=0 to Counts8-1 do
begin
SHtmlFile.Add(' <div id='''+'block'''+'>');
SHtmlFile.Add(' <div class='''+'headline'''+'>');
SHtmlFile.Add(' <div id='''+'title'''+'>·<a href='+D8.Strings[i]+' target=_blank>'+A8.Strings[i]+'</a></div>');
if B8.Count=D8.Count then
SHtmlFile.Add(' <div id='''+'time'''+'>'+B8.Strings[i]+'</div>')
else
SHtmlFile.Add(' <div id='''+'time'''+'>'+' '+'</div>');
SHtmlFile.Add(' <div id='''+'readall'''+'>[<a href='+D8.Strings[i]+' target=_blank>阅读全文</a>]</div>');
SHtmlFile.Add(' </div>');
if C8.Count=D8.Count then
SHtmlFile.Add(' <div id='''+'description'''+'> '+C8.Strings[i]+'</div><p>')
else
SHtmlFile.Add(' <div id='''+'description'''+'> '+'<没有摘要说明>'+'</div><p>');
SHtmlFile.Add(' </div>');
SHtmlFile.Add(' <hr size=1 style='''+'color:#000199;clear:both;'''+'>');
end;
SHtmlFile.Add('</div></center></body></html>');
SHtmlFile.SaveToFile(ExtractFilePath(Application.ExeName)+'Temp.htm');
FMRss.WebBrowser1.Navigate(ExtractFilePath(Application.ExeName)+'Temp.htm');
SHtmlFile.Free;
end;
procedure SaveTempHTML9(A9, B9, C9, D9: TstringList;
TitleName9: string; Counts9: integer);
var
SHtmlFile:TStringList;
i:integer;
begin
SHtmlFile:=TStringList.Create ;
SHtmlFile.Clear;
SHtmlFile.Add('<html><head><title></title><meta http-equiv="Content-Type" content="text/html; charset=gb2312">');
SHtmlFile.Add('<style type="text/css">');
SHtmlFile.Add(' td,p,li,input,select,div,span {font-size:12px;}');
SHtmlFile.Add(' table,td,img,div,span{border: none;margin: 0px 0px 0px 0px;padding: 0px 0px 0px 0px;}');
SHtmlFile.Add(' .f10 {font-size: 10px;}');
SHtmlFile.Add(' .f12 {font-size: 12px;}');
SHtmlFile.Add(' .f14 {font-size: 14px;}');
SHtmlFile.Add(' .f16 {font-size: 16px;}');
SHtmlFile.Add(' .lh17 {line-height:17px;}');
SHtmlFile.Add(' .lh19 {line-height:19px;}');
SHtmlFile.Add(' A:link {color:#00f;}');
SHtmlFile.Add(' A:visited {color:#800080;}');
SHtmlFile.Add(' A:active {color:#f00;}');
SHtmlFile.Add(' A:hover {color:#f00;}');
SHtmlFile.Add(' .tree a:link {text-decoration: underline;color:#33358A;font-weight: bold;}');
SHtmlFile.Add(' .tree a:visited {text-decoration: underline;color:#33358A;font-weight: normal;}');
SHtmlFile.Add(' .tree a:active,.tree a:hover {text-decoration: none;color:#0066CB;}');
SHtmlFile.Add(' .tree {color:#464646;width:96%;text-align:left;}');
SHtmlFile.Add(' .tree #channel{font-size:16px;font-weight:bold;color:#000;text-align:center;padding:5px 0 15px 0;border-bottom:1px dotted #C0C0C0;margin-bottom:10px;}');
SHtmlFile.Add(' .tree #block{margin-bottom:10px;clear:both;}');
SHtmlFile.Add(' .tree #title{font-weight:bold;float:left;font-size:14px;}');
SHtmlFile.Add(' .tree #author{color:#666;}');
SHtmlFile.Add(' .tree #time{color:#666;float:left;margin-left:5px;}');
SHtmlFile.Add(' .tree #description{line-height:19px;}');
SHtmlFile.Add(' .tree #readall{text-align:right;font-weight:bold;color:#33358A;}');
SHtmlFile.Add(' .tree #readall a{font-weight: bold;}');
SHtmlFile.Add(' .blkDes{border:1px solid #E3E3E3;background-color:#fff;margin:6px 4px 4px 20px;padding:5px 5px 5px 5px;display:none;clear:both;}');
SHtmlFile.Add(' .blkExpand{height:13px;width:12px;border:1px solid #34368B;overflow:hidden;font-weight:normal;cursor:pointer;margin-right:3px;margin-bottom:2px;color:#34368B;background-color:#fff;}');
SHtmlFile.Add('</style>');
SHtmlFile.Add('<script language='''+'javascript'''+' type='''+'text/javascript'''+'>');
SHtmlFile.Add('<!--');
SHtmlFile.Add(' var count = 2;');
SHtmlFile.Add(' function iniClass(){if(count<2) Expand(0);}');
SHtmlFile.Add(' function GetObj(objName){if(document.getElementById){return eval('''+'document.getElementById("''' + '+objName+' + '''")'''+');}else{return eval('''+'document.all.''' + '+objName);}}');
SHtmlFile.Add(' function Expand(itemNo){if(GetObj('''+'i'''+'+'+'itemNo).style.display != '''+'block'''+')'+'{GetObj('''+'i'''+'+'+'itemNo).style.display = '''+'block'''+';GetObj('''+'t'''+'+'+'itemNo).innerText = "-";}else{GetObj('''+'i'''+'+'+'itemNo).style.display = '''+'none'''+';GetObj('''+'t'''+'+'+'itemNo).innerText = "+";}}');
SHtmlFile.Add('//-->');
SHtmlFile.Add('</script>');
SHtmlFile.Add('</head>');
SHtmlFile.Add('<body bgcolor=#EFF2F7 topmargin=5 marginheight=5 leftmargin=5 marginwidth=5 onload='''+'iniClass()'''+'>');
SHtmlFile.Add('<center>');
SHtmlFile.Add('<div id='''+'list'''+' class='''+'tree'''+'>');
if TitleName9<>'' then
SHtmlFile.Add('<div id='''+'channel'''+'>'+TitleName9+'</div>');
for i:=0 to Counts9-1 do
begin
SHtmlFile.Add('<div id='''+'block'''+'>');
SHtmlFile.Add(' <div id='''+'title'''+'><span id='''+'t'+inttostr(i)+''''+' onclick='''+'Expand('+inttostr(i)+')'+''''+' class=blkExpand title='+'点击展开/收缩提要'+'>+</span><a href='+D9.Strings[i]+' target=_blank>'+A9.Strings[I]+'</a></div>');
if B9.Count=D9.Count then
SHtmlFile.Add(' <div id='''+'time'''+'>'+B9.Strings[I]+'</div>')
else
SHtmlFile.Add(' <div id='''+'time'''+'>'+' '+'</div>');
SHtmlFile.Add(' <div id='''+'i'+inttostr(i)+''''+' class='''+'blkDes'''+'>');
if C9.Count=D9.Count then
SHtmlFile.Add(' <div id='''+'description'''+'> '+C9.Strings[i]+'</div><p>')
else
SHtmlFile.Add(' <div id='''+'description'''+'> '+'<没有摘要说明>'+'</div><p>');
SHtmlFile.Add(' <div id='''+'readall'''+'>[<a href='+D9.Strings[i]+' target=_blank>阅读全文</a>]</div>');
SHtmlFile.Add(' </div>');
SHtmlFile.Add('</div>');
end;
SHtmlFile.Add('</div>');
SHtmlFile.Add('</center></body></html>');
SHtmlFile.SaveToFile(ExtractFilePath(Application.ExeName)+'Temp.htm');
FMRss.WebBrowser1.Navigate(ExtractFilePath(Application.ExeName)+'Temp.htm');
SHtmlFile.Free;
end;
procedure SaveTempHTML10(A10,B10,C10,D10:TStringList;
TitleName10:string;Counts10:integer);
var
SHtmlFile:TStringList;
i:integer;
begin
SHtmlFile:=TStringList.Create ;
SHtmlFile.Clear;
SHtmlFile.Add('<html><head><title></title><meta http-equiv="Content-Type" content="text/html; charset=gb2312">');
SHtmlFile.Add('<style type="text/css">');
SHtmlFile.Add(' td,p,li,input,select,div,span {font-size:12px;}');
SHtmlFile.Add(' table,td,img,div,span{border: none;margin: 0px 0px 0px 0px;padding: 0px 0px 0px 0px;}');
SHtmlFile.Add(' .f10 {font-size: 10px;}');
SHtmlFile.Add(' .f12 {font-size: 12px;}');
SHtmlFile.Add(' .f14 {font-size: 14px;}');
SHtmlFile.Add(' .f16 {font-size: 16px;}');
SHtmlFile.Add(' .lh17 {line-height:17px;}');
SHtmlFile.Add(' .lh19 {line-height:19px;}');
SHtmlFile.Add(' A:link {color:#00f;}');
SHtmlFile.Add(' A:visited {color:#800080;}');
SHtmlFile.Add(' A:active {color:#f00;}');
SHtmlFile.Add(' A:hover {color:#f00;}');
SHtmlFile.Add(' .tree a:link,{text-decoration: underline;color:#426873;font-weight: bold;}');
SHtmlFile.Add(' .tree a:visited {text-decoration: underline;color:#426873;font-weight: normal;}');
SHtmlFile.Add(' .tree a:active,.tree a:hover {text-decoration: underline;color:#CC0000;}');
SHtmlFile.Add(' .tree {color:#222;line-height:22px;width:96%;text-align:left;}');
SHtmlFile.Add(' .tree #channel{font-size:20px;color:#436773;padding:10px 0 10px 15;clear:both;margin-top:5px;font-family:??;font-weight:bold;}');
SHtmlFile.Add(' .tree #block{margin-bottom:12px;border:1px solid #7BABCF;border-top:5px solid #85A1AD;background-color:#fff;clear:both;}');
SHtmlFile.Add(' .tree #title{font-weight:bold;font-size:16px;clear:both;padding:8px 5px 7px 5px;color:#426873;}');
SHtmlFile.Add(' .tree #author{color:#808080;float:left;padding-left:15px;padding-bottom:5px;}');
SHtmlFile.Add(' .tree #time{color:#808080;float:right;padding-right:15px;padding-bottom:5px;}');
SHtmlFile.Add(' .tree #description{clear:both;border-top:1px dotted #666;padding:7px 7px 2px 7px;font-size:14px;}');
SHtmlFile.Add(' .tree #readall{text-align:right;font-weight:bold;color:#426873;padding:0 7px 7px 7px;font-size:14px;}');
SHtmlFile.Add(' .tree #readall a{font-weight: bold;}');
SHtmlFile.Add('</style>');
SHtmlFile.Add('</head>');
SHtmlFile.Add('<body bgcolor=#F6F8F5 topmargin=5 marginheight=5 leftmargin=5 marginwidth=5 >');
SHtmlFile.Add('<center>');
SHtmlFile.Add('<div id='''+'list'''+' class='''+'tree'''+'>');
if TitleName10<>'' then
SHtmlFile.Add('<div id='''+'channel'''+'>'+TitleName10+'</div>');
for i:=0 to Counts10-1 do
begin
SHtmlFile.Add('<div id='''+'block'''+'>');
SHtmlFile.Add(' <div id='''+'title'''+'>·<a href='+D10.Strings[i]+' target=_blank>'+A10.Strings[I]+'</a></div>');
if B10.Count=D10.Count then
SHtmlFile.Add(' <div id='''+'time'''+'>'+B10.Strings[I]+'</div>')
else
SHtmlFile.Add(' <div id='''+'time'''+'>'+' '+'</div>');
if C10.Count=D10.Count then
SHtmlFile.Add(' <div id='''+'description'''+'> '+C10.Strings[i]+'</div><p>')
else
SHtmlFile.Add(' <div id='''+'description'''+'> '+'<没有摘要说明>'+'</div><p>');
SHtmlFile.Add(' <div id='''+'readall'''+'>[<a href='+D10.Strings[i]+' target=_blank>阅读全文</a>]</div>');
SHtmlFile.Add(' </div>');
end;
SHtmlFile.Add('</div>');
SHtmlFile.Add('</center></body></html>');
SHtmlFile.SaveToFile(ExtractFilePath(Application.ExeName)+'Temp.htm');
FMRss.WebBrowser1.Navigate(ExtractFilePath(Application.ExeName)+'Temp.htm');
SHtmlFile.Free;
end;
end.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -