Skip to content

Instantly share code, notes, and snippets.

View loloof64's full-sized avatar
💻
Developing projects in Flutter

laurent bernabé loloof64

💻
Developing projects in Flutter
  • Bayonne (France) in Pyrénées Atlantiques (64)
View GitHub Profile
@loloof64
loloof64 / index.html
Created September 6, 2021 16:24
CSS Course Udemy Grid #2
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>CSS Course</title>
<link rel="stylesheet" href="main.css">
</head>
<body>
@loloof64
loloof64 / index.html
Created September 6, 2021 15:51
CSS Course Udemy Grid
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>CSS Course</title>
<link rel="stylesheet" href="main.css">
</head>
<body>
@loloof64
loloof64 / shared.css
Created September 6, 2021 13:25
CSS course Udemy exercise (flexbox)
#product-overview {
background: linear-gradient(to top, rgba(80, 68, 18, 0.6) 10%, transparent),
url("images/freedom.jpg") center/cover no-repeat border-box,
#ff1b68;
/* background-image: url("freedom.jpg");
background-size: cover;
background-position: left 10% bottom 20%; */
/* background-repeat: no-repeat;
background-origin: border-box;
background-clip: border-box; */
@loloof64
loloof64 / DragNDrop.kt
Last active February 3, 2021 18:17
Jetpack compose alpha11 Drag and Drop in a strange checker board
import androidx.compose.foundation.Canvas
import androidx.compose.foundation.background
import androidx.compose.foundation.layout.size
import androidx.compose.runtime.Composable
import androidx.compose.runtime.getValue
import androidx.compose.runtime.setValue
import androidx.compose.runtime.mutableStateOf
import androidx.compose.runtime.remember
import androidx.compose.ui.Modifier
import androidx.compose.ui.geometry.Offset
@loloof64
loloof64 / Animation.kt
Last active February 9, 2021 18:30
Jetpack compose alpha 11 : Simple yellow ball running in a red background [Both finite and infinite versions]
import androidx.compose.animation.core.*
import androidx.compose.foundation.Canvas
import androidx.compose.foundation.background
import androidx.compose.foundation.layout.size
import androidx.compose.runtime.Composable
import androidx.compose.runtime.getValue
import androidx.compose.runtime.remember
import androidx.compose.ui.Modifier
import androidx.compose.ui.geometry.Offset
import androidx.compose.ui.graphics.Color
@loloof64
loloof64 / chess_board_component.rs
Created January 17, 2021 10:46
Chess board widget attempt (Iced)
use pleco::Board;
use iced::{
canvas::{Cache, Cursor, Geometry, Path, Program},
Canvas, Color, Element, Length, Point, Rectangle,
};
#[derive(Debug, Clone, Copy)]
enum Message {}
@loloof64
loloof64 / chess_board.rs
Created January 15, 2021 08:51
Chess board widget iced
use iced_graphics::{
Backend, Defaults, Font, HorizontalAlignment, Primitive, Renderer, VerticalAlignment,
};
use iced_native::{
event::{Event, Status},
layout,
widget::svg::Handle,
Background, Clipboard, Color, Element, Hasher, Layout, Length, Point, Rectangle, Size, Vector,
Widget,
{
@loloof64
loloof64 / index.html (packages)
Created December 11, 2020 16:54
Css course - Udemy - Exercise 3
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>uHost</title>
<link rel="shortcut icon" href="favicon.png">
<link href="https://fonts.googleapis.com/css?family=Montserrat:400,700" rel="stylesheet">
<link rel="stylesheet" href="../shared.css">
@loloof64
loloof64 / index.html
Created December 11, 2020 09:58
Css course - Udemy tutorial - exercise 2
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>CSS Course</title>
<link rel="stylesheet" href="main.css">
</head>
<body>
@loloof64
loloof64 / DragAndDropWithAnimation.kt
Last active December 17, 2020 01:49
Drag and drop then animation for going back (Jetpack compose 1.0.0-alpha07) : Thank you Joost Klitsie for your help on the Slack channel :)
@Preview
@Composable
fun DragAndDropComponent() {
Column(modifier = Modifier.size(300.dp).background(Color.Red)) {
val x = animatedFloat(150f)
val y = animatedFloat(150f)
val bouncySpring = SpringSpec(
dampingRatio = DampingRatioMediumBouncy,
stiffness = StiffnessLow,
visibilityThreshold = DefaultDisplacementThreshold)