Skip to content

Commit

Permalink
添加顶部导航
Browse files Browse the repository at this point in the history
  • Loading branch information
dogstarTest committed Mar 16, 2018
1 parent c880372 commit ec170f8
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 2 deletions.
21 changes: 19 additions & 2 deletions src/Helper/api_desc_tpl.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,21 @@
<body>
<br />
<div class="ui fixed inverted menu">
<div class="ui container">
<a href="/docs.php" class="header item">
<img class="logo" src="http://7xiz2f.com1.z0.glb.clouddn.com/20180316214150_f6f390e686d0397f1f1d6a66320864d6">
{$projectName}
</a>
<a href="https://www.phalapi.net/" class="item">PhalApi</a>
<a href="http://docs.phalapi.net/#/v2.0/" class="item">文档</a>
<a href="http://qa.phalapi.net/" class="item">社区</a>
</div>
</div>
<div class="row"></div>
<br />
<br />
<div class="ui text container" style="max-width: none !important;">
<div class="ui floating message">
Expand Down Expand Up @@ -171,7 +185,10 @@
foreach ($rules as $key => $rule){
$name = $rule['name'];
$require = isset($rule['require']) && $rule['require'] ? '<font color="red">必须</font>' : '可选';
$default = isset($rule['default']) ? $rule['default'] : '';
$default = isset($rule['default'])
? (is_array($rule['default']) ? json_encode($rule['default']) : $rule['default'])
: '';
$default = htmlspecialchars($default);
$desc = isset($rule['desc']) ? htmlspecialchars(trim($rule['desc'])) : '';
$inputType = (isset($rule['type']) && $rule['type'] == 'file') ? 'file' : 'text';
echo <<<EOT
Expand Down
15 changes: 15 additions & 0 deletions src/Helper/api_list_tpl.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,21 @@
<meta name="robots" content="none"/>
</head>
<body>

<div class="ui fixed inverted menu">
<div class="ui container">
<a href="/docs.php" class="header item">
<img class="logo" src="http://7xiz2f.com1.z0.glb.clouddn.com/20180316214150_f6f390e686d0397f1f1d6a66320864d6">
<?php echo $projectName; ?>
</a>
<a href="https://www.phalapi.net/" class="item">PhalApi</a>
<a href="http://docs.phalapi.net/#/v2.0/" class="item">文档</a>
<a href="http://qa.phalapi.net/" class="item">社区</a>
</div>
</div>

<div class="row"></div>
<br />
<br/>


Expand Down

0 comments on commit ec170f8

Please sign in to comment.