Commit MetaInfo

Revisão9d9b1661c89e9d19a68ff030934977de5482b223 (tree)
Hora2020-02-01 09:08:26
Autoryamat0jp <terukohietori@gmai...>
Commiteryamat0jp

Mensagem de Log

することがなくなってきた

Mudança Sumário

Diff

--- a/WebModuleUnit1.dfm
+++ b/WebModuleUnit1.dfm
@@ -1536,8 +1536,24 @@ object WebModule1: TWebModule1
15361536 HTMLDoc.Strings = (
15371537 '<#pr>'
15381538
1539- '<form method=post action=<#uri>/adminset?db=<#database> style=te' +
1540- 'xt-align:center>'
1539+ ' <link rel="stylesheet" href="https://stackpath.bootstrapcdn' +
1540+ '.com/bootstrap/4.2.1/css/bootstrap.min.css" integrity="sha384-GJ' +
1541+ 'zZqFGwb1QTTN6wy59ffF1BuGJpLSa9DkKMp0DgiMDm4iYMj70gZWKYbI706tWS" ' +
1542+ 'crossorigin="anonymous"> <script src="https://code.jquery.com/' +
1543+ 'jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK4' +
1544+ '1JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anony' +
1545+ 'mous"></script>'
1546+
1547+ ' <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.j' +
1548+ 's/1.14.6/umd/popper.min.js" integrity="sha384-wHAiFfRlMFy6i5SRax' +
1549+ 'vfOCifBUQy1xHdJ/yoi7FRNXMRBu5WHdZYu1hA6ZOblgut" crossorigin="ano' +
1550+ 'nymous"></script>'
1551+
1552+ ' <script src="https://stackpath.bootstrapcdn.com/bootstrap/4.' +
1553+ '2.1/js/bootstrap.min.js" integrity="sha384-B0UglyR+jN6CkvvICOB2j' +
1554+ 'oaf5I4l3gm9GU6Hc1og6Ls7i6U/mkkaduKaBhlAXv9k" crossorigin="anonym' +
1555+ 'ous"></script><form method=post action=<#uri>/adminset?db=<#data' +
1556+ 'base> style=text-align:center>'
15411557 ' <label><p>'#12497#12473#12527#12540#12489#12398#22793#26356
15421558
15431559 ' <input type="password" style="HEIGHT: 23px; WIDTH: 85px" n' +
@@ -1848,7 +1864,11 @@ object WebModule1: TWebModule1
18481864 end
18491865 object footer: TPageProducer
18501866 HTMLDoc.Strings = (
1851- '<p style=text-align:center>[ <#link> ] <#recent>')
1867+ '<nav aria-label="Page naigation">'
1868+ ' <ui class="pagination justify-content-center pagination-sm">'
1869+ ' <#link>'
1870+ ' </ui>'
1871+ '</nav> <#recent>')
18521872 OnHTMLTag = footerHTMLTag
18531873 Left = 112
18541874 Top = 192
--- a/WebModuleUnit1.pas
+++ b/WebModuleUnit1.pas
@@ -151,6 +151,7 @@ type
151151 procedure pages(count: Integer; var page: Integer);
152152 procedure strsCheck(var Error: string; list: TStringList);
153153 procedure setLastArticle;
154+ function footerLink(Data: array of const): string;
154155 function isInfo: Boolean;
155156 function loginCheck: Boolean;
156157 function hash(str: string): string;
@@ -196,7 +197,12 @@ procedure TWebModule1.adminFormatCell(Sender: TObject;
196197 var CustomAttrs, CellData: string);
197198 begin
198199 if CellRow = 0 then
200+ begin
201+ BgColor:='Silver';
199202 Exit;
203+ end;
204+ if CellRow mod 2 = 0 then
205+ BgColor:='Maroon';
200206 case CellColumn of
201207 0:
202208 CellData := Format('<input name=check%d type=checkbox>', [CellRow]);
@@ -272,25 +278,42 @@ procedure TWebModule1.footerHTMLTag(Sender: TObject; Tag: TTag;
272278 const TagString: string; TagParams: TStrings; var ReplaceText: string);
273279 var
274280 i: Integer;
281+ s: shortstring;
282+ x: Boolean;
275283 begin
276284 if TagString = 'link' then
277285 begin
278286 for i := 1 to 10 do
279- if i = index.Tag then
280- ReplaceText := ReplaceText + ' ' + i.ToString + ' '
281- else
282- ReplaceText := ReplaceText +
283- Format(' <a style=text-decoration-line:none href="%s?db=%d&num=%d">%d</a> ',
284- [Request.ScriptName + PString(Self.Tag)^,
285- FDTable1.FieldByName('dbnum').AsInteger, i, i]);
287+ begin
288+ x := i = index.Tag;
289+ ReplaceText := ReplaceText + footerLink([i, i, x]);
290+ end;
291+ x := index.Tag = -1;
292+ s:='さいご';
293+ ReplaceText := ReplaceText + footerLink([-1, s, x]);
294+ end;
295+end;
296+
297+function TWebModule1.footerLink(Data: array of const): string;
298+var
299+ s, t: string;
300+begin
301+ if data[1].VType = vtInteger then
302+ t:=data[1].VInteger.toString
303+ else
304+ t:=data[1].VString^;
305+ if Data[2].VBoolean = true then
306+ begin
307+ s := ' active';
308+ t := '<span class=page-link>' + t +
309+ '<span class=sr-only>(current)</span></span>';
286310 end
287- else if TagString = 'recent' then
288- if index.Tag = -1 then
289- ReplaceText := TagString
290- else
291- ReplaceText := '<a style=text-decoration-line:none href="' +
292- Request.ScriptName + PString(Self.Tag)^ + '?db=' +
293- FDTable1.FieldByName('dbnum').AsString + '">recent</a>';
311+ else
312+ s := '';
313+ result := Format
314+ ('<li class="page-item%s"><a class=page-link href="%s?db=%d&num=%d">%s</a></li>',
315+ [s, Request.ScriptName + PString(Self.Tag)^, FDTable1.FieldByName('dbnum')
316+ .AsInteger, Data[0].VInteger, t]);
294317 end;
295318
296319 function TWebModule1.hash(str: string): string;
@@ -786,8 +809,8 @@ begin
786809 FDTable1.Next;
787810 end;
788811 ReplaceText :=
789- '<div class="carousel-caption text-left" style="text-align:bottom;font-size:1.5rem">' +
790- ReplaceText + '</div>';
812+ '<div class="carousel-caption text-left" style="text-align:bottom;font-size:1.5rem">'
813+ + ReplaceText + '</div>';
791814 end
792815 else if TagString = 'info' then
793816 ReplaceText := FDTable1.Lookup('dbnum', FDTable3.FieldByName('info')
Show on old repository browser