summaryrefslogtreecommitdiff
path: root/public/assets
diff options
context:
space:
mode:
authorJules Laplace <julescarbon@gmail.com>2018-01-25 02:15:48 +0100
committerJules Laplace <julescarbon@gmail.com>2018-01-25 02:15:48 +0100
commitf8055775f3ac74e9e6054aef102673cefcf27986 (patch)
tree6c7c302746db594ff0d61863f533633c7259de33 /public/assets
parent3975b8e7e2841298da1ad497ffe29ba004b55ec2 (diff)
more on profile
Diffstat (limited to 'public/assets')
-rw-r--r--public/assets/css/bucky.css12
-rw-r--r--public/assets/js/lib/views/profile/profile.js20
2 files changed, 29 insertions, 3 deletions
diff --git a/public/assets/css/bucky.css b/public/assets/css/bucky.css
index f699c01..60d4390 100644
--- a/public/assets/css/bucky.css
+++ b/public/assets/css/bucky.css
@@ -353,10 +353,12 @@ tr:nth-child(even) td.black { background-color: #eee; border-bottom-color:
.older { color: #5D6464; }
.quiet { color: #787878; }
+#profile_rapper,
#details_rapper {
width: 100%;
text-align: center;
}
+#profile .r,
#details {
display: flex;
flex-direction: row;
@@ -370,6 +372,13 @@ tr:nth-child(even) td.black { background-color: #eee; border-bottom-color:
vertical-align: top;
width: 50%;
}
+.r .left {
+ padding-right: 20px;
+ padding-bottom: 20px;
+}
+.r .right {
+ padding-bottom: 20px;
+}
#comments {
width: 100%;
@@ -656,6 +665,9 @@ pre br {
max-width: 100%;
max-height: 450px;
}
+#profile #gallery div a:first-child .thumb {
+ max-width: 200px; max-height: 200px;
+}
#gallery .thumb {
max-width: 150px;
}
diff --git a/public/assets/js/lib/views/profile/profile.js b/public/assets/js/lib/views/profile/profile.js
index 1064adb..4396414 100644
--- a/public/assets/js/lib/views/profile/profile.js
+++ b/public/assets/js/lib/views/profile/profile.js
@@ -5,19 +5,33 @@ var ProfileView = View.extend({
events: {
},
- action: "/api/user/",
+ action: "/api/profile/",
initialize: function(opt){
this.template = this.$(".template").html()
+ this.comments = new CommentsView ({ parent: this })
+ this.files = new FilesView ({ parent: this })
+ this.gallery = new GalleryView ({ parent: this })
+ this.threadbox = new ThreadBox ({ parent: this })
},
load: function(username){
- $.get(this.action + username, this.populate.bind(this))
+ $.get(this.action + username, this.loadProfile.bind(this))
+ },
+
+ loadProfile: function(data){
+ const { user, threads, topThreads, files, comments } = data
+ this.populate(user)
+ // this.populateComments(topComments)
+ // this.comments.load(data.comments, data.thread)
+ this.gallery.load(data.files)
+ this.files.load(data.files)
+ this.threadbox.load({ threads: data.threads })
},
populate: function(user){
$("body").removeClass('loading')
- var $table = this.$("table")
+ var $table = this.$("table.profile_meta")
var username = sanitizeHTML(user.username)
var is_own_profile = (username === auth.user.username)
if (is_own_profile) {