Skip to content

Instantly share code, notes, and snippets.

View shvets-sergey's full-sized avatar

Sergey Shvets shvets-sergey

View GitHub Profile
@shvets-sergey
shvets-sergey / jst.clj
Created August 14, 2023 00:54
Implements a hiccup-like compiler into js templates
(ns jst
(:require [camel-snake-kebab.core :as csk]
[clojure.string :as string]
[hyperfiddle.rcf :refer [tests]]))
(hyperfiddle.rcf/enable!)
;; Implements a hiccup compiler into js-template.
;;
;; Usage: (jst cljs-symbol? template-fn? hiccup), where:
;; cljs-symbol - what symbol implements js-template in cljs (default: shadow.cljs.modern/js-template)
@shvets-sergey
shvets-sergey / index.html
Created May 27, 2016 04:18
Global mouse hover for any element in filter
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Hover event test</title>
</head>
<body>
<div style="min-height: 500px; width: 100%" class="root">
This is the root
<div class="child"> This one is a child div that contains some <i>interesting</i> elements... <b>VERY</b>
{% extends 'base.html' %}
{% import 'macros.html' as macros %}
{% block content %}
<div class="row">
<div class="col-xs-12 col-md-3 col-sm-4 col-sm-offset-4 col-md-offset-4 col-lg-3 col-lg-offset-4">
<div class="login-message">
Login to AwesomeService!
</div>
{% call macros.render_form(form, action_url=url_for('login_view'), action_text='Login',
class_='login-form') %}