Skip to content

Commit 9c04d93

Browse files
authored
Merge pull request #10 from Slavetomints/add/tabs-dir
Adding tabs mockups
2 parents b44cb57 + 1a8d1c2 commit 9c04d93

11 files changed

Lines changed: 170 additions & 22 deletions

File tree

_config.yml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,13 @@ title: Nyx Demo
22
theme: jekyll-theme-nyx
33

44
markdown: kramdown
5-
6-
75
kramdown:
86
syntax_highlighter: rouge
97
syntax_highlighter_opts:
108
css_class: highlight
119
block:
1210
line_numbers: true
1311

14-
1512
exclude:
1613
- "*.gem"
1714
- "*.gemspec"
@@ -20,4 +17,10 @@ exclude:
2017
- Rakefile
2118
- CHANGELOG.md
2219
- CODE_OF_CONDUCT.md
23-
- "certs/slavetomints.pem"
20+
- "certs/slavetomints.pem"
21+
22+
collections:
23+
tabs:
24+
output: true
25+
permalink: /:name/
26+
sort_by: order

_includes/header.html

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<header>
2+
{% assign tabs = site.tabs | sort: "nav_order" %}
3+
<ul>
4+
<li><a href="/">Home</a></li>
5+
{% for tab in tabs %}
6+
<li><a href="{{ tab.url | relative_url }}" class="{% if page.url == tab.url %}active{% endif %}">
7+
{{ tab.title }}
8+
</a></li>
9+
{% endfor %}
10+
</ul>
11+
</header>

_includes/sidebar.html

Lines changed: 0 additions & 9 deletions
This file was deleted.

_layouts/default.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
</head>
1010

1111
<body>
12-
{% include sidebar.html %}
12+
{% include header.html %}
1313
<main>
1414
{{ content }}
1515
</main>

_sass/nyx/_base.scss

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,22 @@ a:hover {
2727
text-decoration: underline;
2828
}
2929

30+
header a {
31+
color: $muted;
32+
}
33+
34+
header a:hover {
35+
text-decoration: none;
36+
color: $fg
37+
}
38+
39+
header ul{
40+
display: flex;
41+
flex-direction: row;
42+
justify-content: space-around;
43+
list-style-type: none;
44+
}
45+
3046
img {
3147
max-width: 100%;
3248
height: auto;
@@ -35,6 +51,6 @@ img {
3551

3652
hr {
3753
border: none;
38-
border-top: 2px solid #f8f8f2;
54+
border-top: 2px solid $fg;
3955
margin: 1.5rem 0;
4056
}

_sass/nyx/_layout.scss

Lines changed: 61 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,5 @@
11
@use "variables" as *;
22

3-
#sidebar-list {
4-
display: flex;
5-
flex-direction: row;
6-
justify-content: space-around;
7-
list-style-type: none;
8-
}
9-
103
header,
114
footer {
125
padding: $space-2 $space-3;
@@ -22,3 +15,64 @@ main {
2215
padding: $space-4;
2316
}
2417
}
18+
19+
/* STYLING FOR /POSTS/ */
20+
21+
.post-list {
22+
list-style: none;
23+
padding: 0;
24+
margin: 2rem 0;
25+
26+
display: grid;
27+
grid-template-columns: 1fr;
28+
gap: 1.5rem;
29+
}
30+
31+
.post-item {
32+
background: $card-bg;
33+
border: 1px solid rgba(255, 255, 255, 0.06);
34+
border-radius: 0.75rem;
35+
padding: 1.5rem;
36+
37+
transition: transform 0.15s ease, box-shadow 0.15s ease;
38+
}
39+
40+
.post-item:hover {
41+
transform: translateY(-2px);
42+
box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
43+
text-decoration: none;
44+
position: relative;
45+
}
46+
47+
.post-item h2 {
48+
margin: 0 0 0.25rem 0;
49+
font-size: 1.4rem;
50+
}
51+
52+
.post-item h2 a {
53+
text-decoration: none;
54+
color: inherit;
55+
}
56+
57+
.post-item h2 a:hover {
58+
text-decoration: underline;
59+
}
60+
61+
.post-item h2 a::after {
62+
content: "";
63+
position: absolute;
64+
inset: 0;
65+
}
66+
67+
.post-item time {
68+
display: block;
69+
font-size: 0.85rem;
70+
color: $muted;
71+
margin-bottom: 0.75rem;
72+
}
73+
74+
.post-item p {
75+
margin: 0;
76+
color: $fg;
77+
line-height: 1.6;
78+
}

_sass/nyx/_variables.scss

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,8 @@ $space-5: 4rem;
1919
/* Layout */
2020
$max-width: 72ch;
2121
$radius: 6px;
22+
23+
/* Cards */
24+
$card-bg: #0f111a;
25+
$card-border: rgba(255, 255, 255, 0.06);
26+
$card-shadow-hover: 0 8px 24px rgba(0, 0, 0, 0.35);

_tabs/about.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
layout: default
3+
permalink: /about/
4+
order: 4
5+
---
6+
7+
<h1>About</h1>
8+

_tabs/categories.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
---
2+
layout: default
3+
permalink: /categories/
4+
order: 2
5+
---
6+
7+
<h1>Categories</h1>
8+
9+
<div class="categories-list">
10+
{% for category in site.categories %}
11+
{% assign category_name = category[0] %}
12+
<li>
13+
<a href="{{ '/categories/' | append: category_name | slugify | append: '/' | relative_url }}">
14+
{{ category_name }} ({{ category[1].size }})
15+
</a>
16+
</li>
17+
{% endfor %}
18+
</div>

_tabs/posts.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
---
2+
layout: default
3+
permalink: /posts/
4+
order: 1
5+
---
6+
7+
# Posts
8+
9+
<ul class="post-list">
10+
{% for post in site.posts %}
11+
<li class="post-item">
12+
<h2>
13+
<a href="{{ post.url | relative_url }}">{{ post.title }}</a>
14+
</h2>
15+
<time datetime="{{ post.date | date_to_xmlschema }}">
16+
{{ post.author }} - {{ post.date | date: "%B %d, %Y" }}
17+
</time>
18+
{% if post.description %}
19+
<p>{{ post.description | strip_html }}</p>
20+
{% endif %}
21+
</li>
22+
{% endfor %}
23+
</ul>
24+

0 commit comments

Comments
 (0)