Skip to content

Commit a0f6989

Browse files
committed
Update for JuliaLangJa
1 parent 88ddb9f commit a0f6989

File tree

6 files changed

+76
-175
lines changed

6 files changed

+76
-175
lines changed

Diff for: _assets/julialangja-biglogo.png

19.7 KB
Loading

Diff for: _css/julialangja.css

+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
header.page-header {
2+
display: block;
3+
text-align: center;
4+
}
5+
6+
header.page-header h2 {
7+
text-align: center;
8+
font-size: 1.25rem;
9+
font-weight: normal;
10+
}
11+
12+
.btn {
13+
padding: 0.75rem 1rem;
14+
display: inline-block;
15+
margin-bottom: 1rem;
16+
border-style: solid;
17+
border-width: 1px;
18+
border-radius: 2rem;
19+
color: rgba(0, 0, 0, 1);
20+
transition: color 0.2s, background-color 0.2s, border-color 0.2s;
21+
text-decoration: none;
22+
}
23+
24+
.btn:hover {
25+
color: rgba(50, 50, 50, 0.8);
26+
text-decoration: none;
27+
background-color: rgba(200,200,200,0.2);
28+
border-color: rgba(0, 0, 0, 0.3);
29+
}
30+
31+
.page-foot {
32+
text-align: left;
33+
}

Diff for: _layout/head.html

+2
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,11 @@
77
{{if hascode}} {{insert head_highlight.html }} {{end}}
88
<link rel="stylesheet" href="/css/franklin.css">
99
<link rel="stylesheet" href="/css/basic.css">
10+
<link rel="stylesheet" href="/css/julialangja.css">
1011
<link rel="icon" href="/assets/favicon.png">
1112
{{isdef title}} <title>{{fill title}}</title> {{end}}
1213
</head>
1314
<body>
15+
{{ispage index}}{{insert title.html}}{{end}}
1416

1517
<!-- Content appended here -->

Diff for: _layout/page_foot.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
<div class="page-foot">
2-
<a href="http://creativecommons.org/licenses/by-sa/4.0/">CC BY-SA 4.0</a> {{ fill author }}. {{isnotpage /tag/*}}Last modified: {{ fill fd_mtime }}.{{end}}
3-
Website built with <a href="https://github.com/tlienart/Franklin.jl">Franklin.jl</a> and the <a href="https://julialang.org">Julia programming language</a>.
2+
JuliaLangJa は有志の Julia ユーザによって運営されています。<br>
3+
このウェブサイトは <a href="https://github.com/tlienart/Franklin.jl">Franklin.jl</a> <a href="https://julialang.org">Julia </a> で生成されています。
44
</div>

Diff for: _layout/title.html

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<header class="page-header" role="banner">
2+
<h1><img src="assets/julialangja-biglogo.png"></h1>
3+
<h2>JuiaLangJa Discord</h2>
4+
<a href="{{fill discord_invite_link}}" class="btn">
5+
Join to JuliaLangJa Discord server
6+
</a>
7+
<hr>
8+
</header>

Diff for: index.md

+31-173
Original file line numberDiff line numberDiff line change
@@ -1,187 +1,45 @@
1-
@def title = "Franklin Example"
2-
@def tags = ["syntax", "code"]
1+
@def title = "JuliaLangJa Discord"
2+
@def hasmath = false
33

4-
# How to use Franklin
4+
**JuliaLangJa は Julia プログラマー同士の交流を目的とした Discord サーバー**です。
55

6-
\tableofcontents <!-- you can use \toc as well -->
6+
参加者の技術レベルに関わらず、質問・相談・情報交換を気軽にできる場を目指しています。
77

8-
This section is meant as a refresher if you're new to Franklin.
9-
Have a look at both how the website renders and the corresponding markdown (`index.md`).
10-
Modify at will to get a feeling for how things work!
8+
Julia を勉強中でまだ経験が浅い**入門者や学生さんも大歓迎**です。
119

12-
Ps: if you want to modify the header or footer or the general look of the website, adjust the files in
13-
* `src/_css/` and
14-
* `src/_html_parts/`.
10+
勉強をしていて経験者に教えて欲しいことや困ったことがあればいつでも相談してください。
1511

16-
## The base with Markdown
12+
なお、JuliaLangJa に参加する方は、利用前に下記の「行動規範」を必ずご一読ください。
1713

18-
The [standard markdown syntax](https://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet) can be used such as titles using `#`, lists:
14+
JuliaLangJa は**世代や所属組織の垣根を超えて、Julia に興味を持つ人々同士が交流できる場**を提供してまいります。
1915

20-
* element with **bold**
21-
* element with _emph_
16+
# 行動規範
2217

23-
or code-blocks `inline` or with highlighting (note the `@def hascode = true` in the source to allow [highlight.js](https://highlightjs.org/) to do its job):
18+
- 上級者は、入門者や学習者にやさしく接するようにしてください
19+
- 議論が白熱しても、相手を罵ったり傷つけることがないようにしてください
20+
- 性別/性的指向/障碍の有無/政治/宗教/民族/人種/年齢/能力などに関わりなく、誰もが気持ちよく交流できるようにしましょう
21+
- ソフトウェアの作者を含む "他者へのリスペクトに欠けるような発言" は控えましょう
22+
- 著しく問題がある行動が確認できた場合、対象者の利用を停止することもありますのでご了承ください
23+
- 上記の行動規範に加えて [Julia Community - Standards](https://julialang.org/community/standards/) にも従いましょう
2424

25-
```julia
26-
abstract type Point end
27-
struct PointR2{T<:Real} <: Point
28-
x::T
29-
y::T
30-
end
31-
struct PointR3{T<:Real} <: Point
32-
x::T
33-
y::T
34-
z::T
35-
end
36-
function len(p::T) where T<:Point
37-
sqrt(sum(getfield(p, η)^2 for η fieldnames(T)))
38-
end
39-
```
25+
# JuliaLangJa の使い方
4026

41-
You can also quote stuff
27+
- JuliaLangJa は参加者の技術レベルに関わらず、質問・相談・情報交換ができる場です
28+
- 過去ログをすべて読んだり、場の空気を読んだりする必要はありません
29+
<!-- - チャンネルの作成も絵文字の追加も、誰でも自由に行ってください。許可は不要です -->
30+
- 絵文字は著作権的に不適切なもの、他者を不快にさせるものは削除することがあります
31+
- 一定期間利用されていないチャンネルは、予告なくアーカイブすることがあります。もしも戻したい場合はいつでも戻してください
32+
- 情報量が多いので、ご自身の好きなチャンネルを購読しマイペースで楽しんでください
33+
- 趣味でプログラミングを楽しんでいる方も、これから Julia を勉強したい方も大歓迎です
4234

43-
> You must have chaos within you to ...
35+
# Julia 入門者・学生の方へ
4436

45-
or have tables:
37+
- いろいろなチャンネルがありますが `#newbie` という初学者用のチャンネル、 `#students` という学生向けのチャンネルがおすすめです
38+
- オンラインのプログラミング学習コースや参考書で遭遇した不明点や学習方法など、何でも気軽に聞いてください
39+
- 答えだけを教えてもらうのではなく「答えを導くまでの考え方」や「なぜそのように書くのか」を教えてもらうようにするとスキルアップに繋がると思います
40+
- どのチャンネルに質問して良いか分からなければ、まず `#newbie``#support` で質問してみると良いでしょう。より適切なチャンネルがあれば誰かがリンクを貼ってくれます
4641

47-
| English | Mandarin |
48-
| --------------- | ---------- |
49-
| winnie the pooh | 维尼熊 |
42+
# 自己紹介をしましょう
5043

51-
Note that you may have to do a bit of CSS-styling to get these elements to look the way you want them (the same holds for the whole page in fact).
52-
53-
### Symbols and html entities
54-
55-
If you want a dollar sign you have to escape it like so: \$, you can also use html entities like so: &rarr; or &pi; or, if you're using Juno for instance, you can use `\pi[TAB]` to insert the symbol as is: π (it will be converted to a html entity).[^1]
56-
57-
If you want to show a backslash, just use it like so: \ ; if you want to force a line break, use a ` \\ ` like \\ so (this is on a new line).[^blah]
58-
59-
If you want to show a backtick, escape it like so: \` and if you want to show a tick in inline code use double backticks like ``so ` ...``.
60-
61-
Footnotes are nice too:
62-
63-
[^1]: this is the text for the first footnote, you can style all this looking at `.fndef` elements; note that the whole footnote definition is _expected to be on the same line_.
64-
[^blah]: and this is a longer footnote with some blah from veggie ipsum: turnip greens yarrow ricebean rutabaga endive cauliflower sea lettuce kohlrabi amaranth water spinach avocado daikon napa cabbage asparagus winter purslane kale. Celery potato scallion desert raisin horseradish spinach carrot soko.
65-
66-
## Basic Franklin extensions
67-
68-
### Divs
69-
70-
It is sometimes useful to have a short way to make a part of the page belong to a div so that it can be styled separately.
71-
You can do this easily with Franklin by using `@@divname ... @@`.
72-
For instance, you could want a blue background behind some text.
73-
74-
@@colbox-blue
75-
Here we go! (this is styled in the css sheet with name "colbox-blue").
76-
@@
77-
78-
Since it's just a `<div>` block, you can put this construction wherever you like and locally style your text.
79-
80-
### LaTeX and Maths
81-
82-
Essentially three things are imitated from LaTeX
83-
84-
1. you can introduce definitions using `\newcommand`
85-
1. you can use hyper-references with `\eqref`, `\cite`, ...
86-
1. you can show nice maths (via KaTeX)
87-
88-
The definitions can be introduced in the page or in the `config.md` (in which case they're available everywhere as opposed to just in that page).
89-
For instance, the commands `\scal` and `\R` are defined in the config file (see `src/config.md`) and can directly be used whereas the command `\E` is defined below (and therefore only available on this page):
90-
91-
\newcommand{\E}[1]{\mathbb E\left[#1\right]}
92-
93-
Now we can write something like
94-
95-
$$ \varphi(\E{X}) \le \E{\varphi(X)}. \label{equation blah} $$
96-
97-
since we've given it the label `\label{equation blah}`, we can refer it like so: \eqref{equation blah} which can be convenient for pages that are math-heavy.
98-
99-
In a similar vein you can cite references that would be at the bottom of the page: \citep{noether15, bezanson17}.
100-
101-
**Note**: the LaTeX commands you define can also incorporate standard markdown (though not in a math environment) so for instance let's define a silly `\bolditalic` command.
102-
103-
\newcommand{\bolditalic}[1]{_**!#1**_} <!--_ ignore this comment, it helps atom to not get confused by the trailing underscore when highlighting the code but is not necessary.-->
104-
105-
and use it \bolditalic{here for example}.
106-
107-
Here's another quick one, a command to change the color:
108-
109-
\newcommand{\col}[2]{~~~<span style="color:~~~#1~~~">~~~!#2~~~</span>~~~}
110-
111-
This is \col{blue}{in blue} or \col{#bf37bc}{in #bf37bc}.
112-
113-
### A quick note on whitespaces
114-
115-
For most commands you will use `#k` to refer to the $k$-th argument as in LaTeX.
116-
In order to reduce headaches, this forcibly introduces a whitespace on the left of whatever is inserted which, usually, changes nothing visible (e.g. in a math settings).
117-
However there _may be_ situations where you do not want this to happen and you know that the insertion will not clash with anything else.
118-
In that case, you should simply use `!#k` which will not introduce that whitespace.
119-
It's probably easier to see this in action:
120-
121-
\newcommand{\pathwith}[1]{`/usr/local/bin/#1`}
122-
\newcommand{\pathwithout}[1]{`/usr/local/bin/!#1`}
123-
124-
* with: \pathwith{script.jl}, there's a whitespace you don't want 🚫
125-
* without: \pathwithout{script.jl} here there isn't ✅
126-
127-
### Raw HTML
128-
129-
You can include raw HTML by just surrounding a block with `~~~`.
130-
Not much more to add.
131-
This may be useful for local custom layouts like having a photo next to a text in a specific way.
132-
133-
~~~
134-
<div class="row">
135-
<div class="container">
136-
<img class="left" src="/assets/rndimg.jpg">
137-
<p>
138-
Marine iguanas are truly splendid creatures. They're found on the Gálapagos islands, have skin that basically acts as a solar panel, can swim and may have the ability to adapt their body size depending on whether there's food or not.
139-
</p>
140-
<p>
141-
Evolution is cool.
142-
</p>
143-
<div style="clear: both"></div>
144-
</div>
145-
</div>
146-
~~~
147-
148-
**Note 1**: again, entire such blocks can be made into latex-like commands via `\newcommand{\mynewblock}[1]{...}`.
149-
150-
**Note 2**: whatever is in a raw HTML block is *not* further processed (so you can't have LaTeX in there for instance). A partial way around this is to use `@@...` blocks which *will* be recursively parsed. The following code gives the same result as above with the small difference that there is LaTeX being processed in the inner div.
151-
152-
@@row
153-
@@container
154-
@@left ![](/assets/rndimg.jpg) @@
155-
@@
156-
Marine iguanas are **truly splendid** creatures. They're not found in equations like $\exp(-i\pi)+1$. But they're still quite cool.
157-
~~~
158-
<div style="clear: both"></div>
159-
~~~
160-
@@
161-
162-
## Pages and structure
163-
164-
Here are a few empty pages connecting to the menu links to show where files can go and the resulting paths. (It's probably best if you look at the source folder for this).
165-
166-
* [menu 1](/menu1/)
167-
* [menu 2](/menu2/)
168-
* [menu 3](/menu3/)
169-
170-
## References (not really)
171-
172-
* \biblabel{noether15}{Noether (1915)} **Noether**, Körper und Systeme rationaler Funktionen, 1915.
173-
* \biblabel{bezanson17}{Bezanson et al. (2017)} **Bezanson**, **Edelman**, **Karpinski** and **Shah**, [Julia: a fresh approach to numerical computing](https://julialang.org/research/julia-fresh-approach-BEKS.pdf), SIAM review 2017.
174-
175-
## Header and Footer
176-
177-
As you can see here at the bottom of the page, there is a footer which you may want on all pages but for instance you may want the date of last modification to be displayed.
178-
In a fashion heavily inspired by [Hugo](https://gohugo.io), you can write things like
179-
180-
```html
181-
Last modified: {{ fill fd_mtime }}.
182-
```
183-
184-
(cf. `src/_html_parts/page_foot.html`) which will then replace these braces with the content of a dictionary of variables at the key `fd_mtime`.
185-
This dictionary of variables is accessed locally by pages through `@def varname = value` and globally through the `config.md` page via the same syntax.
186-
187-
There's a few other such functions of the form `{{fname p₁ p₂}}` as well as support for conditional blocks. If you wander through the `src/_html_parts/` folder and its content, you should be able to see those in action.
44+
- `#general` チャンネルで自己紹介をしましょう
45+
- プロフィール画像を設定すると覚えてもらいやすくなって便利です

0 commit comments

Comments
 (0)