Я также спросил это на GitHub. Предположим, есть компоненты Signin
и Signup
. Они близнецы:
Signup:
<main>
<h1 className={styles.h1}>Sign Up</h1>
<?php | |
/** | |
* CercecUser | |
* | |
* @author Marc Elie <[email protected]> | |
* | |
* Event: OnUserFormSave | |
* | |
* Modified from Bob Ray's plugin tutorial, Official Guide p. 492-3 | |
* and Bob Ray's online explanation on create class: |
<?php | |
/* | |
Output filter to retrieve names of TVs from a list of TV ids | |
[email protected] | |
Idea: | |
Use it with toogleTVSet plugin (included below) to handel different template options. | |
Usage: |
<script type="text/javascript"> | |
window.onscroll = scroll; | |
function scroll () { | |
var scrollTop = window.pageYOffset; | |
console.log(scrollTop); | |
if( scrollTop > 363 ){ | |
document.getElementById('summary').style.top="20px"; | |
document.getElementById('summary').style.position="fixed"; | |
} | |
else |
Я также спросил это на GitHub. Предположим, есть компоненты Signin
и Signup
. Они близнецы:
Signup:
<main>
<h1 className={styles.h1}>Sign Up</h1>
const gulp = require('gulp'); | |
const Builder = require('gulp-bem-bundle-builder'); | |
const bundler = require('gulp-bem-bundler-fs'); | |
const nodemon = require('gulp-nodemon'); | |
const merge = require('merge2'); | |
const debug = require('gulp-debug'); | |
const babel = require('gulp-babel'); | |
const uglify = require('gulp-uglify'); | |
const gulpif = require('gulp-if'); | |
const concat = require('gulp-concat'); |
function declOfNum(number, titles) { | |
cases = [2, 0, 1, 1, 1, 2]; | |
return titles[ (number%100>4 && number%100<20)? 2 : cases[(number%10<5)?number%10:5] ]; | |
} | |
use: | |
declOfNum(count, ['найдена', 'найдено', 'найдены']); |
#!/usr/bin/env bash | |
# MIT © Sindre Sorhus - sindresorhus.com | |
# git hook to run a command after `git pull` if a specified file was changed | |
# Run `chmod +x post-merge` to make it executable then put it into `.git/hooks/`. | |
changed_files="$(git diff-tree -r --name-only --no-commit-id ORIG_HEAD HEAD)" | |
check_run() { | |
echo "$changed_files" | grep --quiet "$1" && eval "$2" |
#!/usr/bin/env bash | |
# | |
# Script to remove GPG key from git-crypt | |
# | |
# It will re-initialize git-crypt for the repository and re-add all keys except | |
# the one requested for removal. | |
# | |
# Note: You still need to change all your secrets to fully protect yourself. | |
# Removing a user will prevent them from reading future changes but they will | |
# still have a copy of the data up to the point of their removal. |
We should have at least three files: 'Widget.svelte', 'rollup.config.js' and 'package.json':
Widget.svelte
:<script>
export let name;
</script>
<h1>Hello {name}!</h1>