This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| calculateItems() { | |
| let currentPage = 3; //needs to be get dynamically | |
| let itemsTotal = 25; | |
| const maxItemsPerPage = 12; | |
| const lastPage = Math.trunc(itemsTotal / maxItemsPerPage) + 1; | |
| let shownFrom, shownTo; | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| img { | |
| background-color: #ccc; | |
| background-size: 30%; | |
| text-align: center; | |
| line-height: 7; | |
| color: #000; | |
| } | |
| img:after { | |
| content: ""; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class DoubleDndedArray { | |
| constructor(arr) { | |
| this.arr = arr; | |
| } | |
| firstToEnd() { | |
| const el = this.arr.shift(); | |
| this.arr.push(el); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class Queue { | |
| constructor() { | |
| // Record the length of the queue , size | |
| this.count = 0; | |
| // Record the first element of the queue |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /********** fonts **********/ | |
| @font-face { | |
| font-family: 'Inter'; | |
| src: | |
| url(':f:inter-v8-latin-regular.woff2') format('woff2'), | |
| url(':f:inter-v8-latin-regular.woff') format('woff'); | |
| font-weight: normal; | |
| font-style: normal; | |
| font-display: swap; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const express = require('express'); | |
| const bodyParser = require('body-parser'); | |
| const app = express(); | |
| app.use(bodyParser.urlencoded({ extended: true })); | |
| app.set('view engine', 'ejs'); | |
| app.listen(3000, () => { | |
| console.log('app on port 3000'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| GIT shortcuts | |
| git add app && git commit -m "Initial dist subtree commit" | |
| Add branch to host on GH pages | |
| git subtree push --prefix app origin gh-page | |
| *** |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @mixin font($font_name, $file_name, $weight, $style) { | |
| @font-face { | |
| font-family: $font_name; | |
| font-weight: #{$weight}; | |
| font-style: #{$style}; | |
| font-display: swap; | |
| src: url('../fonts/#{$file_name}.woff2') format('woff2'); | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <title>Document</title> | |
| </head> |
NewerOlder