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
d14a7922
Commit
d14a7922
authored
7 years ago
by
syuilo
Browse files
Options
Downloads
Patches
Plain Diff
wip
parent
dbd3cdb3
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/web/app/common/tags/url.tag
+0
-54
0 additions, 54 deletions
src/web/app/common/tags/url.tag
src/web/app/common/tags/url.vue
+63
-0
63 additions, 0 deletions
src/web/app/common/tags/url.vue
with
63 additions
and
54 deletions
src/web/app/common/tags/url.tag
deleted
100644 → 0
+
0
−
54
View file @
dbd3cdb3
<mk-url>
<a href={ url } target={ opts.target }>
<span class="schema">{ schema }//</span>
<span class="hostname">{ hostname }</span>
<span class="port" if={ port != '' }>:{ port }</span>
<span class="pathname" if={ pathname != '' }>{ pathname }</span>
<span class="query">{ query }</span>
<span class="hash">{ hash }</span>
%fa:external-link-square-alt%
</a>
<style>
:scope
word-break break-all
> a
> [data-fa]
padding-left 2px
font-size .9em
font-weight 400
font-style normal
> .schema
opacity 0.5
> .hostname
font-weight bold
> .pathname
opacity 0.8
> .query
opacity 0.5
> .hash
font-style italic
</style>
<script>
this.url = this.opts.href;
this.on('before-mount', () => {
const url = new URL(this.url);
this.schema = url.protocol;
this.hostname = url.hostname;
this.port = url.port;
this.pathname = url.pathname;
this.query = url.search;
this.hash = url.hash;
this.update();
});
</script>
</mk-url>
This diff is collapsed.
Click to expand it.
src/web/app/common/tags/url.vue
0 → 100644
+
63
−
0
View file @
d14a7922
<
template
>
<a
:href=
"url"
:target=
"target"
>
<span
class=
"schema"
>
{{
schema
}}
//
</span>
<span
class=
"hostname"
>
{{
hostname
}}
</span>
<span
class=
"port"
v-if=
"port != ''"
>
:
{{
port
}}
</span>
<span
class=
"pathname"
v-if=
"pathname != ''"
>
{{
pathname
}}
</span>
<span
class=
"query"
>
{{
query
}}
</span>
<span
class=
"hash"
>
{{
hash
}}
</span>
%fa:external-link-square-alt%
</a>
</
template
>
<
script
lang=
"typescript"
>
export
default
{
props
:
[
'
url
'
,
'
target
'
],
created
:
function
()
{
const
url
=
new
URL
(
this
.
url
);
this
.
schema
=
url
.
protocol
;
this
.
hostname
=
url
.
hostname
;
this
.
port
=
url
.
port
;
this
.
pathname
=
url
.
pathname
;
this
.
query
=
url
.
search
;
this
.
hash
=
url
.
hash
;
},
data
:
{
schema
:
null
,
hostname
:
null
,
port
:
null
,
pathname
:
null
,
query
:
null
,
hash
:
null
}
};
</
script
>
<
style
lang=
"stylus"
scoped
>
:scope
word-break break-all
> a
> [data-fa]
padding-left 2px
font-size .9em
font-weight 400
font-style normal
> .schema
opacity 0.5
> .hostname
font-weight bold
> .pathname
opacity 0.8
> .query
opacity 0.5
> .hash
font-style italic
</
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