Fakultas Ilmu Komputer UI
Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
ppl-fasilkom-ui
2020
PPL-C
Diskominfo-D'Blood
Mantan Aab-D Blood
Commits
b2552c77
Commit
b2552c77
authored
Jun 24, 2020
by
Nabila Febri Viola
Browse files
Merge branch 'warmfix-article' into 'staging'
Warmfix article See merge request
!124
parents
85154f3a
37f638be
Pipeline
#50091
passed with stages
in 7 minutes and 26 seconds
Changes
4
Pipelines
1
Expand all
Hide whitespace changes
Inline
Side-by-side
backend/main/models.py
View file @
b2552c77
...
...
@@ -93,6 +93,8 @@ class Profile(models.Model):
@
property
def
age
(
self
):
if
self
.
birthdate
is
None
:
return
0
born
=
self
.
birthdate
today
=
date
.
today
()
return
today
.
year
-
born
.
year
-
((
today
.
month
,
today
.
day
)
<
(
born
.
month
,
born
.
day
))
...
...
frontend/src/images/logo.svg
View file @
b2552c77
This diff is collapsed.
Click to expand it.
frontend/src/pages/article.css
View file @
b2552c77
...
...
@@ -10,7 +10,6 @@
.article
.column
div
{
position
:
relative
;
float
:
left
;
width
:
300px
;
margin
:
0
0
0
25px
;
padding
:
0
;
}
...
...
@@ -21,7 +20,6 @@
position
:
relative
;
left
:
0
;
display
:
block
;
width
:
300px
;
margin-top
:
10px
;
padding
:
0
;
color
:
var
(
--red
);
...
...
@@ -33,7 +31,8 @@
opacity
:
0.3
;
}
.article
figure
{
width
:
300px
;
max-width
:
100%
;
height
:
auto
;
margin
:
0
;
padding
:
0
;
border-radius
:
0.25rem
;
...
...
@@ -51,5 +50,20 @@
#one-article-title
{
text-align
:
center
;
word-break
:
break-all
;
word-wrap
:
break-word
;
}
.three-articles-span
{
display
:
block
;
text-align
:
center
;
word-wrap
:
break-word
;
}
a
:hover
{
text-decoration
:
none
;
font-weight
:
bold
;
}
a
:focus
{
text-decoration
:
none
;
font-weight
:
bold
;
}
frontend/src/pages/article.js
View file @
b2552c77
...
...
@@ -78,8 +78,8 @@ const Content = props => {
)
:
(
dataList
.
data
.
results
.
slice
(
0
,
3
).
map
(
newArticle
=>
(
<
Link
to
=
{
"
/article/
"
+
newArticle
.
id
}
key
=
{
newArticle
.
id
}
>
<
Row
className
=
"
my-3
"
>
<
div
className
=
"
col
umn
"
>
<
Row
className
=
"
my-3
d-flex flex-column align-items-center
"
>
<
div
className
=
"
col
-sm-12
"
>
<
div
>
<
figure
>
<
img
...
...
@@ -88,7 +88,9 @@ const Content = props => {
className
=
"
img-fluid rounded mx-auto d-block
"
/>
<
/figure
>
<
span
>
{
newArticle
.
title
}
<
/span
>
<
span
className
=
"
three-articles-span
"
>
{
newArticle
.
title
}
<
/span
>
<
/div
>
<
/div
>
<
/Row
>
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment