development 0.1

parents
/.project
/node_modules/
/nbproject/
--- This Project is under
**Attribution-NonCommercial**
**CC BY-NC**
This license lets others remix, tweak, and build upon your work non-commercially, and although their new works must also acknowledge you and be non-commercial, they don’t have to license their derivative works on the same terms.
\ No newline at end of file
/*
Theme Name: A309 WP Theme
Theme URI: https://gitlab.flashsoft.ro/andrei0x309/tailwindcss-wordpress-theme
Author: andrei0x309 ( [email protected] )
Author URI: https://flashsoft.ro
Description: A theme specificaly made from my blog it uses laravel-mix with tailwindcss
Version: 0.1 dev
Text Domain: a309
License: CC BY-NC
License URI: -
*/
/*
Created on : Jun 8, 2019, 1:02:07 PM
Author : andrei0x309
*/
@import "../../node_modules/tailwindcss/base";
//@import "./custom-base-styles.css";
@import "../../node_modules/tailwindcss/components";
//@import "./custom-components";
@import "../../node_modules/tailwindcss/utilities";
//@import "./custom-utilities.css;
body{
background-color: #005196;
background-image: url(images/black-linen.png);
height: 100%;
width: 100%;
}
.header {
background: linear-gradient(to bottom, rgba(153,92,0,1) 0%, rgba(255,161,10,1) 3%, rgba(253,135,33,0.91) 87%, rgba(222,105,2,0.9) 100%);
.logo{
border-width: 4px;
}
nav{
}
}
.main{
max-width: 96%;
margin:auto;
.content{
max-width:1200px;
}
.sidebar{
max-width:300px;
}
.content, .siebar{
min-height: 50.8rem;
}
}
.footer{
background-color: #00000052;
}
.header, .footer{
min-height: 4rem;
}
/* Plugins */
.syntaxhighlighter {
word-break: break-all;
}
<?php
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
<?php
require_once(ABSPATH . 'wp-admin/includes/file.php');
if (! function_exists('mix')) {
/**
* Get the path to a versioned Mix file.
*
* @param string $path
* @param string $manifestDirectory
* @return string
*
* @throws \Exception
*/
function mix($path, $manifestDirectory = ''): String
{
static $manifest;
global $wp_filesystem;
WP_Filesystem();
$publicPath = get_template_directory()."/";
if (! $manifest) {
if (! file_exists($manifestPath = (get_template_directory() .'/mix-manifest.json') )) {
throw new Exception('The Mix manifest does not exist. '. $manifestPath);
}
$manifest = json_decode($wp_filesystem->get_contents($manifestPath), true);
}
$path = "/{$path}";
if (! array_key_exists($path, $manifest)) {
throw new Exception(
"Unable to locate Mix file: {$path}. Please check your ".
'webpack.mix.js output paths and try again.'
);
}
return get_theme_file_uri( $manifest[$path] );
}
}
function enquereThemeCss(): Void{
wp_register_style('az309', get_template_directory_uri() . '/bootstrap/css/bootstrap.min.css' );
}
function theme_support_setup() {
add_theme_support( 'title-tag' );
add_theme_support( 'automatic-feed-links' );
}
add_action( 'after_setup_theme', 'theme_support_setup' );
<!DOCTYPE html>
<html <?php language_attributes(); ?>>
<head>
<link rel="stylesheet" href="<?php echo mix('style.css'); ?>" />
<meta charset="<?php bloginfo( 'charset' ); ?>">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<?php wp_head(); ?>
</head>
<body <?php body_class( ); ?>>
<header class="header flex flex-row bg-gray-200 items-center">
<div class="logo min-h-full h-16 w-56 bg-white px-4 py-2 rounded-tr-full">
<img src="<?php echo get_theme_file_uri( 'images/na309BL.png' ) ?>" />
</div>
<nav class="menu flex-none text-gray-100 text-center px-4 py-2 m-2">
nav MENU here
</nav>
</header>
<?php get_header(); ?>
<main class="main flex w-full mt-6 mb-6 justify-center">
<div class="content bg-white w-full sm:w-full md:w-3/5 lg:w-3/5 xl:w-3/5 p-10">
<?php
if ( have_posts() ) {
while ( have_posts() ) : the_post();
?>
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<header><h2 class="blog-post-title"><?php the_title(); ?></h2>
<p class="blog-post-meta"><?php the_date(); ?> by <?php the_author(); ?></p></header>
<?php the_content(); ?>
</article><!-- /.blog-post -->
<?php
endwhile;
}
?>
</div>
<aside class="sidebar w-1/4 ml-8 bg-gray-100 hidden sm:hidden md:flex lg:flex xl:flex text-4xl content-center items-center justify-center" >
aside content here
</aside>
</main>
<footer class="footer flex w-full items-center text-center text-4xl content-center justify-center">
footer content here
</footer>
<?php wp_footer(); ?>
</body>
</html>
{
"/style.css": "/style.css?id=4c0ee0886c22a28177b0"
}
This diff is collapsed.
{
"name": "wp-theme-309",
"version": "1.0.0",
"description": "NPM for a wp theme",
"main": "index.js",
"scripts": {
"dev": "node node_modules/cross-env/dist/bin/cross-env.js NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js",
"watch": "node node_modules/cross-env/dist/bin/cross-env.js NODE_ENV=development node_modules/webpack/bin/webpack.js --watch --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js",
"hot": "node node_modules/cross-env/dist/bin/cross-env.js NODE_ENV=development node_modules/webpack-dev-server/bin/webpack-dev-server.js --inline --hot --config=node_modules/laravel-mix/setup/webpack.config.js",
"production": "node node_modules/cross-env/dist/bin/cross-env.js NODE_ENV=production node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js"
},
"author": "andrei0x309",
"license": "ISC",
"devDependencies": {
"concat-files": "^0.1.1",
"cross-env": "^5.2.0",
"css-loader": "^2.1.1",
"laravel-mix": "^4.0.16",
"laravel-mix-tailwind": "^0.1.0",
"node-sass": "^4.12.0",
"postcss-loader": "^3.0.0",
"resolve-url-loader": "^2.3.1",
"sass-loader": "^7.1.0",
"tailwindcss": "^1.0.3"
},
"dependencies": {
"postcss-import": "^12.0.1"
}
}
<?php
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
This diff is collapsed.
// Example `tailwind.js` file
module.exports = {
important: true,
theme: {
fontFamily: {
display: ['Gilroy', 'sans-serif'],
body: ['Graphik', 'sans-serif'],
},
extend: {
colors: {
cyan: '#9cdbff',
},
margin: {
'96': '24rem',
'128': '32rem',
},
}
},
variants: {
opacity: ['responsive', 'hover']
}
}
\ No newline at end of file
const mix = require('laravel-mix');
const concat = require('concat-files');
require('laravel-mix-tailwind');
mix.setPublicPath('../a309');
//mix.js('css', 'public/js');
mix.sass('assets/scss/app.scss', 'style.css').tailwind().version()
.then(function () {
concat([
'assets/css/template-header.css',
'style.css'
], 'style.css', function (err) {
if (err) { throw err; }
console.log('done');
});
});
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment