Skip to content

Commit 03776e3

Browse files
authored
Add news (#3)
* quickfix alignment * add news and clean up scss
1 parent 9970ad6 commit 03776e3

15 files changed

+263
-172
lines changed

Diff for: index.qmd

+68-96
Original file line numberDiff line numberDiff line change
@@ -1,66 +1,77 @@
11
---
22
# pagetitle: "Turing"
33
toc: false
4-
page-layout: custom
4+
page-layout: full
55
section-divs: false
66
hide-description: true
7+
listing:
8+
- id: news
9+
contents:
10+
- "news/posts/*/index.qmd"
11+
sort: date desc
12+
type: grid
13+
grid-columns: 3
14+
categories: false
15+
sort-ui: false
16+
filter-ui: false
17+
fields: [title, description, date]
18+
max-items: 3
19+
image-height: "200"
720
description: |
821
Turing.jl is a probabilistic programming language and Bayesian modelling framework for the Julia programming language.
922
---
1023

1124
```{=html}
12-
<div class="content-panel">
13-
<div class="d-flex flex-column align-items-center gap-0" style="padding:6rem 0;">
14-
<image src="assets/images/turing-logo.svg" width="150px" alt="Three normal probability distributions">
15-
<span style="font-size:4rem;font-weight:700;">
16-
Turing.jl
17-
</span>
18-
<span class="display-6 d-block text-center pb-4 display-md-5 display-lg-4">
19-
Bayesian inference with probabilistic programming
20-
</span>
21-
<div class="d-flex flex-row flex-wrap justify-content-center gap-2">
22-
<a href="https://turinglang.org/docs/tutorials/docs-00-getting-started/" class="button--fill btn">
23-
Tutorials
24-
</a>
25-
<a href="/library" class="button btn">
26-
Ecosystem
27-
</a>
28-
<a href="https://github.com/TuringLang" class="button btn">
29-
View on GitHub
30-
</a>
31-
</div>
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">
31+
Bayesian inference with probabilistic programming
32+
</span>
33+
<div class="d-flex flex-row flex-wrap justify-content-center gap-2">
34+
<a href="https://turinglang.org/docs/tutorials/docs-00-getting-started/" class="button--fill btn">
35+
Tutorials
36+
</a>
37+
<a href="/library" class="button btn">
38+
Ecosystem
39+
</a>
40+
<a href="https://github.com/TuringLang" class="button btn">
41+
View on GitHub
42+
</a>
3243
</div>
33-
<div class="d-flex flex-row flex-wrap justify-content-center gap-3" style="padding-bottom:6rem;">
34-
<div class="card">
35-
<div class="card-title">
36-
Intuitive
37-
</div>
38-
Turing models are easy to write and communicate — syntax is close to mathematical notations.
44+
</div>
45+
<div class="d-flex flex-row flex-wrap justify-content-center gap-4 section-end-space">
46+
<div class="panel">
47+
<div class="panel-title">
48+
Intuitive
3949
</div>
40-
<div class="card">
41-
<div class="card-title">
42-
General-purpose
43-
</div>
44-
Turing supports models with discrete parameters and stochastic control flow.
50+
Turing models are easy to write and communicate — syntax is close to mathematical notations.
51+
</div>
52+
<div class="panel">
53+
<div class="panel-title">
54+
General-purpose
4555
</div>
46-
<div class="card">
47-
<div class="card-title">
48-
Modular & composable
49-
</div>
50-
Turing is modular, written entirely in Julia, and is interoperable with the powerful Julia ecosystem.
56+
Turing supports models with discrete parameters and stochastic control flow.
57+
</div>
58+
<div class="panel">
59+
<div class="panel-title">
60+
Modular & composable
5161
</div>
62+
Turing is modular, written entirely in Julia, and is interoperable with the powerful Julia ecosystem.
5263
</div>
5364
</div>
5465
```
55-
<div class="content-panel">
56-
<div class="d-flex flex-row flex-wrap justify-content-center gap-3">
57-
<div style="min-width:420px; max-width:420px;text-align:right;padding:0.5rem;">
58-
<div style="font-size:x-large;font-weight:700;padding-bottom:0.5rem;">
66+
67+
<div class="d-flex flex-row flex-wrap justify-content-center gap-3 pb-2">
68+
<div class="example-text" style="text-align:right;padding:0.5rem;">
69+
<div class="fs-4 fw-bold pb-1">
5970
Hello, World in Turing
6071
</div>
6172
Some text about how easy it is to [get going](https://turinglang.org/docs/tutorials/00-introduction/).
6273
</div>
63-
<div style="min-width:500px;">
74+
<div class="example-code">
6475
```julia
6576
@model function coinflip(; N::Int)
6677
# Prior belief about the probability of heads
@@ -75,8 +86,14 @@ end;
7586
```
7687
</div>
7788
</div>
78-
<div class="d-flex flex-row flex-wrap justify-content-center gap-3">
79-
<div style="min-width:500px;">
89+
<div class="d-flex flex-row-reverse flex-wrap justify-content-center gap-3 pt-2 section-end-space">
90+
<div class="example-text" style="padding:0.5rem;">
91+
<div class="fs-4 fw-bold pb-1">
92+
Goodbye, World in Turing
93+
</div>
94+
Some text about how easy it is to interface with external packages like AbstractGPs. Learn more about modelling [Gaussian Processes](https://turinglang.org/docs/tutorials/15-gaussian-processes/) with Turing.jl.
95+
</div>
96+
<div class="example-code">
8097
```julia
8198
@model function putting_model(d, n; jitter=1e-4)
8299
v ~ Gamma(2, 1)
@@ -89,60 +106,15 @@ end;
89106
end
90107
```
91108
</div>
92-
<div style="min-width:420px; max-width:420px;padding:0.5rem;">
93-
<div style="font-size:x-large;font-weight:700;padding-bottom:0.5rem;">
94-
Goodbye, World in Turing
95-
</div>
96-
Some text about how easy it is to interface with external packages like AbstractGPs. Learn more about modelling [Gaussian Processes](https://turinglang.org/docs/tutorials/15-gaussian-processes/) with Turing.jl.
97-
</div>
98109
</div>
99-
</div>
100-
101-
102-
<!--
103-
::: {.hero-banner}
104-
::: {.grid}
105-
::: {.g-col-1}
106-
:::
107-
::: {.g-col-8}
108-
109-
# Turing.jl: Bayesian inference with probabilistic programming.
110-
111-
### Intuitive
112-
Turing models are easy to write and communicate — syntax is close to mathematical notations.
113110

114-
### General-purpose
115-
Turing supports models with discrete parameters and stochastic control flow.
116-
117-
### Modular and composable
118-
Turing is modular, written entirely in Julia, and is interoperable with the powerful Julia ecosystem.
119-
120-
121-
::: {.hero-buttons style="position: relative; display: flex; justify-content: center;"}
122-
[Get Started]({{< meta get-started >}}){.btn-action-primary .btn-action .btn .btn-lg role="button" style="background-color: #073c44; color: white"}
123-
:::
124-
125-
::: {.g-col-3}
126-
:::
127-
:::
128-
:::
129-
130-
:::
111+
```{=html}
112+
<div class="pb-3 fs-2 fw-bold">
113+
News
114+
</div>
115+
```
116+
::: {#news}
131117

132-
::: {style="position: relative; display: flex; justify-content: center;"}
133-
::: {.grid}
134-
::: {.g-col-1}
135118
:::
136-
::: {.g-col-8}
137-
## Community Resources
138-
139-
The Turing.jl [discourse forum](https://discourse.julialang.org/c/domain/probprog) provides support and discussion for all user levels.
140-
The [Turing.jl documentation]({{< meta get-started >}}) and [official tutorials]({{< meta tutorials-intro >}}) help users learn and use Turing.jl!
141-
There's also a [tutorial in Bayesian Statistics using Julia and Turing.jl](https://storopoli.io/Bayesian-Julia).
142119

143-
:::
144-
::: {.g-col-3}
145-
:::
146-
:::
147-
:::
148-
-->
120+
[See all news &rarr;](news/)

Diff for: theming/dark.scss

+8-4
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,19 @@
33
// Bootswatch
44

55
$theme: "cosmo" !default;
6+
@import "variables/greys";
67
@import "variables/colorsdark";
78
@import "variables/borders";
9+
@import "variables/spacers";
810

911
/*-- scss:rules --*/
1012

13+
@import "rules/mixins";
14+
1115
@import "rules/layouts";
12-
@import "rules/cards";
13-
@import "rules/buttons";
16+
@import "rules/hoverables-dark";
17+
@import "rules/panels";
1418
@import "rules/navbar";
15-
@import "rules/sourceCode";
19+
@import "rules/codeblocks";
1620

17-
//
21+
@import "old/old-styles";

Diff for: theming/light.scss

+9-3
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,19 @@
11
/*-- scss:defaults --*/
22

3+
@import "variables/greys";
34
@import "variables/colorslight";
45
@import "variables/borders";
6+
@import "variables/spacers";
57

68
/*-- scss:rules --*/
79

10+
@import "rules/mixins";
11+
812
@import "rules/layouts";
9-
@import "rules/cards";
10-
@import "rules/buttons";
13+
@import "rules/hoverables-light";
14+
@import "rules/panels";
1115
@import "rules/navbar";
12-
@import "rules/sourceCode";
16+
@import "rules/codeblocks";
17+
18+
@import "old/old-styles";
1319

Diff for: theming/old/_old-styles.scss

+47
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
/* css styles */
2+
/* .cell-output {
3+
background-color: #f1f3f5;
4+
} */
5+
6+
/* .cell-output img {
7+
max-width: 100%;
8+
height: auto;
9+
} */
10+
11+
/* .cell-output-display pre {
12+
word-break: break-wor !important;
13+
white-space: pre-wrap !important;
14+
}
15+
*/
16+
17+
/* now included in _navbar.scss
18+
.navbar a:hover {
19+
text-decoration: none;
20+
}
21+
*/
22+
23+
.cell-output {
24+
border: 1px dashed;
25+
}
26+
27+
.cell-output-stdout code {
28+
word-break: break-wor !important;
29+
white-space: pre-wrap !important;
30+
}
31+
32+
33+
.cell-output-display svg {
34+
height: fit-content;
35+
width: fit-content;
36+
}
37+
38+
.cell-output-display img {
39+
max-width: 100%;
40+
max-height: 100%;
41+
object-fit: contain;
42+
}
43+
44+
.nav-footer-center {
45+
display: flex;
46+
justify-content: center;
47+
}

Diff for: theming/rules/_buttons.scss

-24
This file was deleted.
File renamed without changes.

Diff for: theming/rules/_hoverables-dark.scss

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
$hover-border: lighten($color-secondary, 5%);
2+
3+
.button {
4+
@include button($hover-border)
5+
}
6+
7+
.card {
8+
@include card($hover-border)
9+
}
10+
11+
.example-code {
12+
flex: 0 1 45%;
13+
14+
@media screen and (max-width: 992px) {
15+
flex: 0 1 100%;
16+
}
17+
}
18+
19+
.example-text {
20+
flex: 0 1 53%;
21+
22+
@media screen and (max-width: 992px) {
23+
flex: 0 1 100%;
24+
}
25+
}

Diff for: theming/rules/_hoverables-light.scss

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
$hover-border: darken($color-secondary, 15%);
2+
3+
.button {
4+
@include button($hover-border)
5+
}
6+
7+
.card {
8+
@include card($hover-border)
9+
}
10+
11+
.example-code {
12+
flex: 0 1 45%;
13+
14+
@media screen and (max-width: 992px) {
15+
flex: 0 1 100%;
16+
}
17+
}
18+
19+
.example-text {
20+
flex: 0 1 53%;
21+
22+
@media screen and (max-width: 992px) {
23+
flex: 0 1 100%;
24+
}
25+
}

Diff for: theming/rules/_layouts.scss

+4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
11
.content-panel {
22
padding: 1.5rem;
33
}
4+
5+
.section-end-space {
6+
padding-bottom: $large-y-space;
7+
}

0 commit comments

Comments
 (0)