Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
slm-fileview
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
jenkins
slm-fileview
Commits
dac3606b
Commit
dac3606b
authored
Dec 28, 2020
by
kl
Committed by
kl
Dec 28, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
更新markdown文件预览UI风格
parent
eb00385d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
13 deletions
+20
-13
txt.ftl
server/src/main/resources/web/txt.ftl
+20
-13
No files found.
server/src/main/resources/web/txt.ftl
View file @
dac3606b
...
@@ -11,11 +11,25 @@
...
@@ -11,11 +11,25 @@
<div
class=
"container"
>
<div
class=
"container"
>
<
#
if
textType
??
&&
textType =
=
"
markdown
"
>
<
#
if
textType
??
&&
textType =
=
"
markdown
"
>
<p>
<div
class=
"panel panel-default"
>
<button
id=
"markdown_btn"
type=
"button"
class=
"btn btn-primary"
>
切换markdown
</button>
<div
id=
"markdown_btn"
class=
"panel-heading"
>
<button
id=
"text_btn"
type=
"button"
class=
"btn btn-primary"
>
切换text
</button>
<h4
class=
"panel-title"
>
</p>
<a
data-toggle=
"collapse"
data-parent=
"#accordion"
href=
"#collapseOne"
>
<div
id=
"markdown"
style=
"padding: 18px;"
></div>
切换markdown
</a>
</h4>
</div>
<div
id=
"text_btn"
class=
"panel-heading"
>
<h4
class=
"panel-title"
>
<a
data-toggle=
"collapse"
data-parent=
"#accordion"
href=
"#collapseOne"
>
切换text
</a>
</h4>
</div>
<div
class=
"panel-body"
>
<div
id=
"markdown"
></div>
</div>
</div>
<
#
elseif
textType
??
&&
textType =
=
"
xml
"
>
<
#
elseif
textType
??
&&
textType =
=
"
xml
"
>
<div
id=
"xml"
style=
"padding: 18px;"
></div>
<div
id=
"xml"
style=
"padding: 18px;"
></div>
<
#
else
>
<
#
else
>
...
@@ -77,7 +91,7 @@
...
@@ -77,7 +91,7 @@
*/
*/
function
fetchData
()
{
function
fetchData
()
{
window
.
textData
=
Base64
.
decode
(
$
(
"#textData"
).
val
())
window
.
textData
=
Base64
.
decode
(
$
(
"#textData"
).
val
())
window
.
textPreData
=
"<pre>"
+
window
.
textData
+
"</pre>"
;
window
.
textPreData
=
"<pre
style='background-color: #FFFFFF;border:none'
>"
+
window
.
textData
+
"</pre>"
;
}
}
/**
/**
...
@@ -134,13 +148,6 @@
...
@@ -134,13 +148,6 @@
width
:
100%
;
width
:
100%
;
}
}
#markdown
,
#xml
{
height
:
97%
;
max-height
:
97%
;
border
:
1px
solid
#ece7e7
;
overflow-y
:
scroll
;
width
:
100%
;
}
</style>
</style>
</body>
</body>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment