Skip to content

Instantly share code, notes, and snippets.

View mrtuvn's full-sized avatar
👨‍💻
Keep calm and enter your center

Tu Nguyen mrtuvn

👨‍💻
Keep calm and enter your center
View GitHub Profile
git config --global core.autocrlf false
git config --global core.eol LF
git config --global diff.renamelimit 5000
@mrtuvn
mrtuvn / styles-m.css
Created January 15, 2021 11:29
styles-m.css magento 2 compile server side 309KB
body {
margin: 0;
padding: 0;
}
article,
aside,
details,
figcaption,
figure,
main,
@mrtuvn
mrtuvn / _typography-line-height.less
Last active December 14, 2020 16:11
mixin line-height custom magento 2
// line height
.lib-line-height(@heightValue) when not (@heightValue = false) and not (@heightValue = normal) and not (ispercentage(@heightValue)) {
.lib-css(line-height, @heightValue);
}
.lib-line-height(@heightValue) when (ispercentage(@heightValue)) and not (@heightValue = false) {
.lib-css(line-height, @line-height__base);
}
.lib-line-height(@heightValue) when (@heightValue = normal) {
//Page identifier in config backend
@page-cms-wedding: wedding;
// Common styles for mobile and desktop
& when (@media-common = true) {
.cms-@{page-cms-wedding} {
.topblock__widget {
margin-bottom: 0;
}
@mrtuvn
mrtuvn / requirejs-config.js
Created September 30, 2020 09:13
extend core mgt
var config = {
config: {
mixins: {
'Magento_Ui/js/form/element/abstract': {
'Company_Base/js/form/element/abstract-ext': true,
}
},
}
};
@mrtuvn
mrtuvn / default_head_blocks.xml
Last active August 27, 2020 04:27
bootstrap4 load with magento base! If you want place bootstrap order load css before theme consider add style via module instead
<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<head>
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"/>
<css src="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css" src_type="url" rel="stylesheet" type="text/css" />
<css src="https://use.fontawesome.com/releases/v5.14.0/css/all.css" src_type="url" rel="stylesheet" type="text/css"/>
<css src="https://fonts.googleapis.com/css2?family=Montserrat:wght@400;600;800&amp;display=swap" src_type="url" />
@mrtuvn
mrtuvn / form.phtml
Last active August 2, 2020 18:30
contact form template magento 2 follow standard
<?php
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
// phpcs:disable Magento2.Templates.ThisInTemplate
// phpcs:disable Generic.Files.LineLength.TooLong
/**
@mrtuvn
mrtuvn / magento-issues.txt
Last active April 14, 2021 15:20
Recent confirmed magento 2 issues for investigate, tracking, confirmd fixed issue will be remove later
*COMMON
https://github.com/magento/magento2/issues/27889 -CLOSED NOT VERIFY
https://github.com/magento/magento2/issues/29033 -CLOSED
https://github.com/magento/magento2/issues/16242 -OPEN
https://github.com/magento/magento2/issues/26492 -OPEN
https://github.com/magento/magento2/issues/29125 -OPEN
https://github.com/magento/magento2/issues/26565 -OPEN WITH CREATED PR
https://github.com/magento/magento2/issues/31973 -CLOSED
https://github.com/magento/magento2/issues/28387 -OPEN
@mrtuvn
mrtuvn / bootstrap5.css
Created June 23, 2020 07:03
Online code bootstrap 5
/*!
* Bootstrap v5.0.0-alpha1 (https://getbootstrap.com/)
* Copyright 2011-2020 The Bootstrap Authors
* Copyright 2011-2020 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
*/
:root {
--bs-blue: #0d6efd;
--bs-indigo: #6610f2;
--bs-purple: #6f42c1;
@mrtuvn
mrtuvn / fight.gif
Last active February 24, 2020 02:00
fight.gif