├── .gitignore ├── README.md ├── bash ├── README.md ├── clone_vendors.sh ├── core │ ├── .gitignore │ ├── README.md │ ├── assets │ │ ├── theme1 │ │ │ ├── _styles │ │ │ │ └── vars.css │ │ │ ├── base │ │ │ │ └── styles.css │ │ │ ├── profile │ │ │ │ └── styles.css │ │ │ └── toolbar │ │ │ │ └── styles.css │ │ ├── theme2 │ │ │ ├── _styles │ │ │ │ └── vars.css │ │ │ ├── base │ │ │ │ └── styles.css │ │ │ ├── profile │ │ │ │ └── styles.css │ │ │ └── toolbar │ │ │ │ └── styles.css │ │ ├── theme3 │ │ │ ├── _styles │ │ │ │ └── vars.css │ │ │ ├── base │ │ │ │ └── styles.css │ │ │ ├── profile │ │ │ │ └── styles.css │ │ │ └── toolbar │ │ │ │ └── styles.css │ │ ├── theme4 │ │ │ ├── _styles │ │ │ │ └── vars.css │ │ │ ├── base │ │ │ │ └── styles.css │ │ │ ├── profile │ │ │ │ └── styles.css │ │ │ └── toolbar │ │ │ │ └── styles.css │ │ ├── theme5 │ │ │ ├── _styles │ │ │ │ └── vars.css │ │ │ ├── base │ │ │ │ └── styles.css │ │ │ ├── profile │ │ │ │ └── styles.css │ │ │ └── toolbar │ │ │ │ └── styles.css │ │ └── theme6 │ │ │ ├── _styles │ │ │ └── vars.css │ │ │ ├── base │ │ │ └── styles.css │ │ │ ├── profile │ │ │ └── styles.css │ │ │ └── toolbar │ │ │ └── styles.css │ └── jsApp │ │ ├── gulp │ │ ├── gulpfile.js │ │ └── package.json └── scripting │ ├── .bashrc │ ├── README.md │ ├── case_in_esac.sh │ ├── clean_dist.sh │ ├── diff-hot-fixes.diff │ ├── fast_diff.sh │ ├── fast_diff_v2.sh │ ├── for_in.sh │ ├── hw.sh │ ├── if_elif_else.sh │ ├── up_repo.sh │ ├── variables.sh │ └── while.sh ├── contributing.md ├── screen-vs-tmux └── README.md ├── screen ├── .screenrc ├── README.md ├── chat-example │ ├── .gitignore │ ├── README.md │ ├── index.html │ ├── index.js │ └── package.json └── hotkey.md └── tmux ├── README.md ├── chat-example ├── .gitignore ├── README.md ├── index.html ├── index.js └── package.json └── hotkey.md /.gitignore: -------------------------------------------------------------------------------- 1 | # sublime config 2 | *.sublime-* 3 | 4 | # node_modules 5 | node_modules -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # terminalForCoder__WSD 2 | _repository for practice *nix terminal (Ubuntu prefer)_ 3 | 4 | ## Articles (EN) 5 | 1. [Console Into Mass. The Transit to the Light Side.](https://medium.com/@var_bin/console-into-mass-the-transit-to-the-light-side-81766a3d7fff#.d0n45y67r) 6 | 2. [Console Into Mass. The Transit to the Light Side. Part Two.](https://medium.com/@var_bin/console-into-mass-the-transit-to-the-light-side-part-two-6ffa79dd1a5e#.akahigs63) 7 | 3. [Console Into Mass. The Transit to the Light Side. Bash-scripting.](https://medium.com/@var_bin/console-into-mass-bash-scripting-698f75c20163#.hfn82vp1u) 8 | 4. [Console Into Mass. The Transit to the Light Side. Automatization of Routine Tasks.](https://medium.com/@var_bin/console-into-mass-the-transit-to-the-light-side-automatization-of-routine-tasks-af3200bd9a47#.jzvxtz5d7) 9 | 10 | 11 | ## Статьи (RU) 12 | 1. [Консоль в массы. Переход на светлую сторону. Часть первая.](https://habrahabr.ru/post/317534/) 13 | 2. [Консоль в массы. Переход на светлую сторону. Часть вторая.](https://habrahabr.ru/post/318376/) 14 | 3. [Консоль в массы. Переход на светлую сторону. Bash.](https://habrahabr.ru/post/319670/) 15 | 4. [Консоль в массы. Переход на светлую сторону. Автоматизация рутинных задач.](https://habrahabr.ru/post/321928/) 16 | 17 | ## Slides (EN) 18 | 1. [Console Into Mass__](http://var-bin.com/terminalForCoder__WSD-2016/en/shower/) 19 | 20 | ## Слайды (RU) 21 | 1. [Консоль в массы__](http://var-bin.com/terminalForCoder__WSD-2016/shower/) 22 | 23 | ## How to use it 24 | 25 | * Do `git clone` stuff 26 | 27 | ```bash 28 | $ git clone git@github.com:var-bin/terminalForCoder__WSD.git 29 | ``` 30 | 31 | * Enjoy :computer: 32 | 33 | ## The list of topics 34 | 35 | 1. Terminal managers 36 | 1. `screen` [[Follow this link]](https://github.com/var-bin/terminalForCoder__WSD/tree/master/screen) 37 | * Installation 38 | * Configuration file for `screen` 39 | * Basic key combinations 40 | * How it works 41 | 2. `tmux` [[Follow this link]](https://github.com/var-bin/terminalForCoder__WSD/tree/master/tmux) 42 | * Installation 43 | * Basic key combinations 44 | * How it works 45 | 3. `screen` vs `tmux` [[Follow this link]](https://github.com/var-bin/terminalForCoder__WSD/tree/master/screen-vs-tmux) 46 | 2. `bash` [[Follow this link]](https://github.com/var-bin/terminalForCoder__WSD/tree/master/bash) 47 | 1. Basic 48 | * Variables 49 | * Passing arguments to the script 50 | * Processing arguments within the script 51 | 2. Conditions to execute different branches of code 52 | * `if` 53 | * `if/else` 54 | * `if/elif/else` 55 | * `case/in/esac` 56 | 3. Loops for repeated code 57 | * `for/in` 58 | * `while` 59 | 3. Routine tasks automation [[Follow this link]](https://github.com/var-bin/terminalForCoder__WSD/tree/master/bash/scripting) 60 | * Fast `diff` 61 | * Fast `diff` + `Jira API` 62 | * Clean _dist 63 | * Up a large number of repositories 64 | * Useful aliases 65 | 66 | ## Contributing 67 | Want to contribute? [Follow these recommendations](https://github.com/var-bin/terminalForCoder__WSD/blob/master/contributing.md). 68 | -------------------------------------------------------------------------------- /bash/README.md: -------------------------------------------------------------------------------- 1 | # bash 2 | 3 | ### Preface 4 | Every time you launch a terminal, it starts to run the shell - a special program that interprets and processes command-lines taken from your keyboard. The shell also detects errors and monitors compliance of the commands and with their syntax. Some of the examples of these commands include opening a folder, creating a directory, adding, editing and saving text files. Actually, there are many other command-line interpreters out there. Developed by Stephen Bourne in 1977 ([`sh`](https://en.wikipedia.org/wiki/Bourne_shell)) is known to be one of the first and successful release of the shell. It was a part of Version 7 OS Unix and is commonly considered a de facto standard for any `*nix` distributive. In 1989 the world witnessed its upgraded version under a new name - `sh - bash (Bourne again shell)`. You're likely to ask why bash and the question would be quite to the point, although here's all pretty simple. In 99% `OS *nix` driven computers use bash as the default shell. You can also find the `zsh`, but that’s a completely different story. 5 | 6 | ```bash 7 | which bash # where is placed bash 8 | ``` 9 | 10 | ### Basics 11 | The beginning of any script in bash 12 | 13 | ```bash 14 | #!/bin/bash 15 | ``` 16 | 17 | #### Variables 18 | - **name**: letters, numbers, `_` (underscore). 19 | - **name** - it cannot start with a number. 20 | - **value**: numbers, strings (if there is any whitespace - wrap it into double quotes), characters. 21 | 22 | **Create (rewrite) variable:** 23 | 24 | ```bash 25 | path=~/Docs 26 | ``` 27 | 28 | **Read variable:** 29 | 30 | ```bash 31 | "$path" or "${path}" 32 | ``` 33 | 34 | **Pass arguments to a script:** 35 | ```bash 36 | ./script.sh arg1 arg2 arg3 … argN 37 | ``` 38 | 39 | **Processing arguments within the script:** 40 | 41 | ```bash 42 | "$1" # first argument 43 | "$2" # second argument 44 | "$0" # name of script 45 | "$#" # count of arguments 46 | "$@" # all arguments is concatenated in one string, 47 | # each argument is represented as one word 48 | ``` 49 | 50 | **Hello, world!** `*` 51 | 52 | ```bash 53 | #!/bin/bash 54 | echo "Hello, world!" 55 | 56 | # ./hw.sh - how this script should be called 57 | ``` 58 | 59 | **Another one example of working with variables:** 60 | 61 | ```bash 62 | #!/bin/bash 63 | 64 | var1="$1" 65 | var2="$2" 66 | 67 | echo "Arguments are \$1=${var1} \$2=${var2}" 68 | 69 | # ./variables.sh Hello world - how this script should be called 70 | ``` 71 | > `*` Edit a permit for a file: 72 | ```bash 73 | chmod +x 74 | ``` 75 | 76 | #### Conditions to execute different branches of code 77 | 78 | **if** 79 | 80 | ```bash 81 | if [[ condition ]] 82 | then 83 | # an action, if condition is true 84 | fi 85 | ``` 86 | 87 | * * * 88 | **Conditions (strings):** 89 | 90 | ```bash 91 | -z # string is empty 92 | -n # string is not empty 93 | == # strings are equal 94 | != # strings are not equal 95 | ``` 96 | 97 | **Conditions (numbers/strings):** 98 | 99 | ```bash 100 | operation 101 | -eq, (==) # equal 102 | -ne, (!=) # not equal 103 | -lt, (<) # less than 104 | -le # less than or equal 105 | -gt, (>) # more than 106 | -ge # more than or equal 107 | ``` 108 | 109 | **Conditions (files):** 110 | 111 | ```bash 112 | -e # path is exist 113 | -f # is file 114 | -d # is directory 115 | -s # file size more than 0 116 | -x # file is executable 117 | ``` 118 | 119 | **Conditions (boolean):** 120 | 121 | ```bash 122 | ! # denial of boolean expression 123 | && # boolean "and" 124 | || # boolean "or" 125 | ``` 126 | * * * 127 | 128 | **if/else:** 129 | 130 | ```bash 131 | if [[ condition ]] 132 | then 133 | # action, if condition is true 134 | else 135 | # action, if condition is false 136 | fi 137 | 138 | break # break loop 139 | continue # go to the next value of i 140 | ``` 141 | 142 | **if/elif/else** 143 | 144 | ```bash 145 | #!/bin/bash 146 | 147 | if [[ -f "$1" ]] 148 | then 149 | echo "Removing file" 150 | rm "$1" 151 | elif [[ -d "$1" ]] 152 | then 153 | echo "Removing dir" 154 | rm -r "$1" 155 | else 156 | echo "Cannot remove ${1}" 157 | fi 158 | ``` 159 | 160 | 161 | **case/in/esac** 162 | 163 | ```bash 164 | #!/bin/bash 165 | 166 | # ./case_in_esac.sh 2 1 167 | # Creating dir 1 168 | # ./case_in_esac.sh 1 2 169 | # Creating file 2 170 | 171 | if [[ "$#" -ne 2 ]] 172 | then 173 | echo "You should specify exactly two arguments!" 174 | else 175 | case "$1" in 176 | 1) 177 | echo "Creating file ${2}" 178 | touch "$2" 179 | ;; 180 | 2) 181 | echo "Creating dir ${2}" 182 | mkdir "$2" 183 | ;; 184 | *) 185 | echo "Wrong value" 186 | ;; 187 | esac 188 | fi 189 | ``` 190 | 191 | #### Loops for repeated code 192 | 193 | **for/in** 194 | 195 | ```bash 196 | for i in array 197 | do 198 | # an action, i on every iteration is getting 199 | # the next value from array 200 | done 201 | ``` 202 | 203 | **while** 204 | 205 | ```bash 206 | while [ condition ] 207 | do 208 | # an action, while condition is true 209 | done 210 | ``` 211 | 212 | **while example:** 213 | 214 | ```bash 215 | #!/bin/bash 216 | # while.sh 217 | 218 | again="yes" 219 | 220 | while [ "$again" = "yes" ] 221 | do 222 | echo "Please enter a name:" 223 | read name # !!! 224 | echo "The name you entered is ${name}" 225 | 226 | echo "Do you wish to continue? (yes/no)" 227 | read again # !!! 228 | done 229 | ``` 230 | 231 | ### Routine tasks automation 232 | 233 | #### Fast diff 234 | ```bash 235 | git diff origin/master origin/ > ~//diff/diff-.diff 236 | 237 | # a name of the branch to which you want to create a diff 238 | # a name of the folder where to save the file with diff 239 | ``` 240 | 241 | #### Fast diff + `Jira API` 242 | ```bash 243 | #!/bin/bash 244 | 245 | PATH_TO_DIFF_DIR="${HOME}/diff/" 246 | FILE_EXTENTION=".diff" 247 | 248 | USER_NAME="" 249 | USER_PASSWORD="" 250 | PROJECT_NAME="" 251 | 252 | # if "$1" is empty 253 | if [ -z "$1" ] 254 | then 255 | echo "Please, specify an issue ID" 256 | exit 0 257 | fi 258 | 259 | issue_id="$1" 260 | branch=$(git rev-parse --abbrev-ref HEAD) 261 | 262 | # Get the first line of git remote output and cut a path to repository 263 | repository=$(git remote -v | head -n1 | sed "s/^origin.*\/\(.*\)\.git\s(.*)/\1/") 264 | file_name="${branch}-${repository}${FILE_EXTENTION}" 265 | 266 | # path to diff directory with .diff 267 | path_to_diff="${PATH_TO_DIFF_DIR}${file_name}" 268 | 269 | diffMaster() { 270 | git diff "origin/master origin/${branch}" > "$path_to_diff" 271 | } 272 | 273 | attachDiff() { 274 | curl -D -u "${USER_NAME}":"${USER_PASSWORD}" -X POST -H "X-Atlassian-Token: no-check" -F "file=@${path_to_diff};type=text/x-diff" "https://jira.${PROJECT_NAME}.com/rest/api/2/issue/${issue_id}/attachments" 275 | } 276 | 277 | diffMaster && attachDiff 278 | 279 | # Usage: cd && fast_diff_v2.sh 280 | # should include your company prefix (ABC, XYZ, XX, etc.) 281 | # At instance, "./fast_diff_v2.sh XYZ-135" will try to attach diff to 282 | # https://jira..com/browse/XYZ-135 283 | ``` 284 | 285 | #### Up a large number of repositories 286 | 287 | :bangbang: Before start working with `./scripting/up_repo.sh` you need to run `./clone_vendors.sh` :bangbang: 288 | 289 | ```bash 290 | #!/bin/bash 291 | 292 | # up_repo.sh - check repositories in core/vendor 293 | # find all directories that included .git 294 | # If any repo hasn't switched on master branch 295 | # than git checkout master && git branch && git pull 296 | # else git branch && git pull 297 | 298 | # get list of repositories 299 | findRepo() { 300 | REPO_NAME="terminalForCoder__WSD" 301 | PATH_TO_VENDORS_REPO="${HOME}/${REPO_NAME}/bash/core/vendors/" 302 | 303 | # find all git repositories in $PATH_TO_VENDORS_REPO 304 | # filter by /.git 305 | 306 | if [[ -e "$PATH_TO_VENDORS_REPO" ]] 307 | then 308 | r=$( find "$PATH_TO_VENDORS_REPO" -name .git | xargs | sed "s/\\/.git//g" ) 309 | else 310 | echo "Cannot find ${PATH_TO_VENDORS_REPO}" 311 | echo "Try to edit REPO_NAME in ${0}" 312 | exit 0 313 | fi 314 | 315 | # do check repositories stuff 316 | checkBranch $r 317 | } 318 | 319 | # do check repositories stuff 320 | checkBranch() { 321 | BRANCH="master" 322 | CHECK_BRANCH="* master" 323 | 324 | # $i is an item in $r 325 | for i in "$@" 326 | do 327 | # get current branch name 328 | b=$(cd "$i" && git branch | grep \*) 329 | echo "repo: ${i}" 330 | echo "current brunch: ${b}" 331 | 332 | # check branch 333 | if [[ "$b" != "$CHECK_BRANCH" ]] 334 | then 335 | echo "!Error! ${i} is not on ${BRANCH} branch" 336 | echo "Current branch is ${b}" 337 | echo "Checkout to ${BRANCH} and do git pull stuff for ${i}" 338 | cd "$i" && git checkout "$BRANCH" && git branch && git pull origin "$BRANCH" 339 | echo "" 340 | else 341 | echo "Do git pull stuff for ${i}" 342 | cd "$i" && git branch && git pull origin "$BRANCH" 343 | echo "" 344 | fi 345 | done 346 | echo "Done. Congratulation, you win!" 347 | } 348 | 349 | findRepo "$@" 350 | 351 | ``` 352 | 353 | #### Helpful aliases 354 | 355 | ```bash 356 | # User specific aliases and functions 357 | alias gst='git status' 358 | alias gf='git fetch' 359 | alias gm='git merge' 360 | alias gd='git diff' 361 | alias gb='git branch' 362 | alias gbm='git branch --merged' 363 | alias gcm='git commit -m' 364 | alias gp='git push origin' 365 | alias gbd='git branch -D' 366 | alias gshorth='git log -p -2' 367 | alias gch='git checkout' 368 | alias grntds='./grunt deploySync' 369 | alias grntd='./grunt deploy' 370 | alias ghide='git stash' 371 | alias gshow='git stash pop' 372 | alias gsl='git stash list' 373 | alias myps='ps aux | grep rybka' 374 | alias gmom='git merge origin/master' 375 | alias gad='git add' 376 | alias grm='git rm' 377 | alias showaliases='cat $HOME/.bashrc | grep alias' 378 | ``` 379 | -------------------------------------------------------------------------------- /bash/clone_vendors.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # clone vendors repositories to ./core/vendors 3 | REPO_NAME="terminalForCoder__WSD" 4 | PATH_TO_CORE="${HOME}/${REPO_NAME}/bash/core" 5 | PATH_TO_VENDORS_REPO="${HOME}/${REPO_NAME}/vendors" 6 | 7 | # array with repositories 8 | repositories=( "https://github.com/larscmagnusson/CSS3MultiColumn.git" "https://github.com/tc39/test262.git" "https://github.com/postcss/postcss" "https://github.com/webpack/webpack" "https://github.com/var-bin/spriteFactory.git" "https://github.com/var-bin/backbone-training.git" "https://github.com/var-bin/flex-grid-framework.git" "https://github.com/var-bin/BrandButtons.git" "https://github.com/var-bin/less-easings.git" ) 9 | 10 | i=0 # start el 11 | repositories_count=${#repositories[@]} # array size 12 | 13 | cloneVendors() { 14 | # if "${PATH_TO_CORE}" is not exist 15 | # show info message 16 | if [[ ! -e "${PATH_TO_CORE}" ]] 17 | then 18 | echo "Cannot find ${PATH_TO_CORE}" 19 | echo "Try to edit REPO_NAME in ${0}" 20 | exit 0 21 | fi 22 | 23 | # if "${PATH_TO_VENDORS_REPO}" is not exist 24 | # create "${PATH_TO_VENDORS_REPO}" directory 25 | if [[ ! -e "${PATH_TO_VENDORS_REPO}" ]] 26 | then 27 | mkdir "${PATH_TO_VENDORS_REPO}" 28 | fi 29 | 30 | while [ "$i" -lt "$repositories_count" ] 31 | do 32 | # Get vendor name 33 | vendor=$(echo ${repositories[$i]} | sed "s/https\:\/\/github\.com\/*//g" | sed "s/\/.*//g") 34 | vendor_repo_name=$(echo ${repositories[$i]} | sed "s/https\:\/\/github\.com\/.*\///g" | sed "s/\.git//g") 35 | 36 | # if "${PATH_TO_VENDORS_REPO}/${vendor}" is directory 37 | # go to directory and do git clone stuff 38 | if [[ -d "${PATH_TO_VENDORS_REPO}/${vendor}" ]] 39 | then 40 | echo "Directory ${PATH_TO_VENDORS_REPO}/${vendor} is exist" 41 | 42 | if [[ ! -e "${PATH_TO_VENDORS_REPO}/${vendor}/${vendor_repo_name}" ]] 43 | then 44 | echo "Repository: ${repositories[$i]} is clonning" 45 | cd "${PATH_TO_VENDORS_REPO}/${vendor}" && git clone ${repositories[$i]} 46 | else 47 | echo "Repository ${PATH_TO_VENDORS_REPO}/${vendor}/${vendor_repo_name} is exist" 48 | echo "" 49 | fi 50 | else 51 | # create directory "${PATH_TO_VENDORS_REPO}/${vendor}" 52 | # go to directory and do git clone stuff 53 | echo "Create directory: ${PATH_TO_VENDORS_REPO}/${vendor}" 54 | mkdir "${PATH_TO_VENDORS_REPO}/${vendor}" 55 | 56 | echo "Repository: ${repositories[$i]} is clonning" 57 | cd "${PATH_TO_VENDORS_REPO}/${vendor}" && git clone ${repositories[$i]} 58 | fi 59 | i=$((i + 1)) # i++ 60 | done 61 | } 62 | 63 | cloneVendors "$@" 64 | -------------------------------------------------------------------------------- /bash/core/.gitignore: -------------------------------------------------------------------------------- 1 | # dist 2 | _dist 3 | 4 | # vendors 5 | vendors -------------------------------------------------------------------------------- /bash/core/README.md: -------------------------------------------------------------------------------- 1 | # core 2 | 3 | ### Before start working with `./jsApp/gulp` you need: 4 | 5 | Do npm install stuff 6 | 7 | ```bash 8 | $ cd jsApp 9 | $ npm i 10 | ``` 11 | 12 | ### Do gulp stuff 13 | 14 | ```bash 15 | $ cd jsApp 16 | $ ./gulp 17 | ``` 18 | 19 | ### Enjoy =) 20 | 21 | -------------------------------------------------------------------------------- /bash/core/assets/theme1/_styles/vars.css: -------------------------------------------------------------------------------- 1 | :root { 2 | /* base */ 3 | --font-sans-serif: Arial, Helvetica, sans-serif; 4 | --base-color: #000; 5 | 6 | /* toolbar */ 7 | --l-toolbar-bg: #ff0; 8 | --l-toolbar-color: #000; 9 | --l-toolbar_nav-list-bg: #0f0; 10 | --l-toolbar_nav-list-border_color: #4d4d4d; 11 | --l-toolbar_nav-list-color: #d45; 12 | --l-toolbar_nav-list-color-hover: #45d; 13 | 14 | /* profile */ 15 | --l-profile-bg: #f00; 16 | --l-profile-color: #369; 17 | } -------------------------------------------------------------------------------- /bash/core/assets/theme1/base/styles.css: -------------------------------------------------------------------------------- 1 | /* base styles */ 2 | 3 | /* normalize */ 4 | /*! normalize.css v5.0.0 | MIT License | github.com/necolas/normalize.css */ 5 | 6 | /** 7 | * 1. Change the default font family in all browsers (opinionated). 8 | * 2. Correct the line height in all browsers. 9 | * 3. Prevent adjustments of font size after orientation changes in 10 | * IE on Windows Phone and in iOS. 11 | */ 12 | 13 | /* Document 14 | ========================================================================== */ 15 | 16 | html { 17 | font-family: sans-serif; /* 1 */ 18 | line-height: 1.15; /* 2 */ 19 | -ms-text-size-adjust: 100%; /* 3 */ 20 | -webkit-text-size-adjust: 100%; /* 3 */ 21 | } 22 | 23 | /* Sections 24 | ========================================================================== */ 25 | 26 | /** 27 | * Remove the margin in all browsers (opinionated). 28 | */ 29 | 30 | body { 31 | margin: 0; 32 | } 33 | 34 | /** 35 | * Add the correct display in IE 9-. 36 | */ 37 | 38 | article, 39 | aside, 40 | footer, 41 | header, 42 | nav, 43 | section { 44 | display: block; 45 | } 46 | 47 | /** 48 | * Correct the font size and margin on `h1` elements within `section` and 49 | * `article` contexts in Chrome, Firefox, and Safari. 50 | */ 51 | 52 | h1 { 53 | font-size: 2em; 54 | margin: 0.67em 0; 55 | } 56 | 57 | /* Grouping content 58 | ========================================================================== */ 59 | 60 | /** 61 | * Add the correct display in IE 9-. 62 | * 1. Add the correct display in IE. 63 | */ 64 | 65 | figcaption, 66 | figure, 67 | main { /* 1 */ 68 | display: block; 69 | } 70 | 71 | /** 72 | * Add the correct margin in IE 8. 73 | */ 74 | 75 | figure { 76 | margin: 1em 40px; 77 | } 78 | 79 | /** 80 | * 1. Add the correct box sizing in Firefox. 81 | * 2. Show the overflow in Edge and IE. 82 | */ 83 | 84 | hr { 85 | box-sizing: content-box; /* 1 */ 86 | height: 0; /* 1 */ 87 | overflow: visible; /* 2 */ 88 | } 89 | 90 | /** 91 | * 1. Correct the inheritance and scaling of font size in all browsers. 92 | * 2. Correct the odd `em` font sizing in all browsers. 93 | */ 94 | 95 | pre { 96 | font-family: monospace, monospace; /* 1 */ 97 | font-size: 1em; /* 2 */ 98 | } 99 | 100 | /* Text-level semantics 101 | ========================================================================== */ 102 | 103 | /** 104 | * 1. Remove the gray background on active links in IE 10. 105 | * 2. Remove gaps in links underline in iOS 8+ and Safari 8+. 106 | */ 107 | 108 | a { 109 | background-color: transparent; /* 1 */ 110 | -webkit-text-decoration-skip: objects; /* 2 */ 111 | } 112 | 113 | /** 114 | * Remove the outline on focused links when they are also active or hovered 115 | * in all browsers (opinionated). 116 | */ 117 | 118 | a:active, 119 | a:hover { 120 | outline-width: 0; 121 | } 122 | 123 | /** 124 | * 1. Remove the bottom border in Firefox 39-. 125 | * 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari. 126 | */ 127 | 128 | abbr[title] { 129 | border-bottom: none; /* 1 */ 130 | text-decoration: underline; /* 2 */ 131 | text-decoration: underline dotted; /* 2 */ 132 | } 133 | 134 | /** 135 | * Prevent the duplicate application of `bolder` by the next rule in Safari 6. 136 | */ 137 | 138 | b, 139 | strong { 140 | font-weight: inherit; 141 | } 142 | 143 | /** 144 | * Add the correct font weight in Chrome, Edge, and Safari. 145 | */ 146 | 147 | b, 148 | strong { 149 | font-weight: bolder; 150 | } 151 | 152 | /** 153 | * 1. Correct the inheritance and scaling of font size in all browsers. 154 | * 2. Correct the odd `em` font sizing in all browsers. 155 | */ 156 | 157 | code, 158 | kbd, 159 | samp { 160 | font-family: monospace, monospace; /* 1 */ 161 | font-size: 1em; /* 2 */ 162 | } 163 | 164 | /** 165 | * Add the correct font style in Android 4.3-. 166 | */ 167 | 168 | dfn { 169 | font-style: italic; 170 | } 171 | 172 | /** 173 | * Add the correct background and color in IE 9-. 174 | */ 175 | 176 | mark { 177 | background-color: #ff0; 178 | color: #000; 179 | } 180 | 181 | /** 182 | * Add the correct font size in all browsers. 183 | */ 184 | 185 | small { 186 | font-size: 80%; 187 | } 188 | 189 | /** 190 | * Prevent `sub` and `sup` elements from affecting the line height in 191 | * all browsers. 192 | */ 193 | 194 | sub, 195 | sup { 196 | font-size: 75%; 197 | line-height: 0; 198 | position: relative; 199 | vertical-align: baseline; 200 | } 201 | 202 | sub { 203 | bottom: -0.25em; 204 | } 205 | 206 | sup { 207 | top: -0.5em; 208 | } 209 | 210 | /* Embedded content 211 | ========================================================================== */ 212 | 213 | /** 214 | * Add the correct display in IE 9-. 215 | */ 216 | 217 | audio, 218 | video { 219 | display: inline-block; 220 | } 221 | 222 | /** 223 | * Add the correct display in iOS 4-7. 224 | */ 225 | 226 | audio:not([controls]) { 227 | display: none; 228 | height: 0; 229 | } 230 | 231 | /** 232 | * Remove the border on images inside links in IE 10-. 233 | */ 234 | 235 | img { 236 | border-style: none; 237 | } 238 | 239 | /** 240 | * Hide the overflow in IE. 241 | */ 242 | 243 | svg:not(:root) { 244 | overflow: hidden; 245 | } 246 | 247 | /* Forms 248 | ========================================================================== */ 249 | 250 | /** 251 | * 1. Change the font styles in all browsers (opinionated). 252 | * 2. Remove the margin in Firefox and Safari. 253 | */ 254 | 255 | button, 256 | input, 257 | optgroup, 258 | select, 259 | textarea { 260 | font-family: sans-serif; /* 1 */ 261 | font-size: 100%; /* 1 */ 262 | line-height: 1.15; /* 1 */ 263 | margin: 0; /* 2 */ 264 | } 265 | 266 | /** 267 | * Show the overflow in IE. 268 | * 1. Show the overflow in Edge. 269 | */ 270 | 271 | button, 272 | input { /* 1 */ 273 | overflow: visible; 274 | } 275 | 276 | /** 277 | * Remove the inheritance of text transform in Edge, Firefox, and IE. 278 | * 1. Remove the inheritance of text transform in Firefox. 279 | */ 280 | 281 | button, 282 | select { /* 1 */ 283 | text-transform: none; 284 | } 285 | 286 | /** 287 | * 1. Prevent a WebKit bug where (2) destroys native `audio` and `video` 288 | * controls in Android 4. 289 | * 2. Correct the inability to style clickable types in iOS and Safari. 290 | */ 291 | 292 | button, 293 | html [type="button"], /* 1 */ 294 | [type="reset"], 295 | [type="submit"] { 296 | -webkit-appearance: button; /* 2 */ 297 | } 298 | 299 | /** 300 | * Remove the inner border and padding in Firefox. 301 | */ 302 | 303 | button::-moz-focus-inner, 304 | [type="button"]::-moz-focus-inner, 305 | [type="reset"]::-moz-focus-inner, 306 | [type="submit"]::-moz-focus-inner { 307 | border-style: none; 308 | padding: 0; 309 | } 310 | 311 | /** 312 | * Restore the focus styles unset by the previous rule. 313 | */ 314 | 315 | button:-moz-focusring, 316 | [type="button"]:-moz-focusring, 317 | [type="reset"]:-moz-focusring, 318 | [type="submit"]:-moz-focusring { 319 | outline: 1px dotted ButtonText; 320 | } 321 | 322 | /** 323 | * Change the border, margin, and padding in all browsers (opinionated). 324 | */ 325 | 326 | fieldset { 327 | border: 1px solid #c0c0c0; 328 | margin: 0 2px; 329 | padding: 0.35em 0.625em 0.75em; 330 | } 331 | 332 | /** 333 | * 1. Correct the text wrapping in Edge and IE. 334 | * 2. Correct the color inheritance from `fieldset` elements in IE. 335 | * 3. Remove the padding so developers are not caught out when they zero out 336 | * `fieldset` elements in all browsers. 337 | */ 338 | 339 | legend { 340 | box-sizing: border-box; /* 1 */ 341 | color: inherit; /* 2 */ 342 | display: table; /* 1 */ 343 | max-width: 100%; /* 1 */ 344 | padding: 0; /* 3 */ 345 | white-space: normal; /* 1 */ 346 | } 347 | 348 | /** 349 | * 1. Add the correct display in IE 9-. 350 | * 2. Add the correct vertical alignment in Chrome, Firefox, and Opera. 351 | */ 352 | 353 | progress { 354 | display: inline-block; /* 1 */ 355 | vertical-align: baseline; /* 2 */ 356 | } 357 | 358 | /** 359 | * Remove the default vertical scrollbar in IE. 360 | */ 361 | 362 | textarea { 363 | overflow: auto; 364 | } 365 | 366 | /** 367 | * 1. Add the correct box sizing in IE 10-. 368 | * 2. Remove the padding in IE 10-. 369 | */ 370 | 371 | [type="checkbox"], 372 | [type="radio"] { 373 | box-sizing: border-box; /* 1 */ 374 | padding: 0; /* 2 */ 375 | } 376 | 377 | /** 378 | * Correct the cursor style of increment and decrement buttons in Chrome. 379 | */ 380 | 381 | [type="number"]::-webkit-inner-spin-button, 382 | [type="number"]::-webkit-outer-spin-button { 383 | height: auto; 384 | } 385 | 386 | /** 387 | * 1. Correct the odd appearance in Chrome and Safari. 388 | * 2. Correct the outline style in Safari. 389 | */ 390 | 391 | [type="search"] { 392 | -webkit-appearance: textfield; /* 1 */ 393 | outline-offset: -2px; /* 2 */ 394 | } 395 | 396 | /** 397 | * Remove the inner padding and cancel buttons in Chrome and Safari on macOS. 398 | */ 399 | 400 | [type="search"]::-webkit-search-cancel-button, 401 | [type="search"]::-webkit-search-decoration { 402 | -webkit-appearance: none; 403 | } 404 | 405 | /** 406 | * 1. Correct the inability to style clickable types in iOS and Safari. 407 | * 2. Change font properties to `inherit` in Safari. 408 | */ 409 | 410 | ::-webkit-file-upload-button { 411 | -webkit-appearance: button; /* 1 */ 412 | font: inherit; /* 2 */ 413 | } 414 | 415 | /* Interactive 416 | ========================================================================== */ 417 | 418 | /* 419 | * Add the correct display in IE 9-. 420 | * 1. Add the correct display in Edge, IE, and Firefox. 421 | */ 422 | 423 | details, /* 1 */ 424 | menu { 425 | display: block; 426 | } 427 | 428 | /* 429 | * Add the correct display in all browsers. 430 | */ 431 | 432 | summary { 433 | display: list-item; 434 | } 435 | 436 | /* Scripting 437 | ========================================================================== */ 438 | 439 | /** 440 | * Add the correct display in IE 9-. 441 | */ 442 | 443 | canvas { 444 | display: inline-block; 445 | } 446 | 447 | /** 448 | * Add the correct display in IE. 449 | */ 450 | 451 | template { 452 | display: none; 453 | } 454 | 455 | /* Hidden 456 | ========================================================================== */ 457 | 458 | /** 459 | * Add the correct display in IE 10-. 460 | */ 461 | 462 | [hidden] { 463 | display: none; 464 | } 465 | 466 | 467 | body { 468 | color: var(--base-color); 469 | font: 12px/1.2 var(--font-sans-serif); 470 | -webkit-font-smoothing: antialiased; 471 | text-rendering: optimizeSpeed; 472 | } 473 | 474 | ul, 475 | ol { 476 | padding: 0; 477 | margin: 0; 478 | list-style: none; 479 | } -------------------------------------------------------------------------------- /bash/core/assets/theme1/profile/styles.css: -------------------------------------------------------------------------------- 1 | .l-profile { 2 | width: 200px; 3 | height: 200px; 4 | background: var(--l-profile-bg); 5 | color: var(--l-profile-color); 6 | } 7 | -------------------------------------------------------------------------------- /bash/core/assets/theme1/toolbar/styles.css: -------------------------------------------------------------------------------- 1 | .l-toolbar { 2 | display: flex; 3 | height: 60px; 4 | background: var(--l-toolbar-bg); 5 | color: var(--l-toolbar-color); 6 | 7 | .nav-list { 8 | display: flex; 9 | justify-content: center; 10 | width: 100%; 11 | &_item { 12 | margin: auto; 13 | min-width: 100px; 14 | max-width: 250px; 15 | background: var(--l-toolbar_nav-list-bg); 16 | padding: 5px; 17 | border-radius: 5px; 18 | border: 5px solid var(--l-toolbar_nav-list-border_color); 19 | color: var(--l-toolbar_nav-list-color); 20 | font-weight: 900; 21 | 22 | &:hover { 23 | --l-toolbar_nav-list-color: #fff; 24 | } 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /bash/core/assets/theme2/_styles/vars.css: -------------------------------------------------------------------------------- 1 | :root { 2 | /* base */ 3 | --font-sans-serif: Arial, Helvetica, sans-serif; 4 | --base-color: #000; 5 | 6 | /* toolbar */ 7 | --l-toolbar-bg: #ff0; 8 | --l-toolbar-color: #000; 9 | --l-toolbar_nav-list-bg: #0f0; 10 | --l-toolbar_nav-list-border_color: #4d4d4d; 11 | --l-toolbar_nav-list-color: #d45; 12 | --l-toolbar_nav-list-color-hover: #45d; 13 | 14 | /* profile */ 15 | --l-profile-bg: #f00; 16 | --l-profile-color: #369; 17 | } -------------------------------------------------------------------------------- /bash/core/assets/theme2/base/styles.css: -------------------------------------------------------------------------------- 1 | /* base styles */ 2 | 3 | /* normalize */ 4 | /*! normalize.css v5.0.0 | MIT License | github.com/necolas/normalize.css */ 5 | 6 | /** 7 | * 1. Change the default font family in all browsers (opinionated). 8 | * 2. Correct the line height in all browsers. 9 | * 3. Prevent adjustments of font size after orientation changes in 10 | * IE on Windows Phone and in iOS. 11 | */ 12 | 13 | /* Document 14 | ========================================================================== */ 15 | 16 | html { 17 | font-family: sans-serif; /* 1 */ 18 | line-height: 1.15; /* 2 */ 19 | -ms-text-size-adjust: 100%; /* 3 */ 20 | -webkit-text-size-adjust: 100%; /* 3 */ 21 | } 22 | 23 | /* Sections 24 | ========================================================================== */ 25 | 26 | /** 27 | * Remove the margin in all browsers (opinionated). 28 | */ 29 | 30 | body { 31 | margin: 0; 32 | } 33 | 34 | /** 35 | * Add the correct display in IE 9-. 36 | */ 37 | 38 | article, 39 | aside, 40 | footer, 41 | header, 42 | nav, 43 | section { 44 | display: block; 45 | } 46 | 47 | /** 48 | * Correct the font size and margin on `h1` elements within `section` and 49 | * `article` contexts in Chrome, Firefox, and Safari. 50 | */ 51 | 52 | h1 { 53 | font-size: 2em; 54 | margin: 0.67em 0; 55 | } 56 | 57 | /* Grouping content 58 | ========================================================================== */ 59 | 60 | /** 61 | * Add the correct display in IE 9-. 62 | * 1. Add the correct display in IE. 63 | */ 64 | 65 | figcaption, 66 | figure, 67 | main { /* 1 */ 68 | display: block; 69 | } 70 | 71 | /** 72 | * Add the correct margin in IE 8. 73 | */ 74 | 75 | figure { 76 | margin: 1em 40px; 77 | } 78 | 79 | /** 80 | * 1. Add the correct box sizing in Firefox. 81 | * 2. Show the overflow in Edge and IE. 82 | */ 83 | 84 | hr { 85 | box-sizing: content-box; /* 1 */ 86 | height: 0; /* 1 */ 87 | overflow: visible; /* 2 */ 88 | } 89 | 90 | /** 91 | * 1. Correct the inheritance and scaling of font size in all browsers. 92 | * 2. Correct the odd `em` font sizing in all browsers. 93 | */ 94 | 95 | pre { 96 | font-family: monospace, monospace; /* 1 */ 97 | font-size: 1em; /* 2 */ 98 | } 99 | 100 | /* Text-level semantics 101 | ========================================================================== */ 102 | 103 | /** 104 | * 1. Remove the gray background on active links in IE 10. 105 | * 2. Remove gaps in links underline in iOS 8+ and Safari 8+. 106 | */ 107 | 108 | a { 109 | background-color: transparent; /* 1 */ 110 | -webkit-text-decoration-skip: objects; /* 2 */ 111 | } 112 | 113 | /** 114 | * Remove the outline on focused links when they are also active or hovered 115 | * in all browsers (opinionated). 116 | */ 117 | 118 | a:active, 119 | a:hover { 120 | outline-width: 0; 121 | } 122 | 123 | /** 124 | * 1. Remove the bottom border in Firefox 39-. 125 | * 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari. 126 | */ 127 | 128 | abbr[title] { 129 | border-bottom: none; /* 1 */ 130 | text-decoration: underline; /* 2 */ 131 | text-decoration: underline dotted; /* 2 */ 132 | } 133 | 134 | /** 135 | * Prevent the duplicate application of `bolder` by the next rule in Safari 6. 136 | */ 137 | 138 | b, 139 | strong { 140 | font-weight: inherit; 141 | } 142 | 143 | /** 144 | * Add the correct font weight in Chrome, Edge, and Safari. 145 | */ 146 | 147 | b, 148 | strong { 149 | font-weight: bolder; 150 | } 151 | 152 | /** 153 | * 1. Correct the inheritance and scaling of font size in all browsers. 154 | * 2. Correct the odd `em` font sizing in all browsers. 155 | */ 156 | 157 | code, 158 | kbd, 159 | samp { 160 | font-family: monospace, monospace; /* 1 */ 161 | font-size: 1em; /* 2 */ 162 | } 163 | 164 | /** 165 | * Add the correct font style in Android 4.3-. 166 | */ 167 | 168 | dfn { 169 | font-style: italic; 170 | } 171 | 172 | /** 173 | * Add the correct background and color in IE 9-. 174 | */ 175 | 176 | mark { 177 | background-color: #ff0; 178 | color: #000; 179 | } 180 | 181 | /** 182 | * Add the correct font size in all browsers. 183 | */ 184 | 185 | small { 186 | font-size: 80%; 187 | } 188 | 189 | /** 190 | * Prevent `sub` and `sup` elements from affecting the line height in 191 | * all browsers. 192 | */ 193 | 194 | sub, 195 | sup { 196 | font-size: 75%; 197 | line-height: 0; 198 | position: relative; 199 | vertical-align: baseline; 200 | } 201 | 202 | sub { 203 | bottom: -0.25em; 204 | } 205 | 206 | sup { 207 | top: -0.5em; 208 | } 209 | 210 | /* Embedded content 211 | ========================================================================== */ 212 | 213 | /** 214 | * Add the correct display in IE 9-. 215 | */ 216 | 217 | audio, 218 | video { 219 | display: inline-block; 220 | } 221 | 222 | /** 223 | * Add the correct display in iOS 4-7. 224 | */ 225 | 226 | audio:not([controls]) { 227 | display: none; 228 | height: 0; 229 | } 230 | 231 | /** 232 | * Remove the border on images inside links in IE 10-. 233 | */ 234 | 235 | img { 236 | border-style: none; 237 | } 238 | 239 | /** 240 | * Hide the overflow in IE. 241 | */ 242 | 243 | svg:not(:root) { 244 | overflow: hidden; 245 | } 246 | 247 | /* Forms 248 | ========================================================================== */ 249 | 250 | /** 251 | * 1. Change the font styles in all browsers (opinionated). 252 | * 2. Remove the margin in Firefox and Safari. 253 | */ 254 | 255 | button, 256 | input, 257 | optgroup, 258 | select, 259 | textarea { 260 | font-family: sans-serif; /* 1 */ 261 | font-size: 100%; /* 1 */ 262 | line-height: 1.15; /* 1 */ 263 | margin: 0; /* 2 */ 264 | } 265 | 266 | /** 267 | * Show the overflow in IE. 268 | * 1. Show the overflow in Edge. 269 | */ 270 | 271 | button, 272 | input { /* 1 */ 273 | overflow: visible; 274 | } 275 | 276 | /** 277 | * Remove the inheritance of text transform in Edge, Firefox, and IE. 278 | * 1. Remove the inheritance of text transform in Firefox. 279 | */ 280 | 281 | button, 282 | select { /* 1 */ 283 | text-transform: none; 284 | } 285 | 286 | /** 287 | * 1. Prevent a WebKit bug where (2) destroys native `audio` and `video` 288 | * controls in Android 4. 289 | * 2. Correct the inability to style clickable types in iOS and Safari. 290 | */ 291 | 292 | button, 293 | html [type="button"], /* 1 */ 294 | [type="reset"], 295 | [type="submit"] { 296 | -webkit-appearance: button; /* 2 */ 297 | } 298 | 299 | /** 300 | * Remove the inner border and padding in Firefox. 301 | */ 302 | 303 | button::-moz-focus-inner, 304 | [type="button"]::-moz-focus-inner, 305 | [type="reset"]::-moz-focus-inner, 306 | [type="submit"]::-moz-focus-inner { 307 | border-style: none; 308 | padding: 0; 309 | } 310 | 311 | /** 312 | * Restore the focus styles unset by the previous rule. 313 | */ 314 | 315 | button:-moz-focusring, 316 | [type="button"]:-moz-focusring, 317 | [type="reset"]:-moz-focusring, 318 | [type="submit"]:-moz-focusring { 319 | outline: 1px dotted ButtonText; 320 | } 321 | 322 | /** 323 | * Change the border, margin, and padding in all browsers (opinionated). 324 | */ 325 | 326 | fieldset { 327 | border: 1px solid #c0c0c0; 328 | margin: 0 2px; 329 | padding: 0.35em 0.625em 0.75em; 330 | } 331 | 332 | /** 333 | * 1. Correct the text wrapping in Edge and IE. 334 | * 2. Correct the color inheritance from `fieldset` elements in IE. 335 | * 3. Remove the padding so developers are not caught out when they zero out 336 | * `fieldset` elements in all browsers. 337 | */ 338 | 339 | legend { 340 | box-sizing: border-box; /* 1 */ 341 | color: inherit; /* 2 */ 342 | display: table; /* 1 */ 343 | max-width: 100%; /* 1 */ 344 | padding: 0; /* 3 */ 345 | white-space: normal; /* 1 */ 346 | } 347 | 348 | /** 349 | * 1. Add the correct display in IE 9-. 350 | * 2. Add the correct vertical alignment in Chrome, Firefox, and Opera. 351 | */ 352 | 353 | progress { 354 | display: inline-block; /* 1 */ 355 | vertical-align: baseline; /* 2 */ 356 | } 357 | 358 | /** 359 | * Remove the default vertical scrollbar in IE. 360 | */ 361 | 362 | textarea { 363 | overflow: auto; 364 | } 365 | 366 | /** 367 | * 1. Add the correct box sizing in IE 10-. 368 | * 2. Remove the padding in IE 10-. 369 | */ 370 | 371 | [type="checkbox"], 372 | [type="radio"] { 373 | box-sizing: border-box; /* 1 */ 374 | padding: 0; /* 2 */ 375 | } 376 | 377 | /** 378 | * Correct the cursor style of increment and decrement buttons in Chrome. 379 | */ 380 | 381 | [type="number"]::-webkit-inner-spin-button, 382 | [type="number"]::-webkit-outer-spin-button { 383 | height: auto; 384 | } 385 | 386 | /** 387 | * 1. Correct the odd appearance in Chrome and Safari. 388 | * 2. Correct the outline style in Safari. 389 | */ 390 | 391 | [type="search"] { 392 | -webkit-appearance: textfield; /* 1 */ 393 | outline-offset: -2px; /* 2 */ 394 | } 395 | 396 | /** 397 | * Remove the inner padding and cancel buttons in Chrome and Safari on macOS. 398 | */ 399 | 400 | [type="search"]::-webkit-search-cancel-button, 401 | [type="search"]::-webkit-search-decoration { 402 | -webkit-appearance: none; 403 | } 404 | 405 | /** 406 | * 1. Correct the inability to style clickable types in iOS and Safari. 407 | * 2. Change font properties to `inherit` in Safari. 408 | */ 409 | 410 | ::-webkit-file-upload-button { 411 | -webkit-appearance: button; /* 1 */ 412 | font: inherit; /* 2 */ 413 | } 414 | 415 | /* Interactive 416 | ========================================================================== */ 417 | 418 | /* 419 | * Add the correct display in IE 9-. 420 | * 1. Add the correct display in Edge, IE, and Firefox. 421 | */ 422 | 423 | details, /* 1 */ 424 | menu { 425 | display: block; 426 | } 427 | 428 | /* 429 | * Add the correct display in all browsers. 430 | */ 431 | 432 | summary { 433 | display: list-item; 434 | } 435 | 436 | /* Scripting 437 | ========================================================================== */ 438 | 439 | /** 440 | * Add the correct display in IE 9-. 441 | */ 442 | 443 | canvas { 444 | display: inline-block; 445 | } 446 | 447 | /** 448 | * Add the correct display in IE. 449 | */ 450 | 451 | template { 452 | display: none; 453 | } 454 | 455 | /* Hidden 456 | ========================================================================== */ 457 | 458 | /** 459 | * Add the correct display in IE 10-. 460 | */ 461 | 462 | [hidden] { 463 | display: none; 464 | } 465 | 466 | 467 | body { 468 | color: var(--base-color); 469 | font: 12px/1.2 var(--font-sans-serif); 470 | -webkit-font-smoothing: antialiased; 471 | text-rendering: optimizeSpeed; 472 | } 473 | 474 | ul, 475 | ol { 476 | padding: 0; 477 | margin: 0; 478 | list-style: none; 479 | } -------------------------------------------------------------------------------- /bash/core/assets/theme2/profile/styles.css: -------------------------------------------------------------------------------- 1 | .l-profile { 2 | width: 200px; 3 | height: 200px; 4 | background: var(--l-profile-bg); 5 | color: var(--l-profile-color); 6 | } 7 | -------------------------------------------------------------------------------- /bash/core/assets/theme2/toolbar/styles.css: -------------------------------------------------------------------------------- 1 | .l-toolbar { 2 | display: flex; 3 | height: 60px; 4 | background: var(--l-toolbar-bg); 5 | color: var(--l-toolbar-color); 6 | 7 | .nav-list { 8 | display: flex; 9 | justify-content: center; 10 | width: 100%; 11 | &_item { 12 | margin: auto; 13 | min-width: 100px; 14 | max-width: 250px; 15 | background: var(--l-toolbar_nav-list-bg); 16 | padding: 5px; 17 | border-radius: 5px; 18 | border: 5px solid var(--l-toolbar_nav-list-border_color); 19 | color: var(--l-toolbar_nav-list-color); 20 | font-weight: 900; 21 | 22 | &:hover { 23 | --l-toolbar_nav-list-color: #fff; 24 | } 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /bash/core/assets/theme3/_styles/vars.css: -------------------------------------------------------------------------------- 1 | :root { 2 | /* base */ 3 | --font-sans-serif: Arial, Helvetica, sans-serif; 4 | --base-color: #000; 5 | 6 | /* toolbar */ 7 | --l-toolbar-bg: #ff0; 8 | --l-toolbar-color: #000; 9 | --l-toolbar_nav-list-bg: #0f0; 10 | --l-toolbar_nav-list-border_color: #4d4d4d; 11 | --l-toolbar_nav-list-color: #d45; 12 | --l-toolbar_nav-list-color-hover: #45d; 13 | 14 | /* profile */ 15 | --l-profile-bg: #f00; 16 | --l-profile-color: #369; 17 | } -------------------------------------------------------------------------------- /bash/core/assets/theme3/base/styles.css: -------------------------------------------------------------------------------- 1 | /* base styles */ 2 | 3 | /* normalize */ 4 | /*! normalize.css v5.0.0 | MIT License | github.com/necolas/normalize.css */ 5 | 6 | /** 7 | * 1. Change the default font family in all browsers (opinionated). 8 | * 2. Correct the line height in all browsers. 9 | * 3. Prevent adjustments of font size after orientation changes in 10 | * IE on Windows Phone and in iOS. 11 | */ 12 | 13 | /* Document 14 | ========================================================================== */ 15 | 16 | html { 17 | font-family: sans-serif; /* 1 */ 18 | line-height: 1.15; /* 2 */ 19 | -ms-text-size-adjust: 100%; /* 3 */ 20 | -webkit-text-size-adjust: 100%; /* 3 */ 21 | } 22 | 23 | /* Sections 24 | ========================================================================== */ 25 | 26 | /** 27 | * Remove the margin in all browsers (opinionated). 28 | */ 29 | 30 | body { 31 | margin: 0; 32 | } 33 | 34 | /** 35 | * Add the correct display in IE 9-. 36 | */ 37 | 38 | article, 39 | aside, 40 | footer, 41 | header, 42 | nav, 43 | section { 44 | display: block; 45 | } 46 | 47 | /** 48 | * Correct the font size and margin on `h1` elements within `section` and 49 | * `article` contexts in Chrome, Firefox, and Safari. 50 | */ 51 | 52 | h1 { 53 | font-size: 2em; 54 | margin: 0.67em 0; 55 | } 56 | 57 | /* Grouping content 58 | ========================================================================== */ 59 | 60 | /** 61 | * Add the correct display in IE 9-. 62 | * 1. Add the correct display in IE. 63 | */ 64 | 65 | figcaption, 66 | figure, 67 | main { /* 1 */ 68 | display: block; 69 | } 70 | 71 | /** 72 | * Add the correct margin in IE 8. 73 | */ 74 | 75 | figure { 76 | margin: 1em 40px; 77 | } 78 | 79 | /** 80 | * 1. Add the correct box sizing in Firefox. 81 | * 2. Show the overflow in Edge and IE. 82 | */ 83 | 84 | hr { 85 | box-sizing: content-box; /* 1 */ 86 | height: 0; /* 1 */ 87 | overflow: visible; /* 2 */ 88 | } 89 | 90 | /** 91 | * 1. Correct the inheritance and scaling of font size in all browsers. 92 | * 2. Correct the odd `em` font sizing in all browsers. 93 | */ 94 | 95 | pre { 96 | font-family: monospace, monospace; /* 1 */ 97 | font-size: 1em; /* 2 */ 98 | } 99 | 100 | /* Text-level semantics 101 | ========================================================================== */ 102 | 103 | /** 104 | * 1. Remove the gray background on active links in IE 10. 105 | * 2. Remove gaps in links underline in iOS 8+ and Safari 8+. 106 | */ 107 | 108 | a { 109 | background-color: transparent; /* 1 */ 110 | -webkit-text-decoration-skip: objects; /* 2 */ 111 | } 112 | 113 | /** 114 | * Remove the outline on focused links when they are also active or hovered 115 | * in all browsers (opinionated). 116 | */ 117 | 118 | a:active, 119 | a:hover { 120 | outline-width: 0; 121 | } 122 | 123 | /** 124 | * 1. Remove the bottom border in Firefox 39-. 125 | * 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari. 126 | */ 127 | 128 | abbr[title] { 129 | border-bottom: none; /* 1 */ 130 | text-decoration: underline; /* 2 */ 131 | text-decoration: underline dotted; /* 2 */ 132 | } 133 | 134 | /** 135 | * Prevent the duplicate application of `bolder` by the next rule in Safari 6. 136 | */ 137 | 138 | b, 139 | strong { 140 | font-weight: inherit; 141 | } 142 | 143 | /** 144 | * Add the correct font weight in Chrome, Edge, and Safari. 145 | */ 146 | 147 | b, 148 | strong { 149 | font-weight: bolder; 150 | } 151 | 152 | /** 153 | * 1. Correct the inheritance and scaling of font size in all browsers. 154 | * 2. Correct the odd `em` font sizing in all browsers. 155 | */ 156 | 157 | code, 158 | kbd, 159 | samp { 160 | font-family: monospace, monospace; /* 1 */ 161 | font-size: 1em; /* 2 */ 162 | } 163 | 164 | /** 165 | * Add the correct font style in Android 4.3-. 166 | */ 167 | 168 | dfn { 169 | font-style: italic; 170 | } 171 | 172 | /** 173 | * Add the correct background and color in IE 9-. 174 | */ 175 | 176 | mark { 177 | background-color: #ff0; 178 | color: #000; 179 | } 180 | 181 | /** 182 | * Add the correct font size in all browsers. 183 | */ 184 | 185 | small { 186 | font-size: 80%; 187 | } 188 | 189 | /** 190 | * Prevent `sub` and `sup` elements from affecting the line height in 191 | * all browsers. 192 | */ 193 | 194 | sub, 195 | sup { 196 | font-size: 75%; 197 | line-height: 0; 198 | position: relative; 199 | vertical-align: baseline; 200 | } 201 | 202 | sub { 203 | bottom: -0.25em; 204 | } 205 | 206 | sup { 207 | top: -0.5em; 208 | } 209 | 210 | /* Embedded content 211 | ========================================================================== */ 212 | 213 | /** 214 | * Add the correct display in IE 9-. 215 | */ 216 | 217 | audio, 218 | video { 219 | display: inline-block; 220 | } 221 | 222 | /** 223 | * Add the correct display in iOS 4-7. 224 | */ 225 | 226 | audio:not([controls]) { 227 | display: none; 228 | height: 0; 229 | } 230 | 231 | /** 232 | * Remove the border on images inside links in IE 10-. 233 | */ 234 | 235 | img { 236 | border-style: none; 237 | } 238 | 239 | /** 240 | * Hide the overflow in IE. 241 | */ 242 | 243 | svg:not(:root) { 244 | overflow: hidden; 245 | } 246 | 247 | /* Forms 248 | ========================================================================== */ 249 | 250 | /** 251 | * 1. Change the font styles in all browsers (opinionated). 252 | * 2. Remove the margin in Firefox and Safari. 253 | */ 254 | 255 | button, 256 | input, 257 | optgroup, 258 | select, 259 | textarea { 260 | font-family: sans-serif; /* 1 */ 261 | font-size: 100%; /* 1 */ 262 | line-height: 1.15; /* 1 */ 263 | margin: 0; /* 2 */ 264 | } 265 | 266 | /** 267 | * Show the overflow in IE. 268 | * 1. Show the overflow in Edge. 269 | */ 270 | 271 | button, 272 | input { /* 1 */ 273 | overflow: visible; 274 | } 275 | 276 | /** 277 | * Remove the inheritance of text transform in Edge, Firefox, and IE. 278 | * 1. Remove the inheritance of text transform in Firefox. 279 | */ 280 | 281 | button, 282 | select { /* 1 */ 283 | text-transform: none; 284 | } 285 | 286 | /** 287 | * 1. Prevent a WebKit bug where (2) destroys native `audio` and `video` 288 | * controls in Android 4. 289 | * 2. Correct the inability to style clickable types in iOS and Safari. 290 | */ 291 | 292 | button, 293 | html [type="button"], /* 1 */ 294 | [type="reset"], 295 | [type="submit"] { 296 | -webkit-appearance: button; /* 2 */ 297 | } 298 | 299 | /** 300 | * Remove the inner border and padding in Firefox. 301 | */ 302 | 303 | button::-moz-focus-inner, 304 | [type="button"]::-moz-focus-inner, 305 | [type="reset"]::-moz-focus-inner, 306 | [type="submit"]::-moz-focus-inner { 307 | border-style: none; 308 | padding: 0; 309 | } 310 | 311 | /** 312 | * Restore the focus styles unset by the previous rule. 313 | */ 314 | 315 | button:-moz-focusring, 316 | [type="button"]:-moz-focusring, 317 | [type="reset"]:-moz-focusring, 318 | [type="submit"]:-moz-focusring { 319 | outline: 1px dotted ButtonText; 320 | } 321 | 322 | /** 323 | * Change the border, margin, and padding in all browsers (opinionated). 324 | */ 325 | 326 | fieldset { 327 | border: 1px solid #c0c0c0; 328 | margin: 0 2px; 329 | padding: 0.35em 0.625em 0.75em; 330 | } 331 | 332 | /** 333 | * 1. Correct the text wrapping in Edge and IE. 334 | * 2. Correct the color inheritance from `fieldset` elements in IE. 335 | * 3. Remove the padding so developers are not caught out when they zero out 336 | * `fieldset` elements in all browsers. 337 | */ 338 | 339 | legend { 340 | box-sizing: border-box; /* 1 */ 341 | color: inherit; /* 2 */ 342 | display: table; /* 1 */ 343 | max-width: 100%; /* 1 */ 344 | padding: 0; /* 3 */ 345 | white-space: normal; /* 1 */ 346 | } 347 | 348 | /** 349 | * 1. Add the correct display in IE 9-. 350 | * 2. Add the correct vertical alignment in Chrome, Firefox, and Opera. 351 | */ 352 | 353 | progress { 354 | display: inline-block; /* 1 */ 355 | vertical-align: baseline; /* 2 */ 356 | } 357 | 358 | /** 359 | * Remove the default vertical scrollbar in IE. 360 | */ 361 | 362 | textarea { 363 | overflow: auto; 364 | } 365 | 366 | /** 367 | * 1. Add the correct box sizing in IE 10-. 368 | * 2. Remove the padding in IE 10-. 369 | */ 370 | 371 | [type="checkbox"], 372 | [type="radio"] { 373 | box-sizing: border-box; /* 1 */ 374 | padding: 0; /* 2 */ 375 | } 376 | 377 | /** 378 | * Correct the cursor style of increment and decrement buttons in Chrome. 379 | */ 380 | 381 | [type="number"]::-webkit-inner-spin-button, 382 | [type="number"]::-webkit-outer-spin-button { 383 | height: auto; 384 | } 385 | 386 | /** 387 | * 1. Correct the odd appearance in Chrome and Safari. 388 | * 2. Correct the outline style in Safari. 389 | */ 390 | 391 | [type="search"] { 392 | -webkit-appearance: textfield; /* 1 */ 393 | outline-offset: -2px; /* 2 */ 394 | } 395 | 396 | /** 397 | * Remove the inner padding and cancel buttons in Chrome and Safari on macOS. 398 | */ 399 | 400 | [type="search"]::-webkit-search-cancel-button, 401 | [type="search"]::-webkit-search-decoration { 402 | -webkit-appearance: none; 403 | } 404 | 405 | /** 406 | * 1. Correct the inability to style clickable types in iOS and Safari. 407 | * 2. Change font properties to `inherit` in Safari. 408 | */ 409 | 410 | ::-webkit-file-upload-button { 411 | -webkit-appearance: button; /* 1 */ 412 | font: inherit; /* 2 */ 413 | } 414 | 415 | /* Interactive 416 | ========================================================================== */ 417 | 418 | /* 419 | * Add the correct display in IE 9-. 420 | * 1. Add the correct display in Edge, IE, and Firefox. 421 | */ 422 | 423 | details, /* 1 */ 424 | menu { 425 | display: block; 426 | } 427 | 428 | /* 429 | * Add the correct display in all browsers. 430 | */ 431 | 432 | summary { 433 | display: list-item; 434 | } 435 | 436 | /* Scripting 437 | ========================================================================== */ 438 | 439 | /** 440 | * Add the correct display in IE 9-. 441 | */ 442 | 443 | canvas { 444 | display: inline-block; 445 | } 446 | 447 | /** 448 | * Add the correct display in IE. 449 | */ 450 | 451 | template { 452 | display: none; 453 | } 454 | 455 | /* Hidden 456 | ========================================================================== */ 457 | 458 | /** 459 | * Add the correct display in IE 10-. 460 | */ 461 | 462 | [hidden] { 463 | display: none; 464 | } 465 | 466 | 467 | body { 468 | color: var(--base-color); 469 | font: 12px/1.2 var(--font-sans-serif); 470 | -webkit-font-smoothing: antialiased; 471 | text-rendering: optimizeSpeed; 472 | } 473 | 474 | ul, 475 | ol { 476 | padding: 0; 477 | margin: 0; 478 | list-style: none; 479 | } -------------------------------------------------------------------------------- /bash/core/assets/theme3/profile/styles.css: -------------------------------------------------------------------------------- 1 | .l-profile { 2 | width: 200px; 3 | height: 200px; 4 | background: var(--l-profile-bg); 5 | color: var(--l-profile-color); 6 | } 7 | -------------------------------------------------------------------------------- /bash/core/assets/theme3/toolbar/styles.css: -------------------------------------------------------------------------------- 1 | .l-toolbar { 2 | display: flex; 3 | height: 60px; 4 | background: var(--l-toolbar-bg); 5 | color: var(--l-toolbar-color); 6 | 7 | .nav-list { 8 | display: flex; 9 | justify-content: center; 10 | width: 100%; 11 | &_item { 12 | margin: auto; 13 | min-width: 100px; 14 | max-width: 250px; 15 | background: var(--l-toolbar_nav-list-bg); 16 | padding: 5px; 17 | border-radius: 5px; 18 | border: 5px solid var(--l-toolbar_nav-list-border_color); 19 | color: var(--l-toolbar_nav-list-color); 20 | font-weight: 900; 21 | 22 | &:hover { 23 | --l-toolbar_nav-list-color: #fff; 24 | } 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /bash/core/assets/theme4/_styles/vars.css: -------------------------------------------------------------------------------- 1 | :root { 2 | /* base */ 3 | --font-sans-serif: Arial, Helvetica, sans-serif; 4 | --base-color: #000; 5 | 6 | /* toolbar */ 7 | --l-toolbar-bg: #ff0; 8 | --l-toolbar-color: #000; 9 | --l-toolbar_nav-list-bg: #0f0; 10 | --l-toolbar_nav-list-border_color: #4d4d4d; 11 | --l-toolbar_nav-list-color: #d45; 12 | --l-toolbar_nav-list-color-hover: #45d; 13 | 14 | /* profile */ 15 | --l-profile-bg: #f00; 16 | --l-profile-color: #369; 17 | } -------------------------------------------------------------------------------- /bash/core/assets/theme4/base/styles.css: -------------------------------------------------------------------------------- 1 | /* base styles */ 2 | 3 | /* normalize */ 4 | /*! normalize.css v5.0.0 | MIT License | github.com/necolas/normalize.css */ 5 | 6 | /** 7 | * 1. Change the default font family in all browsers (opinionated). 8 | * 2. Correct the line height in all browsers. 9 | * 3. Prevent adjustments of font size after orientation changes in 10 | * IE on Windows Phone and in iOS. 11 | */ 12 | 13 | /* Document 14 | ========================================================================== */ 15 | 16 | html { 17 | font-family: sans-serif; /* 1 */ 18 | line-height: 1.15; /* 2 */ 19 | -ms-text-size-adjust: 100%; /* 3 */ 20 | -webkit-text-size-adjust: 100%; /* 3 */ 21 | } 22 | 23 | /* Sections 24 | ========================================================================== */ 25 | 26 | /** 27 | * Remove the margin in all browsers (opinionated). 28 | */ 29 | 30 | body { 31 | margin: 0; 32 | } 33 | 34 | /** 35 | * Add the correct display in IE 9-. 36 | */ 37 | 38 | article, 39 | aside, 40 | footer, 41 | header, 42 | nav, 43 | section { 44 | display: block; 45 | } 46 | 47 | /** 48 | * Correct the font size and margin on `h1` elements within `section` and 49 | * `article` contexts in Chrome, Firefox, and Safari. 50 | */ 51 | 52 | h1 { 53 | font-size: 2em; 54 | margin: 0.67em 0; 55 | } 56 | 57 | /* Grouping content 58 | ========================================================================== */ 59 | 60 | /** 61 | * Add the correct display in IE 9-. 62 | * 1. Add the correct display in IE. 63 | */ 64 | 65 | figcaption, 66 | figure, 67 | main { /* 1 */ 68 | display: block; 69 | } 70 | 71 | /** 72 | * Add the correct margin in IE 8. 73 | */ 74 | 75 | figure { 76 | margin: 1em 40px; 77 | } 78 | 79 | /** 80 | * 1. Add the correct box sizing in Firefox. 81 | * 2. Show the overflow in Edge and IE. 82 | */ 83 | 84 | hr { 85 | box-sizing: content-box; /* 1 */ 86 | height: 0; /* 1 */ 87 | overflow: visible; /* 2 */ 88 | } 89 | 90 | /** 91 | * 1. Correct the inheritance and scaling of font size in all browsers. 92 | * 2. Correct the odd `em` font sizing in all browsers. 93 | */ 94 | 95 | pre { 96 | font-family: monospace, monospace; /* 1 */ 97 | font-size: 1em; /* 2 */ 98 | } 99 | 100 | /* Text-level semantics 101 | ========================================================================== */ 102 | 103 | /** 104 | * 1. Remove the gray background on active links in IE 10. 105 | * 2. Remove gaps in links underline in iOS 8+ and Safari 8+. 106 | */ 107 | 108 | a { 109 | background-color: transparent; /* 1 */ 110 | -webkit-text-decoration-skip: objects; /* 2 */ 111 | } 112 | 113 | /** 114 | * Remove the outline on focused links when they are also active or hovered 115 | * in all browsers (opinionated). 116 | */ 117 | 118 | a:active, 119 | a:hover { 120 | outline-width: 0; 121 | } 122 | 123 | /** 124 | * 1. Remove the bottom border in Firefox 39-. 125 | * 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari. 126 | */ 127 | 128 | abbr[title] { 129 | border-bottom: none; /* 1 */ 130 | text-decoration: underline; /* 2 */ 131 | text-decoration: underline dotted; /* 2 */ 132 | } 133 | 134 | /** 135 | * Prevent the duplicate application of `bolder` by the next rule in Safari 6. 136 | */ 137 | 138 | b, 139 | strong { 140 | font-weight: inherit; 141 | } 142 | 143 | /** 144 | * Add the correct font weight in Chrome, Edge, and Safari. 145 | */ 146 | 147 | b, 148 | strong { 149 | font-weight: bolder; 150 | } 151 | 152 | /** 153 | * 1. Correct the inheritance and scaling of font size in all browsers. 154 | * 2. Correct the odd `em` font sizing in all browsers. 155 | */ 156 | 157 | code, 158 | kbd, 159 | samp { 160 | font-family: monospace, monospace; /* 1 */ 161 | font-size: 1em; /* 2 */ 162 | } 163 | 164 | /** 165 | * Add the correct font style in Android 4.3-. 166 | */ 167 | 168 | dfn { 169 | font-style: italic; 170 | } 171 | 172 | /** 173 | * Add the correct background and color in IE 9-. 174 | */ 175 | 176 | mark { 177 | background-color: #ff0; 178 | color: #000; 179 | } 180 | 181 | /** 182 | * Add the correct font size in all browsers. 183 | */ 184 | 185 | small { 186 | font-size: 80%; 187 | } 188 | 189 | /** 190 | * Prevent `sub` and `sup` elements from affecting the line height in 191 | * all browsers. 192 | */ 193 | 194 | sub, 195 | sup { 196 | font-size: 75%; 197 | line-height: 0; 198 | position: relative; 199 | vertical-align: baseline; 200 | } 201 | 202 | sub { 203 | bottom: -0.25em; 204 | } 205 | 206 | sup { 207 | top: -0.5em; 208 | } 209 | 210 | /* Embedded content 211 | ========================================================================== */ 212 | 213 | /** 214 | * Add the correct display in IE 9-. 215 | */ 216 | 217 | audio, 218 | video { 219 | display: inline-block; 220 | } 221 | 222 | /** 223 | * Add the correct display in iOS 4-7. 224 | */ 225 | 226 | audio:not([controls]) { 227 | display: none; 228 | height: 0; 229 | } 230 | 231 | /** 232 | * Remove the border on images inside links in IE 10-. 233 | */ 234 | 235 | img { 236 | border-style: none; 237 | } 238 | 239 | /** 240 | * Hide the overflow in IE. 241 | */ 242 | 243 | svg:not(:root) { 244 | overflow: hidden; 245 | } 246 | 247 | /* Forms 248 | ========================================================================== */ 249 | 250 | /** 251 | * 1. Change the font styles in all browsers (opinionated). 252 | * 2. Remove the margin in Firefox and Safari. 253 | */ 254 | 255 | button, 256 | input, 257 | optgroup, 258 | select, 259 | textarea { 260 | font-family: sans-serif; /* 1 */ 261 | font-size: 100%; /* 1 */ 262 | line-height: 1.15; /* 1 */ 263 | margin: 0; /* 2 */ 264 | } 265 | 266 | /** 267 | * Show the overflow in IE. 268 | * 1. Show the overflow in Edge. 269 | */ 270 | 271 | button, 272 | input { /* 1 */ 273 | overflow: visible; 274 | } 275 | 276 | /** 277 | * Remove the inheritance of text transform in Edge, Firefox, and IE. 278 | * 1. Remove the inheritance of text transform in Firefox. 279 | */ 280 | 281 | button, 282 | select { /* 1 */ 283 | text-transform: none; 284 | } 285 | 286 | /** 287 | * 1. Prevent a WebKit bug where (2) destroys native `audio` and `video` 288 | * controls in Android 4. 289 | * 2. Correct the inability to style clickable types in iOS and Safari. 290 | */ 291 | 292 | button, 293 | html [type="button"], /* 1 */ 294 | [type="reset"], 295 | [type="submit"] { 296 | -webkit-appearance: button; /* 2 */ 297 | } 298 | 299 | /** 300 | * Remove the inner border and padding in Firefox. 301 | */ 302 | 303 | button::-moz-focus-inner, 304 | [type="button"]::-moz-focus-inner, 305 | [type="reset"]::-moz-focus-inner, 306 | [type="submit"]::-moz-focus-inner { 307 | border-style: none; 308 | padding: 0; 309 | } 310 | 311 | /** 312 | * Restore the focus styles unset by the previous rule. 313 | */ 314 | 315 | button:-moz-focusring, 316 | [type="button"]:-moz-focusring, 317 | [type="reset"]:-moz-focusring, 318 | [type="submit"]:-moz-focusring { 319 | outline: 1px dotted ButtonText; 320 | } 321 | 322 | /** 323 | * Change the border, margin, and padding in all browsers (opinionated). 324 | */ 325 | 326 | fieldset { 327 | border: 1px solid #c0c0c0; 328 | margin: 0 2px; 329 | padding: 0.35em 0.625em 0.75em; 330 | } 331 | 332 | /** 333 | * 1. Correct the text wrapping in Edge and IE. 334 | * 2. Correct the color inheritance from `fieldset` elements in IE. 335 | * 3. Remove the padding so developers are not caught out when they zero out 336 | * `fieldset` elements in all browsers. 337 | */ 338 | 339 | legend { 340 | box-sizing: border-box; /* 1 */ 341 | color: inherit; /* 2 */ 342 | display: table; /* 1 */ 343 | max-width: 100%; /* 1 */ 344 | padding: 0; /* 3 */ 345 | white-space: normal; /* 1 */ 346 | } 347 | 348 | /** 349 | * 1. Add the correct display in IE 9-. 350 | * 2. Add the correct vertical alignment in Chrome, Firefox, and Opera. 351 | */ 352 | 353 | progress { 354 | display: inline-block; /* 1 */ 355 | vertical-align: baseline; /* 2 */ 356 | } 357 | 358 | /** 359 | * Remove the default vertical scrollbar in IE. 360 | */ 361 | 362 | textarea { 363 | overflow: auto; 364 | } 365 | 366 | /** 367 | * 1. Add the correct box sizing in IE 10-. 368 | * 2. Remove the padding in IE 10-. 369 | */ 370 | 371 | [type="checkbox"], 372 | [type="radio"] { 373 | box-sizing: border-box; /* 1 */ 374 | padding: 0; /* 2 */ 375 | } 376 | 377 | /** 378 | * Correct the cursor style of increment and decrement buttons in Chrome. 379 | */ 380 | 381 | [type="number"]::-webkit-inner-spin-button, 382 | [type="number"]::-webkit-outer-spin-button { 383 | height: auto; 384 | } 385 | 386 | /** 387 | * 1. Correct the odd appearance in Chrome and Safari. 388 | * 2. Correct the outline style in Safari. 389 | */ 390 | 391 | [type="search"] { 392 | -webkit-appearance: textfield; /* 1 */ 393 | outline-offset: -2px; /* 2 */ 394 | } 395 | 396 | /** 397 | * Remove the inner padding and cancel buttons in Chrome and Safari on macOS. 398 | */ 399 | 400 | [type="search"]::-webkit-search-cancel-button, 401 | [type="search"]::-webkit-search-decoration { 402 | -webkit-appearance: none; 403 | } 404 | 405 | /** 406 | * 1. Correct the inability to style clickable types in iOS and Safari. 407 | * 2. Change font properties to `inherit` in Safari. 408 | */ 409 | 410 | ::-webkit-file-upload-button { 411 | -webkit-appearance: button; /* 1 */ 412 | font: inherit; /* 2 */ 413 | } 414 | 415 | /* Interactive 416 | ========================================================================== */ 417 | 418 | /* 419 | * Add the correct display in IE 9-. 420 | * 1. Add the correct display in Edge, IE, and Firefox. 421 | */ 422 | 423 | details, /* 1 */ 424 | menu { 425 | display: block; 426 | } 427 | 428 | /* 429 | * Add the correct display in all browsers. 430 | */ 431 | 432 | summary { 433 | display: list-item; 434 | } 435 | 436 | /* Scripting 437 | ========================================================================== */ 438 | 439 | /** 440 | * Add the correct display in IE 9-. 441 | */ 442 | 443 | canvas { 444 | display: inline-block; 445 | } 446 | 447 | /** 448 | * Add the correct display in IE. 449 | */ 450 | 451 | template { 452 | display: none; 453 | } 454 | 455 | /* Hidden 456 | ========================================================================== */ 457 | 458 | /** 459 | * Add the correct display in IE 10-. 460 | */ 461 | 462 | [hidden] { 463 | display: none; 464 | } 465 | 466 | 467 | body { 468 | color: var(--base-color); 469 | font: 12px/1.2 var(--font-sans-serif); 470 | -webkit-font-smoothing: antialiased; 471 | text-rendering: optimizeSpeed; 472 | } 473 | 474 | ul, 475 | ol { 476 | padding: 0; 477 | margin: 0; 478 | list-style: none; 479 | } -------------------------------------------------------------------------------- /bash/core/assets/theme4/profile/styles.css: -------------------------------------------------------------------------------- 1 | .l-profile { 2 | width: 200px; 3 | height: 200px; 4 | background: var(--l-profile-bg); 5 | color: var(--l-profile-color); 6 | } 7 | -------------------------------------------------------------------------------- /bash/core/assets/theme4/toolbar/styles.css: -------------------------------------------------------------------------------- 1 | .l-toolbar { 2 | display: flex; 3 | height: 60px; 4 | background: var(--l-toolbar-bg); 5 | color: var(--l-toolbar-color); 6 | 7 | .nav-list { 8 | display: flex; 9 | justify-content: center; 10 | width: 100%; 11 | &_item { 12 | margin: auto; 13 | min-width: 100px; 14 | max-width: 250px; 15 | background: var(--l-toolbar_nav-list-bg); 16 | padding: 5px; 17 | border-radius: 5px; 18 | border: 5px solid var(--l-toolbar_nav-list-border_color); 19 | color: var(--l-toolbar_nav-list-color); 20 | font-weight: 900; 21 | 22 | &:hover { 23 | --l-toolbar_nav-list-color: #fff; 24 | } 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /bash/core/assets/theme5/_styles/vars.css: -------------------------------------------------------------------------------- 1 | :root { 2 | /* base */ 3 | --font-sans-serif: Arial, Helvetica, sans-serif; 4 | --base-color: #000; 5 | 6 | /* toolbar */ 7 | --l-toolbar-bg: #ff0; 8 | --l-toolbar-color: #000; 9 | --l-toolbar_nav-list-bg: #0f0; 10 | --l-toolbar_nav-list-border_color: #4d4d4d; 11 | --l-toolbar_nav-list-color: #d45; 12 | --l-toolbar_nav-list-color-hover: #45d; 13 | 14 | /* profile */ 15 | --l-profile-bg: #f00; 16 | --l-profile-color: #369; 17 | } -------------------------------------------------------------------------------- /bash/core/assets/theme5/base/styles.css: -------------------------------------------------------------------------------- 1 | /* base styles */ 2 | 3 | /* normalize */ 4 | /*! normalize.css v5.0.0 | MIT License | github.com/necolas/normalize.css */ 5 | 6 | /** 7 | * 1. Change the default font family in all browsers (opinionated). 8 | * 2. Correct the line height in all browsers. 9 | * 3. Prevent adjustments of font size after orientation changes in 10 | * IE on Windows Phone and in iOS. 11 | */ 12 | 13 | /* Document 14 | ========================================================================== */ 15 | 16 | html { 17 | font-family: sans-serif; /* 1 */ 18 | line-height: 1.15; /* 2 */ 19 | -ms-text-size-adjust: 100%; /* 3 */ 20 | -webkit-text-size-adjust: 100%; /* 3 */ 21 | } 22 | 23 | /* Sections 24 | ========================================================================== */ 25 | 26 | /** 27 | * Remove the margin in all browsers (opinionated). 28 | */ 29 | 30 | body { 31 | margin: 0; 32 | } 33 | 34 | /** 35 | * Add the correct display in IE 9-. 36 | */ 37 | 38 | article, 39 | aside, 40 | footer, 41 | header, 42 | nav, 43 | section { 44 | display: block; 45 | } 46 | 47 | /** 48 | * Correct the font size and margin on `h1` elements within `section` and 49 | * `article` contexts in Chrome, Firefox, and Safari. 50 | */ 51 | 52 | h1 { 53 | font-size: 2em; 54 | margin: 0.67em 0; 55 | } 56 | 57 | /* Grouping content 58 | ========================================================================== */ 59 | 60 | /** 61 | * Add the correct display in IE 9-. 62 | * 1. Add the correct display in IE. 63 | */ 64 | 65 | figcaption, 66 | figure, 67 | main { /* 1 */ 68 | display: block; 69 | } 70 | 71 | /** 72 | * Add the correct margin in IE 8. 73 | */ 74 | 75 | figure { 76 | margin: 1em 40px; 77 | } 78 | 79 | /** 80 | * 1. Add the correct box sizing in Firefox. 81 | * 2. Show the overflow in Edge and IE. 82 | */ 83 | 84 | hr { 85 | box-sizing: content-box; /* 1 */ 86 | height: 0; /* 1 */ 87 | overflow: visible; /* 2 */ 88 | } 89 | 90 | /** 91 | * 1. Correct the inheritance and scaling of font size in all browsers. 92 | * 2. Correct the odd `em` font sizing in all browsers. 93 | */ 94 | 95 | pre { 96 | font-family: monospace, monospace; /* 1 */ 97 | font-size: 1em; /* 2 */ 98 | } 99 | 100 | /* Text-level semantics 101 | ========================================================================== */ 102 | 103 | /** 104 | * 1. Remove the gray background on active links in IE 10. 105 | * 2. Remove gaps in links underline in iOS 8+ and Safari 8+. 106 | */ 107 | 108 | a { 109 | background-color: transparent; /* 1 */ 110 | -webkit-text-decoration-skip: objects; /* 2 */ 111 | } 112 | 113 | /** 114 | * Remove the outline on focused links when they are also active or hovered 115 | * in all browsers (opinionated). 116 | */ 117 | 118 | a:active, 119 | a:hover { 120 | outline-width: 0; 121 | } 122 | 123 | /** 124 | * 1. Remove the bottom border in Firefox 39-. 125 | * 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari. 126 | */ 127 | 128 | abbr[title] { 129 | border-bottom: none; /* 1 */ 130 | text-decoration: underline; /* 2 */ 131 | text-decoration: underline dotted; /* 2 */ 132 | } 133 | 134 | /** 135 | * Prevent the duplicate application of `bolder` by the next rule in Safari 6. 136 | */ 137 | 138 | b, 139 | strong { 140 | font-weight: inherit; 141 | } 142 | 143 | /** 144 | * Add the correct font weight in Chrome, Edge, and Safari. 145 | */ 146 | 147 | b, 148 | strong { 149 | font-weight: bolder; 150 | } 151 | 152 | /** 153 | * 1. Correct the inheritance and scaling of font size in all browsers. 154 | * 2. Correct the odd `em` font sizing in all browsers. 155 | */ 156 | 157 | code, 158 | kbd, 159 | samp { 160 | font-family: monospace, monospace; /* 1 */ 161 | font-size: 1em; /* 2 */ 162 | } 163 | 164 | /** 165 | * Add the correct font style in Android 4.3-. 166 | */ 167 | 168 | dfn { 169 | font-style: italic; 170 | } 171 | 172 | /** 173 | * Add the correct background and color in IE 9-. 174 | */ 175 | 176 | mark { 177 | background-color: #ff0; 178 | color: #000; 179 | } 180 | 181 | /** 182 | * Add the correct font size in all browsers. 183 | */ 184 | 185 | small { 186 | font-size: 80%; 187 | } 188 | 189 | /** 190 | * Prevent `sub` and `sup` elements from affecting the line height in 191 | * all browsers. 192 | */ 193 | 194 | sub, 195 | sup { 196 | font-size: 75%; 197 | line-height: 0; 198 | position: relative; 199 | vertical-align: baseline; 200 | } 201 | 202 | sub { 203 | bottom: -0.25em; 204 | } 205 | 206 | sup { 207 | top: -0.5em; 208 | } 209 | 210 | /* Embedded content 211 | ========================================================================== */ 212 | 213 | /** 214 | * Add the correct display in IE 9-. 215 | */ 216 | 217 | audio, 218 | video { 219 | display: inline-block; 220 | } 221 | 222 | /** 223 | * Add the correct display in iOS 4-7. 224 | */ 225 | 226 | audio:not([controls]) { 227 | display: none; 228 | height: 0; 229 | } 230 | 231 | /** 232 | * Remove the border on images inside links in IE 10-. 233 | */ 234 | 235 | img { 236 | border-style: none; 237 | } 238 | 239 | /** 240 | * Hide the overflow in IE. 241 | */ 242 | 243 | svg:not(:root) { 244 | overflow: hidden; 245 | } 246 | 247 | /* Forms 248 | ========================================================================== */ 249 | 250 | /** 251 | * 1. Change the font styles in all browsers (opinionated). 252 | * 2. Remove the margin in Firefox and Safari. 253 | */ 254 | 255 | button, 256 | input, 257 | optgroup, 258 | select, 259 | textarea { 260 | font-family: sans-serif; /* 1 */ 261 | font-size: 100%; /* 1 */ 262 | line-height: 1.15; /* 1 */ 263 | margin: 0; /* 2 */ 264 | } 265 | 266 | /** 267 | * Show the overflow in IE. 268 | * 1. Show the overflow in Edge. 269 | */ 270 | 271 | button, 272 | input { /* 1 */ 273 | overflow: visible; 274 | } 275 | 276 | /** 277 | * Remove the inheritance of text transform in Edge, Firefox, and IE. 278 | * 1. Remove the inheritance of text transform in Firefox. 279 | */ 280 | 281 | button, 282 | select { /* 1 */ 283 | text-transform: none; 284 | } 285 | 286 | /** 287 | * 1. Prevent a WebKit bug where (2) destroys native `audio` and `video` 288 | * controls in Android 4. 289 | * 2. Correct the inability to style clickable types in iOS and Safari. 290 | */ 291 | 292 | button, 293 | html [type="button"], /* 1 */ 294 | [type="reset"], 295 | [type="submit"] { 296 | -webkit-appearance: button; /* 2 */ 297 | } 298 | 299 | /** 300 | * Remove the inner border and padding in Firefox. 301 | */ 302 | 303 | button::-moz-focus-inner, 304 | [type="button"]::-moz-focus-inner, 305 | [type="reset"]::-moz-focus-inner, 306 | [type="submit"]::-moz-focus-inner { 307 | border-style: none; 308 | padding: 0; 309 | } 310 | 311 | /** 312 | * Restore the focus styles unset by the previous rule. 313 | */ 314 | 315 | button:-moz-focusring, 316 | [type="button"]:-moz-focusring, 317 | [type="reset"]:-moz-focusring, 318 | [type="submit"]:-moz-focusring { 319 | outline: 1px dotted ButtonText; 320 | } 321 | 322 | /** 323 | * Change the border, margin, and padding in all browsers (opinionated). 324 | */ 325 | 326 | fieldset { 327 | border: 1px solid #c0c0c0; 328 | margin: 0 2px; 329 | padding: 0.35em 0.625em 0.75em; 330 | } 331 | 332 | /** 333 | * 1. Correct the text wrapping in Edge and IE. 334 | * 2. Correct the color inheritance from `fieldset` elements in IE. 335 | * 3. Remove the padding so developers are not caught out when they zero out 336 | * `fieldset` elements in all browsers. 337 | */ 338 | 339 | legend { 340 | box-sizing: border-box; /* 1 */ 341 | color: inherit; /* 2 */ 342 | display: table; /* 1 */ 343 | max-width: 100%; /* 1 */ 344 | padding: 0; /* 3 */ 345 | white-space: normal; /* 1 */ 346 | } 347 | 348 | /** 349 | * 1. Add the correct display in IE 9-. 350 | * 2. Add the correct vertical alignment in Chrome, Firefox, and Opera. 351 | */ 352 | 353 | progress { 354 | display: inline-block; /* 1 */ 355 | vertical-align: baseline; /* 2 */ 356 | } 357 | 358 | /** 359 | * Remove the default vertical scrollbar in IE. 360 | */ 361 | 362 | textarea { 363 | overflow: auto; 364 | } 365 | 366 | /** 367 | * 1. Add the correct box sizing in IE 10-. 368 | * 2. Remove the padding in IE 10-. 369 | */ 370 | 371 | [type="checkbox"], 372 | [type="radio"] { 373 | box-sizing: border-box; /* 1 */ 374 | padding: 0; /* 2 */ 375 | } 376 | 377 | /** 378 | * Correct the cursor style of increment and decrement buttons in Chrome. 379 | */ 380 | 381 | [type="number"]::-webkit-inner-spin-button, 382 | [type="number"]::-webkit-outer-spin-button { 383 | height: auto; 384 | } 385 | 386 | /** 387 | * 1. Correct the odd appearance in Chrome and Safari. 388 | * 2. Correct the outline style in Safari. 389 | */ 390 | 391 | [type="search"] { 392 | -webkit-appearance: textfield; /* 1 */ 393 | outline-offset: -2px; /* 2 */ 394 | } 395 | 396 | /** 397 | * Remove the inner padding and cancel buttons in Chrome and Safari on macOS. 398 | */ 399 | 400 | [type="search"]::-webkit-search-cancel-button, 401 | [type="search"]::-webkit-search-decoration { 402 | -webkit-appearance: none; 403 | } 404 | 405 | /** 406 | * 1. Correct the inability to style clickable types in iOS and Safari. 407 | * 2. Change font properties to `inherit` in Safari. 408 | */ 409 | 410 | ::-webkit-file-upload-button { 411 | -webkit-appearance: button; /* 1 */ 412 | font: inherit; /* 2 */ 413 | } 414 | 415 | /* Interactive 416 | ========================================================================== */ 417 | 418 | /* 419 | * Add the correct display in IE 9-. 420 | * 1. Add the correct display in Edge, IE, and Firefox. 421 | */ 422 | 423 | details, /* 1 */ 424 | menu { 425 | display: block; 426 | } 427 | 428 | /* 429 | * Add the correct display in all browsers. 430 | */ 431 | 432 | summary { 433 | display: list-item; 434 | } 435 | 436 | /* Scripting 437 | ========================================================================== */ 438 | 439 | /** 440 | * Add the correct display in IE 9-. 441 | */ 442 | 443 | canvas { 444 | display: inline-block; 445 | } 446 | 447 | /** 448 | * Add the correct display in IE. 449 | */ 450 | 451 | template { 452 | display: none; 453 | } 454 | 455 | /* Hidden 456 | ========================================================================== */ 457 | 458 | /** 459 | * Add the correct display in IE 10-. 460 | */ 461 | 462 | [hidden] { 463 | display: none; 464 | } 465 | 466 | 467 | body { 468 | color: var(--base-color); 469 | font: 12px/1.2 var(--font-sans-serif); 470 | -webkit-font-smoothing: antialiased; 471 | text-rendering: optimizeSpeed; 472 | } 473 | 474 | ul, 475 | ol { 476 | padding: 0; 477 | margin: 0; 478 | list-style: none; 479 | } -------------------------------------------------------------------------------- /bash/core/assets/theme5/profile/styles.css: -------------------------------------------------------------------------------- 1 | .l-profile { 2 | width: 200px; 3 | height: 200px; 4 | background: var(--l-profile-bg); 5 | color: var(--l-profile-color); 6 | } 7 | -------------------------------------------------------------------------------- /bash/core/assets/theme5/toolbar/styles.css: -------------------------------------------------------------------------------- 1 | .l-toolbar { 2 | display: flex; 3 | height: 60px; 4 | background: var(--l-toolbar-bg); 5 | color: var(--l-toolbar-color); 6 | 7 | .nav-list { 8 | display: flex; 9 | justify-content: center; 10 | width: 100%; 11 | &_item { 12 | margin: auto; 13 | min-width: 100px; 14 | max-width: 250px; 15 | background: var(--l-toolbar_nav-list-bg); 16 | padding: 5px; 17 | border-radius: 5px; 18 | border: 5px solid var(--l-toolbar_nav-list-border_color); 19 | color: var(--l-toolbar_nav-list-color); 20 | font-weight: 900; 21 | 22 | &:hover { 23 | --l-toolbar_nav-list-color: #fff; 24 | } 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /bash/core/assets/theme6/_styles/vars.css: -------------------------------------------------------------------------------- 1 | :root { 2 | /* base */ 3 | --font-sans-serif: Arial, Helvetica, sans-serif; 4 | --base-color: #000; 5 | 6 | /* toolbar */ 7 | --l-toolbar-bg: #ff0; 8 | --l-toolbar-color: #000; 9 | --l-toolbar_nav-list-bg: #0f0; 10 | --l-toolbar_nav-list-border_color: #4d4d4d; 11 | --l-toolbar_nav-list-color: #d45; 12 | --l-toolbar_nav-list-color-hover: #45d; 13 | 14 | /* profile */ 15 | --l-profile-bg: #f00; 16 | --l-profile-color: #369; 17 | } -------------------------------------------------------------------------------- /bash/core/assets/theme6/base/styles.css: -------------------------------------------------------------------------------- 1 | /* base styles */ 2 | 3 | /* normalize */ 4 | /*! normalize.css v5.0.0 | MIT License | github.com/necolas/normalize.css */ 5 | 6 | /** 7 | * 1. Change the default font family in all browsers (opinionated). 8 | * 2. Correct the line height in all browsers. 9 | * 3. Prevent adjustments of font size after orientation changes in 10 | * IE on Windows Phone and in iOS. 11 | */ 12 | 13 | /* Document 14 | ========================================================================== */ 15 | 16 | html { 17 | font-family: sans-serif; /* 1 */ 18 | line-height: 1.15; /* 2 */ 19 | -ms-text-size-adjust: 100%; /* 3 */ 20 | -webkit-text-size-adjust: 100%; /* 3 */ 21 | } 22 | 23 | /* Sections 24 | ========================================================================== */ 25 | 26 | /** 27 | * Remove the margin in all browsers (opinionated). 28 | */ 29 | 30 | body { 31 | margin: 0; 32 | } 33 | 34 | /** 35 | * Add the correct display in IE 9-. 36 | */ 37 | 38 | article, 39 | aside, 40 | footer, 41 | header, 42 | nav, 43 | section { 44 | display: block; 45 | } 46 | 47 | /** 48 | * Correct the font size and margin on `h1` elements within `section` and 49 | * `article` contexts in Chrome, Firefox, and Safari. 50 | */ 51 | 52 | h1 { 53 | font-size: 2em; 54 | margin: 0.67em 0; 55 | } 56 | 57 | /* Grouping content 58 | ========================================================================== */ 59 | 60 | /** 61 | * Add the correct display in IE 9-. 62 | * 1. Add the correct display in IE. 63 | */ 64 | 65 | figcaption, 66 | figure, 67 | main { /* 1 */ 68 | display: block; 69 | } 70 | 71 | /** 72 | * Add the correct margin in IE 8. 73 | */ 74 | 75 | figure { 76 | margin: 1em 40px; 77 | } 78 | 79 | /** 80 | * 1. Add the correct box sizing in Firefox. 81 | * 2. Show the overflow in Edge and IE. 82 | */ 83 | 84 | hr { 85 | box-sizing: content-box; /* 1 */ 86 | height: 0; /* 1 */ 87 | overflow: visible; /* 2 */ 88 | } 89 | 90 | /** 91 | * 1. Correct the inheritance and scaling of font size in all browsers. 92 | * 2. Correct the odd `em` font sizing in all browsers. 93 | */ 94 | 95 | pre { 96 | font-family: monospace, monospace; /* 1 */ 97 | font-size: 1em; /* 2 */ 98 | } 99 | 100 | /* Text-level semantics 101 | ========================================================================== */ 102 | 103 | /** 104 | * 1. Remove the gray background on active links in IE 10. 105 | * 2. Remove gaps in links underline in iOS 8+ and Safari 8+. 106 | */ 107 | 108 | a { 109 | background-color: transparent; /* 1 */ 110 | -webkit-text-decoration-skip: objects; /* 2 */ 111 | } 112 | 113 | /** 114 | * Remove the outline on focused links when they are also active or hovered 115 | * in all browsers (opinionated). 116 | */ 117 | 118 | a:active, 119 | a:hover { 120 | outline-width: 0; 121 | } 122 | 123 | /** 124 | * 1. Remove the bottom border in Firefox 39-. 125 | * 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari. 126 | */ 127 | 128 | abbr[title] { 129 | border-bottom: none; /* 1 */ 130 | text-decoration: underline; /* 2 */ 131 | text-decoration: underline dotted; /* 2 */ 132 | } 133 | 134 | /** 135 | * Prevent the duplicate application of `bolder` by the next rule in Safari 6. 136 | */ 137 | 138 | b, 139 | strong { 140 | font-weight: inherit; 141 | } 142 | 143 | /** 144 | * Add the correct font weight in Chrome, Edge, and Safari. 145 | */ 146 | 147 | b, 148 | strong { 149 | font-weight: bolder; 150 | } 151 | 152 | /** 153 | * 1. Correct the inheritance and scaling of font size in all browsers. 154 | * 2. Correct the odd `em` font sizing in all browsers. 155 | */ 156 | 157 | code, 158 | kbd, 159 | samp { 160 | font-family: monospace, monospace; /* 1 */ 161 | font-size: 1em; /* 2 */ 162 | } 163 | 164 | /** 165 | * Add the correct font style in Android 4.3-. 166 | */ 167 | 168 | dfn { 169 | font-style: italic; 170 | } 171 | 172 | /** 173 | * Add the correct background and color in IE 9-. 174 | */ 175 | 176 | mark { 177 | background-color: #ff0; 178 | color: #000; 179 | } 180 | 181 | /** 182 | * Add the correct font size in all browsers. 183 | */ 184 | 185 | small { 186 | font-size: 80%; 187 | } 188 | 189 | /** 190 | * Prevent `sub` and `sup` elements from affecting the line height in 191 | * all browsers. 192 | */ 193 | 194 | sub, 195 | sup { 196 | font-size: 75%; 197 | line-height: 0; 198 | position: relative; 199 | vertical-align: baseline; 200 | } 201 | 202 | sub { 203 | bottom: -0.25em; 204 | } 205 | 206 | sup { 207 | top: -0.5em; 208 | } 209 | 210 | /* Embedded content 211 | ========================================================================== */ 212 | 213 | /** 214 | * Add the correct display in IE 9-. 215 | */ 216 | 217 | audio, 218 | video { 219 | display: inline-block; 220 | } 221 | 222 | /** 223 | * Add the correct display in iOS 4-7. 224 | */ 225 | 226 | audio:not([controls]) { 227 | display: none; 228 | height: 0; 229 | } 230 | 231 | /** 232 | * Remove the border on images inside links in IE 10-. 233 | */ 234 | 235 | img { 236 | border-style: none; 237 | } 238 | 239 | /** 240 | * Hide the overflow in IE. 241 | */ 242 | 243 | svg:not(:root) { 244 | overflow: hidden; 245 | } 246 | 247 | /* Forms 248 | ========================================================================== */ 249 | 250 | /** 251 | * 1. Change the font styles in all browsers (opinionated). 252 | * 2. Remove the margin in Firefox and Safari. 253 | */ 254 | 255 | button, 256 | input, 257 | optgroup, 258 | select, 259 | textarea { 260 | font-family: sans-serif; /* 1 */ 261 | font-size: 100%; /* 1 */ 262 | line-height: 1.15; /* 1 */ 263 | margin: 0; /* 2 */ 264 | } 265 | 266 | /** 267 | * Show the overflow in IE. 268 | * 1. Show the overflow in Edge. 269 | */ 270 | 271 | button, 272 | input { /* 1 */ 273 | overflow: visible; 274 | } 275 | 276 | /** 277 | * Remove the inheritance of text transform in Edge, Firefox, and IE. 278 | * 1. Remove the inheritance of text transform in Firefox. 279 | */ 280 | 281 | button, 282 | select { /* 1 */ 283 | text-transform: none; 284 | } 285 | 286 | /** 287 | * 1. Prevent a WebKit bug where (2) destroys native `audio` and `video` 288 | * controls in Android 4. 289 | * 2. Correct the inability to style clickable types in iOS and Safari. 290 | */ 291 | 292 | button, 293 | html [type="button"], /* 1 */ 294 | [type="reset"], 295 | [type="submit"] { 296 | -webkit-appearance: button; /* 2 */ 297 | } 298 | 299 | /** 300 | * Remove the inner border and padding in Firefox. 301 | */ 302 | 303 | button::-moz-focus-inner, 304 | [type="button"]::-moz-focus-inner, 305 | [type="reset"]::-moz-focus-inner, 306 | [type="submit"]::-moz-focus-inner { 307 | border-style: none; 308 | padding: 0; 309 | } 310 | 311 | /** 312 | * Restore the focus styles unset by the previous rule. 313 | */ 314 | 315 | button:-moz-focusring, 316 | [type="button"]:-moz-focusring, 317 | [type="reset"]:-moz-focusring, 318 | [type="submit"]:-moz-focusring { 319 | outline: 1px dotted ButtonText; 320 | } 321 | 322 | /** 323 | * Change the border, margin, and padding in all browsers (opinionated). 324 | */ 325 | 326 | fieldset { 327 | border: 1px solid #c0c0c0; 328 | margin: 0 2px; 329 | padding: 0.35em 0.625em 0.75em; 330 | } 331 | 332 | /** 333 | * 1. Correct the text wrapping in Edge and IE. 334 | * 2. Correct the color inheritance from `fieldset` elements in IE. 335 | * 3. Remove the padding so developers are not caught out when they zero out 336 | * `fieldset` elements in all browsers. 337 | */ 338 | 339 | legend { 340 | box-sizing: border-box; /* 1 */ 341 | color: inherit; /* 2 */ 342 | display: table; /* 1 */ 343 | max-width: 100%; /* 1 */ 344 | padding: 0; /* 3 */ 345 | white-space: normal; /* 1 */ 346 | } 347 | 348 | /** 349 | * 1. Add the correct display in IE 9-. 350 | * 2. Add the correct vertical alignment in Chrome, Firefox, and Opera. 351 | */ 352 | 353 | progress { 354 | display: inline-block; /* 1 */ 355 | vertical-align: baseline; /* 2 */ 356 | } 357 | 358 | /** 359 | * Remove the default vertical scrollbar in IE. 360 | */ 361 | 362 | textarea { 363 | overflow: auto; 364 | } 365 | 366 | /** 367 | * 1. Add the correct box sizing in IE 10-. 368 | * 2. Remove the padding in IE 10-. 369 | */ 370 | 371 | [type="checkbox"], 372 | [type="radio"] { 373 | box-sizing: border-box; /* 1 */ 374 | padding: 0; /* 2 */ 375 | } 376 | 377 | /** 378 | * Correct the cursor style of increment and decrement buttons in Chrome. 379 | */ 380 | 381 | [type="number"]::-webkit-inner-spin-button, 382 | [type="number"]::-webkit-outer-spin-button { 383 | height: auto; 384 | } 385 | 386 | /** 387 | * 1. Correct the odd appearance in Chrome and Safari. 388 | * 2. Correct the outline style in Safari. 389 | */ 390 | 391 | [type="search"] { 392 | -webkit-appearance: textfield; /* 1 */ 393 | outline-offset: -2px; /* 2 */ 394 | } 395 | 396 | /** 397 | * Remove the inner padding and cancel buttons in Chrome and Safari on macOS. 398 | */ 399 | 400 | [type="search"]::-webkit-search-cancel-button, 401 | [type="search"]::-webkit-search-decoration { 402 | -webkit-appearance: none; 403 | } 404 | 405 | /** 406 | * 1. Correct the inability to style clickable types in iOS and Safari. 407 | * 2. Change font properties to `inherit` in Safari. 408 | */ 409 | 410 | ::-webkit-file-upload-button { 411 | -webkit-appearance: button; /* 1 */ 412 | font: inherit; /* 2 */ 413 | } 414 | 415 | /* Interactive 416 | ========================================================================== */ 417 | 418 | /* 419 | * Add the correct display in IE 9-. 420 | * 1. Add the correct display in Edge, IE, and Firefox. 421 | */ 422 | 423 | details, /* 1 */ 424 | menu { 425 | display: block; 426 | } 427 | 428 | /* 429 | * Add the correct display in all browsers. 430 | */ 431 | 432 | summary { 433 | display: list-item; 434 | } 435 | 436 | /* Scripting 437 | ========================================================================== */ 438 | 439 | /** 440 | * Add the correct display in IE 9-. 441 | */ 442 | 443 | canvas { 444 | display: inline-block; 445 | } 446 | 447 | /** 448 | * Add the correct display in IE. 449 | */ 450 | 451 | template { 452 | display: none; 453 | } 454 | 455 | /* Hidden 456 | ========================================================================== */ 457 | 458 | /** 459 | * Add the correct display in IE 10-. 460 | */ 461 | 462 | [hidden] { 463 | display: none; 464 | } 465 | 466 | 467 | body { 468 | color: var(--base-color); 469 | font: 12px/1.2 var(--font-sans-serif); 470 | -webkit-font-smoothing: antialiased; 471 | text-rendering: optimizeSpeed; 472 | } 473 | 474 | ul, 475 | ol { 476 | padding: 0; 477 | margin: 0; 478 | list-style: none; 479 | } -------------------------------------------------------------------------------- /bash/core/assets/theme6/profile/styles.css: -------------------------------------------------------------------------------- 1 | .l-profile { 2 | width: 200px; 3 | height: 200px; 4 | background: var(--l-profile-bg); 5 | color: var(--l-profile-color); 6 | } 7 | -------------------------------------------------------------------------------- /bash/core/assets/theme6/toolbar/styles.css: -------------------------------------------------------------------------------- 1 | .l-toolbar { 2 | display: flex; 3 | height: 60px; 4 | background: var(--l-toolbar-bg); 5 | color: var(--l-toolbar-color); 6 | 7 | .nav-list { 8 | display: flex; 9 | justify-content: center; 10 | width: 100%; 11 | &_item { 12 | margin: auto; 13 | min-width: 100px; 14 | max-width: 250px; 15 | background: var(--l-toolbar_nav-list-bg); 16 | padding: 5px; 17 | border-radius: 5px; 18 | border: 5px solid var(--l-toolbar_nav-list-border_color); 19 | color: var(--l-toolbar_nav-list-color); 20 | font-weight: 900; 21 | 22 | &:hover { 23 | --l-toolbar_nav-list-color: #fff; 24 | } 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /bash/core/jsApp/gulp: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | ./node_modules/gulp/bin/gulp.js 4 | -------------------------------------------------------------------------------- /bash/core/jsApp/gulpfile.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | // gulpfile.js 4 | 5 | var gulp = require("gulp"), 6 | postcss = require("gulp-postcss"), 7 | concat = require("gulp-concat"), 8 | rename = require("gulp-rename"), 9 | csso = require("postcss-csso"), 10 | removeRoot = require("postcss-remove-root"), 11 | nestRules = require("postcss-nested"), 12 | inject = require("postcss-inject"), 13 | cssvariables = require("postcss-css-variables"), 14 | autoprefixer = require("autoprefixer"); 15 | 16 | var fs = require("fs"), 17 | path = require("path"); 18 | 19 | var BASE_PATH = "../assets/", 20 | DIST_CSS = "/_dist/css", 21 | STYLES = { 22 | base: { 23 | path: function (theme) { 24 | return [path.join(BASE_PATH, theme, "_styles/vars.css"), 25 | path.join(BASE_PATH, theme, "base/styles.css")]; 26 | }, 27 | concatFilename: "base.css", 28 | basename: "base", 29 | prefix: "styles-", 30 | suffix: ".min", 31 | extname: ".css" 32 | }, 33 | all: { 34 | path: function (theme) { 35 | return [path.join(BASE_PATH, theme, "**/*.css"), 36 | "!" + path.join(BASE_PATH, theme, "_dist/**/*.css"), 37 | "!" + path.join(BASE_PATH, theme, "base/*.css"), 38 | "!" + path.join(BASE_PATH, theme, "_styles/*.css")]; 39 | }, 40 | prefix: "styles-", 41 | suffix: ".min", 42 | extname: ".css" 43 | } 44 | }; 45 | 46 | // get themes list 47 | function getThemes(dir) { 48 | return fs.readdirSync(dir).filter(function (file) { 49 | return fs.statSync(path.join(dir, file)).isDirectory(); 50 | }); 51 | } 52 | 53 | // create styles-base.min.css for each theme 54 | gulp.task("base-css-concat", function() { 55 | var dirs = getThemes(BASE_PATH); 56 | 57 | dirs.forEach(function (dir) { 58 | var distPath = path.join(BASE_PATH, dir, DIST_CSS); 59 | 60 | gulp.src(STYLES.base.path(dir)) 61 | .pipe(concat(STYLES.base.concatFilename)) 62 | .pipe(postcss([autoprefixer, cssvariables({ 63 | preserve: true 64 | }), nestRules, csso])) 65 | .pipe(rename({ 66 | basename: STYLES.base.basename, 67 | prefix: STYLES.base.prefix, 68 | suffix: STYLES.base.suffix, 69 | extname: STYLES.base.extname 70 | })) 71 | .pipe(gulp.dest(distPath)) 72 | }); 73 | }); 74 | 75 | // work with other components for each theme 76 | gulp.task("minify-css", function () { 77 | var dirs = getThemes(BASE_PATH); 78 | 79 | dirs.forEach(function (dir) { 80 | var distPath = path.join(BASE_PATH, dir, DIST_CSS); 81 | 82 | gulp.src(STYLES.all.path(dir)) 83 | .pipe(postcss([autoprefixer, inject({ 84 | cssFilePath: STYLES.base.path(dir)[0] 85 | }), cssvariables({ 86 | preserve: true 87 | }), removeRoot, nestRules, csso])) 88 | .pipe(rename(function (file) { 89 | var dirname = file.dirname, 90 | filename = dirname; 91 | 92 | file.dirname = ""; 93 | file.basename = STYLES.all.prefix + filename + STYLES.all.suffix; 94 | file.extname = STYLES.all.extname; 95 | 96 | return file; 97 | })) 98 | .pipe(gulp.dest(distPath)); 99 | }); 100 | }); 101 | 102 | gulp.task("default", ["base-css-concat", "minify-css"]); 103 | -------------------------------------------------------------------------------- /bash/core/jsApp/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "jsApp", 3 | "version": "0.0.0", 4 | "description": "", 5 | "main": "index.js", 6 | "scripts": { 7 | "test": "echo \"Error: no test specified\" && exit 1" 8 | }, 9 | "author": "", 10 | "license": "BSD", 11 | "devDependencies": { 12 | "gulp": "~3.9.1", 13 | "gulp-postcss": "~6.2.0", 14 | "autoprefixer": "~6.5.1", 15 | "gulp-concat": "~2.6.0", 16 | "gulp-csso": "~2.0.0", 17 | "gulp-rename": "~1.2.2", 18 | "postcss-css-variables": "~0.6.0", 19 | "postcss-csso": "~1.1.2", 20 | "postcss-inject": "~1.0.1", 21 | "postcss-remove-root": "0.0.2", 22 | "postcss-nested": "~1.0.0" 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /bash/scripting/.bashrc: -------------------------------------------------------------------------------- 1 | # .bashrc 2 | 3 | # Source global definitions 4 | if [[ -f /etc/bashrc ]] 5 | then 6 | . /etc/bashrc 7 | fi 8 | 9 | source ~/git-completion.bash 10 | 11 | # Making SSH_AUTH_SOCK work between detaches in tmux/screen 12 | if [[ ! -z "$SSH_AUTH_SOCK" -a "$SSH_AUTH_SOCK" != "${HOME}/agent_sock" ]] 13 | then 14 | unlink "${HOME}/agent_sock" 2>/dev/null 15 | ln -s "$SSH_AUTH_SOCK" "${HOME}/agent_sock" 16 | export SSH_AUTH_SOCK="${HOME}/agent_sock" 17 | fi 18 | 19 | # User specific aliases and functions 20 | alias gst='git status' 21 | alias gf='git fetch' 22 | alias gm='git merge' 23 | alias gd='git diff' 24 | alias gb='git branch' 25 | alias gbm='git branch --merged' 26 | alias gcm='git commit -m' 27 | alias gp='git push origin' 28 | alias gbd='git branch -D' 29 | alias gshorth='git log -p -2' 30 | alias gch='git checkout' 31 | alias grntds='./grunt deploySync' 32 | alias grntd='./grunt deploy' 33 | alias ghide='git stash' 34 | alias gshow='git stash pop' 35 | alias gsl='git stash list' 36 | alias myps='ps aux | grep rybka' 37 | alias gmom='git merge origin/master' 38 | alias gad='git add' 39 | alias grm='git rm' 40 | alias showaliases='cat $HOME/.bashrc | grep alias' 41 | -------------------------------------------------------------------------------- /bash/scripting/README.md: -------------------------------------------------------------------------------- 1 | # Scripting 2 | 3 | ## First step 4 | 5 | `REPO_NAME="terminalForCoder__WSD"` - this is the directory name where the repository’s been cloned to. Change it if you need. 6 | 7 | ### List of files: 8 | 9 | * `hw.sh` - simple "Hello, world!" example 10 | * `variables.sh` - simple example with variables 11 | * `if_elif_else.sh` - `if/elif/else` example 12 | * `case_in_esac.sh` - `case/in/esac` example 13 | * `for_in.sh` - `for/in` example 14 | * `while.sh` - `while` example 15 | * `fast_diff.sh` - create `diff` and put it to some directory 16 | * `fast_diff_v2.sh` - create `diff` and add it to task through `Jira API` 17 | * `clean_dist.sh` - do clean stuff for `_dist` directory 18 | * `up_repo.sh` - check repositories in `vendor` directory 19 | * `.bashrc` - aliases; source global definitions; making `SSH_AUTH_SOCK` work between detaches in `tmux/screen` 20 | -------------------------------------------------------------------------------- /bash/scripting/case_in_esac.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # ./case_in_esac.sh 2 1 4 | # Creating dir 1 5 | # ./case_in_esac.sh 1 2 6 | # Creating file 2 7 | 8 | if [[ "$#" -ne 2 ]] 9 | then 10 | echo "You should specify exactly two arguments!" 11 | else 12 | case "$1" in 13 | 1) 14 | echo "Creating file ${2}" 15 | touch "$2" 16 | ;; 17 | 2) 18 | echo "Creating dir ${2}" 19 | mkdir "$2" 20 | ;; 21 | *) 22 | echo "Wrong value" 23 | esac 24 | fi 25 | -------------------------------------------------------------------------------- /bash/scripting/clean_dist.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # clean_dist.sh - clean dist for current theme 4 | # ./clean_dist.sh - clean all directories with dists 5 | # ./clean_dist.sh - clean dist 6 | 7 | 8 | cleanDist() { 9 | theme="$1" 10 | DIST_NAME="_dist" 11 | REPO_NAME="terminalForCoder__WSD" 12 | PATH_TO_CORE="${HOME}/${REPO_NAME}/bash/core" 13 | 14 | PATH_TO_ASSETS="${PATH_TO_CORE}/assets" 15 | 16 | # if "${PATH_TO_CORE}" is not exist 17 | # show info message 18 | if [[ ! -e "${PATH_TO_CORE}" ]] 19 | then 20 | echo "Cannot find ${PATH_TO_CORE}" 21 | echo "Try to edit REPO_NAME in ${0}" 22 | exit 0 23 | fi 24 | 25 | # if $1 == "" clean all _dist in each theme 26 | if [[ -z "$theme" ]] 27 | then 28 | path_to_dist="$PATH_TO_ASSETS" 29 | else 30 | path_to_dist="${PATH_TO_ASSETS}/${theme}" 31 | fi 32 | 33 | if [[ -n $(find "$path_to_dist" -type d -name "$DIST_NAME") ]] 34 | then 35 | # do clean stuff 36 | find "$path_to_dist" -type d -name "$DIST_NAME" | xargs rm -rfv 37 | echo "Dist of ${theme} has already deleted: ${path_to_dist}" 38 | else 39 | echo "Cannot find ${DIST_NAME} in ${theme}" 40 | fi 41 | } 42 | 43 | cleanDist "$@" 44 | -------------------------------------------------------------------------------- /bash/scripting/diff-hot-fixes.diff: -------------------------------------------------------------------------------- 1 | diff --git a/bash/README.md b/bash/README.md 2 | index df53c7c..32fec97 100644 3 | --- a/bash/README.md 4 | +++ b/bash/README.md 5 | @@ -8,23 +8,27 @@ Every time you launch a terminal, it starts to run the shell - a special program 6 | ``` 7 | 8 | ### Basics 9 | +The beginning of any script in bash 10 | + 11 | ```bash 12 | - #!/bin/bash # the beginning of any script on bash 13 | + #!/bin/bash 14 | ``` 15 | 16 | #### Variables 17 | - - **name**: letters, numbers, _ (underscore). 18 | + - **name**: letters, numbers, `_` (underscore). 19 | - **name** - it cannot start with a number. 20 | - **value**: numbers, strings (if there is any whitespace - wrap it into double quotes), characters. 21 | 22 | **Create (rewrite) variable:** 23 | + 24 | ```bash 25 | path=~/Docs 26 | ``` 27 | 28 | **Read variable:** 29 | + 30 | ```bash 31 | - $path или ${path} 32 | + "$path" или "${path}" 33 | ``` 34 | 35 | **Pass arguments to a script:** 36 | @@ -33,40 +37,46 @@ Every time you launch a terminal, it starts to run the shell - a special program 37 | ``` 38 | 39 | **Processing arguments within the script:** 40 | + 41 | ```bash 42 | - $1 # first argument 43 | - $2 # second argument 44 | - $0 # name of script 45 | - $# # count of arguments 46 | + "$1" # first argument 47 | + "$2" # second argument 48 | + "$0" # name of script 49 | + "$#" # count of arguments 50 | + "$@" # all arguments is concatenated in one string, 51 | + # each argument is represented as one word 52 | ``` 53 | 54 | **Hello, world!** `*` 55 | + 56 | ```bash 57 | #!/bin/bash 58 | echo "Hello, world!" 59 | 60 | - ./hw.sh # how it calls 61 | + # ./hw.sh - how this script should be called 62 | ``` 63 | 64 | **Another one example of working with variables:** 65 | + 66 | ```bash 67 | #!/bin/bash 68 | 69 | - var1=$1 70 | - var2=$2 71 | + var1="$1" 72 | + var2="$2" 73 | 74 | - echo "Arguments are \$1=$var1 \$2=$var2" 75 | + echo "Arguments are \$1=${var1} \$2=${var2}" 76 | 77 | - ./variables.sh var1 var2 # how it calls 78 | + # ./variables.sh Hello world - how this script should be called 79 | ``` 80 | > `*` Edit a permit for a file: 81 | ```bash 82 | - chmod +x filename.sh 83 | + chmod +x 84 | ``` 85 | 86 | #### Conditions to execute different branches of code 87 | 88 | **if** 89 | + 90 | ```bash 91 | if [[ condition ]] 92 | then 93 | @@ -76,6 +86,7 @@ Every time you launch a terminal, it starts to run the shell - a special program 94 | 95 | * * * 96 | **Conditions (strings):** 97 | + 98 | ```bash 99 | -z # string is empty 100 | -n # string is not empty 101 | @@ -84,6 +95,7 @@ Every time you launch a terminal, it starts to run the shell - a special program 102 | ``` 103 | 104 | **Conditions (numbers/strings):** 105 | + 106 | ```bash 107 | operation 108 | -eq, (==) # equal 109 | @@ -95,6 +107,7 @@ Every time you launch a terminal, it starts to run the shell - a special program 110 | ``` 111 | 112 | **Conditions (files):** 113 | + 114 | ```bash 115 | -e # path is exist 116 | -f # is file 117 | @@ -104,6 +117,7 @@ Every time you launch a terminal, it starts to run the shell - a special program 118 | ``` 119 | 120 | **Conditions (boolean):** 121 | + 122 | ```bash 123 | ! # denial of boolean expression 124 | && # boolean "and" 125 | @@ -112,6 +126,7 @@ Every time you launch a terminal, it starts to run the shell - a special program 126 | * * * 127 | 128 | **if/else:** 129 | + 130 | ```bash 131 | if [[ condition ]] 132 | then 133 | @@ -119,85 +134,97 @@ Every time you launch a terminal, it starts to run the shell - a special program 134 | else 135 | # action, if condition is false 136 | fi 137 | + 138 | + break # break loop 139 | + continue # go to the next value of i 140 | ``` 141 | 142 | **if/elif/else** 143 | + 144 | ```bash 145 | #!/bin/bash 146 | 147 | - if [[ -f $1 ]] 148 | + if [[ -f "$1" ]] 149 | then 150 | echo "Removing file" 151 | - rm $1 152 | - elif [[ -d $1 ]] 153 | + rm "$1" 154 | + elif [[ -d "$1" ]] 155 | then 156 | echo "Removing dir" 157 | - rm -r $1 158 | + rm -r "$1" 159 | else 160 | - echo "Can't remove $1" 161 | + echo "Can't remove ${1}" 162 | fi 163 | ``` 164 | 165 | 166 | **case/in/esac** 167 | + 168 | ```bash 169 | #!/bin/bash 170 | 171 | - if [[ $# -ne 2 ]] 172 | + # ./case_in_esac.sh 2 1 173 | + # Creating dir 1 174 | + # ./case_in_esac.sh 1 2 175 | + # Creating file 2 176 | + 177 | + if [[ "$#" -ne 2 ]] 178 | then 179 | - echo "You should specify exactly two arguments!" 180 | + echo "You should specify exactly two arguments!" 181 | else 182 | - case $1 in 183 | - 1) 184 | - echo "Creating file $2" 185 | - touch $2 186 | - ;; 187 | - 2) 188 | - echo "Creating dir $2" 189 | - mkdir $2 190 | - ;; 191 | - *) 192 | - echo "Wrong value" 193 | - esac 194 | + case "$1" in 195 | + 1) 196 | + echo "Creating file ${2}" 197 | + touch "$2" 198 | + ;; 199 | + 2) 200 | + echo "Creating dir ${2}" 201 | + mkdir "$2" 202 | + ;; 203 | + *) 204 | + echo "Wrong value" 205 | + ;; 206 | + esac 207 | fi 208 | ``` 209 | 210 | #### Loops for repeated code 211 | 212 | **for/in** 213 | + 214 | ```bash 215 | for i in array 216 | do 217 | # an action, i on every iteration is getting 218 | # the next value from array 219 | done 220 | - 221 | - break # break loop 222 | - continue # go to the next value of i 223 | ``` 224 | 225 | **while** 226 | + 227 | ```bash 228 | - while [[ condition ]] 229 | + while [ condition ] 230 | do 231 | # an action, while condition is true 232 | done 233 | ``` 234 | 235 | **while example:** 236 | + 237 | ```bash 238 | - # while.sh 239 | #!/bin/bash 240 | + # while.sh 241 | 242 | again="yes" 243 | + 244 | while [ "$again" = "yes" ] 245 | do 246 | - echo "Please enter a name:" 247 | - > read name 248 | - echo "The name you entered is $name" 249 | + echo "Please enter a name:" 250 | + read name # !!! 251 | + echo "The name you entered is ${name}" 252 | 253 | - echo "Do you wish to continue? (yes/no)" 254 | - read again 255 | + echo "Do you wish to continue? (yes/no)" 256 | + read again # !!! 257 | done 258 | ``` 259 | 260 | @@ -205,10 +232,10 @@ Every time you launch a terminal, it starts to run the shell - a special program 261 | 262 | #### Fast diff 263 | ```bash 264 | - git diff origin/master origin/%branch-name% > ~/%path_to_directory%/diff/diff-%branch-name%.diff 265 | + git diff origin/master origin/ > ~//diff/diff-.diff 266 | 267 | - %branch-name% # name of the branch to which you want to create a diff 268 | - %path_to_directory% # the name of the folder where to save the file with diff 269 | + # a name of the branch to which you want to create a diff 270 | + # a name of the folder where to save the file with diff 271 | ``` 272 | 273 | #### Fast diff + `Jira API` 274 | @@ -227,14 +254,14 @@ Every time you launch a terminal, it starts to run the shell - a special program 275 | # Get the first line of git remote output and cut a path to repository 276 | repository=$(git remote -v | head -n1 | sed "s/^origin.*\/\(.*\)\.git\s(.*)/\1/") 277 | 278 | - path_to_diff="$HOME/$branch-$repository.diff" 279 | + path_to_diff="${HOME}/${branch}-${repository}.diff" 280 | 281 | diff_live () { 282 | - git diff "origin/live..master/$branch" > "$path_to_diff" 283 | + git diff "origin/live..master/${branch}" > "$path_to_diff" 284 | } 285 | 286 | attach_diff () { 287 | - curl -D- -u "":"" -X POST -H "X-Atlassian-Token: no-check" -F "file=@$path_to_diff;type=text/x-diff" "https://jira..com/rest/api/2/issue/$issue_id/attachments" 288 | + curl -D- -u "":"" -X POST -H "X-Atlassian-Token: no-check" -F "file=@${path_to_diff};type=text/x-diff" "https://jira..com/rest/api/2/issue/${issue_id}/attachments" 289 | } 290 | 291 | diff_live && attach_diff 292 | @@ -246,7 +273,7 @@ Every time you launch a terminal, it starts to run the shell - a special program 293 | 294 | #### Up a large number of repositories 295 | 296 | -:bangbang: Before start working with `./scripting/up_repo.sh` run `./clone_vendors.sh` :bangbang: 297 | +:bangbang: Before start working with `./scripting/up_repo.sh` you need to run `./clone_vendors.sh` :bangbang: 298 | 299 | ```bash 300 | #!/bin/bash 301 | @@ -260,12 +287,12 @@ Every time you launch a terminal, it starts to run the shell - a special program 302 | # get list of repositories 303 | findRepo() { 304 | REPO_NAME="terminalForCoder__WSD" 305 | - path_to_vendor_repo="$HOME/$REPO_NAME/bash/core/vendors/" 306 | + path_to_vendor_repo="${HOME}/${REPO_NAME}/bash/core/vendors/" 307 | # find all git repositories in $path_to_vendor_repo 308 | # filter by /.git 309 | - r=$(find $path_to_vendor_repo -name .git | xargs | sed "s/\\/.git//g") 310 | + r=$(find ${path_to_vendor_repo} -name .git | xargs | sed "s/\\/.git//g") 311 | # do check repositories stuff 312 | - checkBranch $r 313 | + checkBranch "$r" 314 | } 315 | 316 | # do check repositories stuff 317 | @@ -273,28 +300,28 @@ Every time you launch a terminal, it starts to run the shell - a special program 318 | BRANCH="master" 319 | 320 | # $i is item in $r 321 | - for i in $@ 322 | + for i in "$@" 323 | do 324 | # get current branch name 325 | - b=`cd $i && git branch | grep \*` 326 | - echo "repo: $i" 327 | - echo "current brunch: $b" 328 | + b=`cd ${i} && git branch | grep \*` 329 | + echo "repo: ${i}" 330 | + echo "current brunch: ${b}" 331 | 332 | # check branch 333 | - if [[ $b != "* master" ]] 334 | + if [[ "$b" != "* master" ]] 335 | then 336 | - echo "!Error! $i is not on $BRANCH branch" 337 | - echo "Current branch is $b" 338 | - cd $i && git checkout $BRANCH && git branch && git pull origin $BRANCH 339 | + echo "!Error! ${i} is not on ${BRANCH} branch" 340 | + echo "Current branch is ${b}" 341 | + cd "$i" && git checkout "$BRANCH" && git branch && git pull origin "$BRANCH" 342 | else 343 | echo "Do pull stuff" 344 | - cd $i && git branch && git pull origin $BRANCH 345 | + cd "$i" && git branch && git pull origin "$BRANCH" 346 | fi 347 | done 348 | echo "Done. Congratulation, you win!" 349 | } 350 | 351 | - findRepo $@ 352 | + findRepo "$@" 353 | ``` 354 | 355 | #### Helpful aliases 356 | diff --git a/bash/clone_vendors.sh b/bash/clone_vendors.sh 357 | index a70cd65..256c81a 100755 358 | --- a/bash/clone_vendors.sh 359 | +++ b/bash/clone_vendors.sh 360 | @@ -1,7 +1,7 @@ 361 | #!/bin/bash 362 | # clone vendors repositories to ./core/vendors 363 | REPO_NAME="terminalForCoder__WSD" 364 | -PATH_TO_CORE="$HOME/$REPO_NAME/bash/core" 365 | +PATH_TO_CORE="${HOME}/${REPO_NAME}/bash/core" 366 | 367 | # array with repositories 368 | repositories=( "https://github.com/larscmagnusson/CSS3MultiColumn.git" "https://github.com/tc39/test262.git" "https://github.com/postcss/postcss" "https://github.com/webpack/webpack" "https://github.com/var-bin/spriteFactory.git" "https://github.com/var-bin/backbone-training.git" "https://github.com/var-bin/flex-grid-framework.git" "https://github.com/var-bin/BrandButtons.git" "https://github.com/var-bin/less-easings.git" ) 369 | @@ -10,32 +10,31 @@ i=0 # start el 370 | repositories_count=${#repositories[@]} # array size 371 | 372 | cloneVendors() { 373 | - if [[ ! -d "$PATH_TO_CORE/vendors" ]] 374 | + if [[ ! -d "${PATH_TO_CORE}/vendors" ]] 375 | then 376 | - mkdir "$PATH_TO_CORE/vendors" 377 | + mkdir "${PATH_TO_CORE}/vendors" 378 | fi 379 | 380 | - while [ $i -lt $repositories_count ] 381 | + while [ "$i" -lt "$repositories_count" ] 382 | do 383 | # Get vendor name 384 | vendor=$(echo ${repositories[$i]} | sed "s/https\:\/\/github\.com\/*//g" | sed "s/\/.*//g") 385 | - vendor_repo_name=$(echo ${repositories[$i]} | sed "s/https\:\/\/github\.com\/.*\///g" | sed "s/\.git//g") 386 | 387 | - if [[ -d "$PATH_TO_CORE/vendors/$vendor" ]] 388 | + if [[ -d "${PATH_TO_CORE}/vendors/${vendor}" ]] 389 | then 390 | - echo "Directory $PATH_TO_CORE/vendors/$vendor is exist" 391 | + echo "Directory ${PATH_TO_CORE}/vendors/${vendor} is exist" 392 | 393 | - cd "$PATH_TO_CORE/vendors/$vendor" && git clone ${repositories[$i]} 394 | + cd "${PATH_TO_CORE}/vendors/${vendor}" && git clone ${repositories[$i]} 395 | else 396 | - echo "Create directory: $PATH_TO_CORE/vendors/$vendor" 397 | + echo "Create directory: ${PATH_TO_CORE}/vendors/${vendor}" 398 | echo "Repository: ${repositories[$i]} is clonning" 399 | 400 | - mkdir "$PATH_TO_CORE/vendors/$vendor" 401 | + mkdir "${PATH_TO_CORE}/vendors/${vendor}" 402 | 403 | - cd "$PATH_TO_CORE/vendors/$vendor" && git clone ${repositories[$i]} 404 | + cd "${PATH_TO_CORE}/vendors/${vendor}" && git clone ${repositories[$i]} 405 | fi 406 | - i=$((i + 1)) 407 | + i=$((i + 1)) # i++ 408 | done 409 | } 410 | 411 | -cloneVendors $@ 412 | +cloneVendors "$@" 413 | diff --git a/bash/scripting/.bashrc b/bash/scripting/.bashrc 414 | index 1d19945..c05fedd 100644 415 | --- a/bash/scripting/.bashrc 416 | +++ b/bash/scripting/.bashrc 417 | @@ -9,11 +9,11 @@ fi 418 | source ~/git-completion.bash 419 | 420 | # Making SSH_AUTH_SOCK work between detaches in tmux/screen 421 | -if [[ ! -z "$SSH_AUTH_SOCK" -a "$SSH_AUTH_SOCK" != "$HOME/agent_sock" ]] 422 | +if [[ ! -z "$SSH_AUTH_SOCK" -a "$SSH_AUTH_SOCK" != "${HOME}/agent_sock" ]] 423 | then 424 | - unlink "$HOME/agent_sock" 2>/dev/null 425 | - ln -s "$SSH_AUTH_SOCK" "$HOME/agent_sock" 426 | - export SSH_AUTH_SOCK="$HOME/agent_sock" 427 | + unlink "${HOME}/agent_sock" 2>/dev/null 428 | + ln -s "$SSH_AUTH_SOCK" "${HOME}/agent_sock" 429 | + export SSH_AUTH_SOCK="${HOME}/agent_sock" 430 | fi 431 | 432 | # User specific aliases and functions 433 | diff --git a/bash/scripting/README.md b/bash/scripting/README.md 434 | index 83d3b33..6f7dc4a 100755 435 | --- a/bash/scripting/README.md 436 | +++ b/bash/scripting/README.md 437 | @@ -10,6 +10,7 @@ 438 | * `variables.sh` - simple example with variables 439 | * `if_elif_else.sh` - `if/elif/else` example 440 | * `case_in_esac.sh` - `case/in/esac` example 441 | +* `for_in.sh` - `for/in` example 442 | * `while.sh` - `while` example 443 | * `fast_diff.sh` - create `diff` and put it to some directory 444 | * `fast_diff_v2.sh` - create `diff` and add it to task through `Jira API` 445 | diff --git a/bash/scripting/case_in_esac.sh b/bash/scripting/case_in_esac.sh 446 | index 3ae0aa3..9d56408 100755 447 | --- a/bash/scripting/case_in_esac.sh 448 | +++ b/bash/scripting/case_in_esac.sh 449 | @@ -5,18 +5,18 @@ 450 | # ./case_in_esac.sh 1 2 451 | # Creating file 2 452 | 453 | -if [[ $# -ne 2 ]] 454 | +if [[ "$#" -ne 2 ]] 455 | then 456 | echo "You should specify exactly two arguments!" 457 | else 458 | - case $1 in 459 | + case "$1" in 460 | 1) 461 | - echo "Creating file $2" 462 | - touch $2 463 | + echo "Creating file ${2}" 464 | + touch "$2" 465 | ;; 466 | 2) 467 | - echo "Creating dir $2" 468 | - mkdir $2 469 | + echo "Creating dir ${2}" 470 | + mkdir "$2" 471 | ;; 472 | *) 473 | echo "Wrong value" 474 | diff --git a/bash/scripting/clean_dist.sh b/bash/scripting/clean_dist.sh 475 | index b404147..9d193e8 100755 476 | --- a/bash/scripting/clean_dist.sh 477 | +++ b/bash/scripting/clean_dist.sh 478 | @@ -2,31 +2,30 @@ 479 | 480 | # clean_dist.sh - clean dist for current theme 481 | 482 | - 483 | cleanDist() { 484 | - theme=$1 485 | + theme="$1" 486 | DIST_NAME="_dist" 487 | REPO_NAME="terminalForCoder__WSD" 488 | 489 | - path_to_assets="$HOME/$REPO_NAME/bash/core/assets" 490 | + path_to_assets="${HOME}/${REPO_NAME}/bash/core/assets" 491 | 492 | # if $1 == "" clean all _dist in each theme 493 | - if [[ -z $theme ]] 494 | + if [[ -z "$theme" ]] 495 | then 496 | theme="assets" 497 | - path_to_dist="$path_to_assets/" 498 | + path_to_dist="$path_to_assets" 499 | else 500 | - path_to_dist="$path_to_assets/$theme" 501 | + path_to_dist="${path_to_assets}/${theme}" 502 | fi 503 | 504 | - if [[ -n $(find $path_to_dist -type d -name $DIST_NAME) ]] 505 | + if [[ -n $(find "$path_to_dist" -type d -name "$DIST_NAME") ]] 506 | then 507 | # do clear stuff 508 | - find $path_to_dist -type d -name $DIST_NAME | xargs -l rm -rfv 509 | - echo "Dist of $theme have already deleted: $path_to_dist" 510 | + find "$path_to_dist" -type d -name "$DIST_NAME" | xargs -l rm -rfv 511 | + echo "Dist of ${theme} have already deleted: ${path_to_dist}" 512 | else 513 | - echo "Can not find $DIST_NAME in $theme" 514 | + echo "Can not find ${DIST_NAME} in ${theme}" 515 | fi 516 | } 517 | 518 | -cleanDist $@ 519 | +cleanDist "$@" 520 | diff --git a/bash/scripting/fast_diff.sh b/bash/scripting/fast_diff.sh 521 | index f78f4f9..98910d3 100755 522 | --- a/bash/scripting/fast_diff.sh 523 | +++ b/bash/scripting/fast_diff.sh 524 | @@ -2,16 +2,16 @@ 525 | 526 | # create diff for current branch and puts it in the file 527 | 528 | -PATH_TO_DIFF_DIR="$HOME/diff/" 529 | +PATH_TO_DIFF_DIR="${HOME}/diff/" 530 | FILE_PREFIX="diff-" 531 | FILE_EXTENTION=".diff" 532 | 533 | -branch=$1 534 | +branch="$1" 535 | 536 | -if [[ -z $branch ]] 537 | +if [[ -z "$branch" ]] 538 | then 539 | echo "Enter the branch name" 540 | else 541 | - path="$PATH_TO_DIFF_DIR$FILE_PREFIX$branch$FILE_EXTENTION" 542 | + path="${PATH_TO_DIFF_DIR}${FILE_PREFIX}${branch}${FILE_EXTENTION}" 543 | git diff origin/master origin/"$branch" > "$path" 544 | -fi 545 | \ No newline at end of file 546 | +fi 547 | diff --git a/bash/scripting/fast_diff_v2.sh b/bash/scripting/fast_diff_v2.sh 548 | index 04726ae..535ff38 100755 549 | --- a/bash/scripting/fast_diff_v2.sh 550 | +++ b/bash/scripting/fast_diff_v2.sh 551 | @@ -3,7 +3,7 @@ 552 | if [ -z "$1" ] 553 | then 554 | echo "Please, specify an issue ID" 555 | - exit 1 556 | + exit 0 557 | fi 558 | 559 | issue_id="$1" 560 | @@ -12,14 +12,14 @@ branch=$(git rev-parse --abbrev-ref HEAD) 561 | # Get the first line of git remote output and cut a path to repository 562 | repository=$(git remote -v | head -n1 | sed "s/^origin.*\/\(.*\)\.git\s(.*)/\1/") 563 | 564 | -path_to_diff="$HOME/$branch-$repository.diff" 565 | +path_to_diff="${HOME}/${branch}-${repository}.diff" 566 | 567 | diff_live () { 568 | - git diff "origin/live..master/$branch" > "$path_to_diff" 569 | + git diff "origin/live..master/${branch}" > "$path_to_diff" 570 | } 571 | 572 | attach_diff () { 573 | - curl -D- -u "":"" -X POST -H "X-Atlassian-Token: no-check" -F "file=@$path_to_diff;type=text/x-diff" "https://jira..com/rest/api/2/issue/$issue_id/attachments" 574 | + curl -D- -u "":"" -X POST -H "X-Atlassian-Token: no-check" -F "file=@${path_to_diff};type=text/x-diff" "https://jira..com/rest/api/2/issue/${issue_id}/attachments" 575 | } 576 | 577 | diff_live && attach_diff 578 | diff --git a/bash/scripting/for_in.sh b/bash/scripting/for_in.sh 579 | new file mode 100755 580 | index 0000000..bbf1cd9 581 | --- /dev/null 582 | +++ b/bash/scripting/for_in.sh 583 | @@ -0,0 +1,12 @@ 584 | +#!/bin/bash 585 | + 586 | +for i in 1 2 3 4 5 587 | +do 588 | + file_name="file${i}.txt" 589 | + if [[ -e "$file_name" ]] 590 | + then 591 | + continue 592 | + fi 593 | + echo "Creating file ${file_name}" 594 | + touch "$file_name" 595 | +done 596 | diff --git a/bash/scripting/if_elif_else.sh b/bash/scripting/if_elif_else.sh 597 | index a572b45..a263023 100755 598 | --- a/bash/scripting/if_elif_else.sh 599 | +++ b/bash/scripting/if_elif_else.sh 600 | @@ -1,13 +1,13 @@ 601 | #!/bin/bash 602 | 603 | -if [[ -f $1 ]] 604 | +if [[ -f "$1" ]] 605 | then 606 | echo "Removing file" 607 | - rm $1 608 | -elif [[ -d $1 ]] 609 | + rm "$1" 610 | +elif [[ -d "$1" ]] 611 | then 612 | echo "Removing dir" 613 | - rm -r $1 614 | + rm -r "$1" 615 | else 616 | - echo "Can't remove $1" 617 | + echo "Can't remove ${1}" 618 | fi 619 | diff --git a/bash/scripting/up_repo.sh b/bash/scripting/up_repo.sh 620 | index c92fb04..c1b04a0 100755 621 | --- a/bash/scripting/up_repo.sh 622 | +++ b/bash/scripting/up_repo.sh 623 | @@ -9,12 +9,13 @@ 624 | # get list of repositories 625 | findRepo() { 626 | REPO_NAME="terminalForCoder__WSD" 627 | - path_to_vendor_repo="$HOME/$REPO_NAME/bash/core/vendors/" 628 | + path_to_vendor_repo="${HOME}/${REPO_NAME}/bash/core/vendors/" 629 | # find all git repositories in $path_to_vendor_repo 630 | # filter by /.git 631 | - r=$(find $path_to_vendor_repo -name .git | xargs | sed "s/\\/.git//g") 632 | + r=$(find "$path_to_vendor_repo" -name .git | xargs | sed "s/\\/.git//g") 633 | + 634 | # do check repositories stuff 635 | - checkBranch $r 636 | + checkBranch "$r" 637 | } 638 | 639 | # do check repositories stuff 640 | @@ -22,25 +23,25 @@ checkBranch() { 641 | BRANCH="master" 642 | 643 | # $i is item in $r 644 | - for i in $@ 645 | + for i in "$@" 646 | do 647 | # get current branch name 648 | - b=`cd $i && git branch | grep \*` 649 | - echo "repo: $i" 650 | - echo "current brunch: $b" 651 | + b=$(cd "$i" && git branch | grep \*) 652 | + echo "repo: ${i}" 653 | + echo "current brunch: ${b}" 654 | 655 | # check branch 656 | - if [[ $b != "* master" ]] 657 | + if [[ "$b" != "* master" ]] 658 | then 659 | - echo "!Error! $i is not on $BRANCH branch" 660 | - echo "Current branch is $b" 661 | - cd $i && git checkout $BRANCH && git branch && git pull origin $BRANCH 662 | + echo "!Error! ${i} is not on ${BRANCH} branch" 663 | + echo "Current branch is ${b}" 664 | + cd "$i" && git checkout "$BRANCH" && git branch && git pull origin "$BRANCH" 665 | else 666 | echo "Do pull stuff" 667 | - cd $i && git branch && git pull origin $BRANCH 668 | + cd "$i" && git branch && git pull origin "$BRANCH" 669 | fi 670 | done 671 | echo "Done. Congratulation, you win!" 672 | } 673 | 674 | -findRepo $@ 675 | +findRepo "$@" 676 | diff --git a/bash/scripting/variables.sh b/bash/scripting/variables.sh 677 | index eed49d2..8744b16 100755 678 | --- a/bash/scripting/variables.sh 679 | +++ b/bash/scripting/variables.sh 680 | @@ -1,6 +1,6 @@ 681 | #!/bin/bash 682 | 683 | -var1=$1 684 | -var2=$2 685 | +var1="$1" 686 | +var2="$@" 687 | 688 | -echo "Arguments are \$1=$var1 \$2=$var2" 689 | +echo "Arguments are \$1=${var1} \$2=${var2}" 690 | diff --git a/bash/scripting/while.sh b/bash/scripting/while.sh 691 | index f6b7a9d..96004ac 100755 692 | --- a/bash/scripting/while.sh 693 | +++ b/bash/scripting/while.sh 694 | @@ -1,13 +1,14 @@ 695 | -# while.sh 696 | #!/bin/bash 697 | +# while.sh 698 | 699 | again="yes" 700 | + 701 | while [ "$again" = "yes" ] 702 | do 703 | echo "Please enter a name:" 704 | read name 705 | - echo "The name you entered is $name" 706 | + echo "The name you entered is ${name}" 707 | 708 | echo "Do you wish to continue? (yes/no)" 709 | read again 710 | -done 711 | \ No newline at end of file 712 | +done 713 | -------------------------------------------------------------------------------- /bash/scripting/fast_diff.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # create diff for current branch and puts it in the file 4 | # ./fast_diff.sh - how this script should called 5 | 6 | PATH_TO_DIFF_DIR="${HOME}/diff/" 7 | FILE_PREFIX="diff-" 8 | FILE_EXTENTION=".diff" 9 | 10 | branch="$1" 11 | 12 | # if "$branch" is empty 13 | if [[ -z "$branch" ]] 14 | then 15 | echo "Enter the branch name" 16 | exit 0 17 | else 18 | path="${PATH_TO_DIFF_DIR}${FILE_PREFIX}${branch}${FILE_EXTENTION}" 19 | git diff origin/master origin/"$branch" > "$path" 20 | fi 21 | -------------------------------------------------------------------------------- /bash/scripting/fast_diff_v2.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | PATH_TO_DIFF_DIR="${HOME}/diff/" 4 | FILE_EXTENTION=".diff" 5 | 6 | USER_NAME="" 7 | USER_PASSWORD="" 8 | PROJECT_NAME="" 9 | 10 | # if "$1" is empty 11 | if [ -z "$1" ] 12 | then 13 | echo "Please, specify an issue ID" 14 | exit 0 15 | fi 16 | 17 | issue_id="$1" 18 | branch=$(git rev-parse --abbrev-ref HEAD) 19 | 20 | # Get the first line of git remote output and cut a path to repository 21 | repository=$(git remote -v | head -n1 | sed "s/^origin.*\/\(.*\)\.git\s(.*)/\1/") 22 | file_name="${branch}-${repository}${FILE_EXTENTION}" 23 | 24 | # path to diff directory with .diff 25 | path_to_diff="${PATH_TO_DIFF_DIR}${file_name}" 26 | 27 | diffMaster() { 28 | git diff "origin/master origin/${branch}" > "$path_to_diff" 29 | } 30 | 31 | attachDiff() { 32 | curl -D -u "${USER_NAME}":"${USER_PASSWORD}" -X POST -H "X-Atlassian-Token: no-check" -F "file=@${path_to_diff};type=text/x-diff" "https://jira.${PROJECT_NAME}.com/rest/api/2/issue/${issue_id}/attachments" 33 | } 34 | 35 | diffMaster && attachDiff 36 | 37 | # Usage: cd && fast_diff_v2.sh 38 | # should include your company prefix (ABC, XYZ, XX, etc.) 39 | # At instance, "./fast_diff_v2.sh XYZ-135" will try to attach diff to 40 | # https://jira..com/browse/XYZ-135 41 | -------------------------------------------------------------------------------- /bash/scripting/for_in.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | for i in 1 2 3 4 5 4 | do 5 | file_name="file${i}.txt" 6 | if [[ -e "$file_name" ]] 7 | then 8 | continue 9 | fi 10 | echo "Creating file ${file_name}" 11 | touch "$file_name" 12 | done 13 | -------------------------------------------------------------------------------- /bash/scripting/hw.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | echo "Hello, world!" 4 | -------------------------------------------------------------------------------- /bash/scripting/if_elif_else.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | if [[ -f "$1" ]] 4 | then 5 | echo "Removing file ${1}" 6 | rm "$1" 7 | elif [[ -d "$1" ]] 8 | then 9 | echo "Removing dir ${1}" 10 | rm -r "$1" 11 | else 12 | echo "Can't remove ${1}" 13 | fi 14 | -------------------------------------------------------------------------------- /bash/scripting/up_repo.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # up_repo.sh - check repositories in core/vendor 4 | # find all directories that included .git 5 | # If any repo hasn't switched on master branch 6 | # than git checkout master && git branch && git pull 7 | # else git branch && git pull 8 | 9 | # get list of repositories 10 | findRepo() { 11 | REPO_NAME="terminalForCoder__WSD" 12 | PATH_TO_VENDORS_REPO="${HOME}/${REPO_NAME}/bash/core/vendors/" 13 | 14 | # find all git repositories in $PATH_TO_VENDORS_REPO 15 | # filter by /.git 16 | 17 | if [[ -e "$PATH_TO_VENDORS_REPO" ]] 18 | then 19 | r=$( find "$PATH_TO_VENDORS_REPO" -name .git | xargs | sed "s/\\/.git//g" ) 20 | else 21 | echo "Cannot find ${PATH_TO_VENDORS_REPO}" 22 | echo "Try to edit REPO_NAME in ${0}" 23 | exit 0 24 | fi 25 | 26 | # do check repositories stuff 27 | checkBranch $r 28 | } 29 | 30 | # do check repositories stuff 31 | checkBranch() { 32 | BRANCH="master" 33 | CHECK_BRANCH="* master" 34 | 35 | # $i is an item in $r 36 | for i in "$@" 37 | do 38 | # get current branch name 39 | b=$(cd "$i" && git branch | grep \*) 40 | echo "repo: ${i}" 41 | echo "current brunch: ${b}" 42 | 43 | # check branch 44 | if [[ "$b" != "$CHECK_BRANCH" ]] 45 | then 46 | echo "!Error! ${i} is not on ${BRANCH} branch" 47 | echo "Current branch is ${b}" 48 | echo "Checkout to ${BRANCH} and do git pull stuff for ${i}" 49 | cd "$i" && git checkout "$BRANCH" && git branch && git pull origin "$BRANCH" 50 | echo "" 51 | else 52 | echo "Do git pull stuff for ${i}" 53 | cd "$i" && git branch && git pull origin "$BRANCH" 54 | echo "" 55 | fi 56 | done 57 | echo "Done. Congratulation, you win!" 58 | } 59 | 60 | findRepo "$@" 61 | -------------------------------------------------------------------------------- /bash/scripting/variables.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | var1="$1" 4 | var2="$@" 5 | 6 | echo "Arguments are \$1=${var1} \$2=${var2}" 7 | -------------------------------------------------------------------------------- /bash/scripting/while.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # while.sh 3 | 4 | again="yes" 5 | 6 | while [ "$again" = "yes" ] 7 | do 8 | echo "Please enter a name:" 9 | read name 10 | echo "The name you entered is ${name}" 11 | 12 | echo "Do you wish to continue? (yes/no)" 13 | read again 14 | done 15 | -------------------------------------------------------------------------------- /contributing.md: -------------------------------------------------------------------------------- 1 | ## Contributing 2 | 3 | *1 - Fork it!* 4 | 5 | *2 - Clone* 6 | 7 | *3 - Create your feature branch:* 8 | ```bash 9 | $ git checkout -b my-new-feature origin/master 10 | ``` 11 | *4 - Commit your changes:* 12 | ```bash 13 | $ git commit -m 'Add some feature' 14 | ``` 15 | *5 - Push to the branch:* 16 | ```bash 17 | $ git push origin my-new-feature 18 | ``` 19 | *6 - Submit a pull request* 20 | -------------------------------------------------------------------------------- /screen-vs-tmux/README.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 17 | 27 | 28 | 29 |
screentmux
11 | - Cannot create independent layouts for each tab
12 | - Cannot save layouts in case of a connection’s drop
13 | - Before 4.1 version couldn’t support vertical separation
14 | - Whenever you create a new region, you also need to create a new window (Ctrl+a c), then shift to the needed directory, etc
15 | - To delete a region, you’d need to press one more key combination Ctrl+a :remove 16 |
18 | + Boasts quality default settings out-of-the-box
19 | + No need to customize the arrangement and backlight of the control pane
20 | + Supports both vertical and horizontal splits
21 | + In order to close the pane, you only need to enter exit
22 | + Can hold a remote connection by SSH*

23 |
24 | * requires some additional magic 25 |
26 |
30 | -------------------------------------------------------------------------------- /screen/.screenrc: -------------------------------------------------------------------------------- 1 | # Select whether you want to see the copyright 2 | # notice during startup. 3 | # Default is ‘on’, as you probably noticed. 4 | startup_message off 5 | 6 | #change the hardstatus settings to give an window list at the bottom of the 7 | #screen, with the time and date and with the current window highlighted 8 | hardstatus alwayslastline 9 | hardstatus string '%{= mK}%-Lw%{= KW}%50>%n%f* %t%{= mK}%+Lw%< %{= kG}%-=%D %d %M %Y %c:%s%{-}' 10 | hardstatus string '%{= kG}[ %{G}%H %{g}][%= %{= kw}%?%-Lw%?%{r}(%{W}%n*%f%t%?(%u)%?%{r})%{w}%?%+Lw%?%?%= %{g}][%{B} %d/%m %{W}%c %{g}]' 11 | 12 | defscrollback 10240 13 | 14 | termcapinfo xterm ti@:te@ 15 | 16 | chdir startup_message off vbell off caption always "%{= bb}%{+b w}%n %h %=%t %c" hardstatus alwayslastline "%-Lw%{= BW}%50>%n%f* %t%{-}%+Lw%<" 17 | -------------------------------------------------------------------------------- /screen/README.md: -------------------------------------------------------------------------------- 1 | # screen - how to use it 2 | 3 | ### Installation 4 | Open your favourite terminal and type `sudo apt-get install screen` 5 | 6 | ### Run 7 | Type `screen` in your favourite terminal 8 | 9 | ### Hot keys 10 | [Follow this link](./hotkey.md) 11 | 12 | ### Settings 13 | * Download [this file](./.screenrc) 14 | * Rename file `screenrc` -> `.screenrc` 15 | * Put it in your home directory (`~`) 16 | * Restart screen and terminal 17 | 18 | ### Enjoy it =) 19 | -------------------------------------------------------------------------------- /screen/chat-example/.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | -------------------------------------------------------------------------------- /screen/chat-example/README.md: -------------------------------------------------------------------------------- 1 | # chat-example 2 | 3 | This is the source code for a very simple chat example used for 4 | the [Getting Started](http://socket.io/get-started/chat/) guide 5 | of the Socket.IO website. 6 | 7 | Please refer to it to learn how to run this application. 8 | -------------------------------------------------------------------------------- /screen/chat-example/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Socket.IO chat 5 | 15 | 16 | 17 |
    18 |
    19 | 20 |
    21 | 22 | 23 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /screen/chat-example/index.js: -------------------------------------------------------------------------------- 1 | var app = require('express')(); 2 | var http = require('http').Server(app); 3 | var io = require('socket.io')(http); 4 | 5 | app.get('/', function(req, res){ 6 | res.sendFile(__dirname + '/index.html'); 7 | }); 8 | 9 | io.on('connection', function(socket){ 10 | 11 | console.log("user: " + socket.id + " is connect"); 12 | 13 | socket.on('chat message', function(msg){ 14 | console.log("user: " + socket.id + " has sent to you a message: " + msg); 15 | io.emit('chat message', msg); 16 | }); 17 | 18 | }); 19 | 20 | io.on("disconnect", function(socket) { 21 | console.log("user: " + socket.id + " is disconnect"); 22 | }); 23 | 24 | http.listen(3000, function(){ 25 | console.log('listening on localhost:3000'); 26 | }); 27 | -------------------------------------------------------------------------------- /screen/chat-example/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "socket-chat-example", 3 | "version": "0.0.1", 4 | "description": "my first socket.io app", 5 | "dependencies": { 6 | "express": "4.10.2", 7 | "socket.io": "1.2.0" 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /screen/hotkey.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 |
    KeyActionNotes
    Ctrl+a cnew window
    Ctrl+a nnext window
    Ctrl+a pprevious window
    Ctrl+a "select window from listI have windows list in the status line
    Ctrl+a
    Ctrl+a
    previous window viewed
    Regions
    Ctrl+a Ssplit terminal horizontally into regionsCtrl+a c to create new window there
    Ctrl+a |split terminal vertically into regionsRequires screen >= 4.1
    Ctrl+a
    :resize
    resize region
    Ctrl+a :fitfit screen size to new terminal size
    Ctrl+a
    :remove
    remove regionCtrl+a X is the same
    Ctrl+a tabMove to next region
    Session / Terminal / Buffer
    Ctrl+a ddetach screen from terminalStart screen with -r option to reattach
    Ctrl+a Aset window title
    Ctrl+a xlock sessionEnter user password to unlock
    Ctrl+a [enter scrollback/copy modeEnter to start and end copy region. Ctrl+a ] to leave this mode
    Ctrl+a ]paste bufferSupports pasting between windows
    Ctrl+a >write paste buffer to fileuseful for copying between screens
    Ctrl+a <read paste buffer from fileuseful for pasting between screens
    Other
    Ctrl+a ?show key bindings/command namesNote unbound commands only in man page
    Ctrl+a :goto screen command promptup shows last command entered
    121 | -------------------------------------------------------------------------------- /tmux/README.md: -------------------------------------------------------------------------------- 1 | # tmux - how to use it 2 | 3 | ### Installation 4 | Open your favourite terminal and type `sudo apt-get install tmux` 5 | 6 | ### Run 7 | Type `tmux` in your favourite terminal 8 | 9 | ### Hot keys 10 | [Follow this link](./hotkey.md) 11 | 12 | ### Manual 13 | Type `man tmux` 14 | 15 | ### Settings 16 | * Add this code to `.bashrc`: 17 | ```bash 18 | # Making SSH_AUTH_SOCK work between detaches in tmux/screen 19 | if [[ ! -z "$SSH_AUTH_SOCK" -a "$SSH_AUTH_SOCK" != "$HOME/agent_sock" ]] 20 | then 21 | unlink "$HOME/agent_sock" 2>/dev/null 22 | ln -s "$SSH_AUTH_SOCK" "$HOME/agent_sock" 23 | export SSH_AUTH_SOCK="$HOME/agent_sock" 24 | fi 25 | ``` 26 | * Restart tmux and terminal 27 | 28 | ### Enjoy it =) 29 | -------------------------------------------------------------------------------- /tmux/chat-example/.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | -------------------------------------------------------------------------------- /tmux/chat-example/README.md: -------------------------------------------------------------------------------- 1 | # chat-example 2 | 3 | This is the source code for a very simple chat example used for 4 | the [Getting Started](http://socket.io/get-started/chat/) guide 5 | of the Socket.IO website. 6 | 7 | Please refer to it to learn how to run this application. 8 | -------------------------------------------------------------------------------- /tmux/chat-example/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Socket.IO chat 5 | 15 | 16 | 17 |
      18 |
      19 | 20 |
      21 | 22 | 23 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /tmux/chat-example/index.js: -------------------------------------------------------------------------------- 1 | var app = require('express')(); 2 | var http = require('http').Server(app); 3 | var io = require('socket.io')(http); 4 | 5 | app.get('/', function(req, res){ 6 | res.sendFile(__dirname + '/index.html'); 7 | }); 8 | 9 | io.on('connection', function(socket){ 10 | 11 | console.log("user: " + socket.id + " is connect"); 12 | 13 | socket.on('chat message', function(msg){ 14 | console.log("user: " + socket.id + " has sent to you a message: " + msg); 15 | io.emit('chat message', msg); 16 | }); 17 | 18 | }); 19 | 20 | io.on("disconnect", function(socket) { 21 | console.log("user: " + socket.id + " is disconnect"); 22 | }); 23 | 24 | http.listen(3000, function(){ 25 | console.log('listening on localhost:3000'); 26 | }); 27 | -------------------------------------------------------------------------------- /tmux/chat-example/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "socket-chat-example", 3 | "version": "0.0.1", 4 | "description": "my first socket.io app", 5 | "dependencies": { 6 | "express": "4.10.2", 7 | "socket.io": "1.2.0" 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /tmux/hotkey.md: -------------------------------------------------------------------------------- 1 |

      Basic hotkeys for tmux

      2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 |
      KeyActionNotes
      Ctrl+b cnew window
      Ctrl+b nnext window
      Ctrl+a pprevious window
      Ctrl+b pprevious window
      Ctrl+b wselect window from listThe window list you can see in the status line
      Ctrl+b ,name window
      Panes
      Ctrl+b %vertical split
      Ctrl+b “horizontal split
      Ctrl+b oswap panes
      Ctrl+b ;go to the last pane
      Ctrl+b qshow pane numbers
      Ctrl+b xkill paneType `exit`
      Ctrl+b ←↑→↓change pane
      Session / Terminal / Buffer
      Ctrl+b [copy modeuseful when you need scroll up/down
      Ctrl+b &close current tab
      Other
      Ctrl+b ddetach current tmux
      Ctrl+b tshow big clock
      Ctrl+b ?show list shortcuts
      Ctrl+b :promptSometimes it is useful
      Ctrl+b idisplay message
      123 | --------------------------------------------------------------------------------