Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Sharkey
Manage
Activity
Members
Labels
Plan
Issues
342
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
27
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
TransFem.org
Sharkey
Commits
c49c9f16
Commit
c49c9f16
authored
8 years ago
by
otofune
Browse files
Options
Downloads
Patches
Plain Diff
[client] entrance -> public timeline: use nested tag
parent
d1b11138
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/web/app/common/tags/public-timeline.tag
+36
-23
36 additions, 23 deletions
src/web/app/common/tags/public-timeline.tag
with
36 additions
and
23 deletions
src/web/app/common/tags/public-timeline.tag
+
36
−
23
View file @
c49c9f16
<mk-public-timeline>
<article each={ posts }>
<inside-renderer each="{ posts }"></inside-renderer>
<style>
:scope
display block
</style>
<script>
this.mixin('api');
this.posts = [];
this.isFetching = true;
this.on('mount', () => {
this.api('posts', {
limit: 5,
include_reposts: false,
include_replies: false
}).then(posts => {
this.update({
isFetching: false,
posts: posts
});
});
});
</script>
</mk-public-timeline>
<inside-renderer>
<article>
<img src={ user.avatar_url + '?thumbnail&size=64' } alt="avatar"/>
<div>
<header>
...
...
@@ -7,7 +35,7 @@
<span class="username">@{ user.username }</span>
</header>
<div class="body">
<div class="text"
>{
text
}
</div>
<div class="text"
ref="
text
">
</div>
</div>
</div>
</article>
...
...
@@ -59,28 +87,13 @@
</style>
<script>
this.mixin('api');
this.mixin('text')
this.posts = [];
this.isFetching = true;
this.mixin('text');
this.on('mount', () => {
this.api('posts', {
limit: 5,
include_reposts: false,
include_replies: false
}).then(data => {
const posts = data.map(datum => {
const tokens = this.analyze(datum.text);
datum.text = this.compile(tokens);
return datum;
});
this.update({
isFetching: false,
posts: posts
});
});
this.mixin('text');
const tokens = this.analyze(this.text);
const text = this.compile(tokens);
this.refs.text.innerHTML = text;
});
</script>
</
mk-public-timeline
>
</
inside-renderer
>
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment