1
0
mirror of https://github.com/flextype/flextype.git synced 2025-08-05 12:47:45 +02:00

refactor(core): remove themes from the core #414

This commit is contained in:
Awilum
2020-03-15 11:46:24 +03:00
parent 0384d0ae22
commit 158d4eb98e
10 changed files with 0 additions and 236 deletions

View File

@@ -1,8 +0,0 @@
body {
font-family: 'Roboto', sans-serif;
@apply bg-white text-black text-base;
}
a {
@apply underline;
}

View File

@@ -1,23 +0,0 @@
h1, h2, h3, h4, h5 {
@apply mb-8 font-bold;
}
h1 {
@apply text-4xl;
}
h2 {
@apply text-3xl;
}
h3 {
@apply text-2xl;
}
h4 {
@apply text-xl;
}
h5 {
@apply text-lg;
}

View File

@@ -1,5 +0,0 @@
@import "tailwindcss/base";
@import "base";
@import "headings";
@import "tailwindcss/components";
@import "tailwindcss/utilities";

View File

@@ -1,56 +0,0 @@
const gulp = require('gulp');
const tailwindConfig = "tailwind.config.js";
/**
* Task: gulp css
*/
gulp.task("css", function() {
const atimport = require("postcss-import");
const postcss = require("gulp-postcss");
const tailwindcss = require("tailwindcss");
const purgecss = require("gulp-purgecss");
const concat = require('gulp-concat');
const csso = require('gulp-csso');
const sourcemaps = require('gulp-sourcemaps');
const autoprefixer = require('gulp-autoprefixer');
return gulp
.src(["assets/src/styles.css"])
.pipe(postcss([atimport(), tailwindcss(tailwindConfig)]))
.pipe(
purgecss({
content: ["**/*.html", "../../**/*.md"],
extractors: [
{
extractor: TailwindExtractor = (content) => {
return content.match(/[\w-/:]+(?<!:)/g) || [];
},
extensions: ["html", "md"]
}
]
})
)
.pipe(autoprefixer({
overrideBrowserslist: [
"last 1 version"
],
cascade: false
}))
.pipe(csso())
.pipe(concat('build.min.css'))
.pipe(gulp.dest("assets/dist/css/"));
});
/**
* Task: gulp default
*/
gulp.task('default', gulp.series(
'css'
));
/**
* Task: gulp watch
*/
gulp.task('watch', function () {
gulp.watch(["**/*.html", "../../**/*.md", "assets/src/"], gulp.series('css'));
});

View File

@@ -1,31 +0,0 @@
{
"name": "Default",
"version": "0.9.7",
"description": "Default theme for Flextype",
"homepage": "http://flextype.org",
"author": "Sergey Romanenko",
"license": "MIT",
"keywords": [
"flextype",
"cms",
"flat cms",
"flatfile cms",
"css",
"html"
],
"bugs": {
"url": "https://github.com/flextype/flextype/issues"
},
"dependencies": {
"gulp": "^4.0.2",
"gulp-postcss": "^8.0.0",
"gulp-purgecss": "^2.0.6",
"gulp-autoprefixer": "^7.0.1",
"gulp-concat": "^2.6.1",
"gulp-csso": "^4.0.1",
"gulp-sourcemaps": "^2.6.5",
"postcss-import": "^12.0.1",
"@fullhuman/postcss-purgecss": "^2.0.6",
"tailwindcss": "^1.2.0"
}
}

View File

@@ -1,5 +0,0 @@
module.exports = {
theme: {},
variants: {},
plugins: [],
}

View File

@@ -1,5 +0,0 @@
{% extends 'themes/' ~ registry.flextype.theme ~ '/templates/partials/base.html' %}
{% block content %}
{{ entry.content|shortcode|raw}}
{% endblock %}

View File

@@ -1,93 +0,0 @@
<!doctype html>
<html lang="{{ registry.flextype.locale }}">
<head>
{% block head %}
<meta charset="{{ registry.flextype.charset|lower }}">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="description" content="{% if entry.description %}{{ entry.description }}{% else %}{{ registry.plugins.site.settings.description }}{% endif %}">
<meta name="keywords" content="{% if entry.keywords %}{{ entry.keywords }}{% else %}{{ registry.plugins.site.settings.keywords }}{% endif %}">
<meta name="robots" content="{% if entry.robots %}{{ entry.robots }}{% else %}{{ registry.plugins.site.settings.robots }}{% endif %}">
<meta name="generator" content="Powered by Flextype {{ FLEXTYPE_VERSION }}"/>
{% do
emitter.emit('onThemeMeta') %}
<title>
{% if entry.title %}{{ entry.title|e('html') }}
|
{% endif %}{{ registry.plugins.site.settings.title|e('html') }}</title>
<link href="https://fonts.googleapis.com/css?family=Roboto:300,300i,400,400i,500,500i,700,700i,900,900i&display=swap&subset=cyrillic,cyrillic-ext,latin-ext" rel="stylesheet">
{% set build_css = url() ~ '/site/themes/' ~ registry.flextype.theme ~ '/assets/dist/css/build.min.css' %}
{% do
assets.add('css', build_css, 'site', 1) %}
{% for assets_site in assets.get('css', 'site') %}
{% for assets_by_priorities in assets_site %}
<link href="{{ assets_by_priorities.asset }}" rel="stylesheet">
{% endfor %}
{% endfor %}
{% do
emitter.emit('onThemeHeader') %}
{{ snippets.exec('google-analytics')|raw }}
{% endblock %}
</head>
<body>
<nav class="bg-black text-white">
<div class="container mx-auto pl-16 pr-16 pt-6 pb-6 clearfix">
<div class="w-full lg:w-2/12
text-center lg:text-left
float-left text-white py-2 uppercase tracking-wide">
<a href="{{ url() }}" class="w-full lg:w-2/12 text-center text-base no-underline">{{ registry.plugins.site.settings.title|e('html') }}</a>
</div>
<div class="w-full float-right lg:w-9/12 font-noirpro-semibold">
<div class="text-right p-2">
{% for item in entries.fetch('', {
'order_by': {
'field': 'menu_item_order',
'direction': 'asc'
}
}) %}
{% if item.menu_item_title %}
<a
href="{{ url() }}/{{ item.menu_item_url }}"
class="uppercase
relative
block
text-white
text-center
no-underline
mr-0
border-black
border-b-2
hover:border-white
lg:inline-block
{% if loop.last %}lg:mr-0{% else %}lg:mr-4{% endif %}
{% if item.menu_item_url in entry.slug %}border-white{% endif %}">
{{ item.menu_item_title }}
</a>
{% endif %}
{% endfor %}
</div>
</div>
</div>
</nav>
<main class="container mx-auto">
<section id="content" class="p-16">
{% block content %}{% endblock %}
</section>
<footer class="text-center pl-16 pr-16 pt-6 pb-16">
{% block footer %}
<div class="text-xs uppercase">
{{ tr('site_powered_by_flextype')|raw }}
</div>
{% endblock %}
</footer>
</main>
{% do
emitter.emit('onThemeTail') %}
</body>
</html>

View File

@@ -1,10 +0,0 @@
name: Default
version: 0.9.7
description: Default theme for Flextype
author:
name: Sergey Romanenko
email: hello@romanenko.digital
url: http://digital.flextype.org
homepage: https://github.com/flextype/flextype
bugs: https://github.com/flextype/flextype/issues
license: MIT