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
b8d1cf53
Commit
b8d1cf53
authored
3 years ago
by
Henrik Askjer
Browse files
Options
Downloads
Patches
Plain Diff
Add share button
parent
6bb946b3
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/components/ArticleFooter.vue
+8
-3
8 additions, 3 deletions
src/components/ArticleFooter.vue
src/main.js
+0
-8
0 additions, 8 deletions
src/main.js
src/plugins/vuetify.js
+28
-0
28 additions, 0 deletions
src/plugins/vuetify.js
with
36 additions
and
11 deletions
src/components/ArticleFooter.vue
+
8
−
3
View file @
b8d1cf53
...
...
@@ -3,14 +3,15 @@
<span
v-if=
"webShareApiSupported"
>
<button
class=
"share_button"
@
click=
"shareViaWebShare"
>
<span
class =
"share_text"
>
Del ordet
</span>
<
font-awesome-icon
icon
=
"
share
-alt-square"
size =
"lg"
/
>
<
v-icon
dense
>
$vuetify.
icon
s.
share
</v-icon
>
</button>
</span>
<span
v-else
>
<button
class=
"share_button"
>
<ShareNetwork
network=
"facebook"
title=
""
:url=
"share_link"
>
<
font-awesome-icon
:icon=
"['fab', 'facebook-square']"
size=
"lg"
/
>
<
v-icon
dense
>
$vuetify.icons.facebook
</v-icon
>
</ShareNetwork>
</button>
<button
class=
"share_button"
>
...
...
@@ -19,7 +20,7 @@
:url=
"share_link"
:title=
"dict_label"
hashtags=
"#ordbøkene"
>
<
font-awesome-icon
:icon=
"['fab', 'twitter-square']"
size=
"lg"
/
>
<
v-icon
dense
>
$vuetify.icons.twitter
</v-icon
>
</ShareNetwork>
</button>
</span>
...
...
@@ -67,6 +68,10 @@ export default {
padding-right
:
10px
;
}
.v-icon
{
color
:
var
(
--v-primary-base
)
!important
;
}
.share_button
{
padding-right
:
4px
;
font-weight
:
bold
;
...
...
This diff is collapsed.
Click to expand it.
src/main.js
+
0
−
8
View file @
b8d1cf53
...
...
@@ -11,14 +11,6 @@ import VueSocialSharing from 'vue-social-sharing'
Vue
.
use
(
VueSocialSharing
);
import
{
library
}
from
'
@fortawesome/fontawesome-svg-core
'
import
{
faShareAltSquare
}
from
'
@fortawesome/free-solid-svg-icons
'
import
{
faFacebookSquare
,
faTwitterSquare
}
from
'
@fortawesome/free-brands-svg-icons
'
import
{
FontAwesomeIcon
}
from
'
@fortawesome/vue-fontawesome
'
library
.
add
(
faFacebookSquare
,
faTwitterSquare
,
faShareAltSquare
)
Vue
.
component
(
'
font-awesome-icon
'
,
FontAwesomeIcon
);
Vue
.
config
.
productionTip
=
false
Vue
.
use
(
VueRouter
)
Vue
.
use
(
VuePlausible
,
{
...
...
This diff is collapsed.
Click to expand it.
src/plugins/vuetify.js
+
28
−
0
View file @
b8d1cf53
import
Vue
from
'
vue
'
;
import
'
material-design-icons-iconfont/dist/material-design-icons.css
'
;
import
Vuetify
from
'
vuetify/lib/framework
'
;
import
{
library
}
from
'
@fortawesome/fontawesome-svg-core
'
import
{
faShareAltSquare
}
from
'
@fortawesome/free-solid-svg-icons
'
import
{
faFacebookSquare
,
faTwitterSquare
}
from
'
@fortawesome/free-brands-svg-icons
'
import
{
FontAwesomeIcon
}
from
'
@fortawesome/vue-fontawesome
'
library
.
add
(
faFacebookSquare
,
faTwitterSquare
,
faShareAltSquare
)
Vue
.
component
(
'
font-awesome-icon
'
,
FontAwesomeIcon
);
Vue
.
use
(
Vuetify
);
const
FONTAWESOME_ICONS
=
{
facebook
:
{
component
:
FontAwesomeIcon
,
props
:
{
icon
:
[
"
fab
"
,
"
facebook-square
"
]
}
},
twitter
:
{
component
:
FontAwesomeIcon
,
props
:
{
icon
:
[
"
fab
"
,
"
twitter-square
"
]
}
},
share
:
{
component
:
FontAwesomeIcon
,
props
:
{
icon
:
"
share-alt-square
"
}
}
}
export
default
new
Vuetify
({
breakpoint
:
{
thresholds
:
{
...
...
@@ -34,5 +61,6 @@ export default new Vuetify({
},
icons
:
{
iconfont
:
'
md
'
,
values
:
FONTAWESOME_ICONS
,
}
});
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