mirror of
https://forge.chapril.org/tykayn/orgmode-to-gemini-blog
synced 2025-10-09 17:02:45 +02:00
add theme mastodon
This commit is contained in:
parent
8abe2f6aad
commit
e3d64d4e76
6 changed files with 415 additions and 24 deletions
|
@ -25,5 +25,3 @@ Ces projets durent bien sûr plus qu'un mois et le suivi des objets se fait sur
|
|||
|
||||
Vous pouvez tester sur https://projetdumois.fr
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -13,7 +13,10 @@
|
|||
href="{{template_content['NDD']}}/feed/">
|
||||
<link href="/style.css" rel="stylesheet">
|
||||
<script src="main_script.js"></script>
|
||||
<script src="highlight.js"></script>
|
||||
<!-- highlight.js CSS/JS depuis CDN pour l'index -->
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/styles/default.min.css">
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/highlight.min.js"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/languages/go.min.js"></script>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title>{{template_content['TITLE']}}</title>
|
||||
|
@ -27,7 +30,7 @@
|
|||
<meta name="reply-to" content="{{template_content['EMAIL']}}">
|
||||
<link rel="icon" type="{{template_content['SITE_ICON_TYPE']}}" href="{{template_content['SITE_ICON']}}">
|
||||
|
||||
<script>hljs.highlightAll();</script>
|
||||
<script>typeof hljs!== 'undefined' && hljs.highlightAll();</script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
|
|
@ -5,29 +5,36 @@ document.addEventListener('DOMContentLoaded', function () {
|
|||
const form = document.getElementById('recherche');
|
||||
|
||||
// Ajoute un écouteur d'événement pour l'événement 'submit'
|
||||
form.addEventListener('submit', function (event) {
|
||||
// Empêche le comportement par défaut du formulaire
|
||||
event.preventDefault()
|
||||
const query = document.getElementById('query').value
|
||||
const url = `https://duckduckgo.com/?q=${encodeURIComponent(query)}+site%3A${encodeURIComponent(currentDomain)}`;
|
||||
if (form) {
|
||||
form.addEventListener('submit', function (event) {
|
||||
// Empêche le comportement par défaut du formulaire
|
||||
event.preventDefault()
|
||||
const input = form.querySelector('.search-field');
|
||||
const query = input ? input.value : '';
|
||||
const url = `https://duckduckgo.com/?q=${encodeURIComponent(query)}+site%3A${encodeURIComponent(currentDomain)}`;
|
||||
|
||||
window.location.href = url;
|
||||
});
|
||||
window.location.href = url;
|
||||
});
|
||||
}
|
||||
|
||||
// navigation au clavier
|
||||
// Sélectionnez le lien à cliquer
|
||||
const nextArticleLink = document.querySelector('a.next-article');
|
||||
const previousArticleLink = document.querySelector('a.previous-article');
|
||||
|
||||
// Ajoutez un événement de clic au lien
|
||||
nextArticleLink.addEventListener('click', function () {
|
||||
// Redirigez l'utilisateur vers la page suivante
|
||||
window.location.href = nextArticleLink.href;
|
||||
});
|
||||
previousArticleLink.addEventListener('click', function () {
|
||||
// Redirigez l'utilisateur vers la page suivante
|
||||
window.location.href = nextArticleLink.href;
|
||||
});
|
||||
// Ajoutez un événement de clic au lien si présents
|
||||
if (nextArticleLink) {
|
||||
nextArticleLink.addEventListener('click', function () {
|
||||
// Redirigez l'utilisateur vers la page suivante
|
||||
window.location.href = nextArticleLink.href;
|
||||
});
|
||||
}
|
||||
if (previousArticleLink) {
|
||||
previousArticleLink.addEventListener('click', function () {
|
||||
// Redirigez l'utilisateur vers la page précédente
|
||||
window.location.href = previousArticleLink.href;
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
@ -39,14 +46,14 @@ document.addEventListener('DOMContentLoaded', function () {
|
|||
event.preventDefault();
|
||||
|
||||
// Cliquez sur le lien
|
||||
nextArticleLink.click();
|
||||
if (nextArticleLink) nextArticleLink.click();
|
||||
}
|
||||
if (event.key === 'p' || event.key === 'ArrowLeft') {
|
||||
// Empêche le comportement par défaut de la touche
|
||||
event.preventDefault();
|
||||
|
||||
// Cliquez sur le lien
|
||||
previousArticleLink.click();
|
||||
if (previousArticleLink) previousArticleLink.click();
|
||||
}
|
||||
|
||||
});
|
||||
|
@ -60,8 +67,9 @@ document.addEventListener('DOMContentLoaded', function () {
|
|||
boutonTheme.textContent = 'Changer de thème';
|
||||
boutonTheme.id = 'theme-switcher';
|
||||
document.body.appendChild(boutonTheme);
|
||||
|
||||
addEventListener('click', onClickThemeButton)
|
||||
console.log('boutonTheme', boutonTheme);
|
||||
console.log('themes_calsses', themes_calsses);
|
||||
boutonTheme.addEventListener('click', onClickThemeButton)
|
||||
}
|
||||
|
||||
|
||||
|
@ -84,4 +92,6 @@ document.addEventListener('DOMContentLoaded', function () {
|
|||
}
|
||||
|
||||
|
||||
// créer le bouton thème au chargement
|
||||
makeThemesButton();
|
||||
});
|
|
@ -14,6 +14,13 @@ img {
|
|||
}
|
||||
}
|
||||
|
||||
.sourceCode{
|
||||
border-radius: 0.5rem;
|
||||
pre{
|
||||
overflow: auto;
|
||||
}
|
||||
}
|
||||
|
||||
.activitypub-follower-block {
|
||||
&.is-style-compact {
|
||||
|
||||
|
|
352
templates/styles_src/tkblog_responsive.scss
Normal file
352
templates/styles_src/tkblog_responsive.scss
Normal file
|
@ -0,0 +1,352 @@
|
|||
|
||||
@media only screen and (min-width: 768px) and (max-width: 959px) {
|
||||
|
||||
.site-header .home-link,
|
||||
.main-navigation,
|
||||
.site-main,
|
||||
.site-footer .sidebar-inner,
|
||||
.site-info {
|
||||
width: 768px;
|
||||
}
|
||||
|
||||
.site-main {
|
||||
.content-area {
|
||||
padding-right: 20px;
|
||||
padding-right: 2rem;
|
||||
width: 556px;
|
||||
}
|
||||
|
||||
.sidebar-container {
|
||||
width: 172px;
|
||||
}
|
||||
}
|
||||
|
||||
.single-attachment .content-area,
|
||||
.full-width .content-area,
|
||||
.one-footer-sidebar .site-footer .widget-area {
|
||||
width: 748px;
|
||||
}
|
||||
|
||||
.two-footer-sidebars .site-footer .widget-area {
|
||||
width: 364px;
|
||||
}
|
||||
|
||||
.three-footer-sidebars .site-footer .widget-area {
|
||||
width: 236px;
|
||||
}
|
||||
}
|
||||
|
||||
@media only screen and (max-width: 767px) {
|
||||
|
||||
.site-header .home-link,
|
||||
.main-navigation,
|
||||
.site-main,
|
||||
.site-footer .sidebar-inner,
|
||||
.site-info {
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
width: 300px;
|
||||
}
|
||||
|
||||
.site-main {
|
||||
|
||||
.content-area,
|
||||
.sidebar-container {
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
width: 300px;
|
||||
}
|
||||
}
|
||||
|
||||
.single-attachment .content-area,
|
||||
.full-width .content-area,
|
||||
.one-footer-sidebar .site-footer .widget-area,
|
||||
.two-footer-sidebars .site-footer .widget-area,
|
||||
.three-footer-sidebars .site-footer .widget-area {
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
width: 300px;
|
||||
}
|
||||
|
||||
.site-main .content-area {
|
||||
border-bottom: 1px solid rgba(0, 0, 0, 0.1);
|
||||
margin-bottom: 46px;
|
||||
margin-bottom: 4.6rem;
|
||||
padding-bottom: 46px;
|
||||
padding-bottom: 4.6rem;
|
||||
}
|
||||
|
||||
.site-title {
|
||||
font-size: 40px;
|
||||
font-size: 4rem;
|
||||
}
|
||||
|
||||
.custom-logo {
|
||||
max-width: 80%;
|
||||
}
|
||||
|
||||
.widget:last-child {
|
||||
border-bottom: 1px solid rgba(0, 0, 0, 0.1);
|
||||
margin: 0 0 23px;
|
||||
margin: 0 0 2.3rem;
|
||||
padding: 0 0 23px;
|
||||
padding: 0 0 2.3rem;
|
||||
}
|
||||
|
||||
.menu-toggle {
|
||||
background-color: #303030;
|
||||
color: #888;
|
||||
cursor: pointer;
|
||||
display: inline-block;
|
||||
font-family: Lato, sans-serif;
|
||||
font-size: 11px;
|
||||
font-size: 1.1rem;
|
||||
font-weight: 400;
|
||||
letter-spacing: 2px;
|
||||
line-height: 1;
|
||||
margin: 0;
|
||||
padding: 12px 20px;
|
||||
padding: 1.2rem 2rem;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
.toggled-on {
|
||||
.nav-menu {
|
||||
display: block;
|
||||
margin-left: 0;
|
||||
padding: 0;
|
||||
width: 100%;
|
||||
|
||||
>ul {
|
||||
display: block;
|
||||
margin-left: 0;
|
||||
padding: 0;
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
li,
|
||||
.children {
|
||||
display: block;
|
||||
float: none;
|
||||
}
|
||||
|
||||
.nav-menu {
|
||||
li {
|
||||
>ul {
|
||||
background-color: rgba(255, 255, 255, 0.05);
|
||||
box-shadow: none;
|
||||
display: block;
|
||||
float: none;
|
||||
margin-left: 20px;
|
||||
opacity: 1;
|
||||
position: relative;
|
||||
left: auto;
|
||||
top: auto;
|
||||
|
||||
a {
|
||||
text-transform: uppercase;
|
||||
width: auto;
|
||||
}
|
||||
}
|
||||
|
||||
&:hover>a {
|
||||
background-color: transparent;
|
||||
color: #ccc;
|
||||
}
|
||||
}
|
||||
|
||||
.children a {
|
||||
background-color: transparent;
|
||||
color: #ccc;
|
||||
}
|
||||
|
||||
li a:hover,
|
||||
ul a:hover {
|
||||
background-color: #303030;
|
||||
color: #fff;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
ul.nav-menu,
|
||||
div.nav-menu>ul {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.gallery {
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
.gallery-caption {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.gallery-columns-2 .gallery-item {
|
||||
max-width: 49%;
|
||||
max-width: -webkit-calc(50% - 4px);
|
||||
max-width: calc(50% - 4px);
|
||||
}
|
||||
|
||||
.gallery-columns-3 .gallery-item {
|
||||
max-width: 33%;
|
||||
max-width: -webkit-calc(33% - 4px);
|
||||
max-width: calc(33% - 4px);
|
||||
}
|
||||
}
|
||||
|
||||
@media only screen and (min-width: 480px) and (max-width: 767px) {
|
||||
|
||||
.site-header .home-link,
|
||||
.main-navigation,
|
||||
.site-main,
|
||||
.site-footer .sidebar-inner,
|
||||
.site-info {
|
||||
width: 420px;
|
||||
}
|
||||
|
||||
.site-main {
|
||||
|
||||
.content-area,
|
||||
.sidebar-container {
|
||||
width: 420px;
|
||||
}
|
||||
}
|
||||
|
||||
.single-attachment .content-area,
|
||||
.full-width .content-area,
|
||||
.one-footer-sidebar .site-footer .widget-area,
|
||||
.two-footer-sidebars .site-footer .widget-area,
|
||||
.three-footer-sidebars .site-footer .widget-area {
|
||||
width: 420px;
|
||||
}
|
||||
}
|
||||
|
||||
.site-title,
|
||||
.site-description {
|
||||
color: #a1bded;
|
||||
}
|
||||
|
||||
.site-title a {
|
||||
color: #a1bded;
|
||||
|
||||
&:hover {
|
||||
color: #a1bded;
|
||||
}
|
||||
}
|
||||
|
||||
.bottom-of-post {
|
||||
margin-top: 2em;
|
||||
padding-top: 1em;
|
||||
border-top: solid 1px #ccc;
|
||||
font-size: 0.8em;
|
||||
}
|
||||
|
||||
blockquote {
|
||||
padding: 2em;
|
||||
box-sizing: border-box;
|
||||
margin: 2rem 0;
|
||||
font-size: 1.5em;
|
||||
line-height: normal;
|
||||
box-shadow: 0 3px 10px #ddd;
|
||||
}
|
||||
|
||||
.bottom-of-post ul {
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
padding-left: 3em;
|
||||
}
|
||||
|
||||
iframe.mastodon-embed {
|
||||
width: 100%;
|
||||
margin: 1em auto;
|
||||
}
|
||||
|
||||
.entry-content a {
|
||||
color: #007bff;
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
.entry-title {
|
||||
font-size: 4rem;
|
||||
}
|
||||
|
||||
.entry-content {
|
||||
font-size: 1.5rem;
|
||||
line-height: 2.45rem;
|
||||
}
|
||||
|
||||
ul.inline {
|
||||
list-style-type: none;
|
||||
clear: both;
|
||||
float: left;
|
||||
display: block;
|
||||
width: 100%;
|
||||
|
||||
li {
|
||||
float: left;
|
||||
padding: .5em;
|
||||
cursor: pointer;
|
||||
|
||||
&:hover {
|
||||
font-style: underline;
|
||||
color: blue;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.support-message p {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.entry-header .entry-thumbnail img {
|
||||
margin: 2.3rem 0;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
@media screen and (max-width: 767px) {
|
||||
blockquote {
|
||||
padding: 1.5em 1em;
|
||||
margin: 2rem 0;
|
||||
font-size: 1em;
|
||||
line-height: 2.25rem;
|
||||
box-shadow: 0 3px 10px #ddd;
|
||||
}
|
||||
}
|
||||
|
||||
@media screen and (min-width: 767px) {
|
||||
#main {
|
||||
max-width: 1200px;
|
||||
}
|
||||
|
||||
.site-main .content-area {
|
||||
width: 690px;
|
||||
}
|
||||
|
||||
#secondary iframe {
|
||||
width: 500px;
|
||||
height: 45em;
|
||||
}
|
||||
|
||||
.site-main .sidebar-container {
|
||||
width: 400px;
|
||||
}
|
||||
}
|
||||
|
||||
@media screen and (max-width: 767px) and (min-width: 480px) {
|
||||
#masthead {
|
||||
padding: 1rem;
|
||||
}
|
||||
|
||||
.site-main {
|
||||
width: 90%;
|
||||
|
||||
.sidebar-container {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.content-area {
|
||||
width: 90%;
|
||||
}
|
||||
}
|
||||
}
|
21
templates/styles_src/tkblog_themes.scss
Normal file
21
templates/styles_src/tkblog_themes.scss
Normal file
|
@ -0,0 +1,21 @@
|
|||
.theme-mastodon{
|
||||
#page{
|
||||
background: #4d4c4e;
|
||||
}
|
||||
.body-wrap{
|
||||
background: #201e22;
|
||||
color: #fff;
|
||||
a{
|
||||
color: #9327ff;
|
||||
}
|
||||
a:hover{
|
||||
color: #9327ff;
|
||||
}
|
||||
h1, h2, h3, h4, h5, h6{
|
||||
color: #fff;
|
||||
}
|
||||
hr{
|
||||
border-color: #fff;
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue