-
You will need rails 6 installed. (GoRails)[https://gorails.com/setup/] is the best resource I have found to date.
-
You will need the (heroku cli)[https://devcenter.heroku.com/articles/heroku-cli#download-and-install] tool installed.
-
You will need NodeJS installed: https://nodejs.org/en/download/
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
| // For Firefox's Web Console, creates the functions showAsPrint() and undoShowAsPrint() | |
| // to roughly emulate print media and revert | |
| function showAsPrint(){ | |
| var docSS = document.styleSheets, ss, oldMedia, newMedia, rules; | |
| var p2s = function(media){ | |
| if (media.indexOf('all') > -1) return media; //no need to change | |
| if (media == 'print') return 'all, wasprint'; //show on screen, too | |
| if (media.indexOf('print') > -1 && media.indexOf('screen') > -1) return media; //no need to change | |
| if (media == 'screen') return 'wasscreen'; //hide these rules | |
| if (media.indexOf('screen') > -1) return media.replace('screen', 'wasscreen'); //hide these rules |
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
| <template> | |
| <nav id="pagination"> | |
| <ul class="page-numbers" v-if="$store.state.totalPageCount"> | |
| <li v-for="num in this.pageNumbers" v-if="num != null" v-bind:style="{ width: (100 / pageNumberCount) + '%' }"> | |
| <nuxt-link v-if="num != $route.query.page && num != currentPage" :to="{ path: '/', query: { page: num } }">{{ num }}</nuxt-link> | |
| <span v-else>{{ num }}</span> | |
| </li> | |
| </ul> | |
| <ul class="page-guides" v-if="this.$store.state.totalPageCount != 1"> | |
| <li> |
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
| # .railsrc | |
| -B #Skip Bundle | |
| -T #Skip Test-Unit | |
| -d postgresql #Use postgres |
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
| async function fetchAndUpdatePosts() { | |
| const posts = await fetchPosts().catch(() => { | |
| console.log('error in fetching posts'); | |
| }); | |
| if (posts) { | |
| doSomethingWithPosts(posts); | |
| } | |
| } |
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
| <% flash.each do |type, message| %> | |
| <div class="alert <%= bootstrap_class_for(type) %> fade in"> | |
| <button class="close" data-dismiss="alert">×</button> | |
| <%= message %> | |
| </div> | |
| <% end %> |
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
| <?php | |
| /** | |
| * If the aria-label argument has been specified in a wp_dropdown_categories() call, | |
| * output the aria-label option in the <select> | |
| * | |
| * @since 1.0.0 | |
| * | |
| * @param string $output HTML Output | |
| * @param array $arguments wp_dropdown_category() arguments | |
| * @return string Modified HTML Output |
- Website: https://stimulusjs.org/
- GitHub repo: https://github.com/stimulusjs/stimulus
- Handbook: https://stimulusjs.org/handbook/introduction
- Discourse: https://discourse.stimulusjs.org/
initialize: once, when the controller is first instantiatedconnect: anytime the controller is connected to the DOM