Giter Site home page Giter Site logo

tojeiro-me / plasttic Goto Github PK

View Code? Open in Web Editor NEW
3.0 1.0 1.0 9.54 MB

Plasttic Web Workflow: A methodology based Front-End development environment for Static Sites

Home Page: https://plasttic.dev

License: MIT License

HTML 6.69% JavaScript 81.97% CSS 6.49% TypeScript 4.83% Shell 0.01%
frontend template boilerplate css html atomic-design postcss accessibility build-tool dev-server

plasttic's People

Contributors

dependabot[bot] avatar github-actions[bot] avatar renovate[bot] avatar tojeiro-me avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

Forkers

geekwolverine

plasttic's Issues

Plasttic: SCSS Mixins

  • .m13-container as mixin with general declarations and default values in parameters ???

  • Pseudo
    // based on Kevin Powell
    @mixin pseudo(
    $element: after,
    $content: ‘’,
    $top: auto,
    $bottom: auto,
    $left: auto,
    $right: auto) {
    position: relative;

    &::#{$element} {
    content: $content;
    position: absolute;
    top: $top;
    bottom: $bottom;
    left: $left;
    right: $right;
    @content;
    }
    }

  • Container
    /// Define the general styles of the container element
    /// Extend using .sectionSelector + .m13-container
    /// @author Kitty Giraudel
    /// Use: .m13-container
    @mixin container {
    margin-left: auto;
    margin-right: auto;
    max-width: 1200px;
    width: 100%;
    padding-left: 1rem;
    padding-right: 1rem;
    }

  • REVIEW:
    /**

// @each $prop, $value in $shade {
// --clr-#{$color}-#{$prop}: #{$value};
// }
// }

// @each $screen-size, $property in $type-scale {
// @if $screen-size == small {
// @each $prop, $value in $property {
// --fs-#{$prop}: #{$value};
// }
// } @else {
// @include mq(small) {
// @each $prop,
// $value in $property {
// --fs-#{$prop}: #{$value};
// }
// }
// }
// }
// }

  • Breakpoints
    // For Media Queries based on Breakpoints map
    // -----------------------------------------------------------------------------
    @mixin media-query($brkpoint) {
    $size: map-get($vars_brkp, $brkpoint);
    @if ($size != null) {
    @media screen and (min-width: $size) {
    @content;
    }
    } @else {
    @warn "Breakpoint #{$vars_brkp);} wasn't found in $breakpoints.";
    }
    }

// in Variables:

// $vars_brkp: (
// 'sm': 360px,
// 'md': 768px,
// 'xl': 1024px,
// );

// Use:

// body {
// font-size: 2rem;
// @include media-query(sm) {
// font-size: 1rem;
// }
// }

Plasttic Recurring:

  • sitemap date update at each release/content update
  • canonical url uodate for each page
  • Performance check (Preconnect/DNS-Prefetch, Images Lazy Loading, No CDN for CSS, Local hosted fonts)
  • Aria-roles/aria-label

Web Boilerplate v1.4.0: Review Sass Files

  • Base, root, typography

  • Functions and Mixins

  • Variables: Maps

  • Utility classes

  • TOC on Sass files and README with usage info (mixins, functions, …)

  • More REVIEWS to improve: see new Issue “code to REVIEW”

Web Boilerplate: SCSS Variables

  • typography.scss
    /**

// h1, h2, h3, h4 {
// --font-weight: 700;
// --font-width: 80;
// font-weight: normal;
// font-stretch: 100%;
// line-height: 1.1;
// color: var(--clr-neutral-800);
// }

// h1 {
// --font-weight: 900;
// color: var(--clr, var(--clr-primary-400));
// }

// // This is setting the font-sizes
// // based on the ones in the abstract
// // folder, go there to make updates

// h1,
// .h1 {
// font-size: --fs-800;
// }

// h2,
// .h2 {
// --flow-spacer: 1.5em;
// font-size: --fs-700;
// }
// h3,
// .h3 {
// --flow-spacer: 1.5em;
// font-size: --fs-600;
// }

// h4,
// .h4 {
// font-size: --fs-500;
// }

// small,
// .text-small {
// font-size: var(--fs-300);
// }

// strong {
// --font-weight: 50

  • variables.scss (root.scss ?)
    /// Fonts
    // -----------------------------------------------------------------------------

// Generic font-faces with system fonts

$font_system: (
'sans': (
Verdana,
Helvetica,
Arial,
sans-serif,
),
'serif': (
Georgia,
'Times New Roman',
Times,
serif,
),
'mono': (
'Courier New',
Courier,
Monaco,
monospace,
),
);

/// REVIEW: is it useful?
// @each $type, $family in $font_default {
// .m13_font-#{$type} {
// font-family: $family;
// }
// }

/// Type sizes
// -----------------------------------------------------------------------------
$vars_type: (
'body': 1.05rem,
'h1': 2.5rem,
'h2': 2rem,
'h3': 1.5rem,
'h4': 1.05rem,
);

/// REVIEW: use HSL
$vars_color: (
'brand-blue': #40a9bf,
// hsl: 190/50/50
'brand-grey': #2d2d2d,
// hsl: 0/0/18
);

/// REVIEW:
/**

// @each $prop,
// $value in $shade {
// .text-#{$color}-#{$prop} {
// color: var(--clr-#{$color}-#{$prop}) !important;
// }

// .bg-#{$color}-#{$prop} {
// background-color: var(--clr-#{$color}-#{$prop}) !important;
// }
// }
// }

// Breakpoints
// -----------------------------------------------------------------------------
$vars_brkp: (
'sm': 480px,
'md': 768px,
'xl': 1024px,
'xxl': 1280px,
);
// These are the most used breakpoints.
// Use them as a starting point
// and adjust to the right ones for your layout.

/// Layout
// -----------------------------------------------------------------------------

/// Container's maximum width
$vars_ctn-maxWidth: 1200px;

/// Utility Vars
// -----------------------------------------------------------------------------

/// Relative or absolute URL where all assets are served from
$vars_url-cdn: ''; // External CDN: 'https://cdn.monkey13.studio/';
$vars_url-assets: 'assets/';
$vars_url: (
'images': $vars_url-cdn + $vars_url-assets + 'img/',
'fonts': $vars_url-cdn + $vars_url-assets + 'fonts',
'script': $vars_url-cdn + $vars_url-assets + 'js/',
'styles': $vars_url-cdn + $vars_url-assets + 'css/',
);

/// REVIEW: mixin(Fonts)? & functions with preload, preconnect, dns-prefetch, defer
/// see Functions

// @import url('https://fonts.googleapis.com/css2?family=Open+Sans&display=swap');
// Choose self-hosted over CDN

Plasttic: Performance

Plasttic: Init JS

  • get Year for copyright
  • e-mail reformat / Ofuscate ?
  • reset forms?
  • other?
  • see WS.js

Plasttic v2.0: Documentation

Plasttic: SCSS Functions

/// REVIEW:
/// less parameters? other variables?
/// external URL?
/// see $vars_url map in variables

  • /// Returns URL to an image based on its path
    /// @param {String} $path - image path
    /// @param {String} $base - base URL - $vars_url
    /// @return {Url}
    /// @require $base-url

// @function image($path, $base: $vars_url-assets) {
// @return asset($base, 'img/', $path);
// }

  • /// Returns URL to a font based on its path
    /// @param {String} $path - font path
    /// @param {String} $base - base URL - $vars_url
    /// @return {Url}
    /// @require $base-url

// @function font($path, $base: $vars_url-assets) {
// @return asset($base, 'fonts/', $path);
// }

  • lightDark
    // darken($color, 10%) > mix($color, black, 90%)
    // lighten($color, 10%) > mix($color, white, 90%)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.