tessera-jekyll-theme 0.1.0 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d698752f107880b273524ba14c09d97948f37b562d26fd0852561f206edfc42e
4
- data.tar.gz: 90068a01f33c575b1e478fc1836a5f59c01608fdb9b05552cba2ec71cf24187d
3
+ metadata.gz: 32412ff1b96b7d50bbc21d86b11df15913457a0010a9ae0972215beb673d9394
4
+ data.tar.gz: b631456a28835c76c6faab98f838543ec0c423172910f2d4b530a2d44db6858e
5
5
  SHA512:
6
- metadata.gz: beab1c8822c0b0820986b85f15e0a495247dd2951a9d8b224cd491e45ab61978ec9e73d259ccf8eab94a991ef93298041f5acb678b9ce9e32042d2c28e53356e
7
- data.tar.gz: e2bbf6900573f516fb0e7d7c7a7f9655a7146c138d692a141826a94708e2244f3028b0c5073d73b6d9d3b4dec0ebde0303a6b31dc4fa7b6f69a6870649fcd4d9
6
+ metadata.gz: a4f3e906d06fd67c6973cfb8e410b6763b05b80800f5f2fcd8851ad650ecfc0559e8ee3f47c909c80839378d2a7f3c3cb93d6d2fe2fe486f364c8f780105ab2a
7
+ data.tar.gz: 4a2b63dc296c699ffb66b5a721b35fcd66e15278ab4a28776cd01e5d95c1c745aa5e5a63d480fef0628f2a1186dc69980887b9629fdd0110b201a931e0431309
data/README.md CHANGED
@@ -4,18 +4,22 @@ Tessera is a Jekyll theme designed with content creators in mind, but like any o
4
4
 
5
5
  Tessera features three main components: two side panels and a central content area. The theme is highly modular, allowing you to easily customize any component by overriding the `_includes`.
6
6
 
7
+ ## Example:
8
+
9
+ See [Tessera example page](https://itszariep.github.io/Tessera) for a vanilla example, or [My blog](https://itszariep.github.io/) (in Spanish) for a version with modifications and a real use case
10
+
7
11
  ## Installation
8
12
 
9
13
  Add this line to your Jekyll site's `Gemfile`:
10
14
 
11
15
  ```ruby
12
- gem "tessera"
16
+ gem "tessera-jekyll-theme"
13
17
  ```
14
18
 
15
19
  Then add this line to your Jekyll site's `_config.yml`:
16
20
 
17
21
  ```yaml
18
- theme: tessera
22
+ theme: tessera-jekyll-theme
19
23
  ```
20
24
 
21
25
  And then execute:
@@ -27,9 +31,18 @@ $ bundle
27
31
  Or install it manually with:
28
32
 
29
33
  ```
30
- $ gem install tessera
34
+ $ gem install tessera-jekyll-theme
31
35
  ```
32
36
 
37
+ ### GitHub Pages
38
+ Instead of doing the above steps, define this in your `_config.yml`, removing also `theme`:
39
+
40
+ ```
41
+ # theme: something # remove this
42
+ remote_theme: itszariep/Tessera # add this
43
+ ```
44
+
45
+
33
46
  ## Dependencies
34
47
  Tessera needs the following Jekyll plugins to function properly:
35
48
 
@@ -38,6 +51,7 @@ Tessera needs the following Jekyll plugins to function properly:
38
51
 
39
52
 
40
53
  ## Post-install setup
54
+
41
55
  ### Search
42
56
  Search needs /`search.json`:
43
57
 
@@ -46,26 +60,117 @@ Search needs /`search.json`:
46
60
  layout: null
47
61
  ---
48
62
  [
49
- {% for post in site.posts %}
50
- {
51
- "title": "{{ post.title | escape }}",
52
- "url": "{{ site.baseurl }}{{ post.url }}",
53
- "date": "{{ post.date | date: "%B %-d, %Y" }}",
54
- "content": "{{ post.content | strip_html | strip_newlines | escape }}"
55
- }{% unless forloop.last %},{% endunless %}
56
- {% endfor %}
63
+ {% for post in site.posts %}
64
+ {
65
+ "title": "{{ post.title | escape }}",
66
+ "url": "{{ site.baseurl }}{{ post.url }}",
67
+ "date": "{{ post.date | date: "%B %-d, %Y" }}",
68
+ "content": "{{ post.content | strip_html | strip_newlines | escape }}",
69
+ "tags": "{{ post.tags }}"
70
+ }{% unless forloop.last %},{% endunless %}
71
+ {% endfor %}
57
72
  ]
73
+ ```
74
+
75
+ ### Social Media Preview on non-post pages
76
+ set this on your `_config.yml`:
77
+ ```
78
+ defaults:
79
+ -
80
+ scope:
81
+ path: ""
82
+ type: "pages"
83
+ values:
84
+ image: /preview.jpg
85
+ ```
86
+
87
+ > Image need to be always /preview.jpg
88
+
89
+
90
+ ## Authors
91
+
92
+ 1. Optionally set default author in `_.config.yml`:
93
+
94
+ ```
95
+ defaults:
96
+ -
97
+ scope:
98
+ path: ""
99
+ type: "pages"
100
+ values:
101
+ image: /preview.jpg
102
+ -
103
+ scope:
104
+ path: ""
105
+ type: "posts"
106
+ values:
107
+ author: "Tessera"
108
+ image: /preview.jpg
109
+
110
+ ```
111
+
112
+ 2. Create `assets/img/authors/[Author Name].webp`
113
+ 3. Create `about/[Author Name].md`
114
+ 4. Create `_includes/authors.html and set your data`:
58
115
 
59
116
  ```
117
+ {% case include.author %}
118
+ {% when "[YOUR NAME]" %}
119
+ Cool Description
120
+ {% when "Tessera" %}
121
+ Cool Description
122
+ {% else %}
123
+ Unknown Author
124
+ {% endcase %}
125
+ ```
126
+
127
+ > You can add multiple authors, for example with "Tessera", files would be `assets/img/authors/Tessera.webp` and `about/Tessera.md`
60
128
 
61
129
  ### Pagination
62
- Pagination needs setup on `_config.yml`:
130
+ Pagination needs setup on two files:
131
+
132
+ on `_config.yml`:
63
133
 
64
134
  ```
65
135
  paginate: 9
66
136
  paginate_path: "/page:num/"
67
137
  ```
68
138
 
139
+ on `index.html`
140
+
141
+ ```
142
+ ---
143
+ layout: home
144
+ title: [Your index title]
145
+ paginate: 9
146
+ ---
147
+ ```
148
+
149
+ > 9 is the number of post per section, you can change it to have more o less post on grid per section
150
+
151
+
152
+ ### Archives (Categories)
153
+ Archives needs setup on `_config.yml`:
154
+
155
+ ```
156
+ jekyll-archives:
157
+ enabled:
158
+ - categories
159
+ layout: archive
160
+ permalinks:
161
+ category: '/categories/:name/'
162
+ ```
163
+
164
+ > [!NOTE]
165
+ > Github Pages does not support Jekyll Archives, if you want this feature please use Github Actions instead
166
+
167
+ ### Date format
168
+ Date format is configurable on `_config.yml`:
169
+
170
+ ```
171
+ date_format: "%d/%m/%Y" # dd/mm/yy
172
+ ```
173
+
69
174
  ### Social links
70
175
  Like any other Jekyll theme, you need to setup your social links on `_config.yml`:
71
176
 
@@ -82,10 +187,10 @@ social_links:
82
187
  icon: linkedin
83
188
  ```
84
189
 
190
+ ## Customizing
85
191
 
86
- ## Usage
87
-
88
- To start customizing Tessera, copy any of the `_includes` components you'd like to modify. You’ll probably want to copy most or all of them:
192
+ ### Layouts
193
+ To start customizing Tessera, copy any of the `_includes` components you'd like to modify:
89
194
 
90
195
  * `toppane.html`: Header
91
196
  * `leftpane.html`: Left side of the page
@@ -98,28 +203,14 @@ To start customizing Tessera, copy any of the `_includes` components you'd like
98
203
  * `searchbar.html`: Search bar (requires JavaScript)
99
204
  * `bottompane.html`: Footer for all pages
100
205
 
101
- ## Contributing
102
-
103
- Bug reports and pull requests are welcome on GitHub at [https://github.com/itszariep/tessera](https://github.com/itszariep/tessera). This project aims to be a safe and welcoming space for collaboration. All contributors are expected to adhere to the [Contributor Covenant](https://www.contributor-covenant.org/) code of conduct.
104
-
105
- ## Development
106
-
107
- To set up your environment for theme development, run:
108
-
109
- ```
110
- $ bundle install
111
- ```
206
+ ### Styles
207
+ Create `assets/css/custom.css`, this file will serve as override without having to modify entire CSS, so you can edit specific elements you want.
112
208
 
113
- Your theme is set up just like a regular Jekyll site! To test it, run:
209
+ You can see common modifications on [Wiki](https://github.com/ItsZariep/Tessera/wiki/Common-modifications-and-additions:)
114
210
 
115
- ```
116
- $ bundle exec jekyll serve
117
- ```
118
-
119
- Then open your browser at [http://localhost:4000](http://localhost:4000). This starts a Jekyll server using your theme. Add pages, documents, data, etc., as usual to test your theme's content. As you modify the theme or its content, your site will automatically regenerate. Refresh the browser to see the changes.
211
+ ## Contributing
120
212
 
121
- When your theme is released, only the files in `_layouts`, `_includes`, `_sass`, and `assets` that are tracked by Git will be bundled.
122
- To add a custom directory to your theme gem, update the regular expression in `tessera.gemspec` accordingly.
213
+ Bug reports and pull requests are welcome on GitHub at [https://github.com/itszariep/tessera](https://github.com/itszariep/tessera). This project aims to be a safe and welcoming space for collaboration. All contributors are expected to adhere to the [Contributor Covenant](https://www.contributor-covenant.org/) code of conduct.
123
214
 
124
215
  ## License
125
216
 
data/_config.yml CHANGED
@@ -2,9 +2,28 @@ plugins:
2
2
  - jekyll-paginate
3
3
  - jekyll-archives
4
4
 
5
+ author: Tesser
6
+
5
7
  jekyll-archives:
6
8
  enabled:
7
9
  - categories
8
10
  layout: archive
9
11
  permalinks:
10
12
  category: '/categories/:name/'
13
+
14
+ defaults:
15
+ -
16
+ scope:
17
+ path: ""
18
+ type: "pages"
19
+ values:
20
+ image: /preview.jpg
21
+ -
22
+ scope:
23
+ path: ""
24
+ type: "posts"
25
+ values:
26
+ author: "ItsZariep"
27
+ image: /preview.jpg
28
+
29
+ date_format: "%d/%m/%Y"
@@ -0,0 +1,8 @@
1
+ {% case include.author %}
2
+ {% when "ItsZariep" %}
3
+ Cool Duckription🦆️
4
+ {% when "Tessera" %}
5
+ Cool Description
6
+ {% else %}
7
+ Unknown Author
8
+ {% endcase %}
@@ -0,0 +1,24 @@
1
+ <head>
2
+ <meta charset="UTF-8">
3
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
4
+ <link rel="alternate" type="application/rss+xml" title="{{ site.title }}" href="{{ '/feed.xml' | relative_url }}">
5
+
6
+ <meta charset="UTF-8">
7
+ <meta property="og:site_name" content="{{ site.title }}" />
8
+ <meta property="og:title" content="{{ page.title }}" />
9
+ <meta property="og:image" content="{{ site.url }}{{ site.baseurl }}{{ page.image }}" />
10
+ <meta property="og:description" content="{% if page.description %}{{ page.description }}{% elsif page.content and page.content != '' %}{{ page.content | strip_html | truncate: 150 }}{% else %}{{ site.description }}{% endif %}" />
11
+ <meta property="og:url" content="{{ site.url }}{{ site.baseurl }}{{ page.url }}" />
12
+ <meta property="og:type" content="website" />
13
+
14
+ <meta name="twitter:card" content="summary_large_image" />
15
+ <meta name="twitter:title" content="{{ page.title }}" />
16
+ <meta name="twitter:description" content="{% if page.description %}{{ page.description }}{% elsif page.content and page.content != '' %}{{ page.content | strip_html | truncate: 150 }}{% else %}{{ site.description }}{% endif %}" />
17
+ <meta name="twitter:image" content="{{ site.url }}{{ site.baseurl }}{{ page.image }}" />
18
+
19
+ <title>{{ page.title | default: site.title }}</title>
20
+ <link rel="stylesheet" href="{{ '/assets/css/style.css' | relative_url }}">
21
+ <link rel="stylesheet" href="{{ '/assets/css/custom.css' | relative_url }}">
22
+
23
+ <link rel="icon" href="{{ '/favicon.ico' | relative_url }}">
24
+ </head>
@@ -2,6 +2,8 @@
2
2
  {% if paginator.page > 1 %}
3
3
  <a href="{{ '/' | relative_url }}">1</a>
4
4
  <a href="{{ paginator.previous_page_path | relative_url }}">&laquo;</a>
5
+ {% else %}
6
+ <span class="current-page">1</span>
5
7
  {% endif %}
6
8
 
7
9
  {% assign start_page = paginator.page | minus: 3 %}
@@ -20,7 +22,7 @@
20
22
 
21
23
  {% if paginator.page < paginator.total_pages %}
22
24
  <a href="{{ paginator.next_page_path | relative_url }}">&raquo;</a>
23
- <a href="{{ paginator.last_page_path | relative_url }}">{{ paginator.total_pages }}</a>
25
+ <a href="{{ site.paginate_path | replace: ':num', paginator.total_pages | relative_url }}">{{ paginator.total_pages }}</a>
24
26
  {% endif %}
25
27
  </div>
26
28
  <br><br>
@@ -1,6 +1,5 @@
1
1
  <!-- Tags -->
2
2
  <div class="post">
3
-
4
3
  <div class="post-postcategories">
5
4
  <h3>
6
5
  {% for category in page.categories %}
@@ -14,22 +13,30 @@
14
13
  </div>
15
14
 
16
15
  <div class="post-postdate">
17
- <h3>{{ page.date | date: "%y/%m/%d" }}</h3>
16
+ <h3>{{ page.date | date: site.date_format }}</h3>
18
17
  </div>
19
18
 
20
19
  <div class="post-postcontent">
20
+ <div class="post-img">
21
+ {% if page.image %}
22
+ <img src="{{ page.image | relative_url }}" alt="{{ page.title }}" />
23
+ {% endif %}
24
+ </div>
25
+
21
26
  {{ content }}
22
27
  </div>
23
28
 
24
29
  <div class="post-postcategoriesbottom">
25
- <h3>
26
- {% for category in page.categories %}
27
- <a href="/categories/{{ category | downcase | url_encode }}/">{{ category }}</a>{% unless forloop.last %} | {% endunless %}
28
- {% endfor %}
29
- </h3>
30
+ <h3>
31
+ {% for tag in page.tags %}
32
+ <a>{{ tag }}</a>{% unless forloop.last %} | {% endunless %}
33
+ {% endfor %}
34
+ </h3>
35
+ <a href="#scrolltotop" class="scrolltotop"></a>
30
36
  </div>
31
37
 
32
38
  <hr class="endseparator">
33
39
  {% include userbox.html %}
40
+ {% include sharebtn.html %}
34
41
  {% include comments.html %}
35
42
  </div>
@@ -13,13 +13,13 @@
13
13
  <article class="post-card">
14
14
  <div class="post-image-wrapper">
15
15
  {% if post.image %}
16
- <img src="{{ post.image }}" alt="{{ post.title }}" class="post-image" />
16
+ <img src="{{ post.image | relative_url}}" alt="{{ post.title }}" class="post-image" />
17
17
  {% endif %}
18
18
  </div>
19
19
  <div class="post-info">
20
20
  <h3 class="post-labels">{{ post.categories | join: ' | ' }}</h3>
21
21
  <h2 class="post-title">{{ post.title }}</h2>
22
- <div class="post-date">{{ post.date | date: "%y/%m/%d" }}</div>
22
+ <div class="post-date">{{ post.date | date: site.date_format }}</div>
23
23
  </div>
24
24
  </article>
25
25
  </a>
@@ -16,19 +16,20 @@
16
16
  <!-- Entries Section -->
17
17
  <!-- Displays a list of recent blog posts. -->
18
18
  <h2>Entries</h2>
19
- <ul>
20
- <!-- Loop through the latest 5 posts in the site. -->
21
- {% for post in site.posts limit:5 %}
22
- <li>
23
- <!-- Each post is linked to its full page. -->
24
- <a class="rp-post-link" href="{{ post.url }}">
25
- <!-- Post title is shown here with a small heading. -->
26
- <h6 class="rp-post-title">{{ post.title }}</h6>
27
- </a>
28
- </li>
29
- {% endfor %}
30
- </ul>
31
-
19
+ <div class="rightpaneposts">
20
+ <ul>
21
+ <!-- Loop through the latest 5 posts in the site. -->
22
+ {% for post in site.posts limit:5 %}
23
+ <li>
24
+ <!-- Each post is linked to its full page. -->
25
+ <a class="rp-post-link" href="{{ post.url | relative_url }}">
26
+ <!-- Post title is shown here with a small heading. -->
27
+ <h6 class="rp-post-title">{{ post.title }}</h6>
28
+ </a>
29
+ </li>
30
+ {% endfor %}
31
+ </ul>
32
+ </div>
32
33
  <!-- Categories Section -->
33
34
  <!-- Lists all categories used across posts, sorted alphabetically. -->
34
35
  <h2>Categories</h2>
@@ -1,7 +1,5 @@
1
- <div class="search-box">
2
- <input type="text" class="search-input" placeholder="Search...">
3
- <ul class="search-results"></ul>
1
+ <div id="search-container" data-baseurl="{{ site.baseurl }}" class="search-box">
2
+ <input type="text" class="search-input" placeholder="Search...">
3
+ <ul class="search-results"></ul>
4
4
  </div>
5
-
6
-
7
5
  <script src="{{ '/assets/js/search.js' | relative_url }}"></script>
@@ -0,0 +1,5 @@
1
+ <div class="btnshare">
2
+ <input type="checkbox" id="toggleshare" />
3
+ <label for="toggleshare">Share this page</label>
4
+ <input class="urlshare" type="text" readonly value="{{ page.url | absolute_url }}" />
5
+ </div>
@@ -3,7 +3,7 @@
3
3
  <div class="toppanel">
4
4
  <!-- Left side of the pane, usually only has a title or logo -->
5
5
  <div class="tp-left">
6
- <img class="tp-banner" src="{{ '/assets/img/banner.svg' | relative_url }}" width="100%" />
6
+ <a href="{{ '/' | relative_url }}"><img class="tp-banner" src="{{ '/assets/img/banner.svg' | relative_url }}" width="100%" /></a>
7
7
  <!--<h1>{{ site.title }}</h1> -->
8
8
  </div>
9
9
 
@@ -19,7 +19,7 @@
19
19
  <div class="tp-right" id="mobile-menu">
20
20
  <ul class="tp-nav">
21
21
  <li><a href="{{ '/' | relative_url }}">Home</a></li>
22
- <li><a href="{{ '/about/' | relative_url }}">About</a></li>
22
+ <li><a href="{{ '/about/about' | relative_url }}">About</a></li>
23
23
  <li class="tp-dropdown">
24
24
  <input type="checkbox" id="social-toggle" class="dropdown-checkbox">
25
25
  <label for="social-toggle">Social Media</label>
@@ -1,11 +1,11 @@
1
1
  <!--Your personal box at the end of each post-->
2
2
 
3
3
  <div class="userbox">
4
- <img class="userpic" src="{{ '/assets/img/avatar.webp' | relative_url }}" alt="Avatar">
4
+ <img class="userpic" src="{{ '/assets/img/authors/' | append: page.author | append: '.webp' | relative_url }}" alt="Avatar">
5
5
  <div class="userbox-content">
6
- <h1>ItsZariep</h1>
7
- <h3>Cool Description</h3>
8
- <a href="{{ '/about/' | relative_url }}">About me</a>
6
+ <h1>{{ page.author }}</h1>
7
+ <h3>{% include authors.html author=page.author %}</h3>
8
+ <a href="{{ '/about/' | append: page.author | relative_url }}">About me</a>
9
9
  </div>
10
10
  </div>
11
11
  <br>
@@ -1,11 +1,6 @@
1
1
  <!DOCTYPE html>
2
2
  <html>
3
- <head>
4
- <meta charset="UTF-8">
5
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
- <title>{{ page.title | default: site.title }}</title>
7
- <link rel="stylesheet" href="{{ '/assets/css/style.css' | relative_url }}">
8
- </head>
3
+ {% include head.html %}
9
4
  <body>
10
5
  {% include toppane.html %}
11
6
  <main>
data/_layouts/home.html CHANGED
@@ -2,7 +2,6 @@
2
2
  layout: default
3
3
  ---
4
4
 
5
- <link rel="stylesheet" href="{{ '/assets/css/style.css' | relative_url }}">
6
5
  <div id="main-container">
7
6
  {% include leftpane.html %}
8
7
  {% include postgrid.html %}
data/_layouts/post.html CHANGED
@@ -2,24 +2,9 @@
2
2
  layout: default
3
3
  ---
4
4
 
5
- <!DOCTYPE html>
6
- <html>
7
- <head>
8
- <!-- OG Origin tags for social media share preview -->
9
- <meta charset="UTF-8">
10
- <meta property="og:title" content="{{ page.title }}" />
11
- <meta property="og:image" content="{{ page.image }}" />
12
- <meta property="og:url" content="{{ site.url }}{{ site.baseurl }}{{ page.url }}" />
13
- <meta property="og:type" content="website" />
14
-
15
- <title>{{ page.title }}</title>
16
- </head>
17
- <body>
18
- <div id="main-container">
19
- {% include leftpane.html %}
20
- {% include postcontent.html %}
21
- <!-- User box and comments are included on postcontent.html-->
22
- {% include rightpane.html %}
23
- </div>
24
- </body>
25
- </html>
5
+ <div id="main-container">
6
+ {% include leftpane.html %}
7
+ {% include postcontent.html %}
8
+ <!-- User box and comments are included on postcontent.html-->
9
+ {% include rightpane.html %}
10
+ </div>
@@ -0,0 +1 @@
1
+
data/assets/css/style.css CHANGED
@@ -53,6 +53,27 @@ a:hover {
53
53
  color: var(--accenthv);
54
54
  }
55
55
 
56
+ table {
57
+ margin: 0 auto;
58
+ width: 95%;
59
+ border-collapse: collapse;
60
+ box-shadow: 0 0 10px rgba(0,0,0,0.1);
61
+ }
62
+
63
+ th, td {
64
+ padding: 12px 15px;
65
+ border: 1px solid var(--grey1);
66
+ text-align: left;
67
+ }
68
+
69
+ thead {
70
+ background-color: var(--accent);
71
+ color: var(--accentfg);
72
+ }
73
+
74
+ tbody tr:nth-child(even) {
75
+ background-color: var(--black);
76
+ }
56
77
 
57
78
  /*-*/
58
79
 
@@ -227,6 +248,35 @@ input[type="text"] {
227
248
 
228
249
  /*CENTER SIDE (POST CONTENT)*/
229
250
 
251
+ .post {
252
+ text-align: justify;
253
+ display: flex;
254
+ flex-wrap: wrap;
255
+ overflow: auto;
256
+ word-wrap: break-word;
257
+ word-break: break-word;
258
+ flex-direction: column;
259
+ align-items: start;
260
+ align-self: stretch;
261
+ width:100%;
262
+ box-sizing: border-box;
263
+ }
264
+
265
+ .post figcaption {
266
+ display: flex;
267
+ margin: 0 auto;
268
+ justify-content: space-evenly;
269
+ color: var(--grey1);
270
+ }
271
+
272
+ blockquote {
273
+ color: var(--accenthv);
274
+ border-left: 4px solid var(--accenthv);
275
+ background-color: var(--black);
276
+ border-radius: 6px;
277
+ padding: 0 1rem 0 1rem;
278
+ }
279
+
230
280
  .post-postdate h3 {
231
281
  position: relative;
232
282
  top: -1rem;
@@ -238,6 +288,19 @@ input[type="text"] {
238
288
  text-align: justify;
239
289
  }
240
290
 
291
+ .post-postcontent img {
292
+ object-fit: contain;
293
+ width: 75%;
294
+ display: block;
295
+ margin-left: auto;
296
+ margin-right: auto;
297
+ }
298
+
299
+ .post-posttitle {
300
+ max-width: 95%;
301
+ text-align: justify;
302
+ }
303
+
241
304
  .language-plaintext.highlighter-rouge {
242
305
  background-color: var(--black);
243
306
  font-family: monospace;
@@ -264,19 +327,52 @@ input[type="text"] {
264
327
 
265
328
  hr.endseparator {
266
329
  background-color: white; /* sets the color of the line */
267
- width: 100%;
330
+ width: 95%;
268
331
  height: 2.6px;
269
332
  margin-left: 0;
270
333
  border: none; /* remove default border */
271
334
  }
272
335
 
336
+ .btnshare {
337
+ display: inline-block;
338
+ position: relative;
339
+ width: 100%;
340
+ }
341
+ #toggleshare {
342
+ display: none;
343
+ }
344
+ label[for="toggleshare"] {
345
+ display: inline-block;
346
+ padding: 7px 16px;
347
+ margin: 0vw 0vh 0vh 1vw;
348
+ max-width: 95%;
349
+ background: var(--accent);
350
+ color: var(--accentfg);
351
+ cursor: pointer;
352
+ border-radius: 5px;
353
+ user-select: none;
354
+ }
355
+ .urlshare {
356
+ display: none;
357
+ padding: 8px;
358
+ margin: 0vw 0vh 0vh 1vw;
359
+ max-width: 95%;
360
+ }
361
+ #toggleshare:checked + label {
362
+ display: none;
363
+ }
364
+ #toggleshare:checked ~ .urlshare {
365
+ display: inline-block;
366
+ width: 100%;
367
+ }
368
+
273
369
  .userbox {
274
370
  display: flex;
275
371
  align-items: flex-start;
276
372
  border: 3px solid var(--fg);
277
373
  border-radius: 5px;
278
374
  margin: 2vw 0vh 0vh 1vw;
279
- max-width: 500px;
375
+ max-width: 95%;
280
376
  font-family: sans-serif;
281
377
  position: relative;
282
378
  }
@@ -301,7 +397,7 @@ hr.endseparator {
301
397
  }
302
398
 
303
399
  .userbox-content h3 {
304
- margin: 4px 0 12px 0;
400
+ margin: 4px 5px 12px 0;
305
401
  font-weight: normal;
306
402
  color: #666;
307
403
  }
@@ -326,7 +422,7 @@ hr.endseparator {
326
422
  /* CENTER SIDE (POST LIST) */
327
423
 
328
424
  #posts-container {
329
- width: 70%;
425
+ width: 100%;
330
426
  display: grid;
331
427
  grid-template-columns: repeat(auto-fill, minmax(30%, 1fr));
332
428
  gap: 2vw;
@@ -334,6 +430,7 @@ hr.endseparator {
334
430
  }
335
431
 
336
432
  .post-card {
433
+ height: 100%;
337
434
  display: flex;
338
435
  flex-direction: column;
339
436
  border-radius: 8px;
@@ -354,7 +451,9 @@ hr.endseparator {
354
451
  .post-image-wrapper {
355
452
  position: relative;
356
453
  width: 100%;
357
- padding-top: 56.25%; /* 16:9 aspect ratio (9 / 16 * 100%) */
454
+ /* padding-top: 56.25%; /* 16:9 aspect ratio (9 / 16 * 100%) */
455
+ /* padding-top: 75%; /* 4:3 aspect ratio (9 / 16 * 100%) */
456
+ padding-top: 52.36%; /* 1.91:1 aspect ratio (OG:Image standard) */
358
457
  overflow: hidden;
359
458
  border-radius: 8px 8px 0 0;
360
459
  }
@@ -432,6 +531,12 @@ hr.endseparator {
432
531
  width: 20%;
433
532
  padding: 0 0vw 0;
434
533
  margin-left: 0vw;
534
+ /* Uncomment this if you want sticky behavior
535
+ position: sticky;
536
+ top: 0;
537
+ align-self: flex-start;
538
+ */
539
+
435
540
  }
436
541
 
437
542
 
@@ -452,6 +557,10 @@ button {
452
557
  background-color: var(--accent);
453
558
  }
454
559
 
560
+ .rightpaneposts {
561
+ width: 75%
562
+ }
563
+
455
564
  .rp-post-title {
456
565
  margin: 0;
457
566
  font-size: 1.1rem;
@@ -592,170 +701,180 @@ button {
592
701
 
593
702
  /* PORTRAIT SCREEN CHANGES*/
594
703
  @media only screen and (max-aspect-ratio: 1/1) {
595
- body {
596
- background-color: var(--bg);
597
- color: var(--fg);
598
- margin: 0;
599
- padding: 0;
600
- padding-bottom: 9rem;
601
- font-family: "Sans";
602
- }
704
+ body {
705
+ background-color: var(--bg);
706
+ color: var(--fg);
707
+ margin: 0;
708
+ padding: 0;
709
+ padding-bottom: 9rem;
710
+ font-family: "Sans";
711
+ }
603
712
 
604
- .search-box
605
- {
606
- display:flex;
607
- width: 90%;
608
- margin: 0 auto;
609
- flex-direction: column;
610
- margin: 0 auto;
611
- }
713
+ .search-box
714
+ {
715
+ display:flex;
716
+ width: 90%;
717
+ margin: 0 auto;
718
+ flex-direction: column;
719
+ margin: 0 auto;
720
+ }
612
721
 
613
- .bottompane {
614
- position: absolute;
615
- bottom: 0;
616
- left: 0;
617
- width: 100%;
618
- height: 7rem;
619
- display: flex;
620
- justify-content: space-between;
621
- align-items: center;
622
- background-color: var(--black);
623
- z-index: 1000;
624
- flex-direction: column;
625
- }
722
+ .bottompane {
723
+ position: absolute;
724
+ bottom: 0;
725
+ left: 0;
726
+ width: 100%;
727
+ height: 7rem;
728
+ display: flex;
729
+ justify-content: space-between;
730
+ align-items: center;
731
+ background-color: var(--black);
732
+ z-index: 1000;
733
+ flex-direction: column;
734
+ }
626
735
 
627
- .burger-menu {
628
- display: flex;
629
- }
736
+ .burger-menu {
737
+ display: flex;
738
+ }
630
739
 
631
- /* Hide menu by default on mobile */
632
- .tp-right {
633
- display: none;
634
- position: absolute;
635
- top: 100%;
636
- left: 0;
637
- right: 0;
638
- background-color: var(--black);
639
- box-shadow: 0 2px 5px rgba(0,0,0,0.2);
640
- z-index: 1;
641
- }
740
+ /* Hide menu by default on mobile */
741
+ .tp-right {
742
+ display: none;
743
+ position: absolute;
744
+ top: 100%;
745
+ left: 0;
746
+ right: 0;
747
+ background-color: var(--black);
748
+ box-shadow: 0 2px 5px rgba(0,0,0,0.2);
749
+ z-index: 1;
750
+ }
642
751
 
643
- /* Show menu when burger checkbox is checked */
644
- #burger-toggle:checked ~ .tp-right {
645
- display: block;
646
- }
752
+ /* Show menu when burger checkbox is checked */
753
+ #burger-toggle:checked ~ .tp-right {
754
+ display: block;
755
+ }
647
756
 
648
- .tp-nav {
649
- flex-direction: column;
650
- width: 100%;
651
- }
757
+ .tp-nav {
758
+ flex-direction: column;
759
+ width: 100%;
760
+ }
652
761
 
653
762
 
654
- .tp-nav li {
655
- width: 100%;
656
- text-align: left;
657
- padding: 15px;
658
- border-bottom: 1px solid var(--bg);
659
- }
763
+ .tp-nav li {
764
+ width: 100%;
765
+ text-align: left;
766
+ padding: 15px;
767
+ border-bottom: 1px solid var(--bg);
768
+ }
660
769
 
661
- /* Handle dropdown on mobile */
662
- .tp-dropdown-elements {
663
- display: none;
664
- position: static;
665
- box-shadow: none;
666
- padding-left: 15px;
667
- margin-top: 10px;
668
- }
770
+ /* Handle dropdown on mobile */
771
+ .tp-dropdown-elements {
772
+ display: none;
773
+ position: static;
774
+ box-shadow: none;
775
+ padding-left: 15px;
776
+ margin-top: 10px;
777
+ }
669
778
 
670
- /* Show dropdown when its checkbox is checked */
671
- #social-toggle:checked ~ .tp-dropdown-elements {
672
- display: block;
673
- }
779
+ /* Show dropdown when its checkbox is checked */
780
+ #social-toggle:checked ~ .tp-dropdown-elements {
781
+ display: block;
782
+ }
674
783
 
675
- /* Override hover behavior on mobile */
676
- .tp-dropdown:hover .tp-dropdown-elements {
677
- display: none;
678
- }
784
+ /* Override hover behavior on mobile */
785
+ .tp-dropdown:hover .tp-dropdown-elements {
786
+ display: none;
787
+ }
679
788
 
680
- /* Label for dropdown toggle */
681
- .tp-dropdown label {
682
- display: block;
683
- cursor: pointer;
684
- }
789
+ /* Label for dropdown toggle */
790
+ .tp-dropdown label {
791
+ display: block;
792
+ cursor: pointer;
793
+ }
685
794
 
686
- #main-container {
687
- display: flex;
688
- flex-direction: column;
689
- padding-top: 2rem;
690
- width: 100vw;
691
- max-width: 100vw;
692
- justify-content: space-between;
693
- align-items: center;
694
- }
795
+ #main-container {
796
+ display: flex;
797
+ flex-direction: column;
798
+ padding-top: 2rem;
799
+ width: 100vw;
800
+ max-width: 100vw;
801
+ justify-content: space-between;
802
+ align-items: center;
803
+ }
695
804
 
696
- .post {
697
- text-align: justify;
698
- display: flex;
699
- flex-wrap: wrap;
700
- overflow: auto;
701
- word-wrap: break-word;
702
- word-break: break-word;
703
- flex-direction: column;
704
- align-items: start;
705
- width: 90vw;
706
- max-width: 90vw;
707
- /*
708
- overflow-x: hidden;
709
- */
710
- box-sizing: border-box;
711
- }
805
+ .post {
806
+ margin: 0 auto;
807
+ text-align: justify;
808
+ display: flex;
809
+ flex-wrap: wrap;
810
+ overflow: auto;
811
+ word-wrap: break-word;
812
+ word-break: break-word;
813
+ flex-direction: column;
814
+ align-items: start;
815
+ width: 90vw;
816
+ max-width: 90vw;
817
+ /*
818
+ overflow-x: hidden;
819
+ */
820
+ box-sizing: border-box;
821
+ }
822
+ .post-postcontent {
823
+ max-width: 100%;
824
+ text-align: justify;
825
+ }
712
826
 
827
+ .post-postcontent img {
828
+ color: red;
829
+ object-fit: contain;
830
+ width: 100%;
831
+ }
713
832
 
714
- #left-container {
715
- width: 90%;
716
- padding: 0 0vw 0;
717
- margin-left: 0vw;
718
- padding-bottom: 1rem;
719
- }
833
+ #left-container {
834
+ width: 90%;
835
+ padding: 0 0vw 0;
836
+ margin-left: 0vw;
837
+ padding-bottom: 1rem;
838
+ }
720
839
 
721
- .leftpane-landscapescreen {
722
- display: none;
723
- }
840
+ .leftpane-landscapescreen {
841
+ display: none;
842
+ }
724
843
 
725
- .leftpane-portraitscreen {
726
- display: block;
727
- }
844
+ .leftpane-portraitscreen {
845
+ display: block;
846
+ }
728
847
 
729
- #posts-container {
730
- width: 90%;
731
- display: grid;
732
- grid-template-columns: repeat(auto-fill, minmax(60%, 1fr));
733
- gap: 2vw;
734
- padding: 0 0 0 0vw;
735
- }
848
+ #posts-container {
849
+ width: 90%;
850
+ display: grid;
851
+ grid-template-columns: repeat(auto-fill, minmax(60%, 1fr));
852
+ gap: 2vw;
853
+ padding: 0 0 0 0vw;
854
+ }
736
855
 
737
- .pagination-controls {
738
- margin-top: 1rem;
739
- grid-column: 1 / -1;
740
- justify-self: center;
741
- width: fit-content;
742
- }
856
+ .pagination-controls {
857
+ margin-top: 1rem;
858
+ grid-column: 1 / -1;
859
+ justify-self: center;
860
+ width: fit-content;
861
+ }
743
862
 
744
- .pagination-controls a {
745
- font-size: 1.3rem;
746
- text-decoration: none;
747
- border: 2px solid var(--grey1);
748
- padding: 4px 8px;
749
- margin: 0 4px;
750
- display: inline-block;
751
- color: var(--fg);
752
- border-radius: 4px;
753
- }
863
+ .pagination-controls a {
864
+ font-size: 1.3rem;
865
+ text-decoration: none;
866
+ border: 2px solid var(--grey1);
867
+ padding: 4px 8px;
868
+ margin: 0 4px;
869
+ display: inline-block;
870
+ color: var(--fg);
871
+ border-radius: 4px;
872
+ }
754
873
 
755
- #right-container {
756
- width: 90%;
757
- padding: 0 0vw 0;
758
- margin-left: 0vw;
759
- }
874
+ #right-container {
875
+ width: 90%;
876
+ padding: 0 0vw 0;
877
+ margin-left: 0vw;
878
+ }
760
879
 
761
880
  }
Binary file
Binary file
data/assets/js/search.js CHANGED
@@ -1,11 +1,23 @@
1
1
  let searchData = [];
2
2
 
3
- fetch('/search.json')
4
- .then(res => res.json())
5
- .then(data =>
3
+ const baseurl = document.getElementById('search-container').getAttribute('data-baseurl');
4
+ fetch(`${baseurl}/search.json`)
5
+ .then(res => res.text())
6
+ .then(text =>
6
7
  {
7
- searchData = data;
8
- initSearchBars();
8
+ try
9
+ {
10
+ let cleanedText = text
11
+ .replace(/\\(?!["\\/bfnrtu])/g, '\\\\')
12
+ .replace(/[\u0000-\u001F]/g, '');
13
+
14
+ searchData = JSON.parse(cleanedText);
15
+ initSearchBars();
16
+ }
17
+ catch (e)
18
+ {
19
+ console.error("Failed to parse cleaned JSON:", e);
20
+ }
9
21
  });
10
22
 
11
23
  function initSearchBars()
@@ -21,13 +33,32 @@ function initSearchBars()
21
33
  {
22
34
  const query = this.value.toLowerCase();
23
35
  resultsContainer.innerHTML = '';
24
-
25
36
  if (query.length < 2) return;
26
37
 
27
- const results = searchData.filter(item =>
28
- item.title.toLowerCase().includes(query) ||
29
- item.content.toLowerCase().includes(query)
30
- );
38
+ let results = [];
39
+ if (Array.isArray(searchData) && searchData.length > 0)
40
+ {
41
+ results = searchData.filter(item =>
42
+ (item.title?.toLowerCase() || '').includes(query) ||
43
+ (item.tags?.toLowerCase() || '').includes(query) ||
44
+ (item.content?.toLowerCase() || '').includes(query)
45
+ );
46
+ }
47
+
48
+
49
+ if (results.length > 0)
50
+ {
51
+ results.sort((a, b) =>
52
+ {
53
+ const aTitle = (a.title || '').toLowerCase();
54
+ const bTitle = (b.title || '').toLowerCase();
55
+
56
+ const aScore = aTitle === query ? 0 : aTitle.startsWith(query) ? 1 : 2;
57
+ const bScore = bTitle === query ? 0 : bTitle.startsWith(query) ? 1 : 2;
58
+
59
+ return aScore - bScore;
60
+ });
61
+ }
31
62
 
32
63
  results.slice(0, 10).forEach(result =>
33
64
  {
@@ -36,5 +67,6 @@ function initSearchBars()
36
67
  resultsContainer.appendChild(li);
37
68
  });
38
69
  });
70
+
39
71
  });
40
72
  }
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tessera-jekyll-theme
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - ItsZariep
@@ -61,14 +61,17 @@ files:
61
61
  - LICENSE.txt
62
62
  - README.md
63
63
  - _config.yml
64
+ - _includes/authors.html
64
65
  - _includes/bottompane.html
65
66
  - _includes/comments.html
67
+ - _includes/head.html
66
68
  - _includes/leftpane.html
67
69
  - _includes/pagination-controls.html
68
70
  - _includes/postcontent.html
69
71
  - _includes/postgrid.html
70
72
  - _includes/rightpane.html
71
73
  - _includes/searchbar.html
74
+ - _includes/sharebtn.html
72
75
  - _includes/toppane.html
73
76
  - _includes/userbox.html
74
77
  - _layouts/archive.html
@@ -76,7 +79,10 @@ files:
76
79
  - _layouts/home.html
77
80
  - _layouts/page.html
78
81
  - _layouts/post.html
82
+ - assets/css/custom.css
79
83
  - assets/css/style.css
84
+ - assets/img/authors/ItsZariep.webp
85
+ - assets/img/authors/Tessera.webp
80
86
  - assets/img/avatar.webp
81
87
  - assets/img/banner.svg
82
88
  - assets/js/search.js