Skip to content

Instantly share code, notes, and snippets.

View shishirraven's full-sized avatar
🖥️
Coding

Shishir Raven shishirraven

🖥️
Coding
View GitHub Profile
@shishirraven
shishirraven / main.yml
Created May 7, 2024 10:32
How to create a FTP Deployment action.
on: push
name: 🚀 Deploy website on push
jobs:
web-deploy:
name: 🎉 Deploy
runs-on: ubuntu-latest
steps:
- name: 🚚 Get latest code
uses: actions/checkout@v2
function highlightElements() {
const pageWidth = document.body.clientWidth;
const styleTag = document.createElement('style');
styleTag.innerHTML = `
.highlight {
border: 2px solid red;
background-color: yellow;
}
`;
document.head.appendChild(styleTag);
"supports": {
"__experimentalOnEnter": true,
"__experimentalSettings": true,
"align": ["wide", "full"],
"anchor": true,
"ariaLabel": true,
"html": false,
"color": {
"gradients": true,
"link": true,
@shishirraven
shishirraven / adding field
Last active October 14, 2022 14:57
Adding a Phone number to the wordPress users.
lwp_register_rest_route
add_action('edit_user_profile_update', array(&$this, 'lwp_update_phonenumber_field'));
add_action('personal_options_update', array(&$this, 'lwp_update_phonenumber_field'));
add_action('edit_user_profile', array(&$this, 'lwp_add_phonenumber_field'));
add_action('show_user_profile', array(&$this, 'lwp_add_phonenumber_field'));
function lwp_add_phonenumber_field($user)
{
<script>
import "@/../node_modules/bravevue/dist/style.css";
import slide1 from '@/components/slides/slide1.vue'
import slide2 from '@/components/slides/slide2.vue'
import slide3 from '@/components/slides/slide3.vue'
import {BraveSlider} from 'bravevue'
export default{
components:
{
BraveSlider,
@shishirraven
shishirraven / BraveTabs.vue
Created July 5, 2022 17:48
Brave Tabs Example File
<template>
<BraveTabs ref="bravetabref"
class="text-black dark:text-white p-10"
tabs-content-class="border p-10 dark:bg-slate-800"
tab-button-class="px-3 py-2 cursor-pointer rounded-t-lg mr-0 dark:bg-slate-900 bg-gray-50 hover:dark:bg-slate-800 hover:bg-gray-200"
tab-button-active-class="px-3 py-2 shadow-inner-sm -mb-px border rounded-t-lg border-b-0 dark:bg-slate-800 bg-white "
v-bind:tabs="['upload','filemanager']"
initialTab="upload">
<!-- ================================================================ -->
<!-- UPLOAD PANEL -->
@shishirraven
shishirraven / BraveSelect.vue
Last active July 5, 2022 17:57
BraveSelect Example File
<template>
<BraveSelect
class="relative inline-block"
v-model="selectValue"
:options="options"
dropdown-class="shadow rounded border absolute z-10 dark:bg-slate-900 bg-white right-0 left-0"
>
<template v-slot:button="{ selectedValue }">
<div
role="button"
@shishirraven
shishirraven / BraveGistEmbed.vue
Created June 20, 2022 19:31
Brave Gist Embed Example
<template>
<main class="flex-1 lg:p-16">
<div class="py-6">
<div class="max-w-7xl mx-auto px-4 sm:px-6 md:px-8">
<h1 class="text-4xl font-semibold mb-10">
<i class="bi me-2 bi-github"></i>
Brave Gist Embed
</h1>
<p>
You can use this Component to embed Github Gist, right now it solves
@shishirraven
shishirraven / BraveDropMenu.vue
Created June 20, 2022 19:21
Brave Drop Menu Example
<template>
<BraveDropMenu ref="dropmenu2" class="me-3">
<template #button>
<div role="button"
class="dark:bg-slate-900 dark:hover:bg-slate-800 border dark:border-slate-500 border-slate-200 p-2 px-4 mr-5
rounded-lg shadow-sm dark:text-white bg-white hover:shadow dark:hover:border-slate-500 hover:border-slate-300"
>Documentation <i class="bi bi-chevron-down"></i></div>
</template>
<template #menu>
<div class="w-44 dark:bg-slate-900 border dark:border-slate-800 py-2
@shishirraven
shishirraven / gist:162063a800edb7e3c3020a2b6c8afe4d
Created June 19, 2022 22:56
dialog btton for open centered with single action
<button
type="button"
@click="$refs.bravedialog2.show()"
class="my-5 text-white bg-blue-700 hover:bg-blue-800 focus:ring-4 focus:ring-blue-300 font-medium rounded-lg text-sm px-5 py-2.5 mr-2 mb-2 dark:bg-blue-600 dark:hover:bg-blue-700 focus:outline-none dark:focus:ring-blue-800"
>
Open Centered with single action
</button>