forked from server/landingpage
added clickables to hide sites
This commit is contained in:
parent
b2e2a80f9b
commit
95d9f33f69
@ -24,6 +24,9 @@
|
|||||||
float:left;
|
float:left;
|
||||||
padding:20px;
|
padding:20px;
|
||||||
}
|
}
|
||||||
|
.lead > span {
|
||||||
|
margin: 10px;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
<script>
|
<script>
|
||||||
var dataurl="caddy.json"
|
var dataurl="caddy.json"
|
||||||
|
|||||||
9
main.js
9
main.js
@ -1,3 +1,6 @@
|
|||||||
|
function onClick(obj) {
|
||||||
|
obj.toggle()
|
||||||
|
}
|
||||||
jQuery.fn.extend({
|
jQuery.fn.extend({
|
||||||
linklist: function (kwargs) {
|
linklist: function (kwargs) {
|
||||||
var self = $(this);
|
var self = $(this);
|
||||||
@ -12,6 +15,12 @@ jQuery.fn.extend({
|
|||||||
var site_div = $("<div>");
|
var site_div = $("<div>");
|
||||||
$(site_div).attr('id', sitename);
|
$(site_div).attr('id', sitename);
|
||||||
var site_list = $("<ul>");
|
var site_list = $("<ul>");
|
||||||
|
var nav = $("<span>");
|
||||||
|
$(nav).click(function () {
|
||||||
|
onClick(site_div)
|
||||||
|
});
|
||||||
|
$(nav).text(sitename);
|
||||||
|
nav.appendTo($(".lead"));
|
||||||
$.each(attributes2.sites, function (key, attributes) {
|
$.each(attributes2.sites, function (key, attributes) {
|
||||||
var my_link = (typeof attributes['link'] != 'undefined') ? attributes['link'] : "";
|
var my_link = (typeof attributes['link'] != 'undefined') ? attributes['link'] : "";
|
||||||
var my_button = (typeof attributes['button'] != 'undefined') ? attributes['button'] : "";
|
var my_button = (typeof attributes['button'] != 'undefined') ? attributes['button'] : "";
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user