Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
beta.ordbok.uib.no
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
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
Språksamlingane
beta.ordbok.uib.no
Commits
6d5554ae
Commit
6d5554ae
authored
3 years ago
by
Henrik Askjer
Browse files
Options
Downloads
Patches
Plain Diff
Add social media sharing
parent
60bb9983
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
.gitlab-ci.yml
+3
-0
3 additions, 0 deletions
.gitlab-ci.yml
src/components/Article.vue
+36
-1
36 additions, 1 deletion
src/components/Article.vue
src/main.js
+11
-0
11 additions, 0 deletions
src/main.js
with
50 additions
and
1 deletion
.gitlab-ci.yml
+
3
−
0
View file @
6d5554ae
...
@@ -12,6 +12,9 @@ build-dev:
...
@@ -12,6 +12,9 @@ build-dev:
script
:
script
:
-
npm install --progress=false
-
npm install --progress=false
-
npm run build -- --mode dev_server
-
npm run build -- --mode dev_server
-
npm install --save vue-social-sharing
-
npm install --save @fortawesome/vue-fontawesome@latest
-
npm install --save @fortawesome/free-brands-svg-icons
artifacts
:
artifacts
:
expire_in
:
1 week
expire_in
:
1 week
paths
:
paths
:
...
...
This diff is collapsed.
Click to expand it.
src/components/Article.vue
+
36
−
1
View file @
6d5554ae
...
@@ -32,9 +32,31 @@
...
@@ -32,9 +32,31 @@
</router-link>
</router-link>
</div>
</div>
</div>
</div>
</article>
<div
class=
"share"
>
<button
class=
"share-button"
>
<ShareNetwork
network=
"facebook"
:url=
"share_link"
title=
"TITLE"
description=
"DESCRIPTION"
quote=
"QUOTE"
>
<font-awesome-icon
:icon=
"['fab', 'facebook-square']"
size=
"lg"
/>
</ShareNetwork>
</button>
<button
class=
"share-button"
>
<ShareNetwork
network=
"twitter"
:url=
"share_link"
title=
"TITLE"
description=
"DESCRIPTION"
hashtags=
"Ordbøkene"
>
<font-awesome-icon
:icon=
"['fab', 'twitter-square']"
size=
"lg"
/>
</ShareNetwork>
</button>
</div>
</article>
</
template
>
</
template
>
<
script
src=
"/dist/vue-social-sharing.js"
></
script
>
<
script
>
<
script
>
import
DefElement
from
'
./DefElement.vue
'
import
DefElement
from
'
./DefElement.vue
'
import
Definition
from
'
./Definition.vue
'
import
Definition
from
'
./Definition.vue
'
...
@@ -81,6 +103,9 @@ export default {
...
@@ -81,6 +103,9 @@ export default {
article
:
this
.
article
article
:
this
.
article
}
}
},
},
share_link
:
function
()
{
return
'
https://beta.ordbok.uib.no/
'
+
this
.
dictionary
+
'
/
'
+
this
.
article
.
article_id
+
'
/
'
+
encodeURIComponent
(
this
.
article
.
lemmas
[
0
].
lemma
)
},
dictionary
:
function
()
{
dictionary
:
function
()
{
return
this
.
article
.
dictionary
return
this
.
article
.
dictionary
},
},
...
@@ -141,6 +166,16 @@ h3 {
...
@@ -141,6 +166,16 @@ h3 {
font-variant
:
small-caps
;
font-variant
:
small-caps
;
}
}
div
.share
{
color
:
#560027
;
padding-top
:
24px
;
}
.share-button
{
padding-right
:
4px
;
display
:
inline
;
}
section
.etymology
>
h3
,
section
.pronunciation
>
h3
{
section
.etymology
>
h3
,
section
.pronunciation
>
h3
{
display
:
inline
;
display
:
inline
;
font-size
:
14px
;
font-size
:
14px
;
...
...
This diff is collapsed.
Click to expand it.
src/main.js
+
11
−
0
View file @
6d5554ae
...
@@ -7,6 +7,17 @@ import VueRouter from 'vue-router'
...
@@ -7,6 +7,17 @@ import VueRouter from 'vue-router'
import
{
VuePlausible
}
from
'
vue-plausible
'
import
{
VuePlausible
}
from
'
vue-plausible
'
import
vuetify
from
'
./plugins/vuetify
'
import
vuetify
from
'
./plugins/vuetify
'
import
VueSocialSharing
from
'
vue-social-sharing
'
Vue
.
use
(
VueSocialSharing
);
import
{
library
}
from
'
@fortawesome/fontawesome-svg-core
'
import
{
faFacebookSquare
,
faTwitterSquare
}
from
'
@fortawesome/free-brands-svg-icons
'
import
{
FontAwesomeIcon
}
from
'
@fortawesome/vue-fontawesome
'
library
.
add
(
faFacebookSquare
,
faTwitterSquare
)
Vue
.
component
(
'
font-awesome-icon
'
,
FontAwesomeIcon
);
Vue
.
config
.
productionTip
=
false
Vue
.
config
.
productionTip
=
false
Vue
.
use
(
VueRouter
)
Vue
.
use
(
VueRouter
)
Vue
.
use
(
VuePlausible
,
{
Vue
.
use
(
VuePlausible
,
{
...
...
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