George S. Baugh hace 4 años
padre
commit
516031a76b

+ 7 - 3
Readme.md

@@ -30,12 +30,16 @@ See migrate.pl, and modify the $docroot variable appropriately
 
 Content Types
 =============
+Content templates are modular.
+Add in a template to /templates/forms which describe the content *and* how to edit it.
+Our post data storage being JSON allows us the flexibility to have any kind of meta associated with posts, so go hog wild.
+
+Currently supported:
 * Microblogs
 * Blogs
-* Video
-* Audio
-* Files
+* Files (Video/Audio/Images/Other)
 * About Pages
+* Post Series
 
 Planned development:
 * Presentations

+ 20 - 14
lib/Trog/Routes/HTML.pm

@@ -912,14 +912,6 @@ sub posts ($query, $render_cb, $direct=0) {
     #XXX messed up data has to be fixed unfortunately
     @$tags = List::Util::uniq @$tags;
 
-    #XXX also unsure this is actually necessary
-    my $app = 'file';
-    if ($query->{route}) {
-        $app = 'image' if $query->{route} =~ m/image$/;
-        $app = 'video' if $query->{route} =~ m/video$/;
-        $app = 'audio' if $query->{route} =~ m/audio$/;
-    }
-
     #Filter displaying visibility tags
     my @visibuddies = qw{public unlisted private};
     foreach my $post (@posts) {
@@ -933,8 +925,13 @@ sub posts ($query, $render_cb, $direct=0) {
         $_
     } _post_helper({}, ['series'], $query->{acls});
 
-    #TODO make this dynamic with a template subdirectory for users to plop things in
-    my $forms = [qw{microblog.tx blog.tx file.tx}];
+    my $forms = [];
+    opendir(my $dh, "$template_dir/forms");
+    while (my $form = readdir($dh)) {
+        push(@$forms, $form) if -f "$template_dir/forms/$form" && $form =~ m/.*\.tx$/;
+    }
+    close($dh);
+
     my $edittype = $query->{primary_post} ? $query->{primary_post}->{child_form} : $query->{form};
 
     # Grab the rest of the tags to dump into the edit form
@@ -947,12 +944,10 @@ sub posts ($query, $render_cb, $direct=0) {
     my @et = List::MoreUtils::singleton(@$tags, @tags_all);
 
     my $content = $processor->render('posts.tx', {
-        app       => $app,
         acls      => \@acls,
         can_edit  => $is_admin,
-        edittype  => $edittype,
         forms     => $forms,
-        post      => { tags => $tags, extra_tags => \@et, form => $edittype, visibility => $user_visibility },
+        post      => { tags => $tags, extra_tags => \@et, form => $edittype, visibility => $user_visibility, addpost => 1 },
         post_visibilities => \@visibuddies,
         failure   => $query->{failure},
         to        => $query->{to},
@@ -1240,11 +1235,18 @@ sub _build_themed_styles ($style) {
 
 sub _build_themed_scripts ($script) {
     my @scripts = ("/scripts/$script");
-    my $ts = _themed_style($script);
+    my $ts = _themed_script($script);
     push(@scripts, $ts) if $theme_dir && -f "www/$ts";
     return \@scripts;
 }
 
+sub _build_themed_templates ($template) {
+    my @templates = ("/templates/$template");
+    my $ts = _themed_template($template);
+    push(@templates, $ts) if $theme_dir && -f "www/$ts";
+    return \@templates;
+}
+
 sub _pick_processor($file, $normal, $themed) {
     return _dir_for_resource($file) eq $template_dir ? $normal : $themed;
 }
@@ -1262,4 +1264,8 @@ sub _themed_script ($resource) {
     return _dir_for_resource("scripts/$resource")."/scripts/$resource";
 }
 
+sub _themed_template ($resource) {
+    return _dir_for_resource("templates/$resource")."/templates/$resource";
+}
+
 1;

+ 0 - 7
www/templates/blog.tx

@@ -1,7 +0,0 @@
-<form class="Submissions" action="/post/save" method="POST" enctype="multipart/form-data">
-    Title *<br /><input required class="cooltext" type="text" name="title" placeholder="Iowa Man Destroys Moon" value="<: $post.title :>" />
-    : include "preview.tx";
-    : include "acls.tx";
-    : include "tags.tx";
-    : include "form_common.tx";
-</form>

+ 8 - 0
www/templates/edit_foot.tx

@@ -0,0 +1,8 @@
+    : if (!$post.addpost) {
+    <form class="Submissions" action="/post/delete" method="POST" class="inline">
+        <input type="hidden" name="id" value="<: $post.id :>"></input>
+        <input type="hidden" name="to" value="<: $route :>"></input>
+        <input class="coolbutton" type="submit" value="Delete"></input>
+    </form>
+    : }
+</div>

+ 8 - 0
www/templates/edit_head.tx

@@ -0,0 +1,8 @@
+<br />
+: if ( !!$post.addpost ) {
+    <a style="cursor:pointer" onclick="switchMenu('submissions')">[Add Post]</a><hr />
+    <div id="submissions" style="display:none;">
+: } else {
+    <a style="display: inline-block;cursor:pointer;" onclick="switchMenu('<: $post.id :>-<: $post.version :>');">[Edit]</a>
+    <div id="<: $post.id :>-<: $post.version :>" style="display:none;">
+:}

+ 0 - 11
www/templates/file.tx

@@ -1,11 +0,0 @@
-<form class="Submissions" action="/post/save" method="POST" enctype="multipart/form-data">
-    Title *<br /><input required class="cooltext" type="text" name="title" placeholder="Iowa Man Destroys Moon" value="<: $post.title :>" />
-    File *<br /><input <: $post.href ? '' : 'required' :> class="cooltext" type="file" name="file" />
-    : if ( $post.href ) {
-    <input type="hidden" name="href" value="<: $post.href :>" />
-    : }
-    : include "preview.tx";
-    : include "acls.tx";
-    : include "tags.tx";
-    : include "form_common.tx";
-</form>

+ 25 - 0
www/templates/forms/blog.tx

@@ -0,0 +1,25 @@
+<div class="post <: $style :>">
+    :if ( !$post.addpost ) {
+        : include "post_title.tx";
+
+        : if ( !$post.video_href && !$post.is_image && !$post.is_video && !$post.is_profile && $post.preview ) {
+            <div style="background-image:url(<: $post.preview :>);" class="responsive preview"></div>
+        : }
+
+        <div id="postData-<: $post.id :>">
+            <: render_it($post.data) | mark_raw  :>
+        </div>
+    : }
+
+    : if ( $can_edit ) {
+        : include "edit_head.tx";
+        <form class="Submissions" action="/post/save" method="POST" enctype="multipart/form-data">
+            Title *<br /><input required class="cooltext" type="text" name="title" placeholder="Iowa Man Destroys Moon" value="<: $post.title :>" />
+            : include "preview.tx";
+            : include "acls.tx";
+            : include "tags.tx";
+            : include "form_common.tx";
+        </form>
+        : include "edit_foot.tx";
+    : }
+</div>

+ 63 - 0
www/templates/forms/file.tx

@@ -0,0 +1,63 @@
+:if ( !$post.addpost ) {
+    :if ( $tiled ) {
+        <a href="<: $post.local_href :>" class="tile">
+            : if ($post.is_video) {
+                <video preload="none" class="responsive" controls poster="<: $post.preview :>" >
+                    <source src="<: $post.href :>" type="<: $post.content_type :>" />
+                    Your browser does not support the video tag.
+                </video>
+            : } else {
+                <div class="responsive preview" style="background-image:url(<: $post.preview :>)"></div>
+            : }
+            <p class="midtitle"><: $post.title :></p>
+        </a>
+    : } else {
+        : include "post_title.tx";
+
+        : if ( $post.is_video ) {
+            <video preload="none" class="responsive" controls poster="<: $post.preview :>" >
+                <source src="<: $post.href :>" type="<: $post.content_type :>" />
+                Your browser does not support the video tag.
+            </video>
+        : }
+
+        : if ( $post.is_audio ) {
+            <audio controls>
+                <source src="<: $post.href :>" type="<: $post.content_type :>" />
+                Your browser does not support the audio tag.
+            </audio>
+        : }
+
+        : if ( $post.is_image ) {
+            <div style="background-image:url(<: $post.href :>);" class="responsive preview"></div>
+        : }
+
+        : if( $post.data ) {
+            : if ($post.is_video || $post.is_image) {
+                <div id="postData" class="responsive-text">
+            : } else {
+                <div id="postData">
+            : }
+            : if ( $style != 'media' ) {
+                <: render_it($post.data) | mark_raw  :>
+            : }
+            </div>
+        : }
+    : }
+: }
+
+: if ( $can_edit ) {
+    : include "edit_head.tx";
+    <form class="Submissions" action="/post/save" method="POST" enctype="multipart/form-data">
+        Title *<br /><input required class="cooltext" type="text" name="title" placeholder="Iowa Man Destroys Moon" value="<: $post.title :>" />
+        File *<br /><input <: $post.href ? '' : 'required' :> class="cooltext" type="file" name="file" />
+        : if ( $post.href ) {
+        <input type="hidden" name="href" value="<: $post.href :>" />
+        : }
+        : include "preview.tx";
+        : include "acls.tx";
+        : include "tags.tx";
+        : include "form_common.tx";
+    </form>
+    : include "edit_foot.tx";
+: }

+ 43 - 0
www/templates/forms/microblog.tx

@@ -0,0 +1,43 @@
+<div class="post <: $style :>">
+
+    :if ( !$post.addpost ) {
+        : include "post_title.tx";
+
+        : if ( !$post.video_href && !$post.is_image && !$post.is_video && !$post.is_profile && $post.preview ) {
+            <div style="background-image:url(<: $post.preview :>);" class="responsive preview"></div>
+        : }
+        : if ( $post.video_href ) {
+            <video preload="none" class="responsive" controls poster="<: $post.preview :>" >
+                <source src="<: $post.video_href :>" type="<: $post.video_content_type :>" />
+                Your browser does not support the video tag.
+            </video>
+        : }
+        : if ( $post.audio_href ) {
+            <audio controls>
+                <source src="<: $post.audio_href :>" type="<: $post.audio_content_type :>" />
+                Your browser does not support the audio tag.
+            </audio>
+        : }
+
+        : if ( !!$post.data ) {
+            <div id="postData-<: $post.id :>">
+                <: render_it($post.data) | mark_raw  :>
+            </div>
+        : }
+    : }
+
+    : if ( $can_edit ) {
+        : include "edit_head.tx";
+        <form class="Submissions" action="/post/save" method="POST" enctype="multipart/form-data">
+            Title *<br /><input required class="cooltext" type="text" name="title" placeholder="Iowa Man Destroys Moon" value="<: $post.title :>" />
+            URL *<br /><input required class="cooltext" type="href" name="href" placeholder="https://oneweirdtrick.scam" value="<: $post.href :>" />
+            : include "preview.tx";
+            Audio<br /><input class="cooltext" type="url" name="audio_href" placeholder="https://soundclod.com/static.mp3" value="<: $post.audio_href :>" />
+            Video<br /><input class="cooltext" type="url" name="video_href" placeholder="https://youvimeo.tv/infomercial.mp4" value="<: $post.video_href :>" />
+            : include "acls.tx";
+            : include "tags.tx";
+            : include "form_common.tx";
+        </form>
+        :include "edit_foot.tx"
+    : }
+</div>

+ 43 - 0
www/templates/forms/profile.tx

@@ -0,0 +1,43 @@
+: if ( !$post.addpost ) {
+    : if ( $tiled ) {
+        <a href="<: $post.local_href :>" class="tile">
+            <div class="square circle bigprofile preview" style="background-image:url(<: $post.preview :>)"></div>
+            <p class="midtitle"><: $post.title :></p>
+        </a>
+    : } else {
+        : include "post_title.tx";
+        <a href="<: $post.local_href :>" title="<: $post.title :> poasts">
+            <div style="background-image:url(<: $post.wallpaper :>);" class="banner profile">
+                <div style="background-image:url(<: $post.preview :>);" class="circle portrait"></div>
+                : if( $post.data ) {
+                    <div id="postData" class="nameBadge">
+                        <big><: $post.title :></big><br /><br />
+                        <: render_it($post.data) | mark_raw  :>
+                    </div>
+                : }
+            </div>
+         </a><br />
+    : }
+: }
+
+: if ( $can_edit ) {
+    : include "edit_head.tx";
+    <form class="Submissions" action="/profile" method="POST" enctype="multipart/form-data">
+        Username *<br /><input required class="cooltext" type="text" name="username" placeholder="AzureDiamond" value="<: $post.user :>" />
+        Password *<br /><input <: $post.user ? '' : 'required' :> class="cooltext" type="password" name="password" placeholder="hunter2" />
+        Avatar *<br /><input class="cooltext" type="file" name="preview_file" />
+        : if ( $post.preview ) {
+        <input type="hidden" name="preview" value="<: $post.preview :>" />
+        : }
+        Wallpaper<br /><input type="file" class="cooltext" name="wallpaper_file" placeholder="PROMO.JPG" />
+        : if ( $post.wallpaper ) {
+        <input type="hidden" name="wallpaper" value="<: $post.wallpaper :>" />
+        : }
+        Title  <br /><input class="cooltext" type="text" name="title" value="<: $post.title :>" />
+        <input type="hidden" name="callback" value="Trog::Routes::HTML::users" />
+        : include "acls.tx";
+        : include "tags.tx";
+        : include "form_common.tx";
+    </form>
+    : include "edit_foot.tx";
+: }

+ 48 - 0
www/templates/forms/series.tx

@@ -0,0 +1,48 @@
+:if ( !$post.addpost ) {
+    :if ( $tiled ) {
+        <a href="<: $post.local_href :>" class="tile">
+            : if ($post.is_video) {
+                <video preload="none" class="responsive" controls poster="<: $post.preview :>" >
+                    <source src="<: $post.href :>" type="<: $post.content_type :>" />
+                    Your browser does not support the video tag.
+                </video>
+            : } else {
+                <div class="responsive preview" style="background-image:url(<: $post.preview :>)"></div>
+            : }
+            <p class="midtitle"><: $post.title :></p>
+        </a>
+    : } else {
+        : include "post_title.tx";
+
+        : if ( !$post.video_href && !$post.is_image && !$post.is_video && !$post.is_profile && $post.preview ) {
+            <div style="background-image:url(<: $post.preview :>);" class="responsive preview"></div>
+        : }
+
+        : if( $post.data ) {
+            <div id="postData">
+                <: render_it($post.data) | mark_raw  :>
+            </div>
+        : }
+    : }
+: }
+
+: if ( $can_edit ) {
+    : include "edit_head.tx";
+    <form class="Submissions" action="/post/save" method="POST" enctype="multipart/form-data">
+        Title *<br /><input required class="cooltext" type="text" name="title" placeholder="Iowa Man Destroys Moon" value="<: $post.title :>" />
+        URL *<br /><input required class="cooltext" type="text" name="local_href" placeholder="/someurl" value="<: $post.local_href :>" />
+        ACL name *<br /><input required class="cooltext" type="text" name="aclname" value="<: $post.aclname :>" />
+        Content Template *<br />
+        <select required class="cooltext" name="child_form">
+        : for $forms -> $form {
+            <option value="<: $form :>" <: if ( $post.child_form == $form ) { :>selected<: } :> ><: $form :></option>
+        : }
+        </select>
+        <input type="hidden" name="callback" value="Trog::Routes::HTML::series" />
+        : include "preview.tx";
+        : include "acls.tx";
+        : include "tags.tx";
+        : include "form_common.tx";
+    </form>
+    : include "edit_foot.tx";
+: }

+ 0 - 10
www/templates/microblog.tx

@@ -1,10 +0,0 @@
-<form class="Submissions" action="/post/save" method="POST" enctype="multipart/form-data">
-    Title *<br /><input required class="cooltext" type="text" name="title" placeholder="Iowa Man Destroys Moon" value="<: $post.title :>" />
-    URL *<br /><input required class="cooltext" type="href" name="href" placeholder="https://oneweirdtrick.scam" value="<: $post.href :>" />
-    : include "preview.tx";
-    Audio<br /><input class="cooltext" type="url" name="audio_href" placeholder="https://soundclod.com/static.mp3" value="<: $post.audio_href :>" />
-    Video<br /><input class="cooltext" type="url" name="video_href" placeholder="https://youvimeo.tv/infomercial.mp4" value="<: $post.video_href :>" />
-    : include "acls.tx";
-    : include "tags.tx";
-    : include "form_common.tx";
-</form>

+ 19 - 0
www/templates/post_title.tx

@@ -0,0 +1,19 @@
+<h3 class='blogtitles'>
+    : if (!$style || $style == 'embed') {
+        <a ><a href='<: $post.href :>' ><: $post.title :></a>
+        <a class="undecorated" href='<: $post.local_href :>'>🔗</a>
+    : }
+    : if (!$style) {
+        : if ( $post.version_max && !$rss ) {
+        <form method="GET" action="<: $post.local_href :>" style="float:right;">
+            <select id="<: $post.id :>-<: $post.version :>-version" name="version" class="coolbutton">
+                : for [0..$post.version_max] -> $version {
+                    <option value="<: $version :>" <: if ($post.version == $version ) { :>selected<: } :> >v<: $version :></option>
+                : }
+            </select>
+        </form>
+        : }
+        <span id="<: $post.id :>-<: $post.version :>-time" class="responsive-hide" style="float:right;"><: $post.created :></span>
+        <a href="/users/<: $post.user :>" class='postericon <: $post.user :>' title='Posted by <: $post.user :>'>&nbsp;</a>
+    : }
+</h3>

+ 29 - 137
www/templates/posts.tx

@@ -2,13 +2,7 @@
     <script type="text/javascript" src="/scripts/post.js"></script>
     : if (!$direct) {
         : if ($to) {
-        : include "jsalert.tx";
-        : }
-        : if ($edittype) {
-        <a style="cursor:pointer" onclick="switchMenu('submissions')">[Add Post]</a><hr />
-        <div id="submissions" style="display:none">
-          : include $edittype;
-        </div>
+            : include "jsalert.tx";
         : }
         <script type="text/javascript" src="/scripts/fgEmojiPicker.js"></script>
         <script type="text/javascript">
@@ -23,6 +17,7 @@
         });
         </script>
     : }
+    : include "forms/" ~ $post.form;
 : }
 <script type="text/javascript" src="/scripts/highlight.min.js"></script>
 <script>
@@ -52,146 +47,43 @@ document.addEventListener("DOMContentLoaded", function(){
     : if ( !$post.form ) {
     :     next;
     : }
-    :if ( $tiled ) {
-        <a href="<: $post.local_href :>" class="tile">
-        : if ($post.is_video) {
-            <video preload="none" class="responsive" controls poster="<: $post.preview :>" >
-                <source src="<: $post.href :>" type="<: $post.content_type :>" />
-                Your browser does not support the video tag.
-            </video>
-        : } else {
-            : if ($post.is_profile) {
-                <div class="square circle bigprofile preview" style="background-image:url(<: $post.preview :>)"></div>
-            : } else {
-            <div class="responsive preview" style="background-image:url(<: $post.preview :>)"></div>
-            : }
-        : }
-            <p class="midtitle"><: $post.title :></p>
-        </a>
-    : } else {
-        <div class="post <: $style :>">
-            : if (!$post.is_profile) {
-            <h3 class='blogtitles'>
-                : if (!$style || $style == 'embed') {
-                    <a ><a href='<: $post.href :>' ><: $post.title :></a>
-                    <a class="undecorated" href='<: $post.local_href :>'>🔗</a>
-                : }
-                : if (!$style) {
-                    : if ( $post.version_max && !$rss ) {
-                    <form method="GET" action="<: $post.local_href :>" style="float:right;">
-                        <select id="<: $post.id :>-<: $post.version :>-version" name="version" class="coolbutton">
-                            : for [0..$post.version_max] -> $version {
-                                <option value="<: $version :>" <: if ($post.version == $version ) { :>selected<: } :> >v<: $version :></option>
-                            : }
-                        </select>
-                    </form>
-                    : }
-                    <span id="<: $post.id :>-<: $post.version :>-time" class="responsive-hide" style="float:right;"><: $post.created :></span>
-                    <a href="/users/<: $post.user :>" class='postericon <: $post.user :>' title='Posted by <: $post.user :>'>&nbsp;</a>
-                : }
-            </h3>
-            : }
-            : if ( !$post.video_href && !$post.is_image && !$post.is_video && !$post.is_profile && $post.preview ) {
-                <div style="background-image:url(<: $post.preview :>);" class="responsive preview"></div>
-            : }
-            : if ( $post.video_href ) {
-                <video preload="none" class="responsive" controls poster="<: $post.preview :>" >
-                    <source src="<: $post.video_href :>" type="<: $post.video_content_type :>" />
-                    Your browser does not support the video tag.
-                </video>
-            : }
-            : if ( $post.audio_href ) {
-                <audio controls>
-                    <source src="<: $post.audio_href :>" type="<: $post.audio_content_type :>" />
-                    Your browser does not support the audio tag.
-                </audio>
-            : }
-            : if ( $post.is_video ) {
-                <video preload="none" class="responsive" controls poster="<: $post.preview :>" >
-                    <source src="<: $post.href :>" type="<: $post.content_type :>" />
-                    Your browser does not support the video tag.
-                </video>
-            : }
-            : if ( $post.is_audio ) {
-                <audio controls>
-                    <source src="<: $post.href :>" type="<: $post.content_type :>" />
-                    Your browser does not support the audio tag.
-                </audio>
-            : }
-            : if ( $post.is_image ) {
-                <div style="background-image:url(<: $post.href :>);" class="responsive preview"></div>
-            : }
-            : if ( $post.is_profile ) {
-                <a href="<: $post.local_href :>" title="<: $post.title :> poasts">
-                <div style="background-image:url(<: $post.wallpaper :>);" class="banner profile">
-                    <div style="background-image:url(<: $post.preview :>);" class="circle portrait"></div>
-            : }
-            : if( $post.data ) {
-                : if ($post.is_video || $post.is_image) {
-                <div id="postData" class="responsive-text">
-                : } elsif ($post.is_profile) {
-                <div id="postData" class="nameBadge">
-                : } else {
-                <div id="postData">
-                : }
-                    : if ( $post.is_profile ) {
-                    <big><: $post.title :></big><br /><br />
-                    : }
-                    : if ( $style != 'media' ) {
-                        <: render_it($post.data) | mark_raw  :>
-                    : }
-                </div>
-            : }
-            : if( $post.is_profile ) {
-                </div></a><br />
-            : }
-            : if ( $can_edit ) {
-            <br />
-            <a style="display: inline-block;cursor:pointer;" onclick="switchMenu('<: $post.id :>-<: $post.version :>');">[Edit]</a>
-            <div id="<: $post.id :>-<: $post.version :>" style="display:none;">
-                : include $post.form { post => $post };
-                <form class="Submissions" action="/post/delete" method="POST" class="inline">
-                    <input type="hidden" name="id" value="<: $post.id :>"></input>
-                    <input type="hidden" name="to" value="<: $route :>"></input>
-                    <input class="coolbutton" type="submit" value="Delete"></input>
-                </form>
-            </div>
-            : }
-            : if (!$post.is_profile) {
-            <script type="text/javascript">
-                document.addEventListener("DOMContentLoaded", function(event) {
+    : include "forms/" ~ $post.form { post => $post };
 
-                    // Fix post dates to be localized
-                    var e = document.getElementById("<: $post.id :>-<: $post.version :>-time");
-                    if (!e) {
-                        return;
-                    }
-                    var d = new Date(0);
-                    d.setUTCSeconds(e.innerText);
-                    e.innerHTML = "&nbsp;" + d.toDateString();
-
-                    //Make the version switcher do things
-                    var swit = document.getElementById("<: $post.id :>-<: $post.version :>-version"); // I am an elder scrolls fan
-                    if (swit) {
-                        swit.onchange = function (evt) {
-                            this.form.submit();
-                        };
-                    }
-                });
-            </script>
-            : }
-        </div>
-        : if ($posts.size() > 1) {
+    : if ($posts.size() > 1 && !$tiled ) {
         <hr class="divider" />
-        : }
     : }
+
+    <script type="text/javascript">
+        document.addEventListener("DOMContentLoaded", function(event) {
+
+            // Fix post dates to be localized
+            var e = document.getElementById("<: $post.id :>-<: $post.version :>-time");
+            if (!e) {
+                return;
+            }
+            var d = new Date(0);
+            d.setUTCSeconds(e.innerText);
+            e.innerHTML = "&nbsp;" + d.toDateString();
+
+            //Make the version switcher do things
+            var swit = document.getElementById("<: $post.id :>-<: $post.version :>-version");
+            if (swit) {
+                swit.onchange = function (evt) {
+                    this.form.submit();
+                };
+            }
+        });
+    </script>
 : }
+
 : if ( !$direct && ( $rss || $older ) ) {
 : include "paginator.tx";
 : }
+
 : if ( $footer ) {
     <: $footer | mark_raw :>
 : }
+
 <script>
 document.addEventListener("DOMContentLoaded", function(event) {
     var pagin = document.getElementById("paginatorTime");

+ 0 - 17
www/templates/profile.tx

@@ -1,17 +0,0 @@
-<form class="Submissions" action="/profile" method="POST" enctype="multipart/form-data">
-    Username *<br /><input required class="cooltext" type="text" name="username" placeholder="AzureDiamond" value="<: $post.user :>" />
-    Password *<br /><input <: $post.user ? '' : 'required' :> class="cooltext" type="password" name="password" placeholder="hunter2" />
-    Avatar *<br /><input class="cooltext" type="file" name="preview_file" />
-    : if ( $post.preview ) {
-    <input type="hidden" name="preview" value="<: $post.preview :>" />
-    : }
-    Wallpaper<br /><input type="file" class="cooltext" name="wallpaper_file" placeholder="PROMO.JPG" />
-    : if ( $post.wallpaper ) {
-    <input type="hidden" name="wallpaper" value="<: $post.wallpaper :>" />
-    : }
-    Title  <br /><input class="cooltext" type="text" name="title" value="<: $post.title :>" />
-    <input type="hidden" name="callback" value="Trog::Routes::HTML::users" />
-    : include "acls.tx";
-    : include "tags.tx";
-    : include "form_common.tx";
-</form>

+ 0 - 16
www/templates/series.tx

@@ -1,16 +0,0 @@
-<form class="Submissions" action="/post/save" method="POST" enctype="multipart/form-data">
-    Title *<br /><input required class="cooltext" type="text" name="title" placeholder="Iowa Man Destroys Moon" value="<: $post.title :>" />
-    URL *<br /><input required class="cooltext" type="text" name="local_href" placeholder="/someurl" value="<: $post.local_href :>" />
-    ACL name *<br /><input required class="cooltext" type="text" name="aclname" value="<: $post.aclname :>" />
-    Input Form *<br />
-    <select required class="cooltext" name="child_form">
-    : for $forms -> $form {
-        <option value="<: $form :>" <: if ( $post.child_form == $form ) { :>selected<: } :> ><: $form :></option>
-    : }
-    </select>
-    <input type="hidden" name="callback" value="Trog::Routes::HTML::series" />
-    : include "preview.tx";
-    : include "acls.tx";
-    : include "tags.tx";
-    : include "form_common.tx";
-</form>