Compare commits
20 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
b3f9b9e067 | ||
|
a290ab34e2 | ||
|
967d0ef870 | ||
|
db1aa0d0d8 | ||
|
6b54cf9f49 | ||
|
76e8cbe818 | ||
|
c4e54ff847 | ||
|
8a5dff9e28 | ||
|
786dff5ee6 | ||
|
4f68f3d72c | ||
|
62df154688 | ||
|
32e0b63718 | ||
|
546ee17844 | ||
|
06be702099 | ||
|
cac63b53cc | ||
|
61188ff01a | ||
|
88bd93423b | ||
|
b5ddb8ba2a | ||
|
5dc38cc328 | ||
|
855d3bc6e4 |
2
.gitignore
vendored
@@ -1 +1,3 @@
|
|||||||
|
.idea
|
||||||
|
|
||||||
data/
|
data/
|
@@ -4,6 +4,7 @@ services:
|
|||||||
wp:
|
wp:
|
||||||
image: wordpress:5-apache
|
image: wordpress:5-apache
|
||||||
volumes:
|
volumes:
|
||||||
|
- ./uploads.ini:/usr/local/etc/php/conf.d/uploads.ini:ro
|
||||||
- ./data/wp:/var/www/html
|
- ./data/wp:/var/www/html
|
||||||
- ./liquet:/var/www/html/wp-content/themes/liquet:ro
|
- ./liquet:/var/www/html/wp-content/themes/liquet:ro
|
||||||
ports:
|
ports:
|
||||||
@@ -15,11 +16,4 @@ services:
|
|||||||
restart: always
|
restart: always
|
||||||
volumes:
|
volumes:
|
||||||
- ./data/db:/var/lib/mysql
|
- ./data/db:/var/lib/mysql
|
||||||
env_file: .env
|
env_file: .env
|
||||||
|
|
||||||
|
|
||||||
# adminer:
|
|
||||||
# image: adminer
|
|
||||||
# restart: always
|
|
||||||
# ports:
|
|
||||||
# - 8080:8080
|
|
14
liquet/css/logos.css
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
#logos {
|
||||||
|
margin: 1.5em 0 0 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
#logos img {
|
||||||
|
height: 2em;
|
||||||
|
width: 2em;
|
||||||
|
margin: 0 .5em;
|
||||||
|
transition: var(--animation);
|
||||||
|
}
|
||||||
|
|
||||||
|
#logos img:hover {
|
||||||
|
transform: scale(1.15);
|
||||||
|
}
|
@@ -1,6 +1,11 @@
|
|||||||
#singular #main {
|
#singular #main {
|
||||||
padding: 8vw 0;
|
padding: 8vw 0 16vh 0;
|
||||||
overflow: auto;
|
overflow: auto;
|
||||||
|
overflow-wrap: break-word;
|
||||||
|
}
|
||||||
|
|
||||||
|
#singular #main a {
|
||||||
|
text-decoration: underline;
|
||||||
}
|
}
|
||||||
|
|
||||||
#singular #header {
|
#singular #header {
|
||||||
@@ -20,12 +25,13 @@
|
|||||||
|
|
||||||
#singular #content {
|
#singular #content {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
padding: 0 2em;
|
padding: 0 1em;
|
||||||
}
|
}
|
||||||
|
|
||||||
#singular #content > * {
|
#singular #content > * {
|
||||||
max-width: var(--text-width);
|
max-width: var(--text-width);
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
line-height: 1.5;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@@ -1,15 +1,51 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
@ini_set( 'upload_max_size' , '128M' );
|
include_once( 'logos.php' );
|
||||||
@ini_set( 'post_max_size', '128M');
|
|
||||||
@ini_set( 'max_execution_time', '300' );
|
|
||||||
|
|
||||||
add_theme_support( 'align-wide' );
|
add_theme_support( 'align-wide' );
|
||||||
|
add_theme_support( 'title-tag' );
|
||||||
|
|
||||||
add_action( 'wp_enqueue_scripts', function () {
|
add_action( 'wp_enqueue_scripts', function () {
|
||||||
wp_enqueue_style( 'flex', get_template_directory_uri() . '/css/flex.css' );
|
wp_enqueue_style( 'flex', get_template_directory_uri() . '/css/flex.css' );
|
||||||
wp_enqueue_style( 'liquet', get_template_directory_uri() . '/style.css' );
|
wp_enqueue_style( 'liquet', get_template_directory_uri() . '/style.css' );
|
||||||
wp_enqueue_style( 'liquet-home', get_template_directory_uri() . '/css/home.css' );
|
wp_enqueue_style( 'liquet-home', get_template_directory_uri() . '/css/home.css' );
|
||||||
wp_enqueue_style( 'liquet-singular', get_template_directory_uri() . '/css/singular.css' );
|
wp_enqueue_style( 'liquet-singular', get_template_directory_uri() . '/css/singular.css' );
|
||||||
|
wp_enqueue_style( 'liquet-logos', get_template_directory_uri() . '/css/logos.css' );
|
||||||
wp_enqueue_style( 'fonts', get_template_directory_uri() . '/vendor/fonts/import.css' );
|
wp_enqueue_style( 'fonts', get_template_directory_uri() . '/vendor/fonts/import.css' );
|
||||||
} );
|
} );
|
||||||
|
|
||||||
|
|
||||||
|
add_action( 'admin_init', function () {
|
||||||
|
add_settings_section( 'section', 'All Settings', null, 'theme-options' );
|
||||||
|
|
||||||
|
global $links;
|
||||||
|
foreach ( $links as $link ) {
|
||||||
|
|
||||||
|
$id = $link . '_url';
|
||||||
|
add_settings_field( $id, ucfirst( $link ) . ' Url', function () use ( $id ) { ?>
|
||||||
|
<input type="text" name="<?= $id ?>" id="<?= $id ?>" value="<?= get_option( $id ); ?>"/>
|
||||||
|
<?php }, 'theme-options', 'section' );
|
||||||
|
|
||||||
|
register_setting( 'section', $id );
|
||||||
|
}
|
||||||
|
|
||||||
|
} );
|
||||||
|
|
||||||
|
function theme_settings_page() { ?>
|
||||||
|
<div class='wrap'>
|
||||||
|
<h1>Theme Panel</h1>
|
||||||
|
<form method="post" action="options.php">
|
||||||
|
<?php
|
||||||
|
settings_fields( 'section' );
|
||||||
|
do_settings_sections( 'theme-options' );
|
||||||
|
submit_button();
|
||||||
|
?>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
<?php }
|
||||||
|
|
||||||
|
function add_theme_menu_item() {
|
||||||
|
add_menu_page( 'Theme Panel', 'Theme Panel', 'manage_options', 'theme-panel', 'theme_settings_page', null, 99 );
|
||||||
|
}
|
||||||
|
|
||||||
|
add_action( 'admin_menu', 'add_theme_menu_item' );
|
@@ -5,7 +5,6 @@
|
|||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8"/>
|
<meta charset="utf-8"/>
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
<?php add_theme_support( 'title-tag' ); ?>
|
|
||||||
<?php wp_head(); ?>
|
<?php wp_head(); ?>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
@@ -1,41 +1,31 @@
|
|||||||
<?php get_header();
|
<?php
|
||||||
|
include_once( 'logos.php' );
|
||||||
|
include_once( 'tags.php' );
|
||||||
|
|
||||||
$tags = get_tags(['orderby' => 'count', 'order' => 'desc']);
|
get_header();
|
||||||
//$tags = array_map(function ($tag) {
|
|
||||||
// return [
|
$tags = get_tags( [ 'orderby' => 'count', 'order' => 'desc' ] );
|
||||||
// 'name' => $tag->name,
|
|
||||||
// 'slug' => $tag->slug,
|
|
||||||
// 'count' => $tag->count,
|
|
||||||
// ];
|
|
||||||
//}, $tags)
|
|
||||||
?>
|
?>
|
||||||
<div id="home">
|
<div id="home">
|
||||||
<div class="flex container vertical middle" id="list-header">
|
<div class="flex container vertical middle" id="list-header">
|
||||||
<div id="header">
|
<div id="header">
|
||||||
<a href="<?= get_bloginfo('wpurl'); ?>">
|
<a href="<?= get_bloginfo( 'wpurl' ); ?>">
|
||||||
<h1><?= get_bloginfo('name'); ?></h1>
|
<h1><?= get_bloginfo( 'name' ); ?></h1>
|
||||||
<h3><?= get_bloginfo('description'); ?></h3>
|
<h3><?= get_bloginfo( 'description' ); ?></h3>
|
||||||
</a>
|
</a>
|
||||||
|
<?php render_links(); ?>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="flex container horizontal center" id="list-container">
|
<div class="flex container horizontal center" id="list-container">
|
||||||
<div id="list">
|
<div id="list">
|
||||||
<?php if ($tags) { ?>
|
<?php render_all_tags(); ?>
|
||||||
<!-- <div class="flex container horizontal center" id="list-container">-->
|
|
||||||
<div class="tags">
|
|
||||||
<?php foreach ($tags as $tag) { ?>
|
|
||||||
<a class="tag" href="<?= get_tag_link($tag->term_id); ?>"><?= $tag->name; ?> <b><?= $tag->count ?></b></a>
|
|
||||||
<?php } ?>
|
|
||||||
</div>
|
|
||||||
<!-- </div>-->
|
|
||||||
<?php } ?>
|
|
||||||
<br/><br/><br/>
|
<br/><br/><br/>
|
||||||
<?php
|
<?php
|
||||||
while (have_posts()) {
|
while ( have_posts() ) {
|
||||||
the_post();
|
the_post();
|
||||||
get_template_part('post-preview', get_post_format());
|
get_template_part( 'post-preview', get_post_format() );
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
19
liquet/logos.php
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
$links = [ 'medium', 'github', 'twitter', 'website' ];
|
||||||
|
|
||||||
|
function render_links() {
|
||||||
|
global $links;
|
||||||
|
?>
|
||||||
|
<div class="flex container horizontal middle center" id="logos"><?php
|
||||||
|
foreach ( $links as $link ) {
|
||||||
|
$saved = get_option( $link . '_url' );
|
||||||
|
if ( $saved ) { ?>
|
||||||
|
<a href="<?= $saved ?>" target="_blank">
|
||||||
|
<img src="<?= get_template_directory_uri() . '/vendor/logos/' . $link . '.png' ?>"
|
||||||
|
alt="<?= $link; ?>"/>
|
||||||
|
</a>
|
||||||
|
<?php }
|
||||||
|
}
|
||||||
|
?></div><?php
|
||||||
|
}
|
@@ -1,10 +1,12 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
include_once( 'loop-utils.php' );
|
||||||
|
include_once( 'logos.php' );
|
||||||
|
include_once( 'tags.php' );
|
||||||
|
|
||||||
get_header();
|
get_header();
|
||||||
the_post();
|
the_post();
|
||||||
|
|
||||||
include_once( 'loop-utils.php' );
|
|
||||||
|
|
||||||
$dates = getDates();
|
$dates = getDates();
|
||||||
|
|
||||||
?>
|
?>
|
||||||
@@ -43,7 +45,9 @@ $dates = getDates();
|
|||||||
<br><br>
|
<br><br>
|
||||||
<?php the_content(); ?>
|
<?php the_content(); ?>
|
||||||
<br>
|
<br>
|
||||||
<?php get_template_part( 'tags-list', get_post_format() ); ?>
|
<?php render_current_tags(); ?>
|
||||||
|
<hr>
|
||||||
|
<?php render_links(); ?>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@@ -2,7 +2,7 @@
|
|||||||
Theme Name: Liquet
|
Theme Name: Liquet
|
||||||
Author: Niccolo Borgioli
|
Author: Niccolo Borgioli
|
||||||
Description: Minimalistic clean theme
|
Description: Minimalistic clean theme
|
||||||
Version: 0.1
|
Version: 0.3
|
||||||
License: MIT
|
License: MIT
|
||||||
Tags: minimal, simple, typography, clean
|
Tags: minimal, simple, typography, clean
|
||||||
Author URI: https://nicco.io
|
Author URI: https://nicco.io
|
||||||
@@ -12,6 +12,7 @@ Theme URI: https://github.com/cupcakearmy/liquet
|
|||||||
|
|
||||||
* {
|
* {
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
|
-webkit-overflow-scrolling: touch;
|
||||||
--clr-primary: hsl(194, 100%, 88%);
|
--clr-primary: hsl(194, 100%, 88%);
|
||||||
--clr-white: #ffffff;
|
--clr-white: #ffffff;
|
||||||
--clr-black: #000000;
|
--clr-black: #000000;
|
||||||
@@ -36,6 +37,8 @@ pre {
|
|||||||
overflow: auto;
|
overflow: auto;
|
||||||
background-color: var(--clr-ligher);
|
background-color: var(--clr-ligher);
|
||||||
padding: 1em;
|
padding: 1em;
|
||||||
|
border-radius: .25em;
|
||||||
|
overflow-wrap: initial;
|
||||||
}
|
}
|
||||||
|
|
||||||
a {
|
a {
|
||||||
@@ -46,6 +49,7 @@ a {
|
|||||||
hr {
|
hr {
|
||||||
border: 0;
|
border: 0;
|
||||||
border-top: 1px solid #f5f5f5;
|
border-top: 1px solid #f5f5f5;
|
||||||
|
margin: 1em 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.fill {
|
.fill {
|
||||||
|
@@ -1,9 +0,0 @@
|
|||||||
<?php
|
|
||||||
$tags = get_the_tags();
|
|
||||||
if ($tags) { ?>
|
|
||||||
<div class="tags">
|
|
||||||
<?php foreach ($tags as $tag) { ?>
|
|
||||||
<a class="tag" href="<?= get_tag_link($tag->term_id); ?>"><?= $tag->name; ?></a>
|
|
||||||
<?php } ?>
|
|
||||||
</div>
|
|
||||||
<?php }
|
|
25
liquet/tags.php
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
function render_all_tags() {
|
||||||
|
$tags = get_tags( [ 'orderby' => 'count', 'order' => 'desc' ] );
|
||||||
|
|
||||||
|
if ( $tags ) { ?>
|
||||||
|
<div class="tags">
|
||||||
|
<?php foreach ( $tags as $tag ) { ?>
|
||||||
|
<a class="tag" href="<?= get_tag_link( $tag->term_id ); ?>"><?= $tag->name; ?>
|
||||||
|
<b><?= $tag->count ?></b></a>
|
||||||
|
<?php } ?>
|
||||||
|
</div>
|
||||||
|
<?php }
|
||||||
|
}
|
||||||
|
|
||||||
|
function render_current_tags() {
|
||||||
|
$tags = get_the_tags();
|
||||||
|
if ( $tags ) { ?>
|
||||||
|
<div class="tags">
|
||||||
|
<?php foreach ( $tags as $tag ) { ?>
|
||||||
|
<a class="tag" href="<?= get_tag_link( $tag->term_id ); ?>"><?= $tag->name; ?></a>
|
||||||
|
<?php } ?>
|
||||||
|
</div>
|
||||||
|
<?php }
|
||||||
|
}
|
1
liquet/vendor/icons/github.svg
vendored
@@ -1 +0,0 @@
|
|||||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M256 32C132.3 32 32 134.9 32 261.7c0 101.5 64.2 187.5 153.2 217.9 1.4.3 2.6.4 3.8.4 8.3 0 11.5-6.1 11.5-11.4 0-5.5-.2-19.9-.3-39.1-8.4 1.9-15.9 2.7-22.6 2.7-43.1 0-52.9-33.5-52.9-33.5-10.2-26.5-24.9-33.6-24.9-33.6-19.5-13.7-.1-14.1 1.4-14.1h.1c22.5 2 34.3 23.8 34.3 23.8 11.2 19.6 26.2 25.1 39.6 25.1 10.5 0 20-3.4 25.6-6 2-14.8 7.8-24.9 14.2-30.7-49.7-5.8-102-25.5-102-113.5 0-25.1 8.7-45.6 23-61.6-2.3-5.8-10-29.2 2.2-60.8 0 0 1.6-.5 5-.5 8.1 0 26.4 3.1 56.6 24.1 17.9-5.1 37-7.6 56.1-7.7 19 .1 38.2 2.6 56.1 7.7 30.2-21 48.5-24.1 56.6-24.1 3.4 0 5 .5 5 .5 12.2 31.6 4.5 55 2.2 60.8 14.3 16.1 23 36.6 23 61.6 0 88.2-52.4 107.6-102.3 113.3 8 7.1 15.2 21.1 15.2 42.5 0 30.7-.3 55.5-.3 63 0 5.4 3.1 11.5 11.4 11.5 1.2 0 2.6-.1 4-.4C415.9 449.2 480 363.1 480 261.7 480 134.9 379.7 32 256 32z"/></svg>
|
|
Before Width: | Height: | Size: 869 B |
1
liquet/vendor/icons/hom.svg
vendored
@@ -1 +0,0 @@
|
|||||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M258.5 104.1c-1.5-1.2-3.5-1.2-5 0l-156 124.8c-.9.8-1.5 1.9-1.5 3.1v230c0 1.1.9 2 2 2h108c1.1 0 2-.9 2-2V322c0-1.1.9-2 2-2h92c1.1 0 2 .9 2 2v140c0 1.1.9 2 2 2h108c1.1 0 2-.9 2-2V232c0-1.2-.6-2.4-1.5-3.1l-156-124.8z"/><path d="M458.7 204.2l-189-151.4C265.9 49.7 261 48 256 48s-9.9 1.7-13.7 4.8L160 119.7V77.5c0-1.1-.9-2-2-2H98c-1.1 0-2 .9-2 2v92.2l-42.7 35.1c-3.1 2.5-5.1 6.2-5.3 10.2-.2 4 1.3 7.9 4.1 10.7 2.6 2.6 6.1 4.1 9.9 4.1 3.2 0 6.3-1.1 8.8-3.1l183.9-148c.5-.4.9-.4 1.3-.4s.8.1 1.3.4l183.9 147.4c2.5 2 5.6 3.1 8.8 3.1 3.7 0 7.2-1.4 9.9-4.1 2.9-2.8 4.4-6.7 4.2-10.7-.3-4-2.2-7.7-5.4-10.2z"/></svg>
|
|
Before Width: | Height: | Size: 673 B |
1
liquet/vendor/icons/twitter.svg
vendored
@@ -1 +0,0 @@
|
|||||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M492 109.5c-17.4 7.7-36 12.9-55.6 15.3 20-12 35.4-31 42.6-53.6-18.7 11.1-39.4 19.2-61.5 23.5C399.8 75.8 374.6 64 346.8 64c-53.5 0-96.8 43.4-96.8 96.9 0 7.6.8 15 2.5 22.1-80.5-4-151.9-42.6-199.6-101.3-8.3 14.3-13.1 31-13.1 48.7 0 33.6 17.2 63.3 43.2 80.7-16-.4-31-4.8-44-12.1v1.2c0 47 33.4 86.1 77.7 95-8.1 2.2-16.7 3.4-25.5 3.4-6.2 0-12.3-.6-18.2-1.8 12.3 38.5 48.1 66.5 90.5 67.3-33.1 26-74.9 41.5-120.3 41.5-7.8 0-15.5-.5-23.1-1.4C62.8 432 113.7 448 168.3 448 346.6 448 444 300.3 444 172.2c0-4.2-.1-8.4-.3-12.5C462.6 146 479 129 492 109.5z"/></svg>
|
|
Before Width: | Height: | Size: 621 B |
1
liquet/vendor/icons/youtube.svg
vendored
@@ -1 +0,0 @@
|
|||||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M508.6 148.8c0-45-33.1-81.2-74-81.2C379.2 65 322.7 64 265 64h-18c-57.6 0-114.2 1-169.6 3.6C36.6 67.6 3.5 104 3.5 149 1 184.6-.1 220.2 0 255.8c-.1 35.6 1 71.2 3.4 106.9 0 45 33.1 81.5 73.9 81.5 58.2 2.7 117.9 3.9 178.6 3.8 60.8.2 120.3-1 178.6-3.8 40.9 0 74-36.5 74-81.5 2.4-35.7 3.5-71.3 3.4-107 .2-35.6-.9-71.2-3.3-106.9zM207 353.9V157.4l145 98.2-145 98.3z"/></svg>
|
|
Before Width: | Height: | Size: 437 B |
BIN
liquet/vendor/logos/github.png
vendored
Normal file
After Width: | Height: | Size: 4.2 KiB |
BIN
liquet/vendor/logos/medium.png
vendored
Executable file
After Width: | Height: | Size: 11 KiB |
BIN
liquet/vendor/logos/twitter.png
vendored
Executable file
After Width: | Height: | Size: 9.1 KiB |
BIN
liquet/vendor/logos/website.png
vendored
Normal file
After Width: | Height: | Size: 20 KiB |
5
uploads.ini
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
file_uploads = On
|
||||||
|
memory_limit = 512M
|
||||||
|
upload_max_filesize = 512M
|
||||||
|
post_max_size = 512M
|
||||||
|
max_execution_time = 300
|