Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
beta.ordbok.uib.no
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Margunn.Rauset
beta.ordbok.uib.no
Commits
8fd99c49
Commit
8fd99c49
authored
5 years ago
by
Ole Voldsæter
Browse files
Options
Downloads
Patches
Plain Diff
underartikler i boks
parent
d5d5ee79
No related branches found
No related tags found
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
src/App.vue
+1
-1
1 addition, 1 deletion
src/App.vue
src/assets/logo.png
+0
-0
0 additions, 0 deletions
src/assets/logo.png
src/components/Definition.vue
+5
-2
5 additions, 2 deletions
src/components/Definition.vue
src/components/SubArticle.vue
+59
-0
59 additions, 0 deletions
src/components/SubArticle.vue
with
65 additions
and
3 deletions
src/App.vue
+
1
−
1
View file @
8fd99c49
...
...
@@ -12,7 +12,7 @@ export default {
name
:
'
app
'
,
data
:
function
()
{
return
{
article_id
:
window
.
location
.
href
.
split
(
"
/
"
).
pop
()
article_id
:
parseInt
(
window
.
location
.
href
.
split
(
"
/
"
).
pop
()
)
}
},
components
:
{
...
...
This diff is collapsed.
Click to expand it.
src/assets/logo.png
+
0
−
0
View replaced file @
d5d5ee79
View file @
8fd99c49
6.69 KiB
|
W:
|
H:
56.1 KiB
|
W:
|
H:
2-up
Swipe
Onion skin
This diff is collapsed.
Click to expand it.
src/components/Definition.vue
+
5
−
2
View file @
8fd99c49
...
...
@@ -9,6 +9,7 @@
<
script
>
import
DefElement
from
'
./DefElement.vue
'
import
Example
from
'
./Example.vue
'
import
SubArticle
from
'
./SubArticle.vue
'
var
Definition
=
{
name
:
'
Definition
'
,
...
...
@@ -18,7 +19,8 @@ var Definition = {
components
:
{
DefElement
,
Definition
,
Example
Example
,
SubArticle
},
computed
:
{
template_name_added
:
function
(){
...
...
@@ -28,7 +30,8 @@ var Definition = {
'
template
'
:
{
'
explanation
'
:
'
DefElement
'
,
'
definition
'
:
'
Definition
'
,
'
example
'
:
'
Example
'
'
example
'
:
'
Example
'
,
'
sub_article
'
:
'
SubArticle
'
}[
element
.
type
]
||
'
li
'
,
'
element
'
:
element
}
...
...
This diff is collapsed.
Click to expand it.
src/components/SubArticle.vue
0 → 100644
+
59
−
0
View file @
8fd99c49
<
template
>
<li
class=
"sub_article"
>
<span
class=
"sub_article_header"
><a
:href=
"body.article_id"
>
{{
article
.
lemmas
[
0
][
'
word
'
]
}}
</a></span>
<ul>
<DefElement
:body=
"body.intro"
/>
<Definition
:body=
"article.definitions[0]"
/>
</ul>
</li>
</
template
>
<
script
>
import
axios
from
"
axios
"
;
import
DefElement
from
'
./DefElement.vue
'
export
default
{
name
:
'
SubArticle
'
,
props
:
{
body
:
Object
},
data
:
function
(){
return
{
article
:
{
lemmas
:
[{
word
:
''
}],
definitions
:
[{
elements
:
[]
}]
}
}
},
components
:
{
DefElement
},
mounted
:
function
(){
var
self
=
this
;
axios
.
get
(
'
https://search-ordbok-prototype-6qpfmm6fz5jvy5ba3e6blryeqe.eu-west-1.es.amazonaws.com/ordbok/_doc/
'
+
self
.
body
.
article_id
)
.
then
(
response
=>
self
.
article
=
response
.
data
.
_source
)
},
beforeCreate
:
function
()
{
this
.
$options
.
components
.
Definition
=
require
(
'
./Definition.vue
'
).
default
}
}
</
script
>
<
style
scoped
>
.sub_article_header
{
font-weight
:
bold
;
}
li
.sub_article
{
padding-top
:
8px
;
}
li
.sub_article
ul
{
padding-top
:
0px
;
}
li
.sub_article
ul
li
{
list-style
:
none
;
}
</
style
>
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