diff --git a/.hugo_build.lock b/.hugo_build.lock new file mode 100644 index 0000000..e69de29 diff --git a/assets/scss/style.scss b/assets/scss/style.scss index 6445893..426ee59 100644 --- a/assets/scss/style.scss +++ b/assets/scss/style.scss @@ -9,7 +9,7 @@ flex-direction: column; align-items: start; justify-content: space-between; - max-width: 400px; + width: 400px; margin: auto; font-size: 1.5rem; @@ -21,7 +21,9 @@ #home-center { display: flex; flex-direction: column; + flex-grow: 1; align-items: flex-start; + justify-content: center; } #home-title { @@ -50,7 +52,18 @@ } -#home-footer { +%link-shared { + color: #252525; + font-family: Inter; + font-size: 40px; + font-style: normal; + font-weight: 400; + line-height: 150%; + /* 60px */ + text-decoration-line: underline; +} + +%footer-shared { width: 100%; p { @@ -84,3 +97,33 @@ } } } + +#home-footer { + @extend %footer-shared; +} + +#site-footer { + @extend %footer-shared; +} + +.posts-group { + width: 400px; +} + +.post-item { + display: flex; + justify-content: space-between; + align-items: center; + width: 100%; + a { + @extend %link-shared; + font-size: 30px; + } + + .post-day { + @extend %link-shared; + font-size: 30px; + text-decoration: none; + color: #787878; + } +} diff --git a/content/posts/goisforlovers.md b/content/posts/goisforlovers.en.md similarity index 100% rename from content/posts/goisforlovers.md rename to content/posts/goisforlovers.en.md diff --git a/content/posts/goisforlovers.tr.md b/content/posts/goisforlovers.tr.md new file mode 100644 index 0000000..76668cd --- /dev/null +++ b/content/posts/goisforlovers.tr.md @@ -0,0 +1,339 @@ ++++ +title = "Yazmak Güzeldir" +tags = [ + "go", + "golang", + "templates", + "themes", + "development", +] +date = "2014-04-02" +toc = true ++++ + +Hugo uses the excellent [Go][] [html/template][gohtmltemplate] library for +its template engine. It is an extremely lightweight engine that provides a very +small amount of logic. In our experience that it is just the right amount of +logic to be able to create a good static website. If you have used other +template systems from different languages or frameworks you will find a lot of +similarities in Go templates. + +This document is a brief primer on using Go templates. The [Go docs][gohtmltemplate] +provide more details. + +## Introduction to Go Templates + +Go templates provide an extremely simple template language. It adheres to the +belief that only the most basic of logic belongs in the template or view layer. +One consequence of this simplicity is that Go templates parse very quickly. + +A unique characteristic of Go templates is they are content aware. Variables and +content will be sanitized depending on the context of where they are used. More +details can be found in the [Go docs][gohtmltemplate]. + +## Basic Syntax + +Golang templates are HTML files with the addition of variables and +functions. + +**Go variables and functions are accessible within {{ }}** + +Accessing a predefined variable "foo": + + {{ foo }} + +**Parameters are separated using spaces** + +Calling the add function with input of 1, 2: + + {{ add 1 2 }} + +**Methods and fields are accessed via dot notation** + +Accessing the Page Parameter "bar" + + {{ .Params.bar }} + +**Parentheses can be used to group items together** + + {{ if or (isset .Params "alt") (isset .Params "caption") }} Caption {{ end }} + + +## Variables + +Each Go template has a struct (object) made available to it. In hugo each +template is passed either a page or a node struct depending on which type of +page you are rendering. More details are available on the +[variables](/layout/variables) page. + +A variable is accessed by referencing the variable name. + +