Skip to content

Commit 4ab7d47

Browse files
committed
Fixes
1 parent 8d80e61 commit 4ab7d47

File tree

17 files changed

+258
-819
lines changed

17 files changed

+258
-819
lines changed

_config.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ github_username: Zaryob
1414

1515
sass:
1616
style: compressed
17+
post: compressed
1718

1819
# Tracker
1920
#analytics: UA-83979019-1

_layouts/blog.html

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
---
2+
layout: page
3+
---
4+
5+
<link rel="stylesheet" href="{{site.baseurl}}/assets/css/blog.css">
6+
7+
<div class="col-md-9 col-12">
8+
{% assign months = "Ocak|Şubat|Mart|Nisan|Mayıs|Haziran|Temmuz|Ağustos|Eylül|Ekim|Kasım|Aralık" | split: "|" %}
9+
10+
{% assign category = page.permalink | split: '/' | last %}
11+
{% for post in site.categories.[category] %}
12+
{% assign m = post.date | date: "%-m" | minus: 1 %}
13+
{% assign day = post.date | date: "%d" %}
14+
{% assign month = months[m] %}
15+
{% assign year = post.date | date: "%Y" %}
16+
17+
<div class="blog-post">
18+
<a href="{{ post.url | prepend: site.baseurl | replace: '//', '/' }}"><img src="{{site.baseurl}}/assets/img/pages/{{post.image}}?h={{post.image_hash}}" onerror="this.style.backgroundColor='#ccc'; this.style.objectFit='contain'; this.src='';"></a>
19+
<div class="details">
20+
<h5><a href="{{ post.url | prepend: site.baseurl | replace: '//', '/' }}">{{ post.title }}</a></h5>
21+
<p class="meta"> {% if post.author %}
22+
{{ post.author }}
23+
{% else %}
24+
{{ site.author }}
25+
{% endif %} | {{ month }} {{ day }}, {{ year }} | {% include read_time.html content=post.content %}</p>
26+
27+
{% if post.subtitle %}
28+
<p class="post-subtitle">{{ post.subtitle }}</p>
29+
{% else %}
30+
<p>{{ post.excerpt | strip_html | truncatewords: 40 }}</p>
31+
{% endif %}
32+
33+
</div>
34+
</div>
35+
{% endfor %}
36+
37+
<!-- Pager -->
38+
{% if paginator.total_pages > 1 %}
39+
40+
<div class="clearfix">
41+
42+
{% if paginator.previous_page %}
43+
<a class="btn btn-primary float-left"
44+
href="{{ paginator.previous_page_path | prepend: site.baseurl | replace: '//', '/' }}">&larr;
45+
Yeni<span class="d-none d-md-inline"> Gönderiler</span></a>
46+
{% endif %}
47+
48+
{% if paginator.next_page %}
49+
<a class="btn btn-primary float-right"
50+
href="{{ paginator.next_page_path | prepend: site.baseurl | replace: '//', '/' }}">Eski<span
51+
class="d-none d-md-inline"> Gönderiler</span> &rarr;</a>
52+
{% endif %}
53+
54+
</div>
55+
56+
{% endif %}
57+
</div>
58+

_layouts/default.html

Lines changed: 17 additions & 72 deletions
Original file line numberDiff line numberDiff line change
@@ -14,83 +14,15 @@
1414
<link rel="stylesheet" href="{{site.baseurl}}/assets/css/syntax-highlighter.css">
1515
{% endif %}
1616
<link rel="icon" type="image/ico" href="/favicon.ico"/>
17-
<style>
18-
body {
19-
margin: 0;
20-
padding: 0;
21-
}
22-
.navbar {
23-
transition: top 0.3s;
24-
}
25-
26-
.hero {
27-
position: relative;
28-
height: 100vh; /* Adjust based on your design */
29-
background-position: center;
30-
background-size: cover;
31-
overflow: hidden; /* Ensures the content doesn't overflow */
32-
}
33-
34-
.hero::before {
35-
content: '';
36-
position: absolute;
37-
top: 0;
38-
left: 0;
39-
right: 0;
40-
bottom: 0;
41-
background-image: inherit; /* Use the same background image */
42-
background-position: inherit;
43-
background-size: inherit;
44-
filter: blur(7px); /* Adjust the blur intensity */
45-
z-index: 1; /* Keep it behind the content */
46-
opacity: 0.7; /* Optional: Add transparency for a softer effect */
47-
}
17+
18+
<link rel="stylesheet" href="{{site.baseurl}}/assets/css/main.css">
4819

49-
.hero .content {
50-
position: relative;
51-
z-index: 2; /* Ensures content stays on top of the blurred background */
52-
text-align: center;
53-
color: white; /* Adjust text color for readability */
54-
display: flex;
55-
flex-direction: column;
56-
justify-content: center;
57-
align-items: center;
58-
height: 100%;
59-
}
60-
.footer {
61-
background-color: #212529;
62-
color: white;
63-
text-align: center;
64-
padding: 20px 0;
65-
margin-top: auto;
66-
}
67-
.footer .social a {
68-
margin: 0 10px;
69-
color: white;
70-
font-size: 1.2rem;
71-
text-decoration: none;
72-
transition: color 0.3s;
73-
}
74-
.footer .social a:hover {
75-
color: #0d6efd;
76-
}
77-
.footer .copyright {
78-
margin-top: 10px;
79-
font-size: 1rem;
80-
color: #6c757d;
81-
}
82-
.footer .release {
83-
margin-top: 8px;
84-
font-size: 0.7rem;
85-
color: #8e98a1;
86-
}
87-
</style>
8820
</head>
8921
<body class="d-flex flex-column min-vh-100">
9022
<!-- Navbar -->
9123
<nav id="navbar" class="navbar navbar-expand-lg navbar-dark bg-dark fixed-top">
9224
<div class="container-fluid">
93-
<a class="navbar-brand" href="{{site.baseurl}}/" style="font-family: IBM Plex Mono, sans-serif;"><i class="fas fa-home"></i><span>&nbsp;Ev</span></a>
25+
<a class="navbar-brand" href="{{site.baseurl}}/" style="font-family: IBM Plex Mono, sans-serif;"><i class="fas fa-home"></i><span id="ev">&nbsp;Ev</span></a>
9426

9527

9628
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNav" aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation">
@@ -133,6 +65,7 @@
13365
</div>
13466
</nav>
13567

68+
13669
<!-- Hero Section -->
13770
{% if page.image %}
13871
<div class="hero" loading="lazy" style="background-image:url('{{site.baseurl}}/assets/img/pages/{{page.image}}?h={{page.image_hash}}'); background-position: center; background-size: cover;">
@@ -185,10 +118,13 @@ <h1 class="heading-text" style="font-family: IBM Plex Sans, sans-serif; text-sha
185118
</div>
186119
</div>
187120
</div>
121+
<div class="scroll-down" onclick="scrollToNextSection()">
122+
<i class="fas fa-chevron-down"></i>
123+
</div>
188124
</div>
189125

190126
<!-- Content Section -->
191-
<section id="content" class="py-5">
127+
<section id="page_content" class="py-5">
192128
{{ content }}
193129
</section>
194130

@@ -230,6 +166,15 @@ <h1 class="heading-text" style="font-family: IBM Plex Sans, sans-serif; text-sha
230166
lastScrollTop = scrollTop <= 0 ? 0 : scrollTop; // Ensure scrollTop doesn't go negative
231167
});
232168

169+
function scrollToNextSection() {
170+
const nextSection = document.querySelector('#page_content');
171+
if (nextSection) {
172+
window.scrollTo({
173+
top: nextSection.offsetTop,
174+
behavior: 'smooth',
175+
});
176+
}
177+
}
233178
</script>
234179
</body>
235180
</html>

_layouts/post.html

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,8 @@
22
layout: default
33
---
44

5-
<style>
6-
.post-content {
7-
line-height: 1.6;
8-
font-size: 1rem;
9-
word-wrap: break-word;
10-
}
11-
.post-content img {
12-
width: 80%;
13-
object-fit: cover;
14-
border-radius: 8px;
15-
margin-bottom: 20px;
16-
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
17-
transition: transform 0.3s ease;
18-
}
19-
</style>
5+
<link rel="stylesheet" href="{{site.baseurl}}/assets/css/post.css">
6+
207
<div class="col-md-10 col-lg-8 mx-auto">
218

229
<div class="post-content">

_pages/elektronik.md

Lines changed: 1 addition & 91 deletions
Original file line numberDiff line numberDiff line change
@@ -1,97 +1,7 @@
11
---
2-
layout: page
2+
layout: blog
33
title: Elektronik
44
permalink: /elektronik/
55
image: "electronik-bg.jpg"
66
image_hash: "fd7fff582b02262c7e3377b981048d36"
77
---
8-
9-
<style>
10-
11-
.blog-post {
12-
display: flex;
13-
flex-wrap: wrap;
14-
margin-bottom: 2rem;
15-
border-bottom: 1px solid #ddd;
16-
padding-bottom: 1rem;
17-
}
18-
.blog-post img {
19-
max-width: 200px;
20-
margin-right: 1rem;
21-
border-radius: 8px;
22-
background-color: #ccc; /* Default gray color */
23-
}
24-
.blog-post .details {
25-
flex: 1;
26-
}
27-
.blog-post .details h5 {
28-
font-size: 1.5rem;
29-
margin-bottom: 0.5rem;
30-
}
31-
.blog-post .details p {
32-
margin: 0.5rem 0;
33-
}
34-
.blog-post .meta {
35-
font-size: 0.9rem;
36-
color: #888;
37-
}
38-
.blog-post img {
39-
width: 150px; /* Set a consistent width */
40-
height: 150px; /* Set a consistent height */
41-
object-fit: cover; /* Ensures the image fits well without distortion */
42-
margin-right: 1rem; /* Spacing between the image and text */
43-
border-radius: 8px; /* Optional: Rounds the corners */
44-
}
45-
46-
</style>
47-
<div class="col-md-9 col-12">
48-
{% assign months = "Ocak|Şubat|Mart|Nisan|Mayıs|Haziran|Temmuz|Ağustos|Eylül|Ekim|Kasım|Aralık" | split: "|" %}
49-
50-
{% for post in site.categories.elektronik %}
51-
{% assign m = post.date | date: "%-m" | minus: 1 %}
52-
{% assign day = post.date | date: "%d" %}
53-
{% assign month = months[m] %}
54-
{% assign year = post.date | date: "%Y" %}
55-
56-
<div class="blog-post">
57-
<a href="{{ post.url | prepend: site.baseurl | replace: '//', '/' }}"><img src="{{site.baseurl}}/assets/img/pages/{{post.image}}?h={{post.image_hash}}" onerror="this.style.backgroundColor='#ccc'; this.style.objectFit='contain'; this.src='';"></a>
58-
<div class="details">
59-
<h5><a href="{{ post.url | prepend: site.baseurl | replace: '//', '/' }}">{{ post.title }}</a></h5>
60-
<p class="meta"> {% if post.author %}
61-
{{ post.author }}
62-
{% else %}
63-
{{ site.author }}
64-
{% endif %} | {{ month }} {{ day }}, {{ year }} | {% include read_time.html content=post.content %}</p>
65-
66-
{% if post.subtitle %}
67-
<p class="post-subtitle">{{ post.subtitle }}</p>
68-
{% else %}
69-
<p>{{ post.excerpt | strip_html | truncatewords: 40 }}</p>
70-
{% endif %}
71-
72-
</div>
73-
</div>
74-
{% endfor %}
75-
76-
<!-- Pager -->
77-
{% if paginator.total_pages > 1 %}
78-
79-
<div class="clearfix">
80-
81-
{% if paginator.previous_page %}
82-
<a class="btn btn-primary float-left"
83-
href="{{ paginator.previous_page_path | prepend: site.baseurl | replace: '//', '/' }}">&larr;
84-
Yeni<span class="d-none d-md-inline"> Gönderiler</span></a>
85-
{% endif %}
86-
87-
{% if paginator.next_page %}
88-
<a class="btn btn-primary float-right"
89-
href="{{ paginator.next_page_path | prepend: site.baseurl | replace: '//', '/' }}">Eski<span
90-
class="d-none d-md-inline"> Gönderiler</span> &rarr;</a>
91-
{% endif %}
92-
93-
</div>
94-
95-
{% endif %}
96-
</div>
97-

0 commit comments

Comments
 (0)