Skip to content

Commit 296cf71

Browse files
authored
Add SVG header (#5)
* paste in svg * responsive svg header
1 parent 06306ce commit 296cf71

File tree

4 files changed

+112
-9
lines changed

4 files changed

+112
-9
lines changed

Diff for: index.qmd

+21-7
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,25 @@ description: |
2222
---
2323

2424
```{=html}
25-
<div class="d-flex flex-column align-items-center gap-0" style="padding:6rem 0;">
26-
<image src="assets/images/turing-logo.svg" width="150px" alt="Three normal probability distributions">
27-
<span style="font-size:4rem;font-weight:700;">
28-
Turing.jl
29-
</span>
30-
<span class="display-6 d-block text-center pb-4 display-md-5 display-lg-4">
25+
<div class="line-graph">
26+
<div class="upperContent">
27+
<h1>Turing.jl</h1>
28+
</div>
29+
<div class="Animation">
30+
<svg width="2300" height="498" viewBox="0 0 2300 498" fill="none" xmlns="http://www.w3.org/2000/svg">
31+
<path class="line line1"
32+
d="M0 487C428.737 486.5 424.61 478.535 493.575 389C523.23 350.5 595.105 213 654.414 213C713.724 213 748.907 290 790.625 344.5C832.343 399 846.416 425.5 908.239 461.5C979.498 502.995 1144.47 487 2300 487"/>
33+
<path class="line line2"
34+
d="M0 485.5C212.654 485.5 378.977 486 565.45 486C751.923 486 763.644 514.469 852.448 292.5C881.709 219.36 911.829 96 950.052 96C988.276 96 1016.27 197.222 1050.19 287.031C1116.15 461.682 1136.64 484.016 1322.06 484.016C1416.28 484.016 2076.04 486.5 2300 486.5"/>
35+
<path class="line line3"
36+
d="M0 486.499C101.007 486.499 207.547 486.499 308.554 486.499C409.56 486.499 483.491 486.499 577.149 486.499C668.492 486.499 699.329 489.286 731.197 460.973C773.165 423.687 790.94 330.837 809.112 262.111C827.285 193.386 858.089 8 890.182 8C922.275 8 944 162.661 971.155 262.111C988.985 327.407 1006.43 426.95 1058.05 469.982C1081.26 489.327 1164.7 486.499 1248.64 486.499C1356.96 486.499 1406.25 486.499 1516.74 486.499C1627.23 486.499 2191.68 487 2300 487"/>
37+
</svg>
38+
</div>
39+
</div>
40+
<span class="display-6 d-block text-center py-5 display-md-5 display-lg-4">
3141
Bayesian inference with probabilistic programming
32-
</span>
42+
</span>
43+
<div class="d-flex flex-column align-items-center gap-0 pb-5">
3344
<div class="d-flex flex-row flex-wrap panel-wrapper gap-2">
3445
<a href="https://turinglang.org/docs/tutorials/docs-00-getting-started/" class="button--fill btn">
3546
Tutorials
@@ -42,6 +53,9 @@ description: |
4253
</a>
4354
</div>
4455
</div>
56+
```
57+
58+
```{=html}
4559
<div class="d-flex flex-row flex-wrap panel-wrapper gap-4 section-end-space">
4660
<div class="panel">
4761
<div class="panel-title pb-1">

Diff for: theming/dark.scss

+1
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ $theme: "cosmo" !default;
1616
@import "rules/hoverables-dark";
1717
@import "rules/navbar";
1818
@import "rules/quarto-tweaks";
19+
@import "rules/svg";
1920

2021
@import "old/old-styles";
2122

Diff for: theming/light.scss

+1-2
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
@import "rules/hoverables-light";
1414
@import "rules/navbar";
1515
@import "rules/quarto-tweaks";
16+
@import "rules/svg";
1617

1718
@import "old/old-styles";
18-
19-
//

Diff for: theming/rules/_svg.scss

+89
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
.line-graph {
2+
/* height: 85vh; */
3+
width: 100%;
4+
padding-top: 5%;
5+
position: relative;
6+
}
7+
8+
svg {
9+
width: 100%;
10+
height: 100%;
11+
}
12+
13+
@keyframes draw {
14+
to {
15+
stroke-dashoffset: 0;
16+
}
17+
}
18+
19+
.line {
20+
fill: none;
21+
stroke-width: 7;
22+
stroke-dasharray: 3900;
23+
stroke-dashoffset: 3900;
24+
animation: draw 6s forwards ease-in-out;
25+
stroke-opacity: 1;
26+
}
27+
28+
.line1 {
29+
stroke: #b352cc;
30+
animation-delay: 0s;
31+
}
32+
33+
.line2 {
34+
stroke: #cc3333;
35+
animation-delay: 0.5s;
36+
}
37+
38+
.line3 {
39+
stroke: #218921;
40+
animation-delay: 1s;
41+
}
42+
43+
.upperContent {
44+
width: 88%;
45+
text-align: end;
46+
padding-top: 7%;
47+
padding-right: 10%;
48+
position: absolute;
49+
z-index: 5;
50+
opacity: 0;
51+
animation: fadeInText 2s forwards ease-in-out;
52+
animation-delay: 3s;
53+
54+
@media screen and (max-width: 768px) {
55+
width: 100%;
56+
padding-top: 0%;
57+
padding-right: 0%;
58+
text-align: center;
59+
}
60+
}
61+
62+
.upperContent > h1 {
63+
font-size: 5rem;
64+
font-family: "Gill Sans", "Gill Sans MT", Calibri, "Trebuchet MS", sans-serif;
65+
66+
@media screen and (max-width: 992px) {
67+
font-size: 3.5rem;
68+
}
69+
}
70+
71+
.upperContent > p {
72+
font-size: 25px;
73+
font-family: "Gill Sans", "Gill Sans MT", Calibri, "Trebuchet MS", sans-serif;
74+
margin-top: 5%;
75+
}
76+
77+
.upperContent > h1,
78+
79+
.upperContent > p {
80+
margin: 0;
81+
padding: 0;
82+
}
83+
84+
@keyframes fadeInText {
85+
to {
86+
opacity: 1;
87+
transform: translateY(0);
88+
}
89+
}

0 commit comments

Comments
 (0)