diff --git a/src/General/Build.coffee b/src/General/Build.coffee index a0605a48f..535ec502f 100755 --- a/src/General/Build.coffee +++ b/src/General/Build.coffee @@ -107,32 +107,7 @@ Build = else "/#{boardID}/thread/#{threadID}#q#{postID}" - postInfo = <%= html( - '
' + - ' ' + - '?{isOP || boardID === "f"}{${subject} }' + - '' + - '?{email}{}' + - '${name}' + - '?{tripcode}{ ${tripcode}}' + - '?{capcode}{ ## ${capcodeText}}' + - '?{email}{}' + - '?{boardID === "f" && isOP || capcode}{}{ }' + - '?{capcode}{ ${capcodeUC} Icon}' + - '?{uniqueID && !capcode}{ (ID: ${uniqueID})}' + - '?{flagCode}{ }' + - ' ' + - '${date} ' + - '' + - 'No.' + - '${postID}' + - '?{o.isSticky}{ Sticky}' + - '?{o.isClosed && !o.isArchived}{ Closed}' + - '?{o.isArchived}{ Archived}' + - '?{isOP && g.VIEW === "index"}{   [Reply]}' + - '' + - '
' - ) %> + postInfo = <%= importHTML('Build/PostInfo') %> ### File Info ### @@ -141,49 +116,13 @@ Build = fileSize = $.bytesToString file.size fileDims = if file.url[-4..] is '.pdf' then 'PDF' else "#{file.width}x#{file.height}" - fileBlock = <%= html( - '?{file}{
' + - '?{file.isDeleted}{' + - '' + - 'File deleted.' + - '' + - '}{?{boardID === "f"}{' + - '
' + - 'File: ' + - '${file.name}' + - '-(${fileSize}, ${fileDims}, ${file.tag})' + - '
' + - '}{' + - '
' + - 'File: ' + - '' + - '?{file.isSpoiler}{Spoiler Image}{${shortFilename}}' + - ' ' + - '(${fileSize}, ${fileDims})' + - '
' + - '' + - '' + - '' + - '}}' + - '
}' - ) %> + fileBlock = <%= importHTML('Build/File') %> ### Whole Post ### postClass = if isOP then 'op' else 'reply' - wholePost = <%= html( - '?{!isOP}{
>>
}' + - '
' + - '?{isOP}{&{fileBlock}&{postInfo}}{&{postInfo}&{fileBlock}}' + - '
&{comment}
' + - '
' - ) %> + wholePost = <%= importHTML('Build/Post') %> container = $.el 'div', className: "postContainer #{postClass}Container" diff --git a/src/General/html/Build/File.html b/src/General/html/Build/File.html new file mode 100644 index 000000000..f167e6114 --- /dev/null +++ b/src/General/html/Build/File.html @@ -0,0 +1,29 @@ +?{file}{
+ ?{file.isDeleted}{ + + File deleted. + + }{?{boardID === "f"}{ +
+ File: + ${file.name} + -(${fileSize}, ${fileDims}, ${file.tag}) +
+ }{ +
+ File: + + ?{file.isSpoiler}{Spoiler Image}{${shortFilename}} + + (${fileSize}, ${fileDims}) +
+ + ${fileSize} + + }} +
} diff --git a/src/General/html/Build/Post.html b/src/General/html/Build/Post.html new file mode 100644 index 000000000..fc2b36cca --- /dev/null +++ b/src/General/html/Build/Post.html @@ -0,0 +1,5 @@ +?{!isOP}{
>>
} +
+ ?{isOP}{&{fileBlock}&{postInfo}}{&{postInfo}&{fileBlock}} +
&{comment}
+
diff --git a/src/General/html/Build/PostInfo.html b/src/General/html/Build/PostInfo.html new file mode 100644 index 000000000..fbd848f5c --- /dev/null +++ b/src/General/html/Build/PostInfo.html @@ -0,0 +1,24 @@ +
+ + ?{isOP || boardID === "f"}{${subject} } + + ?{email}{} + ${name} + ?{tripcode}{ ${tripcode}} + ?{capcode}{ ## ${capcodeText}} + ?{email}{} + ?{boardID === "f" && isOP || capcode}{}{ } + ?{capcode}{ ${capcodeUC} Icon} + ?{uniqueID && !capcode}{ (ID: ${uniqueID})} + ?{flagCode}{ } + + ${date} + + No. + ${postID} + ?{o.isSticky}{ Sticky} + ?{o.isClosed && !o.isArchived}{ Closed} + ?{o.isArchived}{ Archived} + ?{isOP && g.VIEW === "index"}{   [Reply]} + +