Skip to content

Instantly share code, notes, and snippets.

View anamolsoman's full-sized avatar
🏠
Working from home

Anamol Soman anamolsoman

🏠
Working from home
View GitHub Profile
@anamolsoman
anamolsoman / login.ftl
Last active February 18, 2024 18:13
keycloak customized login page
<#import "template.ftl" as layout>
<@layout.registrationLayout displayInfo=social.displayInfo displayWide=(realm.password && social.providers??); section>
<#if section = "header">
<#-- ${msg("doLogIn")} -->
<#elseif section = "form">
<v-card class="background" flat>
<v-card-title
>
<v-spacer></v-spacer
>
@anamolsoman
anamolsoman / nuxt.config.js
Last active December 20, 2021 06:54
How To Integrate Keycloak in NuxtJs
auth: {
strategies: {
local: false,
keycloak: {
scheme: "oauth2",
endpoints: {
authorization:
process.env.KEYCLOAK_API_URL +
"auth/realms/test-realm/protocol/openid-connect/auth",
token:
@anamolsoman
anamolsoman / FileDownload.vue
Last active July 15, 2020 14:26
Force File download in Vuejs
<script>
import axios from 'axios'
export default {
data() {
return {
filesrcs: [
{
title: 'AadharCard.png',
src: require('~/assets/image/home/demo1.jpg'),
},
@anamolsoman
anamolsoman / FileDownloadLayout.vue
Created July 15, 2020 14:13
Force file Download in vuejs
<template>
<v-container grid-list-xl>
<v-layout justify-center wrap>
<v-flex xs12 md8>
<v-card raised>
<v-card-title class="blue white--text">Download Files</v-card-title>
<br />
<v-container py-0>
<v-layout wrap>
<v-flex v-for="(filesrc, index) in filesrcs" :key="index" xs12 md4>
@anamolsoman
anamolsoman / FileDownloadLayout.vue
Created July 15, 2020 14:10
Force file Download in vuejs
<template>
<v-container grid-list-xl>
<v-layout justify-center wrap>
<v-flex xs12 md8>
<v-card raised>
<v-card-title class="blue white--text">Download Files</v-card-title>
<br />
<v-container py-0>
<v-layout wrap>
<v-flex v-for="(filesrc, index) in filesrcs" :key="index" xs12 md4>
@anamolsoman
anamolsoman / Profilephotojs.vue
Created July 12, 2020 07:07
Image crop and upload
<script>
import { mapState } from 'vuex'
import axios from 'axios'
import VueCropper from 'vue-cropperjs'
import 'cropperjs/dist/cropper.css'
export default {
components: { VueCropper },
props: ['image_name'],
data() {
return {
@anamolsoman
anamolsoman / Profilephoto.vue
Created July 12, 2020 07:00
Image crop and upload
<template>
<div>
<div size="120" class="user">
<v-img :src="image_name" class="profile-img"></v-img>
<v-icon class="icon primary white--text" @click="$refs.FileInput.click()">mdi-upload</v-icon>
<input ref="FileInput" type="file" style="display: none;" @change="onFileSelect" />
</div>
<v-dialog v-model="dialog" width="500">
<v-card>
<v-card-text>
@anamolsoman
anamolsoman / Maharashtra-svg.vue
Created July 9, 2020 07:27
Script file maharashtra svg map
<script>
export default {
data() {
return {
title: '',
id: '',
}
},
methods: {
getInfo(e) {
@anamolsoman
anamolsoman / maharashtra-map.vue
Last active March 4, 2022 19:28
Maharashtra svg map
<svg
id="chart"
viewBox="0 0 432 488"
preserveAspectRatio="xMidYMid meet"
pointer-events="auto"
width="600px"
>
<g class="regions">
<path
id="Gondia"
@anamolsoman
anamolsoman / loading.vue
Last active July 8, 2020 07:49
Custome Loading Component in Nuxt js
<template lang="html">
<v-overlay v-if="loading" :value="overlay">
<v-progress-circular
indeterminate
size="64"
color="primary"
></v-progress-circular>
</v-overlay>
</template>