commit 758101c201d984bd18af78d3a5dde38718f5446b
Author: Hugo Soucy <hugo@soucy.cc>
Date: Wed, 14 Oct 2020 20:44:26 -0400
First commit
Diffstat:
24 files changed, 471 insertions(+), 0 deletions(-)
diff --git a/.editorconfig b/.editorconfig
@@ -0,0 +1,16 @@
+# EditorConfig <http://EditorConfig.org>
+
+root = true
+
+# Unix-style newlines with a newline ending every file
+[*]
+charset = utf-8
+end_of_line = lf
+insert_final_newline = true
+indent_style = space
+indent_size = 4
+trim_trailing_whitespace = true
+
+# 2 space indentation (CSS, YML, and templates HTML big family)
+[*.{css,yml,xml,xhtml,html,vm,ftl,mustache,twig,hbs,yaml,lua,json}]
+indent_size = 2
diff --git a/CHANGELOG.md b/CHANGELOG.md
@@ -0,0 +1,5 @@
+# v0.1.0
+## 10/12/2020
+
+1. [](#new)
+ * ChangeLog started...
diff --git a/LICENSE b/LICENSE
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) 2020 Hugo Soucy (hs0ucy)
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/README.md b/README.md
@@ -0,0 +1,7 @@
+# Jcarrier2020 Theme
+
+The **Jcarrier2020** Theme is for [Grav CMS](http://github.com/getgrav/grav). This README.md file should be modified to describe the features, installation, configuration, and general usage of this theme.
+
+## Description
+
+Theme of jacynthecarrier.com
diff --git a/blueprints.yaml b/blueprints.yaml
@@ -0,0 +1,32 @@
+name: Jcarrier2020
+slug: jcarrier2020
+type: theme
+version: 0.1.0
+description: Theme of jacynthecarrier.com
+icon: rebel
+author:
+ name: Hugo Soucy (hs0ucy)
+ email: hugo@soucy.cc
+homepage: https://github.com/hs0ucy/grav-theme-jcarrier2020
+demo: http://demo.yoursite.com
+keywords: grav, theme, etc
+bugs: https://github.com/hs0ucy/grav-theme-jcarrier2020/issues
+readme: https://github.com/hs0ucy/grav-theme-jcarrier2020/blob/develop/README.md
+license: MIT
+
+dependencies:
+ - { name: grav, version: '>=1.6.0' }
+
+form:
+ validation: loose
+ fields:
+ dropdown.enabled:
+ type: toggle
+ label: Dropdown in Menu
+ highlight: 1
+ default: 1
+ options:
+ 1: PLUGIN_ADMIN.ENABLED
+ 0: PLUGIN_ADMIN.DISABLED
+ validate:
+ type: bool
diff --git a/css/index.css b/css/index.css
@@ -0,0 +1,90 @@
+@charset "UTF-8";
+:root {
+ --base-fontfamily: "Lucida Console", Courier, monospace;
+ --base-fontsize: 16;
+ --base-lineheight: 1.5;
+ --grid-columns: $grid-columns;
+ --grid-gutter: calc(1rem * (var(--base-fontsize) / var(--base-fontsize)));
+ --grid-maxwidth: 1140px; }
+
+:root {
+ --base-red: #e31d25;
+ --base-darkest: #000000;
+ --base-brightest: #ffffff;
+ --base-brightest-grey: #eeeeee;
+ --base-bg: var(--base-brightest);
+ --base-fg: var(--base-darkest);
+ --base-link: var(--base-red); }
+
+html,
+body {
+ font-family: var(--base-fontfamily);
+ height: 100%;
+ line-height: var(--base-lineheight);
+ min-height: 100%; }
+
+body {
+ margin: 0;
+ padding: 0; }
+
+a {
+ color: var(--base-link); }
+ a:focus, a:hover, a:visited {
+ text-decoration: none; }
+ a, a:active {
+ text-decoration: underline; }
+
+.visuallyhidden {
+ border: 0;
+ clip: rect(0 0 0 0);
+ height: 1px;
+ margin: -1px;
+ overflow: hidden;
+ padding: 0;
+ position: absolute;
+ width: 1px; }
+
+.visibilityhidden {
+ visibility: hidden; }
+
+[hidden] {
+ display: none !important; }
+
+h1,
+h2,
+h3 {
+ font-weight: normal; }
+
+img {
+ height: auto;
+ max-width: 100%;
+ width: auto; }
+
+figure {
+ margin: 0; }
+
+nav ol,
+nav ul {
+ list-style-type: none;
+ margin: 0;
+ padding: 0; }
+
+/* ↓ targets the intermediary wrapper */
+.layout > * {
+ display: flex;
+ flex-wrap: wrap; }
+
+.layout > * > * {
+ /* ↓ applies to both elements */ }
+
+.layout__aside {
+ background: aqua;
+ flex-basis: 15rem;
+ flex-grow: 1; }
+
+.layout__main {
+ /* ↓ grow from nothing */
+ background: aquamarine;
+ flex-basis: 0;
+ flex-grow: 999;
+ min-width: calc(50% - 1rem); }
diff --git a/images/logo.png b/images/logo.png
Binary files differ.
diff --git a/jcarrier2020.php b/jcarrier2020.php
@@ -0,0 +1,9 @@
+<?php
+namespace Grav\Theme;
+
+use Grav\Common\Theme;
+
+class Jcarrier2020 extends Theme
+{
+ // Access plugin events in this class
+}
diff --git a/jcarrier2020.yaml b/jcarrier2020.yaml
@@ -0,0 +1,3 @@
+enabled: true
+dropdown:
+ enabled: true
diff --git a/screenshot.jpg b/screenshot.jpg
Binary files differ.
diff --git a/src/README.md b/src/README.md
@@ -0,0 +1,6 @@
+Compile SCSS with `find`, `entr` and `sassc`:
+
+`find . -type f -name "*.scss" | entr -r sassc scss/index.scss ../css/index.css`
+
+* https://github.com/sass/sassc
+* http://eradman.com/entrproject/
diff --git a/src/scss/global/_abstractions.scss b/src/scss/global/_abstractions.scss
@@ -0,0 +1,14 @@
+$base-fontsize: 16;
+$base-lineheight: 1.5;
+$grid-columns: 12;
+
+:root {
+ --base-fontfamily: "Lucida Console", Courier, monospace;
+ --base-fontsize: #{$base-fontsize};
+ --base-lineheight: #{$base-lineheight};
+
+ // Grid System
+ --grid-columns: $grid-columns;
+ --grid-gutter: calc(1rem * (var(--base-fontsize) / var(--base-fontsize)));
+ --grid-maxwidth: 1140px;
+}
diff --git a/src/scss/global/_base.scss b/src/scss/global/_base.scss
@@ -0,0 +1,82 @@
+html,
+body {
+ font-family:var(--base-fontfamily);
+ height:100%;
+ line-height:var(--base-lineheight);
+ min-height:100%;
+}
+
+body {
+ margin:0;
+ padding:0;
+
+ // & > * {
+ // box-sizing:border-box;
+ // margin: 0 auto;
+ // max-width:var(--grid-maxwidth);
+ // padding: 0 rem-calc(32);
+ // }
+
+ // & > * + * {
+ // margin-top: rem-calc(40);
+ // }
+}
+
+a {
+ color: var(--base-link);
+
+ &:focus,
+ &:hover,
+ &:visited {
+ text-decoration: none;
+ }
+
+ &,
+ &:active {
+ text-decoration: underline;
+ }
+}
+
+.visuallyhidden {
+ border: 0;
+ clip: rect(0 0 0 0);
+ height: 1px;
+ margin: -1px;
+ overflow: hidden;
+ padding: 0;
+ position: absolute;
+ width: 1px;
+}
+
+.visibilityhidden {
+ visibility: hidden;
+}
+
+[hidden] {
+ display: none !important;
+}
+
+h1,
+h2,
+h3 {
+ font-weight: normal;
+}
+
+img {
+ height: auto;
+ max-width: 100%;
+ width: auto;
+}
+
+figure {
+ margin: 0;
+}
+
+nav {
+ ol,
+ ul {
+ list-style-type: none;
+ margin: 0;
+ padding: 0;
+ }
+}
diff --git a/src/scss/global/_colors.scss b/src/scss/global/_colors.scss
@@ -0,0 +1,10 @@
+// Color palette
+:root {
+ --base-red: #e31d25;
+ --base-darkest: #000000;
+ --base-brightest: #ffffff;
+ --base-brightest-grey: #eeeeee;
+ --base-bg: var(--base-brightest);
+ --base-fg: var(--base-darkest);
+ --base-link: var(--base-red);
+}
diff --git a/src/scss/global/_fonts.scss b/src/scss/global/_fonts.scss
diff --git a/src/scss/global/_functions.scss b/src/scss/global/_functions.scss
@@ -0,0 +1,6 @@
+// Sass functions
+@function rem-calc($size) {
+ $remSize: $size / $base-fontsize;
+
+ @return #{$remSize}rem;
+}
diff --git a/src/scss/index.scss b/src/scss/index.scss
@@ -0,0 +1,8 @@
+//
+@import "global/_abstractions";
+@import "global/_functions";
+@import "global/_colors";
+@import "global/_fonts";
+@import "global/_base";
+
+@import "modules/_layout";
diff --git a/src/scss/modules/_layout.scss b/src/scss/modules/_layout.scss
@@ -0,0 +1,26 @@
+//
+/* ↓ targets the intermediary wrapper */
+.layout > * {
+ display: flex;
+ flex-wrap: wrap;
+ // margin: -0.5rem;
+}
+
+.layout > * > * {
+ /* ↓ applies to both elements */
+ // margin: 0.5rem;
+}
+
+.layout__aside {
+ background: aqua;
+ flex-basis: 15rem;
+ flex-grow: 1;
+}
+
+.layout__main {
+ /* ↓ grow from nothing */
+ background: aquamarine;
+ flex-basis: 0;
+ flex-grow: 999;
+ min-width: calc(50% - 1rem);
+}
diff --git a/templates/default.html.twig b/templates/default.html.twig
@@ -0,0 +1,5 @@
+{% extends 'partials/base.html.twig' %}
+
+{% block content %}
+ {{ page.content }}
+{% endblock %}
diff --git a/templates/error.html.twig b/templates/error.html.twig
@@ -0,0 +1,8 @@
+{% extends 'partials/base.html.twig' %}
+
+{% block content %}
+ <div class="lead text-center">
+ <h1>Error!</h1>
+ {{ page.content }}
+ </div>
+{% endblock %}
diff --git a/templates/partials/base.html.twig b/templates/partials/base.html.twig
@@ -0,0 +1,64 @@
+{% set theme_config = attribute(config.themes, config.system.pages.theme) %}
+<!DOCTYPE html>
+<html lang="{{ grav.language.getActive ?: grav.config.site.default_lang }}">
+ <head>
+ {% block head %}
+ <meta charset="utf-8" />
+ <title>{% if header.title %}{{ header.title|e('html') }} | {% endif %}{{ site.title|e('html') }}</title>
+
+ <meta http-equiv="X-UA-Compatible" content="IE=edge">
+ <meta name="viewport" content="width=device-width, initial-scale=1">
+ {% include 'partials/metadata.html.twig' %}
+
+ <link rel="icon" type="image/png" href="{{ url('theme://images/logo.png') }}" />
+ <link rel="canonical" href="{{ page.url(true, true) }}" />
+ {% endblock head %}
+
+ {% block stylesheets %}
+ {% do assets.addCss('theme://css/index.css', 98) %}
+ {% endblock %}
+
+ {% block javascripts %}
+ {% do assets.addJs('jquery', 100) %}
+ {% endblock %}
+
+ {% block assets deferred %}
+ {{ assets.css()|raw }}
+ {{ assets.js()|raw }}
+ {% endblock %}
+ </head>
+ <body id="t" class="layout {{ page.header.body_classes }}">
+ <div class="layout__inner">
+ {% block header %}
+ <header class="header-banner layout__aside">
+ <a class="logo" href="{{ home_url }}">
+ {{ config.site.title }}
+ </a>
+ {% block header_navigation %}
+ <nav class="nav">
+ {% include 'partials/navigation.html.twig' %}
+ </nav>
+ {% endblock %}
+ </header>
+ {% endblock %}
+
+ <div class="layout__main">
+ {% block body %}
+ <main id="body">
+ {% block content %}{% endblock %}
+ </main>
+ {% endblock %}
+
+ {% block footer %}
+ <footer class="footer-banner">
+ <p><a href="http://getgrav.org">Grav</a> was <i class="fa fa-code"></i> with <i class="fa fa-heart"></i> by <a href="http://www.rockettheme.com">RocketTheme</a>.</p>
+ </footer>
+ {% endblock %}
+ </div>
+
+ {% block bottom %}
+ {{ assets.js('bottom')|raw }}
+ {% endblock %}
+ </div>
+ </body>
+</html>
diff --git a/templates/partials/navigation.html.twig b/templates/partials/navigation.html.twig
@@ -0,0 +1,48 @@
+{% macro loop(page) %}
+ {% for p in page.children.visible %}
+ {% set current_page = (p.active or p.activeChild) ? 'selected' : '' %}
+ {% if p.children.visible.count > 0 %}
+ <li class="has-children {{ current_page }}">
+ <a href="{{ p.url }}">
+ {% if p.header.icon %}<i class="fa fa-{{ p.header.icon }}"></i>{% endif %}
+ {{ p.menu }}
+ </a>
+ <ul>
+ {{ _self.loop(p) }}
+ </ul>
+ </li>
+ {% else %}
+ <li class="{{ current_page }}">
+ <a href="{{ p.url }}">
+ {% if p.header.icon %}<i class="fa fa-{{ p.header.icon }}"></i>{% endif %}
+ {{ p.menu }}
+ </a>
+ </li>
+ {% endif %}
+ {% endfor %}
+{% endmacro %}
+
+<ul>
+ {% if theme_config.dropdown.enabled %}
+ {{ _self.loop(pages) }}
+ {% else %}
+ {% for page in pages.children.visible %}
+ {% set current_page = (page.active or page.activeChild) ? 'selected' : '' %}
+ <li class="{{ current_page }}">
+ <a href="{{ page.url }}">
+ {% if page.header.icon %}<i class="fa fa-{{ page.header.icon }}"></i>{% endif %}
+ {{ page.menu }}
+ </a>
+ </li>
+ {% endfor %}
+ {% endif %}
+ {% for mitem in site.menu %}
+ <li>
+ <a href="{{ mitem.url }}">
+ {% if mitem.icon %}<i class="fa fa-{{ mitem.icon }}"></i>{% endif %}
+ {{ mitem.text }}
+ </a>
+ </li>
+ {% endfor %}
+</ul>
+
diff --git a/templates/project.html.twig b/templates/project.html.twig
@@ -0,0 +1,11 @@
+{% extends 'partials/base.html.twig' %}
+
+{% block content %}
+ <h1 class="visuallyhidden">{{ page.title }}</h1>
+
+ {{ page.content }}
+
+ {% for image in page.media.images %}
+ {{ image.derivatives(320,1600,300).sizes('(max-width: 71.25rem) 100vw, 100vw').html() }}
+ {% endfor %}
+{% endblock %}
diff --git a/thumbnail.jpg b/thumbnail.jpg
Binary files differ.