frontend

How to integrate OPENID auth into a REST api and front-end framework architecture

不想你离开。 提交于 2020-01-03 10:47:14
问题 I am currently making a site that requires a user to log in with Steam before they can use the rest of my website's functionality. Steam currently only supports OPENID for authentication. The way that I have done it is in these following steps: User presses on "Log in with Steam" button My front-end redirects to steamcommunity.com If the user logged in successsfully, the user's browser should redirect to my backend, I then add the user to the database (if they are not in it already) and

VueJS display grouped array of objects

青春壹個敷衍的年華 提交于 2020-01-03 02:29:05
问题 I'm fetching a list of countries from the API and I want to display them in groups by subregion (continent). Like that: API gives me a response which is an array of objects (countries) and for each object there is a key called 'subregion' - I want to group by that key. I use lodash for grouping, but maybe there is a Vue method I'm not familiar with. My JS code: var app = new Vue({ el: '#app', data: { countries: null, }, created: function () { this.fetchData(); }, methods: { fetchData:

Client Side: HTML, DOM and CSS?

此生再无相见时 提交于 2020-01-01 20:00:52
问题 I have not worked extensively on Client Side/Front End of the Application and I am trying to read about HTML, CSS and DOM but somehow am not able to figure out difference between them and so would really appreciate if someone can: Explain me in simple English how does HTML, CSS and DOM work ? How do they relate to each other from Client Side Technology point of view ? Update I have gone through wikipedia articles but not able to clearly understand working of DOM. Thanks. 回答1: HTML is what is

Client Side: HTML, DOM and CSS?

依然范特西╮ 提交于 2020-01-01 20:00:31
问题 I have not worked extensively on Client Side/Front End of the Application and I am trying to read about HTML, CSS and DOM but somehow am not able to figure out difference between them and so would really appreciate if someone can: Explain me in simple English how does HTML, CSS and DOM work ? How do they relate to each other from Client Side Technology point of view ? Update I have gone through wikipedia articles but not able to clearly understand working of DOM. Thanks. 回答1: HTML is what is

customize the style of rc-time-picker

被刻印的时光 ゝ 提交于 2020-01-01 19:28:12
问题 I am using rc-time-picker package for my project, but I have problem with customizing the style of pop-up of my time picker component. Here is the screenshot of my component: Firstly, I need to change the background-color of time item in the time li from light grey (in the screenshot) to #edeffe when time is hovered and selected . The following is my code: import React from "react"; import TimePicker from "rc-time-picker"; import "rc-time-picker/assets/index.css"; import styled from 'styled

React-Router v4 rendering wrong component but matching correctly

旧巷老猫 提交于 2020-01-01 18:53:51
问题 I've got a sidebar with two buttons, 'test' and 'about'. Test (rocket icon) is rendered at '/test', and About (home icon) is rendered at '/'. They're both located at the root of the app and are nested within a component. When I start at '/' and click the Link to="/test" it always loads the 'About' component, and when I check the props for the componentDidMount of 'About', the match object contains match data for "/test". Only when I refresh does it render the proper component, 'Test', again.

How to create a bar that stays on top when scrolling?

半城伤御伤魂 提交于 2020-01-01 07:20:45
问题 I'm trying to create a div that stays fixed on top when a user scrolls down and when he scrolls back up, goes back to the original position. I need this exact same behaviour that 9gag offers -> http://9gag.com/gag/293756 Thanks! 回答1: Do the following: Create a scroll event handler on the $(window) . In this event handler, check if the user has scrolled lower than the top of the element you always want in view. You can use offest and scrollTop methods to do this. If yes, set the element to

How would you create a JQuery / svg click-drag select outline effect?

☆樱花仙子☆ 提交于 2020-01-01 05:14:30
问题 Not sure exactly what to call it, but I am looking for a way to create a dotted outline/selection box effect via javascript/svg when you click and drag over an area, and then goes away on mouseUp (that could be added if it wasn't an original part) . A jQuery library would be nice if it exists. I've done some looking around, and haven't found exactly what I am looking for. I guess the theory would be get the coord from the first click, track the mouse coord moment and adjust the box

Fixed div inside scrolling div

↘锁芯ラ 提交于 2020-01-01 03:56:09
问题 I need to make the main of my site that has 980px width and 500px height (class="main") be fixed only when the mouse is over a scrolling div and has a height of 1500px and a width of 100% (class="container-scroll"), that is inside other div with height of 500px. (class="container") Pretty confused, right? I made a fiddle, I'm almost there, the problem is that if I set up the main to fixed, it will scroll with the page , not just inside the div This is my fiddle: https://jsfiddle.net/8oj0sge4

Micro frontend architecture advice

江枫思渺然 提交于 2019-12-31 19:16:31
问题 We have several web applications that we wish to present under one single page application. We are looking for a micro-frontend architecture/framework to use. As we see it, these are our options for implementation: Using the single-spa open source framework: https://github.com/CanopyTax/single-spa Using Iframes (friendly Iframes) the hosting application (the shell) and loading each application according to the current url. Writing our own Javascript framework Other? The current state is a