20 Commits
v0.1 ... v0.3

Author SHA1 Message Date
cupcakearmy
b3f9b9e067 automatic settings generation 2019-05-06 21:36:49 +02:00
cupcakearmy
a290ab34e2 reusable logos snippets 2019-05-06 21:35:35 +02:00
cupcakearmy
967d0ef870 reusable tags snippets 2019-05-06 21:35:20 +02:00
cupcakearmy
db1aa0d0d8 version bump 2019-05-06 21:35:02 +02:00
cupcakearmy
6b54cf9f49 logos 2019-05-06 21:34:44 +02:00
cupcakearmy
76e8cbe818 removed unused icons 2019-05-06 21:34:35 +02:00
cupcakearmy
c4e54ff847 smaller padding 2019-05-04 14:26:52 +02:00
cupcakearmy
8a5dff9e28 increase upload limit 2019-05-04 14:26:41 +02:00
cupcakearmy
786dff5ee6 margin bottom for ios 2019-05-03 18:22:08 +02:00
cupcakearmy
4f68f3d72c margin bottom for ios 2019-05-03 18:15:48 +02:00
cupcakearmy
62df154688 overflow of long word 2019-05-03 18:03:53 +02:00
cupcakearmy
32e0b63718 overflow of long word 2019-05-03 17:59:07 +02:00
cupcakearmy
546ee17844 ios smooth scrolling 2019-05-03 17:55:01 +02:00
cupcakearmy
06be702099 line height and link underline in body 2019-05-03 15:59:38 +02:00
cupcakearmy
cac63b53cc pre round corners 2019-05-03 15:59:26 +02:00
cupcakearmy
61188ff01a title tag 2019-05-03 11:01:35 +02:00
cupcakearmy
88bd93423b version bump 2019-05-03 10:25:58 +02:00
cupcakearmy
b5ddb8ba2a increase upload limit 2019-05-03 10:25:44 +02:00
cupcakearmy
5dc38cc328 remove ini set from functions file 2019-05-03 10:25:32 +02:00
cupcakearmy
855d3bc6e4 ingore idea files 2019-05-03 10:25:13 +02:00
21 changed files with 144 additions and 59 deletions

2
.gitignore vendored
View File

@@ -1 +1,3 @@
.idea
data/

View File

@@ -4,6 +4,7 @@ services:
wp:
image: wordpress:5-apache
volumes:
- ./uploads.ini:/usr/local/etc/php/conf.d/uploads.ini:ro
- ./data/wp:/var/www/html
- ./liquet:/var/www/html/wp-content/themes/liquet:ro
ports:
@@ -16,10 +17,3 @@ services:
volumes:
- ./data/db:/var/lib/mysql
env_file: .env
# adminer:
# image: adminer
# restart: always
# ports:
# - 8080:8080

14
liquet/css/logos.css Normal file
View 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);
}

View File

@@ -1,6 +1,11 @@
#singular #main {
padding: 8vw 0;
padding: 8vw 0 16vh 0;
overflow: auto;
overflow-wrap: break-word;
}
#singular #main a {
text-decoration: underline;
}
#singular #header {
@@ -20,12 +25,13 @@
#singular #content {
width: 100%;
padding: 0 2em;
padding: 0 1em;
}
#singular #content > * {
max-width: var(--text-width);
width: 100%;
line-height: 1.5;
}

View File

@@ -1,15 +1,51 @@
<?php
@ini_set( 'upload_max_size' , '128M' );
@ini_set( 'post_max_size', '128M');
@ini_set( 'max_execution_time', '300' );
include_once( 'logos.php' );
add_theme_support( 'align-wide' );
add_theme_support( 'title-tag' );
add_action( 'wp_enqueue_scripts', function () {
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-home', get_template_directory_uri() . '/css/home.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' );
} );
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' );

View File

@@ -5,7 +5,6 @@
<head>
<meta charset="utf-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1">
<?php add_theme_support( 'title-tag' ); ?>
<?php wp_head(); ?>
</head>
<body>

View File

@@ -1,41 +1,31 @@
<?php get_header();
<?php
include_once( 'logos.php' );
include_once( 'tags.php' );
$tags = get_tags(['orderby' => 'count', 'order' => 'desc']);
//$tags = array_map(function ($tag) {
// return [
// 'name' => $tag->name,
// 'slug' => $tag->slug,
// 'count' => $tag->count,
// ];
//}, $tags)
get_header();
$tags = get_tags( [ 'orderby' => 'count', 'order' => 'desc' ] );
?>
<div id="home">
<div class="flex container vertical middle" id="list-header">
<div id="header">
<a href="<?= get_bloginfo('wpurl'); ?>">
<h1><?= get_bloginfo('name'); ?></h1>
<h3><?= get_bloginfo('description'); ?></h3>
<a href="<?= get_bloginfo( 'wpurl' ); ?>">
<h1><?= get_bloginfo( 'name' ); ?></h1>
<h3><?= get_bloginfo( 'description' ); ?></h3>
</a>
<?php render_links(); ?>
</div>
</div>
<div class="flex container horizontal center" id="list-container">
<div id="list">
<?php if ($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 } ?>
<?php render_all_tags(); ?>
<br/><br/><br/>
<?php
while (have_posts()) {
the_post();
get_template_part('post-preview', get_post_format());
}
?>
<?php
while ( have_posts() ) {
the_post();
get_template_part( 'post-preview', get_post_format() );
}
?>
</div>
</div>
</div>

19
liquet/logos.php Normal file
View 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
}

View File

@@ -1,10 +1,12 @@
<?php
include_once( 'loop-utils.php' );
include_once( 'logos.php' );
include_once( 'tags.php' );
get_header();
the_post();
include_once( 'loop-utils.php' );
$dates = getDates();
?>
@@ -43,7 +45,9 @@ $dates = getDates();
<br><br>
<?php the_content(); ?>
<br>
<?php get_template_part( 'tags-list', get_post_format() ); ?>
<?php render_current_tags(); ?>
<hr>
<?php render_links(); ?>
</div>
</div>

View File

@@ -2,7 +2,7 @@
Theme Name: Liquet
Author: Niccolo Borgioli
Description: Minimalistic clean theme
Version: 0.1
Version: 0.3
License: MIT
Tags: minimal, simple, typography, clean
Author URI: https://nicco.io
@@ -12,6 +12,7 @@ Theme URI: https://github.com/cupcakearmy/liquet
* {
box-sizing: border-box;
-webkit-overflow-scrolling: touch;
--clr-primary: hsl(194, 100%, 88%);
--clr-white: #ffffff;
--clr-black: #000000;
@@ -36,6 +37,8 @@ pre {
overflow: auto;
background-color: var(--clr-ligher);
padding: 1em;
border-radius: .25em;
overflow-wrap: initial;
}
a {
@@ -46,6 +49,7 @@ a {
hr {
border: 0;
border-top: 1px solid #f5f5f5;
margin: 1em 0;
}
.fill {

View File

@@ -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
View 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 }
}

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

BIN
liquet/vendor/logos/medium.png vendored Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

BIN
liquet/vendor/logos/twitter.png vendored Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.1 KiB

BIN
liquet/vendor/logos/website.png vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

5
uploads.ini Normal file
View File

@@ -0,0 +1,5 @@
file_uploads = On
memory_limit = 512M
upload_max_filesize = 512M
post_max_size = 512M
max_execution_time = 300