Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
SVG on the Web - Use Cases
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD 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
Heider, Martin
SVG on the Web - Use Cases
Commits
21e16939
Commit
21e16939
authored
10 months ago
by
Heider, Martin
Browse files
Options
Downloads
Patches
Plain Diff
website changes
parent
bd20082d
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
src/css/style.css
+14
-6
14 additions, 6 deletions
src/css/style.css
src/icons/text.svg
+1
-1
1 addition, 1 deletion
src/icons/text.svg
src/ts/icon-definitions.ts
+1
-1
1 addition, 1 deletion
src/ts/icon-definitions.ts
src/ts/page.ts
+7
-1
7 additions, 1 deletion
src/ts/page.ts
with
23 additions
and
9 deletions
src/css/style.css
+
14
−
6
View file @
21e16939
svg
{
margin
:
1rem
;
fill
:
black
;
}
...
...
@@ -6,19 +7,21 @@ svg:hover {
fill
:
olivedrab
;
}
svg
:disabled
{
.i
{
fill
:
gray
;
}
.i
:hover
{
fill
:
red
;
}
input
[
type
=
"checkbox"
]
+
label
{
width
:
2
em
;
height
:
1
em
;
margin-left
:
0.5
em
;
width
:
4r
em
;
height
:
2r
em
;
margin-left
:
1
em
;
background-size
:
cover
;
background-repeat
:
no-repeat
;
display
:
inline-block
;
fill
:
var
(
--slider-fill-off
);
stroke
:
var
(
--slider-stroke-off
);
cursor
:
pointer
;
}
...
...
@@ -26,4 +29,9 @@ input[type="checkbox"]:checked + label {
transform
:
scaleX
(
-1
);
fill
:
olivedrab
;
stroke
:
olivedrab
;
}
div
{
margin
:
auto
;
max-width
:
60%
;
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
src/icons/text.svg
+
1
−
1
View file @
21e16939
<svg
viewBox=
"0 0
1
00
10
0"
<svg
viewBox=
"0 0
2
00
2
0"
xmlns=
"http://www.w3.org/2000/svg"
>
<text
x=
"15"
y=
"15"
>
This is example text.
</text>
</svg>
\ No newline at end of file
This diff is collapsed.
Click to expand it.
src/ts/icon-definitions.ts
+
1
−
1
View file @
21e16939
...
...
@@ -28,7 +28,7 @@ export const settings_icon = `<svg viewBox="0 0 100 100" xmlns:xlink="http://w
export
const
slider_icon
=
`<svg viewBox="0 0 100 50" xmlns="http://www.w3.org/2000/svg"> <line stroke-linecap="round" x1="20" y1="25" x2="80" y2="25" stroke-width="30"/> <circle cx="25" cy="25" r="23" stroke-width="3"/> </svg>`
;
export
const
text_icon
=
`<svg viewBox="0 0
1
00
10
0" xmlns="http://www.w3.org/2000/svg"> <text x="15" y="15">This is example text.</text> </svg>`
;
export
const
text_icon
=
`<svg viewBox="0 0
2
00
2
0" xmlns="http://www.w3.org/2000/svg"> <text x="15" y="15">This is example text.</text> </svg>`
;
export
const
toc_icon
=
`<svg viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg"> <line x1="5" y1="10" x2="5" y2="95" stroke-dasharray="15, 15" style="stroke-width:20"/> <line x1="25" y1="17.5" x2="100" y2="17.5" style="stroke-width:10"/> <line x1="25" y1="47.5" x2="100" y2="47.5" style="stroke-width:10"/> <line x1="25" y1="77.5" x2="100" y2="77.5" style="stroke-width:10"/> </svg>`
;
...
...
This diff is collapsed.
Click to expand it.
src/ts/page.ts
+
7
−
1
View file @
21e16939
...
...
@@ -13,12 +13,18 @@ export const Content = `
<input id="submit" type="button" value="Change Font">
<label id="text-svg" for="submit">`
+
i
.
text_icon
+
`</label>
</form>
<div><div><div><div>
<i class="i">`
+
i
.
overview_icon
+
`</i>
<i>`
+
i
.
overview_icon
+
i
.
overview_icon
+
i
.
overview_icon
+
`</i>
</div></div></div></div>
`
function
start
()
{
const
body
=
document
.
getElementById
(
"
body
"
);
const
content
=
document
.
createElement
(
"
div
"
);
content
.
style
.
width
=
"
100%
"
;
content
.
style
.
textAlign
=
"
center
"
content
.
innerHTML
=
Content
;
body
.
appendChild
(
content
);
...
...
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