first commits

This commit is contained in:
Rubens Jean Simon 2024-08-13 03:13:45 +00:00
parent 19fb728f04
commit b0c003ba2e
34 changed files with 888 additions and 28 deletions

View File

@ -14,19 +14,19 @@ timezone:
# jekyll-seo-tag settings https://github.com/jekyll/jekyll-seo-tag/blob/master/docs/usage.md
# ↓ --------------------------
title: Chirpy # the main title
title: Rubens Jean Simon # the main title
tagline: A text-focused Jekyll theme # it will display as the sub-title
tagline: Software Engineer, Captain (Kozenet Pro) # it will display as the sub-title
description: >- # used by seo meta and the atom feed
A minimal, responsive and feature-rich Jekyll theme for technical writing.
Kozenet Pro - Projects Documentation and More
# Fill in the protocol & hostname for your site.
# e.g. 'https://username.github.io', note that it does not end with a '/'.
url: ""
github:
username: github_username # change to your github username
username: rubemoon # change to your github username
twitter:
username: twitter_username # change to your twitter username
@ -34,24 +34,24 @@ twitter:
social:
# Change to your full name.
# It will be displayed as the default author of the posts and the copyright owner in the Footer
name: your_full_name
email: example@domain.com # change to your email address
name: Rubens Jean Simon
email: contact@kozenetpro.com # change to your email address
links:
# The first element serves as the copyright owner's link
- https://twitter.com/username # change to your twitter homepage
- https://github.com/username # change to your github homepage
- https://www.rubensjeansimon.com # change to your homepage
- https://github.com/rubemoon # change to your github homepage
# Uncomment below to add more social links
# - https://www.facebook.com/username
# - https://www.linkedin.com/in/username
# Site Verification Settings
webmaster_verifications:
google: # fill in your Google verification code
bing: # fill in your Bing verification code
alexa: # fill in your Alexa verification code
yandex: # fill in your Yandex verification code
baidu: # fill in your Baidu verification code
facebook: # fill in your Facebook verification code
# # Site Verification Settings
# webmaster_verifications:
# google: # fill in your Google verification code
# bing: # fill in your Bing verification code
# alexa: # fill in your Alexa verification code
# yandex: # fill in your Yandex verification code
# baidu: # fill in your Baidu verification code
# facebook: # fill in your Facebook verification code
# ↑ --------------------------
# The end of `jekyll-seo-tag` settings
@ -59,7 +59,7 @@ webmaster_verifications:
# Web Analytics Settings
analytics:
google:
id: # fill in your Google Analytics ID
id: "G-PNQNEFDK81"
goatcounter:
id: # fill in your GoatCounter ID
umami:
@ -86,7 +86,7 @@ pageviews:
# light - Use the light color scheme
# dark - Use the dark color scheme
#
theme_mode: # [light | dark]
theme_mode: dark # [light | dark]
# The CDN endpoint for media resources.
# Notice that once it is assigned, the CDN url
@ -96,7 +96,7 @@ theme_mode: # [light | dark]
cdn:
# the avatar on sidebar, support local or CORS resources
avatar:
avatar: assets/img/headers/kozenetproIMG.svg
# The URL of the site-wide social preview image used in SEO `og:image` meta tag.
# It can be overridden by a customized `page.image` in front matter.

View File

@ -1,14 +1,22 @@
# The contact options.
- type: youtube
icon: "fab fa-youtube"
url: "https://www.youtube.com/@kozenetpro"
- type: linkedin
icon: 'fab fa-linkedin' # icons powered by <https://fontawesome.com/>
url: 'https://www.linkedin.com/in/rubens-jean-simon/' # Fill with your Linkedin homepage
- type: github
icon: "fab fa-github"
- type: twitter
icon: "fa-brands fa-x-twitter"
#- type: twitter
# icon: "fa-brands fa-x-twitter"
- type: email
icon: "fas fa-envelope"
noblank: true # open link in current tab
# - type: email
# icon: "fas fa-envelope"
# noblank: true # open link in current tab
- type: rss
icon: "fas fa-rss"

View File

@ -16,10 +16,10 @@ platforms:
# Uncomment below if you need to.
#
# - type: Linkedin
# icon: "fab fa-linkedin"
# link: "https://www.linkedin.com/sharing/share-offsite/?url=URL"
#
- type: Linkedin
icon: "fab fa-linkedin"
link: "https://www.linkedin.com/sharing/share-offsite/?url=URL"
# - type: Weibo
# icon: "fab fa-weibo"
# link: "https://service.weibo.com/share/share.php?title=TITLE&url=URL"

9
_includes/analytics.html Normal file
View File

@ -0,0 +1,9 @@
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id={{ site.google_analytics.id }}"></script>
<script>
/* global dataLayer */
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', '{{ site.google_analytics.id }}');
</script>

19
_includes/favicons.html Normal file
View File

@ -0,0 +1,19 @@
<!--
The Favicons for Web, Android, Microsoft, and iOS (iPhone and iPad) Apps
Generated by: https://realfavicongenerator.net/
-->
{% capture favicon_path %}{{ '/assets/img/favicons' | relative_url }}{% endcapture %}
<link rel="apple-touch-icon" sizes="180x180" href="{{ favicon_path }}/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="{{ favicon_path }}/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="{{ favicon_path }}/favicon-16x16.png">
{% if site.pwa.enabled %}
<link rel="manifest" href="{{ favicon_path }}/site.webmanifest">
{% endif %}
<link rel="shortcut icon" href="{{ favicon_path }}/favicon.ico">
<meta name="apple-mobile-web-app-title" content="{{ site.title }}">
<meta name="application-name" content="{{ site.title }}">
<meta name="msapplication-TileColor" content="#da532c">
<meta name="msapplication-config" content="{{ favicon_path }}/browserconfig.xml">
<meta name="theme-color" content="#ffffff">

27
_includes/footer.html Normal file
View File

@ -0,0 +1,27 @@
<!-- The Footer -->
<footer
aria-label="Site Info"
class="
d-flex flex-column justify-content-center text-muted
flex-lg-row justify-content-lg-between align-items-lg-center pb-lg-3
"
>
<p>
{{ '©' }}
<time>{{ 'now' | date: '%Y' }}</time>
<a href="{{ site.social.links[0] }}">{{ site.social.name }}</a>.
{% if site.data.locales[include.lang].copyright.brief %}
<span
data-bs-toggle="tooltip"
data-bs-placement="top"
title="{{ site.data.locales[include.lang].copyright.verbose }}"
>
{{- site.data.locales[include.lang].copyright.brief -}}
</span>
{% endif %}
</p>
<!-- Custom Link to Digital Den -->
<p><a href="https://www.kozenetpro.com" target="_blank" rel="noopener">Kozenet Pro</a></p>
</footer>

35
_layouts/archives.html Normal file
View File

@ -0,0 +1,35 @@
---
layout: page
# The Archives of posts.
---
{% include lang.html %}
{% assign df_strftime_m = site.data.locales[lang].df.archives.strftime | default: '/ %m' %}
{% assign df_dayjs_m = site.data.locales[lang].df.archives.dayjs | default: '/ MM' %}
<div id="archives" class="pl-xl-3">
{% for post in site.posts %}
{% assign cur_year = post.date | date: '%Y' %}
{% if cur_year != last_year %}
{% unless forloop.first %}</ul>{% endunless %}
<time class="year lead d-block">{{ cur_year }}</time>
{{ '<ul class="list-unstyled">' }}
{% assign last_year = cur_year %}
{% endif %}
<li>
{% assign ts = post.date | date: '%s' %}
<span class="date day" data-ts="{{ ts }}" data-df="DD">{{ post.date | date: '%d' }}</span>
<span class="date month small text-muted ms-1" data-ts="{{ ts }}" data-df="{{ df_dayjs_m }}">
{{ post.date | date: df_strftime_m }}
</span>
<a href="{{ post.url | relative_url }}">{{ post.title }}</a>
</li>
{% if forloop.last %}</ul>{% endif %}
{% endfor %}
</div>

138
_layouts/categories.html Normal file
View File

@ -0,0 +1,138 @@
---
layout: page
# All the Categories of posts
---
{% include lang.html %}
{% assign HEAD_PREFIX = 'h_' %}
{% assign LIST_PREFIX = 'l_' %}
{% assign group_index = 0 %}
{% assign sort_categories = site.categories | sort %}
{% for category in sort_categories %}
{% assign category_name = category | first %}
{% assign posts_of_category = category | last %}
{% assign first_post = posts_of_category | first %}
{% if category_name == first_post.categories[0] %}
{% assign sub_categories = '' | split: '' %}
{% for post in posts_of_category %}
{% assign second_category = post.categories[1] %}
{% if second_category %}
{% unless sub_categories contains second_category %}
{% assign sub_categories = sub_categories | push: second_category %}
{% endunless %}
{% endif %}
{% endfor %}
{% assign sub_categories = sub_categories | sort %}
{% assign sub_categories_size = sub_categories | size %}
<div class="card categories">
<!-- top-category -->
<div
id="{{ HEAD_PREFIX }}{{ group_index }}"
class="card-header d-flex justify-content-between hide-border-bottom"
>
<span class="ms-2">
<i class="far fa-folder{% if sub_categories_size > 0 %}-open{% endif %} fa-fw"></i>
{% capture _category_url %}/categories/{{ category_name | slugify | url_encode }}/{% endcapture %}
<a href="{{ _category_url | relative_url }}" class="mx-2">{{ category_name }}</a>
<!-- content count -->
{% assign top_posts_size = site.categories[category_name] | size %}
<span class="text-muted small font-weight-light">
{% if sub_categories_size > 0 %}
{{ sub_categories_size }}
{% if sub_categories_size > 1 %}
{{
site.data.locales[lang].categories.category_measure.plural
| default: site.data.locales[lang].categories.category_measure
}}
{% else %}
{{
site.data.locales[lang].categories.category_measure.singular
| default: site.data.locales[lang].categories.category_measure
}}
{% endif -%}
,
{% endif %}
{{ top_posts_size }}
{% if top_posts_size > 1 %}
{{
site.data.locales[lang].categories.post_measure.plural
| default: site.data.locales[lang].categories.post_measure
}}
{% else %}
{{
site.data.locales[lang].categories.post_measure.singular
| default: site.data.locales[lang].categories.post_measure
}}
{% endif %}
</span>
</span>
<!-- arrow -->
{% if sub_categories_size > 0 %}
<a
href="#{{ LIST_PREFIX }}{{ group_index }}"
data-bs-toggle="collapse"
aria-expanded="true"
aria-label="{{ HEAD_PREFIX }}{{ group_index }}-trigger"
class="category-trigger hide-border-bottom"
>
<i class="fas fa-fw fa-angle-down"></i>
</a>
{% else %}
<span data-bs-toggle="collapse" class="category-trigger hide-border-bottom disabled">
<i class="fas fa-fw fa-angle-right"></i>
</span>
{% endif %}
</div>
<!-- .card-header -->
<!-- Sub-categories -->
{% if sub_categories_size > 0 %}
<div id="{{ LIST_PREFIX }}{{ group_index }}" class="collapse show" aria-expanded="true">
<ul class="list-group">
{% for sub_category in sub_categories %}
<li class="list-group-item">
<i class="far fa-folder fa-fw"></i>
{% capture _sub_ctg_url %}/categories/{{ sub_category | slugify | url_encode }}/{% endcapture %}
<a href="{{ _sub_ctg_url | relative_url }}" class="mx-2">{{ sub_category }}</a>
{% assign posts_size = site.categories[sub_category] | size %}
<span class="text-muted small font-weight-light">
{{ posts_size }}
{% if posts_size > 1 %}
{{
site.data.locales[lang].categories.post_measure.plural
| default: site.data.locales[lang].categories.post_measure
}}
{% else %}
{{
site.data.locales[lang].categories.post_measure.singular
| default: site.data.locales[lang].categories.post_measure
}}
{% endif %}
</span>
</li>
{% endfor %}
</ul>
</div>
{% endif %}
</div>
<!-- .card -->
{% assign group_index = group_index | plus: 1 %}
{% endif %}
{% endfor %}

24
_layouts/category.html Normal file
View File

@ -0,0 +1,24 @@
---
layout: page
# The Category layout
---
{% include lang.html %}
<div id="page-category">
<h1 class="ps-lg-2">
<i class="far fa-folder-open fa-fw text-muted"></i>
{{ page.title }}
<span class="lead text-muted ps-2">{{ page.posts | size }}</span>
</h1>
<ul class="content ps-0">
{% for post in page.posts %}
<li class="d-flex justify-content-between px-md-3">
<a href="{{ post.url | relative_url }}">{{ post.title }}</a>
<span class="dash flex-grow-1"></span>
{% include datetime.html date=post.date class='text-muted small text-nowrap' lang=lang %}
</li>
{% endfor %}
</ul>
</div>

10
_layouts/compress.html Normal file
View File

@ -0,0 +1,10 @@
---
# Jekyll layout that compresses HTML
# v3.1.0
# http://jch.penibelst.de/
# © 20142015 Anatol Broder
# MIT License
---
{% capture _LINE_FEED %}
{% endcapture %}{% if site.compress_html.ignore.envs contains jekyll.environment or site.compress_html.ignore.envs == "all" %}{{ content }}{% else %}{% capture _content %}{{ content }}{% endcapture %}{% assign _profile = site.compress_html.profile %}{% if site.compress_html.endings == "all" %}{% assign _endings = "html head body li dt dd optgroup option colgroup caption thead tbody tfoot tr td th" | split: " " %}{% else %}{% assign _endings = site.compress_html.endings %}{% endif %}{% for _element in _endings %}{% capture _end %}</{{ _element }}>{% endcapture %}{% assign _content = _content | remove: _end %}{% endfor %}{% if _profile and _endings %}{% assign _profile_endings = _content | size | plus: 1 %}{% endif %}{% for _element in site.compress_html.startings %}{% capture _start %}<{{ _element }}>{% endcapture %}{% assign _content = _content | remove: _start %}{% endfor %}{% if _profile and site.compress_html.startings %}{% assign _profile_startings = _content | size | plus: 1 %}{% endif %}{% if site.compress_html.comments == "all" %}{% assign _comments = "<!-- -->" | split: " " %}{% else %}{% assign _comments = site.compress_html.comments %}{% endif %}{% if _comments.size == 2 %}{% capture _comment_befores %}.{{ _content }}{% endcapture %}{% assign _comment_befores = _comment_befores | split: _comments.first %}{% for _comment_before in _comment_befores %}{% if forloop.first %}{% continue %}{% endif %}{% capture _comment_outside %}{% if _carry %}{{ _comments.first }}{% endif %}{{ _comment_before }}{% endcapture %}{% capture _comment %}{% unless _carry %}{{ _comments.first }}{% endunless %}{{ _comment_outside | split: _comments.last | first }}{% if _comment_outside contains _comments.last %}{{ _comments.last }}{% assign _carry = false %}{% else %}{% assign _carry = true %}{% endif %}{% endcapture %}{% assign _content = _content | remove_first: _comment %}{% endfor %}{% if _profile %}{% assign _profile_comments = _content | size | plus: 1 %}{% endif %}{% endif %}{% assign _pre_befores = _content | split: "<pre" %}{% assign _content = "" %}{% for _pre_before in _pre_befores %}{% assign _pres = _pre_before | split: "</pre>" %}{% assign _pres_after = "" %}{% if _pres.size != 0 %}{% if site.compress_html.blanklines %}{% assign _lines = _pres.last | split: _LINE_FEED %}{% capture _pres_after %}{% for _line in _lines %}{% assign _trimmed = _line | split: " " | join: " " %}{% if _trimmed != empty or forloop.last %}{% unless forloop.first %}{{ _LINE_FEED }}{% endunless %}{{ _line }}{% endif %}{% endfor %}{% endcapture %}{% else %}{% assign _pres_after = _pres.last | split: " " | join: " " %}{% endif %}{% endif %}{% capture _content %}{{ _content }}{% if _pre_before contains "</pre>" %}<pre{{ _pres.first }}</pre>{% endif %}{% unless _pre_before contains "</pre>" and _pres.size == 1 %}{{ _pres_after }}{% endunless %}{% endcapture %}{% endfor %}{% if _profile %}{% assign _profile_collapse = _content | size | plus: 1 %}{% endif %}{% if site.compress_html.clippings == "all" %}{% assign _clippings = "html head title base link meta style body article section nav aside h1 h2 h3 h4 h5 h6 hgroup header footer address p hr blockquote ol ul li dl dt dd figure figcaption main div table caption colgroup col tbody thead tfoot tr td th" | split: " " %}{% else %}{% assign _clippings = site.compress_html.clippings %}{% endif %}{% for _element in _clippings %}{% assign _edges = " <e;<e; </e>;</e>;</e> ;</e>" | replace: "e", _element | split: ";" %}{% assign _content = _content | replace: _edges[0], _edges[1] | replace: _edges[2], _edges[3] | replace: _edges[4], _edges[5] %}{% endfor %}{% if _profile and _clippings %}{% assign _profile_clippings = _content | size | plus: 1 %}{% endif %}{{ _content }}{% if _profile %} <table id="compress_html_profile_{{ site.time | date: "%Y%m%d" }}" class="compress_html_profile"> <thead> <tr> <td>Step <td>Bytes <tbody> <tr> <td>raw <td>{{ content | size }}{% if _profile_endings %} <tr> <td>endings <td>{{ _profile_endings }}{% endif %}{% if _profile_startings %} <tr> <td>startings <td>{{ _profile_startings }}{% endif %}{% if _profile_comments %} <tr> <td>comments <td>{{ _profile_comments }}{% endif %}{% if _profile_collapse %} <tr> <td>collapse <td>{{ _profile_collapse }}{% endif %}{% if _profile_clippings %} <tr> <td>clippings <td>{{ _profile_clippings }}{% endif %} </table>{% endif %}{% endif %}

90
_layouts/default.html Normal file
View File

@ -0,0 +1,90 @@
---
layout: compress
---
<!doctype html>
{% include origin-type.html %}
{% include lang.html %}
{% if site.theme_mode %}
{% capture prefer_mode %}data-mode="{{ site.theme_mode }}"{% endcapture %}
{% endif %}
<!-- `site.alt_lang` can specify a language different from the UI -->
<html lang="{{ site.alt_lang | default: site.lang }}" {{ prefer_mode }}>
{% include head.html %}
{% if jekyll.environment == 'production' and site.google_analytics %}
{% include analytics.html %}
{% endif %}
</head>
<body>
{% include sidebar.html lang=lang %}
<div id="main-wrapper" class="d-flex justify-content-center">
<div class="container d-flex flex-column px-xxl-5">
{% include topbar.html lang=lang %}
<div class="row flex-grow-1">
<main aria-label="Main Content" class="col-12 col-lg-11 col-xl-9 px-md-4">
{% if layout.refactor or layout.layout == 'default' %}
{% include refactor-content.html content=content lang=lang %}
{% else %}
{{ content }}
{% endif %}
</main>
<!-- panel -->
<aside aria-label="Panel" id="panel-wrapper" class="col-xl-3 ps-2 mb-5 text-muted">
<div class="access">
{% include_cached update-list.html lang=lang %}
{% include_cached trending-tags.html lang=lang %}
</div>
{% for _include in layout.panel_includes %}
{% assign _include_path = _include | append: '.html' %}
{% include {{ _include_path }} lang=lang %}
{% endfor %}
</aside>
</div>
<div class="row">
<!-- tail -->
<div id="tail-wrapper" class="col-12 col-lg-11 col-xl-9 px-md-4">
{% for _include in layout.tail_includes %}
{% assign _include_path = _include | append: '.html' %}
{% include {{ _include_path }} lang=lang %}
{% endfor %}
{% include_cached footer.html lang=lang %}
</div>
</div>
{% include_cached search-results.html lang=lang %}
</div>
<aside aria-label="Scroll to Top">
<button id="back-to-top" type="button" class="btn btn-lg btn-box-shadow">
<i class="fas fa-angle-up"></i>
</button>
</aside>
</div>
<div id="mask"></div>
{% if site.pwa.enabled %}
{% include_cached notification.html lang=lang %}
{% endif %}
<!-- JavaScripts -->
{% include js-selector.html %}
{% if page.mermaid %}
{% include mermaid.html %}
{% endif %}
{% include_cached search-loader.html %}
</body>
</html>

118
_layouts/home.html Normal file
View File

@ -0,0 +1,118 @@
---
layout: default
refactor: true
---
{% include lang.html %}
{% assign pinned = site.posts | where: 'pin', 'true' %}
{% assign default = site.posts | where_exp: 'item', 'item.pin != true and item.hidden != true' %}
{% assign posts = '' | split: '' %}
<!-- Get pinned posts -->
{% assign offset = paginator.page | minus: 1 | times: paginator.per_page %}
{% assign pinned_num = pinned.size | minus: offset %}
{% if pinned_num > 0 %}
{% for i in (offset..pinned.size) limit: pinned_num %}
{% assign posts = posts | push: pinned[i] %}
{% endfor %}
{% else %}
{% assign pinned_num = 0 %}
{% endif %}
<!-- Get default posts -->
{% assign default_beg = offset | minus: pinned.size %}
{% if default_beg < 0 %}
{% assign default_beg = 0 %}
{% endif %}
{% assign default_num = paginator.posts | size | minus: pinned_num %}
{% assign default_end = default_beg | plus: default_num | minus: 1 %}
{% if default_num > 0 %}
{% for i in (default_beg..default_end) %}
{% assign posts = posts | push: default[i] %}
{% endfor %}
{% endif %}
<div id="post-list" class="flex-grow-1 px-xl-1">
{% for post in posts %}
<article class="card-wrapper card">
<a href="{{ post.url | relative_url }}" class="post-preview row g-0 flex-md-row-reverse">
{% assign card_body_col = '12' %}
{% if post.image %}
{% assign src = post.image.path | default: post.image %}
{% unless src contains '//' %}
{% assign src = post.img_path | append: '/' | append: src | replace: '//', '/' %}
{% endunless %}
{% assign alt = post.image.alt | xml_escape | default: 'Preview Image' %}
{% assign lqip = null %}
{% if post.image.lqip %}
{% capture lqip %}lqip="{{ post.image.lqip }}"{% endcapture %}
{% endif %}
<div class="col-md-5">
<img src="{{ src }}" alt="{{ alt }}" {{ lqip }}>
</div>
{% assign card_body_col = '7' %}
{% endif %}
<div class="col-md-{{ card_body_col }}">
<div class="card-body d-flex flex-column">
<h1 class="card-title my-2 mt-md-0">{{ post.title }}</h1>
<div class="card-text content mt-0 mb-3">
<p>
{% include no-linenos.html content=post.content %}
{{ content | markdownify | strip_html | truncate: 200 | escape }}
</p>
</div>
<div class="post-meta flex-grow-1 d-flex align-items-end">
<div class="me-auto">
<!-- posted date -->
<i class="far fa-calendar fa-fw me-1"></i>
{% include datetime.html date=post.date lang=lang %}
<!-- categories -->
{% if post.categories.size > 0 %}
<i class="far fa-folder-open fa-fw me-1"></i>
<span class="categories">
{% for category in post.categories %}
{{ category }}
{%- unless forloop.last -%},{%- endunless -%}
{% endfor %}
</span>
{% endif %}
</div>
{% if post.pin %}
<div class="pin ms-1">
<i class="fas fa-thumbtack fa-fw"></i>
<span>{{ site.data.locales[lang].post.pin_prompt }}</span>
</div>
{% endif %}
</div>
<!-- .post-meta -->
</div>
<!-- .card-body -->
</div>
</a>
</article>
{% endfor %}
</div>
<!-- #post-list -->
{% if paginator.total_pages > 1 %}
{% include post-paginator.html %}
{% endif %}

20
_layouts/page.html Normal file
View File

@ -0,0 +1,20 @@
---
layout: default
---
{% include lang.html %}
<article class="px-1">
{% if page.layout == 'page' or page.collection == 'tabs' %}
{% assign tab_key = page.title | downcase %}
{% assign title = site.data.locales[lang].tabs[tab_key] | default: page.title %}
<h1 class="dynamic-title">
{{ title }}
</h1>
<div class="content">
{{ content }}
</div>
{% else %}
{{ content }}
{% endif %}
</article>

139
_layouts/post.html Normal file
View File

@ -0,0 +1,139 @@
---
layout: default
refactor: true
panel_includes:
- toc
tail_includes:
- related-posts
- post-nav
- comments
---
{% include lang.html %}
<article class="px-1">
<header>
<h1 data-toc-skip>{{ page.title }}</h1>
<div class="post-meta text-muted">
<!-- published date -->
<span>
{{ site.data.locales[lang].post.posted }}
{% include datetime.html date=page.date tooltip=true lang=lang %}
</span>
<!-- lastmod date -->
{% if page.last_modified_at and page.last_modified_at != page.date %}
<span>
{{ site.data.locales[lang].post.updated }}
{% include datetime.html date=page.last_modified_at tooltip=true lang=lang %}
</span>
{% endif %}
{% if page.image %}
{% capture src %}src="{{ page.image.path | default: page.image }}"{% endcapture %}
{% capture class %}class="preview-img{% if page.image.no_bg %}{{ ' no-bg' }}{% endif %}"{% endcapture %}
{% capture alt %}alt="{{ page.image.alt | xml_escape | default: "Preview Image" }}"{% endcapture %}
{% if page.image.lqip %}
{%- capture lqip -%}lqip="{{ page.image.lqip }}"{%- endcapture -%}
{% endif %}
<div class="mt-3 mb-3">
<img {{ src }} {{ class }} {{ alt }} w="1200" h="630" {{ lqip }}>
{%- if page.image.alt -%}
<figcaption class="text-center pt-2 pb-2">{{ page.image.alt }}</figcaption>
{%- endif -%}
</div>
{% endif %}
<div class="d-flex justify-content-between">
<!-- author(s) -->
<span>
{% if page.author %}
{% assign authors = page.author %}
{% elsif page.authors %}
{% assign authors = page.authors %}
{% endif %}
{{ site.data.locales[lang].post.written_by }}
<em>
{% if authors %}
{% for author in authors %}
{% if site.data.authors[author].url -%}
<a href="{{ site.data.authors[author].url }}">{{ site.data.authors[author].name }}</a>
{%- else -%}
{{ site.data.authors[author].name }}
{%- endif %}
{% unless forloop.last %}{{ '</em>, <em>' }}{% endunless %}
{% endfor %}
{% else %}
<a href="{{ site.social.links[0] }}">{{ site.social.name }}</a>
{% endif %}
</em>
</span>
<!-- read time -->
{% include read-time.html content=content prompt=true lang=lang %}
</div>
<!-- .d-flex -->
</div>
<!-- .post-meta -->
</header>
<div class="content">
{{ content }}
</div>
<div class="post-tail-wrapper text-muted">
<!-- categories -->
{% if page.categories.size > 0 %}
<div class="post-meta mb-3">
<i class="far fa-folder-open fa-fw me-1"></i>
{% for category in page.categories %}
<a href="{{ site.baseurl }}/categories/{{ category | slugify | url_encode }}/">{{ category }}</a>
{%- unless forloop.last -%},{%- endunless -%}
{% endfor %}
</div>
{% endif %}
<!-- tags -->
{% if page.tags.size > 0 %}
<div class="post-tags">
<i class="fa fa-tags fa-fw me-1"></i>
{% for tag in page.tags %}
<a
href="{{ site.baseurl }}/tags/{{ tag | slugify | url_encode }}/"
class="post-tag no-text-decoration"
>
{{- tag -}}
</a>
{% endfor %}
</div>
{% endif %}
<div
class="
post-tail-bottom
d-flex justify-content-between align-items-center mt-5 pb-2
"
>
<div class="license-wrapper">
{% if site.data.locales[lang].copyright.license.template %}
{% capture _replacement %}
<a href="{{ site.data.locales[lang].copyright.license.link }}">
{{ site.data.locales[lang].copyright.license.name }}
</a>
{% endcapture %}
{{ site.data.locales[lang].copyright.license.template | replace: ':LICENSE_NAME', _replacement }}
{% endif %}
</div>
{% include post-sharing.html lang=lang %}
</div>
<!-- .post-tail-bottom -->
</div>
<!-- div.post-tail-wrapper -->
</article>

23
_layouts/tag.html Normal file
View File

@ -0,0 +1,23 @@
---
layout: page
# The layout for Tag page
---
{% include lang.html %}
<div id="page-tag">
<h1 class="ps-lg-2">
<i class="fa fa-tag fa-fw text-muted"></i>
{{ page.title }}
<span class="lead text-muted ps-2">{{ page.posts | size }}</span>
</h1>
<ul class="content ps-0">
{% for post in page.posts %}
<li class="d-flex justify-content-between px-md-3">
<a href="{{ post.url | relative_url }}">{{ post.title }}</a>
<span class="dash flex-grow-1"></span>
{% include datetime.html date=post.date class='text-muted small text-nowrap' lang=lang %}
</li>
{% endfor %}
</ul>
</div>

22
_layouts/tags.html Normal file
View File

@ -0,0 +1,22 @@
---
layout: page
# All the Tags of posts.
---
<div id="tags" class="d-flex flex-wrap mx-xl-2">
{% assign tags = '' | split: '' %}
{% for t in site.tags %}
{% assign tags = tags | push: t[0] %}
{% endfor %}
{% assign sorted_tags = tags | sort_natural %}
{% for t in sorted_tags %}
<div>
<a class="tag" href="{{ t | slugify | url_encode | prepend: '/tags/' | append: '/' | relative_url }}">
{{ t -}}
<span class="text-muted">{{ site.tags[t].size }}</span>
</a>
</div>
{% endfor %}
</div>

View File

@ -0,0 +1,40 @@
---
title: "24 idées de bussiness innovantes 2024"
date: 2023-12-05 08:00:00 -0500
categories: [Business, Entrepreneur]
tags: [Entrepreneur, Créateur de contenu, Business starter]
image:
path: /assets/img/headers/24-ideas-of-bussiness.webp
lqip: data:image/webp;base64,UklGRoAAAABXRUJQVlA4IHQAAACwAwCdASoUAAsAPzmGuVOvKKWisAgB4CcJbACdAA4LgePetk7+gAD+VFD60XmvqqB3jqLpaMPbn5c/PfNek6HeQ41XuHivqOZr+VZDeUl4w9rMBo7prqfjXZXokRbzK6TnOD/fsWjvRLets7uHr9zflzsAAA==
---
Préparer l'avenir est essentiel, surtout dans un monde où le business évolue rapidement. Voici 24 idées innovantes pour les entrepreneurs en 2024:
1. **Créer une épicerie** - Une nouvelle approche des achats quotidiens.
2. **Marketing d'affiliation efficace** - Optimiser les stratégies pour des gains accrus.
3. **Services freelance de haute qualité** - Offrir l'excellence dans divers domaines.
4. **Contenu digital engageant** - Capturer l'attention dans un monde numérique.
5. **Dropshipping avec produits uniques** - Se démarquer avec des articles rares.
6. **Écrire un ebook captivant** - Partager le savoir de manière innovante.
7. **Ouvrir une laverie automatique moderne** - Réinventer les tâches ménagères.
8. **Tutoriels en ligne interactifs** - Apprendre de manière dynamique.
9. **Site e-commerce innovant** - Redéfinir le shopping en ligne.
10. **Événements virtuels mémorables** - Créer des expériences uniques.
11. **Vidéos virales sur TikTok** - Engager une audience mondiale.
12. **Affiliation via Pinterest** - Utiliser le visuel pour influencer.
13. **Bocaux à épices et stickers design** - Ajouter une touche artistique à la cuisine.
14. **Applications web avec IA** - Intégrer l'intelligence artificielle pour une meilleure fonctionnalité.
15. **Chaîne YouTube inspirante** - Eduquer et divertir.
16. **Espace de co-working accueillant** - Favoriser la collaboration.
17. **Communauté forte pour des marques** - Construire des relations durables.
18. **Manuel détaillé et utile** - Fournir des guides pratiques.
19. **Vente sur Amazon FBA** - Exploiter le géant du e-commerce.
20. **Modèles personnalisés sur Canva** - Créer avec facilité.
21. **Gérer une agence IA** - Diriger l'innovation technologique.
22. **Traduire des vidéos américaines** - Ouvrir des marchés internationaux.
23. **Créer une holding digitale** - Gérer diverses entreprises en ligne.
24. **Copywriting convaincant** - Persuader par les mots.
<!-- **Bonus Exclusif :** Téléchargez notre PDF gratuit **"100 Things You Need to Know About Technology"** pour rester à la pointe de la technologie en 2024. Ce guide essentiel est parfait pour tout entrepreneur souhaitant exploiter le plein potentiel de la technologie moderne. [Téléchargez maintenant!](#) -->
Ces idées sont conçues pour inspirer et propulser les entrepreneurs vers le succès en 2024 et au-delà. Êtes-vous prêt à relever le défi?

View File

@ -0,0 +1,98 @@
---
title: "Building a Reusable Sidebar in Rails with TailwindCSS and Heroicons"
date: 2024-03-25 08:00:00 -0500
categories: [Rails, TailwindCSS, Heroicons]
tags: [Entrepreneur, Créateur de contenu, Business starter]
image:
path: /assets/img/headers/sidebar_rails.webp
lqip: data:image/webp;base64,UklGRkAAAABXRUJQVlA4IDQAAAAQAwCdASoUAAsAPzmGu1OvKSYisAgB4CcJYwAAW+ll18AA/rniDRhs9sq0/4Ip9WfHYHAA
---
# Building a Reusable Sidebar in Rails with TailwindCSS and Heroicons
Creating a sidebar in a web application can be a daunting task, but with the power of TailwindCSS and Heroicons, it becomes both efficient and stylish. This post will guide you through building a reusable sidebar component in a Rails application using these modern tools, while keeping the code DRY (Don't Repeat Yourself).
## Prerequisites
Before getting started, make sure you have the following set up in your Rails application:
- **TailwindCSS** for styling.
- **Heroicons** for icons.
## Step-by-Step Guide
### 1. Create the Sidebar Link Partial
The first step is to create a partial for the sidebar links. This makes your code reusable and maintainable.
Create the file `app/views/layouts/components/_sidebar_link.html.erb` with the following content:
```erb
<li>
<%= link_to path, class: "flex items-center space-x-3 px-3 py-2 text-sm font-medium text-gray-700 dark:text-neutral-200 rounded-lg #{'bg-gray-100 dark:bg-neutral-700' if current} hover:bg-gray-200 dark:hover:bg-neutral-600 transition-colors duration-200" do %>
<%= heroicon icon, class: "h-5 w-5" %>
<span><%= text %></span>
<% end %>
</li>
```
This partial accepts four parameters: `path`, `icon`, `text`, and `current`.
### 2. Create the Sidebar Partial
Next, create a sidebar partial that uses the link partial for adding navigation links.
Create the file `app/views/layouts/_sidebar.html.erb` with the following content:
```erb
<div class="bg-white dark:bg-neutral-800 w-64 min-h-screen">
<div class="p-4">
<!-- Logo -->
<%= link_to root_path, class: "flex items-center space-x-2" do %>
<%= image_tag "logo.svg", alt: "Logo", class: "h-10 w-10" %>
<span class="text-xl font-semibold text-gray-900 dark:text-white">App Name</span>
<% end %>
<!-- End Logo -->
</div>
<nav class="p-4 space-y-4">
<ul class="space-y-2">
<%= render 'layouts/components/sidebar_link', path: root_path, icon: 'home', text: 'Home', current: current_page?(root_path) %>
<%= render 'layouts/components/sidebar_link', path: about_path, icon: 'information-circle', text: 'About', current: current_page?(about_path) %>
<%= render 'layouts/components/sidebar_link', path: contact_path, icon: 'phone', text: 'Contact', current: current_page?(contact_path) %>
<%= render 'layouts/components/sidebar_link', path: help_path, icon: 'support', text: 'Help', current: current_page?(help_path) %>
<li>
<%= form_with url: destroy_user_session_path, method: :delete, class: "inline" do %>
<button type="submit" class="flex items-center space-x-3 px-3 py-2 text-sm text-gray-700 hover:bg-gray-100 dark:hover:bg-neutral-700 dark:text-neutral-200 dark:hover:text-white rounded-lg">
<%= heroicon "logout", class: "h-5 w-5" %>
<span>Sign Out</span>
</button>
<% end %>
</li>
</ul>
</nav>
</div>
```
This partial dynamically creates a sidebar with links by using the `_sidebar_link.html.erb` partial.
### 3. Render the Sidebar in Your Layout
Include the sidebar partial in your main layout file, usually located at `app/views/layouts/application.html.erb`:
```erb
<body>
<%= render 'layouts/sidebar' %>
<div class="flex-1">
<%= yield %>
</div>
</body>
```
## Benefits of This Approach
- Reusability: The sidebar link partial makes it easy to add or modify links without repeating code.
- DRY Principle: By using partials, the code remains organized and avoids unnecessary repetition.
- Responsive Design: TailwindCSS provides utility classes that ensure the sidebar is responsive and visually appealing.
- Consistent Icon Styling: Heroicons integrate smoothly with TailwindCSS classes for consistent icon styling.

Binary file not shown.

After

Width:  |  Height:  |  Size: 43 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 62 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 56 KiB

View File

@ -0,0 +1,13 @@
---
layout: compress
---
<?xml version="1.0" encoding="utf-8"?>
<browserconfig>
<msapplication>
<tile>
<square150x150logo src="{{ '/assets/img/favicons/mstile-150x150.png' | relative_url }}" />
<TileColor>#da532c</TileColor>
</tile>
</msapplication>
</browserconfig>

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 48 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 38 KiB

View File

@ -0,0 +1,26 @@
---
layout: compress
---
{% assign favicon_path = "/assets/img/favicons" | relative_url %}
{
"name": "{{ site.title }}",
"short_name": "{{ site.title }}",
"description": "{{ site.description }}",
"icons": [
{
"src": "{{ favicon_path }}/android-chrome-192x192.png",
"sizes": "192x192",
"type": "image/png"
},
{
"src": "{{ favicon_path }}/android-chrome-512x512.png",
"sizes": "512x512",
"type": "image/png"
}],
"start_url": "{{ '/index.html' | relative_url }}",
"theme_color": "#2a1e6b",
"background_color": "#ffffff",
"display": "fullscreen"
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 508 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 33 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 10 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 452 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 639 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 73 KiB