Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/ojroques/hugo-researcher.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOlivier Roques <olivier@oroques.dev>2020-08-02 00:19:40 +0300
committerOlivier Roques <olivier@oroques.dev>2020-08-02 01:31:40 +0300
commit398eda4992ad73531f39595776c007014b3020c3 (patch)
treec52e5fdef0a7c07eaccc538ad4f95c558db5d692
parent74bfd79303ba8776e3b9d02f125a6c93eef9d2b5 (diff)
Add sass files
-rw-r--r--assets/sass/researcher.scss34
-rw-r--r--assets/sass/typography.scss66
-rw-r--r--assets/sass/variables.scss29
-rw-r--r--layouts/404.html6
-rw-r--r--layouts/_default/list.html5
-rw-r--r--layouts/_default/single.html5
-rw-r--r--layouts/index.html5
-rw-r--r--layouts/partials/footer.html6
-rw-r--r--layouts/partials/head.html18
-rw-r--r--layouts/partials/header.html15
10 files changed, 189 insertions, 0 deletions
diff --git a/assets/sass/researcher.scss b/assets/sass/researcher.scss
new file mode 100644
index 0000000..8acca57
--- /dev/null
+++ b/assets/sass/researcher.scss
@@ -0,0 +1,34 @@
+@import "variables";
+@import "typography";
+
+* {
+ color: $dark;
+ font-family: "Inconsolata";
+ line-height: normal;
+}
+h1, h2, h3, h4, h5, h6 {
+ font-size: medium;
+ font-weight: bold;
+ line-height: normal;
+ margin: 1.2rem 0 0.8rem 0;
+}
+@for $i from 1 through 4 {
+ h#{$i} {
+ font-size: 1.2rem + 0.2 * (4 - $i);
+ }
+}
+.container {
+ max-width: $max-width;
+}
+.navbar-brand {
+ @extend %link-dark;
+ font-size: 2rem;
+}
+.nav-link {
+ @extend %link-default;
+}
+footer {
+ a {
+ @extend %link-dark;
+ }
+}
diff --git a/assets/sass/typography.scss b/assets/sass/typography.scss
new file mode 100644
index 0000000..a1427c4
--- /dev/null
+++ b/assets/sass/typography.scss
@@ -0,0 +1,66 @@
+@import "variables";
+
+#content {
+ a {
+ @extend %link-default;
+ }
+ ol {
+ counter-reset: list;
+ list-style: none;
+ padding-left: 0;
+ & > li {
+ padding-left: 4ch;
+ text-indent: -4ch;
+ margin: 4px 0;
+ &:before {
+ content: "[" counter(list, decimal) "] ";
+ counter-increment: list;
+ }
+ }
+ }
+ ul {
+ list-style: inside;
+ padding-left: 0;
+ & > li {
+ margin: 4px 0;
+ }
+ }
+ blockquote {
+ border-left: 4px solid;
+ font-style: italic;
+ margin: $margin-y 0;
+ padding: 8px 8px;
+ & p {
+ margin: 0;
+ }
+ }
+ .avatar {
+ border-radius: 50%;
+ float: right;
+ margin: -8px 0 0 16px;
+ height: $avatar-size;
+ width: $avatar-size;
+ }
+ img {
+ display: block;
+ margin: $margin-y auto;
+ }
+ table {
+ margin: $margin-y auto;
+ width: 100%;
+ & tr {
+ background-color: white;
+ border: 1px solid #cccccc;
+ & td {
+ @extend %table-cell;
+ }
+ & th {
+ @extend %table-cell;
+ font-weight: bold;
+ }
+ &:nth-child(2n) {
+ background-color: #f8f8f8;
+ }
+ }
+ }
+}
diff --git a/assets/sass/variables.scss b/assets/sass/variables.scss
new file mode 100644
index 0000000..6defa80
--- /dev/null
+++ b/assets/sass/variables.scss
@@ -0,0 +1,29 @@
+// Variables
+$max-width: 750px;
+$avatar-size: 90px;
+$margin-y: 16px;
+$red: #ff0f00;
+$dark: #000000;
+
+// Placeholders
+%link-default {
+ color: $red;
+ text-decoration: none;
+ &:hover {
+ color: $red;
+ text-decoration: underline;
+ }
+}
+%link-dark {
+ color: $dark;
+ text-decoration: none;
+ &:hover {
+ color: $dark;
+ text-decoration: underline;
+ }
+}
+%table-cell {
+ border: 1px solid #cccccc;
+ padding: 6px 12px;
+ text-align: left;
+}
diff --git a/layouts/404.html b/layouts/404.html
index e69de29..163dae0 100644
--- a/layouts/404.html
+++ b/layouts/404.html
@@ -0,0 +1,6 @@
+{{ define "main" }}
+<div class="container">
+ <h1>404 Error</h1>
+ <p>Page does not exist.</p>
+</div>
+{{ end }}
diff --git a/layouts/_default/list.html b/layouts/_default/list.html
index e69de29..2bc2b1e 100644
--- a/layouts/_default/list.html
+++ b/layouts/_default/list.html
@@ -0,0 +1,5 @@
+{{ define "main" }}
+<div class="container">
+ {{ .Content }}
+</div>
+{{ end }}
diff --git a/layouts/_default/single.html b/layouts/_default/single.html
index e69de29..2bc2b1e 100644
--- a/layouts/_default/single.html
+++ b/layouts/_default/single.html
@@ -0,0 +1,5 @@
+{{ define "main" }}
+<div class="container">
+ {{ .Content }}
+</div>
+{{ end }}
diff --git a/layouts/index.html b/layouts/index.html
index e69de29..2bc2b1e 100644
--- a/layouts/index.html
+++ b/layouts/index.html
@@ -0,0 +1,5 @@
+{{ define "main" }}
+<div class="container">
+ {{ .Content }}
+</div>
+{{ end }}
diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html
index e69de29..749441b 100644
--- a/layouts/partials/footer.html
+++ b/layouts/partials/footer.html
@@ -0,0 +1,6 @@
+{{ with .Site.Params.footer }}
+ <hr>
+ <div class="container text-center mb-2">
+ <a href="{{ .url }}"><small>{{ .text }}</small></a>
+ </div>
+{{ end }}
diff --git a/layouts/partials/head.html b/layouts/partials/head.html
index e69de29..2b5566e 100644
--- a/layouts/partials/head.html
+++ b/layouts/partials/head.html
@@ -0,0 +1,18 @@
+<head>
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
+
+ <title>{{ .Title }}</title>
+ <meta name="description" content="{{ .Site.Params.description }}">
+ <meta name="author" content='{{ .Site.Params.author }}'>
+
+ <link href="https://fonts.googleapis.com/css2?family=Inconsolata:wght@400;700&display=swap" rel="stylesheet">
+ <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.0/css/bootstrap.min.css" integrity="sha384-9aIt2nRpC12Uk9gS9baDl411NQApFmC26EwAOH8WgZl5MYYxFfc+NcPb1dKGj7Sk" crossorigin="anonymous">
+
+ {{ $style := resources.Get "sass/researcher.scss" | toCSS | minify }}
+ <link rel="stylesheet" href="{{ $style.RelPermalink }}">
+
+ {{ with .Site.Params.favicon }}
+ <link rel="icon" type="image/ico" href="{{ . | relURL }}">
+ {{ end }}
+</head>
diff --git a/layouts/partials/header.html b/layouts/partials/header.html
index e69de29..45b67a8 100644
--- a/layouts/partials/header.html
+++ b/layouts/partials/header.html
@@ -0,0 +1,15 @@
+<div class="container mt-5">
+ <nav class="navbar navbar-expand-sm flex-column flex-sm-row p-0">
+ <a class="navbar-brand mr-sm-auto" href="{{ .Site.BaseURL }}">{{ .Site.Title }}</a>
+ <div class="navbar-nav flex-row">
+ {{ $navbar_len := len .Site.Menus.navbar }}
+ {{ range $i, $nav_item := .Site.Menus.navbar }}
+ <a class="nav-item nav-link" href="{{ $nav_item.URL | relURL }}">{{ $nav_item.Name }}</a>
+ {{ if ne (add $i 1) $navbar_len }}
+ <span class="nav-item navbar-text mx-1">/</span>
+ {{ end }}
+ {{ end }}
+ </div>
+ </nav>
+</div>
+<hr>