Browse Source

Add footer.

ysc3839 3 years ago
parent
commit
026c96ed70
4 changed files with 5 additions and 2 deletions
  1. 2 1
      data-default/data.json
  2. 1 1
      dbschema.json
  3. 1 0
      index.html
  4. 1 0
      js/ZeroBlog.coffee

+ 2 - 1
data-default/data.json

@@ -4,6 +4,7 @@
 	"links": "- [Source code](https://github.com/HelloZeroNet)",
 	"next_post_id": 2,
 	"demo": false,
+	"footer": "Powered by [ZeroNet](https://zeronet.io) [open, free, and uncensored]",
 	"modified": 1432515193,
 	"post": [
 		{
@@ -13,4 +14,4 @@
 			"body": "Your zeronet blog has been successfully created!"
 		}
 	]
-}
+}

+ 1 - 1
dbschema.json

@@ -15,7 +15,7 @@
 		},
 		"data.json": {
 			"to_table": [ "post" ],
-			"to_keyvalue": [ "title", "description", "links", "next_post_id", "demo", "modified" ]
+			"to_keyvalue": [ "title", "description", "links", "next_post_id", "demo", "modified", "footer" ]
 		}
 
 	},

+ 1 - 0
index.html

@@ -158,6 +158,7 @@
   <a class="next" href="#"><span>Next page</span> →</a>
  </div>
  <!-- EOF Pager -->
+ <div class="footer" data-object="Site"><h4 data-editable="footer"></h4></div>
 
 </div>
 <!-- EOF right -->

+ 1 - 0
js/ZeroBlog.coffee

@@ -91,6 +91,7 @@ class ZeroBlog extends ZeroFrame
 				if @data.title then $(".left h1 a:not(.editable-edit)").html(@data.title).data("content", @data.title)
 				if @data.description then $(".left h2").html(Text.renderMarked(@data.description)).data("content", @data.description)
 				if @data.links then $(".left .links").html(Text.renderMarked(@data.links)).data("content", @data.links)
+				if @data.footer then $(".footer h4").html(Text.renderMarked(@data.footer)).data("content", @data.footer)
 
 	loadLastcomments: (type="show", cb=false) ->
 		query = "