haml and markdown template engines added
This commit is contained in:
parent
f465b2270e
commit
2fb13d873e
16 changed files with 677 additions and 174 deletions
17
docs/project structure.lmay
Normal file
17
docs/project structure.lmay
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
# lmay = yaml.
|
||||
# in vs code, Open Settings (JSON):
|
||||
#
|
||||
# "files.associations":
|
||||
# {
|
||||
# "*.lmay":"yaml"
|
||||
# },
|
||||
# or feel free to rename it ^_^
|
||||
folders:
|
||||
lib:
|
||||
description: all sources
|
||||
|
||||
files:
|
||||
lib/lp_web/:
|
||||
router.ex:
|
||||
notes:
|
||||
|
||||
2
docs/skills/elixir
Normal file
2
docs/skills/elixir
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
mix.exs -> put deps here
|
||||
func (a)+b -> func((a)+b) ;brackets are added implicitly
|
||||
10
docs/skills/phoenix.lmay
Normal file
10
docs/skills/phoenix.lmay
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
version: 1.5.5
|
||||
|
||||
facts:
|
||||
- you need controller, in order to serve route
|
||||
- you also need view
|
||||
- if you want html - must rename it to html.eex and add controller+view
|
||||
- minimal /lib/templates/layout/root is "<%= @inner_content %>"
|
||||
- you get one generated for you, when running "mix phx.gen.live "
|
||||
- live uses websockets
|
||||
|
||||
197
lp/assets/static/js/old.js
Normal file
197
lp/assets/static/js/old.js
Normal file
|
|
@ -0,0 +1,197 @@
|
|||
//__________________ https://gamecult.games/user/plugins/backtotop/assets/js/return-to-top.js
|
||||
// ===== Scroll to Top ====
|
||||
$(window).scroll(function () {
|
||||
if ($(this).scrollTop() >= 50) { // If page is scrolled more than 50px
|
||||
$('#return-to-top').fadeIn(200); // Fade in the arrow
|
||||
} else {
|
||||
$('#return-to-top').fadeOut(200); // Else fade out the arrow
|
||||
}
|
||||
});
|
||||
$('#return-to-top').click(function () { // When arrow is clicked
|
||||
$('body,html').animate({
|
||||
scrollTop: 0 // Scroll to top of body
|
||||
}, 500);
|
||||
});
|
||||
// __________________ https://gamecult.games/user/plugins/simplesearch/js/simplesearch.js
|
||||
((function(){
|
||||
if (!Element.prototype.matches) {
|
||||
Element.prototype.matches = Element.prototype.msMatchesSelector || Element.prototype.webkitMatchesSelector;
|
||||
}
|
||||
var findAncestor = function(el, selector) {
|
||||
while ((el = el.parentElement) && !((el.matches || el.matchesSelector).call(el, selector))) {}
|
||||
return el;
|
||||
};
|
||||
|
||||
var fields = document.querySelectorAll('input[name="searchfield"][data-search-input]');
|
||||
Array.prototype.forEach.call(fields, function(field) {
|
||||
var form = findAncestor(field, 'form[data-simplesearch-form]'),
|
||||
min = field.getAttribute('data-min') || false,
|
||||
location = field.getAttribute('data-search-input'),
|
||||
separator = field.getAttribute('data-search-separator');
|
||||
|
||||
if (min) {
|
||||
var invalid = field.getAttribute('data-search-invalid');
|
||||
field.addEventListener('keydown', function() {
|
||||
field.setCustomValidity(field.value.length >= min ? '' : invalid);
|
||||
});
|
||||
}
|
||||
|
||||
form.addEventListener('submit', function(event) {
|
||||
event.preventDefault();
|
||||
|
||||
if (field.checkValidity()) {
|
||||
window.location.href = location + separator + field.value;
|
||||
}
|
||||
});
|
||||
});
|
||||
})());
|
||||
|
||||
//_______________ https://gamecult.games/user/themes/klb4/js/jquery.treemenu.js
|
||||
/*
|
||||
treeMenu - jQuery plugin
|
||||
version: 0.6
|
||||
|
||||
Copyright 2014 Stepan Krapivin
|
||||
|
||||
*/
|
||||
(function($){
|
||||
$.fn.treemenu = function(options) {
|
||||
options = options || {};
|
||||
options.delay = options.delay || 0;
|
||||
options.openActive = options.openActive || false;
|
||||
options.closeOther = options.closeOther || false;
|
||||
options.activeSelector = options.activeSelector || ".active";
|
||||
|
||||
this.addClass("treemenu");
|
||||
|
||||
if (!options.nonroot) {
|
||||
this.addClass("treemenu-root");
|
||||
}
|
||||
|
||||
options.nonroot = true;
|
||||
|
||||
this.find("> li").each(function() {
|
||||
e = $(this);
|
||||
var subtree = e.find('> ul');
|
||||
var button = e.find('.toggler').eq(0);
|
||||
|
||||
if(button.length == 0) {
|
||||
// create toggler
|
||||
var button = $('<span>');
|
||||
button.addClass('toggler');
|
||||
e.prepend(button);
|
||||
}
|
||||
|
||||
if(subtree.length > 0) {
|
||||
subtree.hide();
|
||||
|
||||
e.addClass('tree-closed');
|
||||
|
||||
e.find(button).click(function() {
|
||||
var li = $(this).parent('li');
|
||||
|
||||
if (options.closeOther && li.hasClass('tree-closed')) {
|
||||
var siblings = li.parent('ul').find("li:not(.tree-empty)");
|
||||
siblings.removeClass("tree-opened");
|
||||
siblings.addClass("tree-closed");
|
||||
siblings.removeClass(options.activeSelector);
|
||||
siblings.find('> ul').slideUp(options.delay);
|
||||
}
|
||||
|
||||
li.find('> ul').slideToggle(options.delay);
|
||||
li.toggleClass('tree-opened');
|
||||
li.toggleClass('tree-closed');
|
||||
li.toggleClass(options.activeSelector);
|
||||
});
|
||||
|
||||
$(this).find('> ul').treemenu(options);
|
||||
} else {
|
||||
$(this).addClass('tree-empty');
|
||||
}
|
||||
});
|
||||
|
||||
if (options.openActive) {
|
||||
var cls = this.attr("class");
|
||||
|
||||
this.find(options.activeSelector).each(function(){
|
||||
var el = $(this).parent();
|
||||
|
||||
while (el.attr("class") !== cls) {
|
||||
el.find('> ul').show();
|
||||
if(el.prop("tagName") === 'UL') {
|
||||
el.show();
|
||||
} else if (el.prop("tagName") === 'LI') {
|
||||
el.removeClass('tree-closed');
|
||||
el.addClass("tree-opened");
|
||||
el.show();
|
||||
}
|
||||
|
||||
el = el.parent();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
return this;
|
||||
}
|
||||
})(jQuery);
|
||||
|
||||
//____________________________ https://gamecult.games/user/themes/klb4/js/site.js
|
||||
var isTouch = window.DocumentTouch && document instanceof DocumentTouch;
|
||||
|
||||
function scrollHeader() {
|
||||
// Has scrolled class on header
|
||||
var zvalue = $(document).scrollTop();
|
||||
if ( zvalue > 75 )
|
||||
$("#header").addClass("scrolled");
|
||||
else
|
||||
$("#header").removeClass("scrolled");
|
||||
}
|
||||
|
||||
function parallaxBackground() {
|
||||
$('.parallax').css('background-positionY', ($(window).scrollTop() * 0.3) + 'px');
|
||||
}
|
||||
|
||||
jQuery(document).ready(function($){
|
||||
|
||||
scrollHeader();
|
||||
|
||||
// Scroll Events
|
||||
if (!isTouch){
|
||||
$(document).scroll(function() {
|
||||
scrollHeader();
|
||||
parallaxBackground();
|
||||
});
|
||||
};
|
||||
|
||||
// Touch scroll
|
||||
$(document).on({
|
||||
'touchmove': function(e) {
|
||||
scrollHeader(); // Replace this with your code.
|
||||
}
|
||||
});
|
||||
|
||||
//Smooth scroll to start
|
||||
$('#to-start').click(function(){
|
||||
var start_y = $('#start').position().top;
|
||||
var header_offset = 45;
|
||||
window.scroll({ top: start_y - header_offset, left: 0, behavior: 'smooth' });
|
||||
return false;
|
||||
});
|
||||
|
||||
//Smooth scroll to top
|
||||
$('#to-top').click(function(){
|
||||
window.scroll({ top: 0, left: 0, behavior: 'smooth' });
|
||||
return false;
|
||||
});
|
||||
|
||||
// Responsive Menu
|
||||
$('#toggle').click(function () {
|
||||
$(this).toggleClass('active');
|
||||
$('#overlay').toggleClass('open');
|
||||
$('body').toggleClass('mobile-nav-open');
|
||||
});
|
||||
|
||||
// Tree Menu
|
||||
$(".tree").treemenu({delay:300});
|
||||
|
||||
});
|
||||
|
|
@ -10,6 +10,8 @@ use Mix.Config
|
|||
config :lp,
|
||||
ecto_repos: [Lp.Repo]
|
||||
|
||||
|
||||
|
||||
# Configures the endpoint
|
||||
config :lp, LpWeb.Endpoint,
|
||||
url: [host: "localhost"],
|
||||
|
|
@ -26,6 +28,13 @@ config :logger, :console,
|
|||
# Use Jason for JSON parsing in Phoenix
|
||||
config :phoenix, :json_library, Jason
|
||||
|
||||
|
||||
config :phoenix, :template_engines,
|
||||
md: PhoenixMarkdown.Engine,
|
||||
haml: PhoenixHaml.Engine
|
||||
# see also: https://github.com/chrismccord/phoenix_haml
|
||||
|
||||
|
||||
# Import environment specific config. This must remain at the bottom
|
||||
# of this file so it overrides the configuration defined above.
|
||||
import_config "#{Mix.env()}.exs"
|
||||
|
|
|
|||
|
|
@ -61,7 +61,7 @@ config :lp, LpWeb.Endpoint,
|
|||
~r"priv/static/.*(js|css|png|jpeg|jpg|gif|svg)$",
|
||||
~r"priv/gettext/.*(po)$",
|
||||
~r"lib/lp_web/(live|views)/.*(ex)$",
|
||||
~r"lib/lp_web/templates/.*(eex)$"
|
||||
~r"lib/lp_web/templates/.*(eex|haml|md)$"
|
||||
]
|
||||
]
|
||||
|
||||
|
|
|
|||
|
|
@ -16,9 +16,10 @@ defmodule LpWeb.Router do
|
|||
|
||||
scope "/", LpWeb do
|
||||
pipe_through :browser
|
||||
get "old", OldController, :index
|
||||
get "/", OldController, :index
|
||||
# get "old", OldController, :index
|
||||
|
||||
live "/", PageLive, :index
|
||||
# live "/", PageLive, :index
|
||||
end
|
||||
|
||||
# Other scopes may use custom stacks.
|
||||
|
|
|
|||
|
|
@ -1 +1,13 @@
|
|||
<%= @inner_content %>
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<%= @inner_content %>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
|||
|
|
@ -1 +0,0 @@
|
|||
Must be html.eex
|
||||
1
lp/lib/lp_web/templates/old/old.html.eex_first
Normal file
1
lp/lib/lp_web/templates/old/old.html.eex_first
Normal file
|
|
@ -0,0 +1 @@
|
|||
Eex has first priority
|
||||
185
lp/lib/lp_web/templates/old/old.html.md
Normal file
185
lp/lib/lp_web/templates/old/old.html.md
Normal file
|
|
@ -0,0 +1,185 @@
|
|||
---
|
||||
title: 'GameCult Labor Platform'
|
||||
anchors:
|
||||
active: false
|
||||
tagtitle: h2
|
||||
---
|
||||
|
||||
# Architecture
|
||||
|
||||
The Labor Platform is available on our website as a web app. Users can simply login using their Github account or create a GameCult account (same account used in our games). Pages and actions in this section all take place on our website, which communicates with an application and database running on our server containing code that interfaces with Github for things like the creation of issues, assignment of tasks, and retrieving patron donation history.
|
||||
|
||||
|
||||
## Contribute
|
||||
|
||||
This section of the Platform is where members can view all of the currently outstanding issues for our projects, and sign up to volunteer themselves. Each entry is linked to Github, and displays its current status in the list entry, including some data which is not available on Github. Issues can be sorted and filtered based on any of the following:
|
||||
|
||||
|
||||
### Data
|
||||
|
||||
|
||||
|
||||
* Project
|
||||
* Name
|
||||
* Category (Modeling/Music/AI/Refactoring/etc.)
|
||||
* Status (available/assigned/pending review/complete)
|
||||
* Currently assigned members/Current volunteers
|
||||
* Man Hours
|
||||
* Skill Level
|
||||
* Contribution Points
|
||||
|
||||
|
||||
## Vote
|
||||
|
||||
This section of the Platform allows members to participate in determining the future direction of GameCult. Any member can create a motion in this section or vote on existing motions.
|
||||
|
||||
|
||||
## Profile
|
||||
|
||||
This section allows the user to access supplementary information and statistics connected to their account. Here the user can describe the skills they have to better match them with open issues.
|
||||
|
||||
|
||||
|
||||
* Nickname
|
||||
* Member Tier
|
||||
* Portfolio Link
|
||||
* Skills
|
||||
* List areas of expertise and the level for each skill.
|
||||
* Availability
|
||||
* Amount of time per day that the user is available for work
|
||||
* Weekday selection
|
||||
* Task History
|
||||
* Completed Tasks
|
||||
* Tasks in Progress
|
||||
* Hours worked
|
||||
* Total points earned/ total payout (per/year)
|
||||
* Payout
|
||||
* Revenue Share
|
||||
* Monthly/Yearly Income
|
||||
* Total
|
||||
* Per Project
|
||||
* Bounties
|
||||
* Total
|
||||
* This Month/Year
|
||||
* Point Balance
|
||||
|
||||
|
||||
### Management
|
||||
|
||||
This section is for creating motions which impact some aspect of the GameCult organization itself, such as tier thresholds or Role applications. Motions in this section are time-limited, and will pass or fail depending on the vote distribution at the end of the time limit. The majority needed to pass a motion depends on the type.
|
||||
|
||||
|
||||
### Projects
|
||||
|
||||
This section is for motions which, when successful, result in the creation of a new issue with associated bounty. This is the place to report bugs in one of our projects, or suggest new features or content to be created. Motions in this section are not time-limited, and are passed when a certain proportion of the total voting body agrees on it. There are only positive votes in this section, abstaining from voting on a proposal here is the same as voting against. The proportion necessary to pass a proposal depends on its category:
|
||||
|
||||
|
||||
|
||||
* Bugs: 15%
|
||||
* Cosmetics: 30%
|
||||
* Balance Changes: 40%
|
||||
* Features: 50%
|
||||
* New Content: 50%
|
||||
* Fundamental Design Changes: 66%
|
||||
|
||||
|
||||
# Tiers
|
||||
|
||||
Members are given points according to two metrics: patrons and contributors, both of which contribute towards their ranking in a tier system. Tiers, in addition to providing certain benefits, directly determine how powerful the member’s vote is on the Platform. Each of the 5 tiers of each type provides a single vote added to the total number of votes a member can use.
|
||||
|
||||
|
||||
### Decay
|
||||
|
||||
In order to avoid stratifying the organization over time due to a weight of historical contribution that is impossible for new members to overcome, historical point balances are subject to exponential decay, with 1% of their balance disappearing every week, rounded down. This does not apply to project specific contribution points.
|
||||
|
||||
|
||||
### Patrons
|
||||
|
||||
Both a patron’s monthly contribution and their total historical donation counts towards their Patron Tier. After a month, a donation becomes historical, meaning its value is halved and subject to point decay. Every dollar of direct donation provides a single point. Player accounts also earn patron points for 20% of their CultCoin purchases.
|
||||
|
||||
**Tier I - Bronze (10 pts)**
|
||||
|
||||
**Tier II - Silver (100 pts)**
|
||||
|
||||
**Tier III - Gold (1k pts)**
|
||||
|
||||
**Tier IV - Platinum (10k pts)**
|
||||
|
||||
**Tier V - Unobtanium (100k pts)**
|
||||
|
||||
|
||||
### Contributors
|
||||
|
||||
Contributors earn points from their contributions, with the amount being calculated using a formula that takes input from the task’s skill requirement and estimated man-hours. Contribution points are accounted for on both a general and per-project basis. Project contribution points do not decay. For simplicity and parity with patron points, each point granted represents a dollar of nominal labor value. Contributors are also eligible for bonuses if they turn in contributions early or if they. New contributors are automatically granted 20 contribution points for an automatic tier of Postulate.
|
||||
|
||||
**Tier I - Postulate (10 pts)**
|
||||
|
||||
**Tier II - Initiate (100 pts)**
|
||||
|
||||
Required to qualify for revenue sharing
|
||||
|
||||
**Tier III - Novice (1k pts)**
|
||||
|
||||
Allows the member to apply for a Maintainer Role for any project
|
||||
|
||||
**Tier IV - Adept (10k pts)**
|
||||
|
||||
Allows the member to apply for a Producer Role for any project
|
||||
|
||||
**Tier V - Master (100k pts)**
|
||||
|
||||
|
||||
# Revenue Sharing
|
||||
|
||||
Revenue is divided in three equal portions: one portion is divided among all members according to total contribution points, one is divided according to contributions for the specific project which generated the revenue, and the last is stored in the budget for expenses and development of future projects.
|
||||
|
||||
|
||||
# Roles
|
||||
|
||||
Not all contributions can be easily quantified by individual tasks. Some jobs are ongoing, and should be rewarded as such. We call those positions “Roles”. Roles provide an ongoing stream of both direct income (salary) and contribution points.
|
||||
|
||||
|
||||
### Social Media
|
||||
|
||||
Describes those tasked with social media-related responsibilities. Someone in this role would be responsible for maintaining and keeping up-to-date with the various social media profiles maintained by GameCult.
|
||||
|
||||
|
||||
### Community Manager
|
||||
|
||||
Community managers are responsible for maintaining contact with and order within our internal social environments, such as Discord or forums.
|
||||
|
||||
|
||||
### Maintainer
|
||||
|
||||
Members of a project’s maintenance team are responsible for formalizing community proposals and reviewing pull requests to verify quality and coverage. This does not apply only to code. Projects need Maintainers to verify the quality of art as well, and there is a writing-related role (Editor) which is not project-specific.
|
||||
|
||||
|
||||
### Producer
|
||||
|
||||
Producers are responsible for coordinating and caring for the members who are working on their project, as well as creating milestones and keeping their eyes on deadlines. It’s their job to choose which volunteers get assigned to issues. They can also unilaterally create new issues as long as they aren’t contradicted by previous community votes.
|
||||
|
||||
|
||||
# Workflow
|
||||
|
||||
|
||||
## Issue Creation
|
||||
|
||||
Sometimes the community has spoken, and decided that something needs to get done. When such a proposal passes, it is added to a queue for formalization. Other times it is a Producer for the project who decides, crafting a proposal and adding it to the queue directly.
|
||||
|
||||
From the queue, a maintainer will pick up the proposal and turn it into an Issue, describing it in detail as well as determining the skill level and man hours required to complete the task.
|
||||
|
||||
|
||||
## Assignment
|
||||
|
||||
Once an issue has been created, it must be assigned to a member. Members must volunteer to work on an issue, at which point they can be chosen for the task by the project’s Producer.
|
||||
|
||||
The assigned member is by default assigned a nominal deadline depending on their stated availability and the amount of man-hours of the task: a person who has declared 1 hour per day of availability would receive 5 days to complete a 5 man-hour task. The default deadline can be adjusted by the Producer when the task is assigned.
|
||||
|
||||
|
||||
## Submission
|
||||
|
||||
Regardless of the state of work when the deadline is reached, it must be submitted to the project repository as a pull request.
|
||||
|
||||
At this point one of the project’s Maintainers needs to come along and determine whether the submission solves the issue and meets the project’s standards for quality. If it does not, the Producer can choose whether to extend the deadline or reassign the task and choose what proportion of the bounty goes to the previous assignee.
|
||||
|
||||
On completion, the member(s) assigned to the task are awarded the contribution points and the cash bounty associated with the task. A successful task can be awarded a point bonus proportional to the nominal man-hours divided by the number taken. A highly successful task where the assignee went beyond the call of duty may also earn a bonus at the discretion of the Producer.
|
||||
|
|
@ -47,7 +47,9 @@ defmodule Lp.MixProject do
|
|||
{:gettext, "~> 0.11"},
|
||||
{:jason, "~> 1.0"},
|
||||
{:plug_cowboy, "~> 2.0"},
|
||||
|
||||
{:phoenix_markdown, "~> 1.0"},
|
||||
{:phoenix_haml, "~> 0.2"},
|
||||
|
||||
]
|
||||
end
|
||||
|
||||
|
|
|
|||
|
|
@ -1,9 +1,12 @@
|
|||
%{
|
||||
"calliope": {:hex, :calliope, "0.4.2", "29d8585331f3c04f95d6e2f7c8367d660cfb6c2dc031bd3d22afb7e7201eb5c6", [:mix], [], "hexpm", "3e355b0057ce52e402172e3f37f739765450b9c7ec18bf84c56c12007363283c"},
|
||||
"connection": {:hex, :connection, "1.0.4", "a1cae72211f0eef17705aaededacac3eb30e6625b04a6117c1b2db6ace7d5976", [:mix], [], "hexpm", "4a0850c9be22a43af9920a71ab17c051f5f7d45c209e40269a1938832510e4d9"},
|
||||
"cowboy": {:hex, :cowboy, "2.8.0", "f3dc62e35797ecd9ac1b50db74611193c29815401e53bac9a5c0577bd7bc667d", [:rebar3], [{:cowlib, "~> 2.9.1", [hex: :cowlib, repo: "hexpm", optional: false]}, {:ranch, "~> 1.7.1", [hex: :ranch, repo: "hexpm", optional: false]}], "hexpm", "4643e4fba74ac96d4d152c75803de6fad0b3fa5df354c71afdd6cbeeb15fac8a"},
|
||||
"cowlib": {:hex, :cowlib, "2.9.1", "61a6c7c50cf07fdd24b2f45b89500bb93b6686579b069a89f88cb211e1125c78", [:rebar3], [], "hexpm", "e4175dc240a70d996156160891e1c62238ede1729e45740bdd38064dad476170"},
|
||||
"db_connection": {:hex, :db_connection, "2.2.2", "3bbca41b199e1598245b716248964926303b5d4609ff065125ce98bcd368939e", [:mix], [{:connection, "~> 1.0.2", [hex: :connection, repo: "hexpm", optional: false]}], "hexpm", "642af240d8a8affb93b4ba5a6fcd2bbcbdc327e1a524b825d383711536f8070c"},
|
||||
"decimal": {:hex, :decimal, "2.0.0", "a78296e617b0f5dd4c6caf57c714431347912ffb1d0842e998e9792b5642d697", [:mix], [], "hexpm", "34666e9c55dea81013e77d9d87370fe6cb6291d1ef32f46a1600230b1d44f577"},
|
||||
"earmark": {:hex, :earmark, "1.4.10", "bddce5e8ea37712a5bfb01541be8ba57d3b171d3fa4f80a0be9bcf1db417bcaf", [:mix], [{:earmark_parser, ">= 1.4.10", [hex: :earmark_parser, repo: "hexpm", optional: false]}], "hexpm", "12dbfa80810478e521d3ffb941ad9fbfcbbd7debe94e1341b4c4a1b2411c1c27"},
|
||||
"earmark_parser": {:hex, :earmark_parser, "1.4.10", "6603d7a603b9c18d3d20db69921527f82ef09990885ed7525003c7fe7dc86c56", [:mix], [], "hexpm", "8e2d5370b732385db2c9b22215c3f59c84ac7dda7ed7e544d7c459496ae519c0"},
|
||||
"ecto": {:hex, :ecto, "3.4.6", "08f7afad3257d6eb8613309af31037e16c36808dfda5a3cd0cb4e9738db030e4", [:mix], [{:decimal, "~> 1.6 or ~> 2.0", [hex: :decimal, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: true]}, {:telemetry, "~> 0.4", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "6f13a9e2a62e75c2dcfc7207bfc65645ab387af8360db4c89fee8b5a4bf3f70b"},
|
||||
"ecto_sql": {:hex, :ecto_sql, "3.4.5", "30161f81b167d561a9a2df4329c10ae05ff36eca7ccc84628f2c8b9fa1e43323", [:mix], [{:db_connection, "~> 2.2", [hex: :db_connection, repo: "hexpm", optional: false]}, {:ecto, "~> 3.4.3", [hex: :ecto, repo: "hexpm", optional: false]}, {:myxql, "~> 0.3.0 or ~> 0.4.0", [hex: :myxql, repo: "hexpm", optional: true]}, {:postgrex, "~> 0.15.0", [hex: :postgrex, repo: "hexpm", optional: true]}, {:tds, "~> 2.1.0", [hex: :tds, repo: "hexpm", optional: true]}, {:telemetry, "~> 0.4.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "31990c6a3579b36a3c0841d34a94c275e727de8b84f58509da5f1b2032c98ac2"},
|
||||
"file_system": {:hex, :file_system, "0.2.9", "545b9c9d502e8bfa71a5315fac2a923bd060fd9acb797fe6595f54b0f975fd32", [:mix], [], "hexpm", "3cf87a377fe1d93043adeec4889feacf594957226b4f19d5897096d6f61345d8"},
|
||||
|
|
@ -14,10 +17,12 @@
|
|||
"mime": {:hex, :mime, "1.4.0", "5066f14944b470286146047d2f73518cf5cca82f8e4815cf35d196b58cf07c47", [:mix], [], "hexpm", "75fa42c4228ea9a23f70f123c74ba7cece6a03b1fd474fe13f6a7a85c6ea4ff6"},
|
||||
"phoenix": {:hex, :phoenix, "1.5.5", "9a5a197edc1828c5f138a8ef10524dfecc43e36ab435c14578b1e9b4bd98858c", [:mix], [{:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: true]}, {:phoenix_html, "~> 2.13", [hex: :phoenix_html, repo: "hexpm", optional: true]}, {:phoenix_pubsub, "~> 2.0", [hex: :phoenix_pubsub, repo: "hexpm", optional: false]}, {:plug, "~> 1.10", [hex: :plug, repo: "hexpm", optional: false]}, {:plug_cowboy, "~> 1.0 or ~> 2.2", [hex: :plug_cowboy, repo: "hexpm", optional: true]}, {:plug_crypto, "~> 1.1.2 or ~> 1.2", [hex: :plug_crypto, repo: "hexpm", optional: false]}, {:telemetry, "~> 0.4", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "b10eaf86ad026eafad2ee3dd336f0fb1c95a3711789855d913244e270bde463b"},
|
||||
"phoenix_ecto": {:hex, :phoenix_ecto, "4.2.1", "13f124cf0a3ce0f1948cf24654c7b9f2347169ff75c1123f44674afee6af3b03", [:mix], [{:ecto, "~> 3.0", [hex: :ecto, repo: "hexpm", optional: false]}, {:phoenix_html, "~> 2.14.2 or ~> 2.15", [hex: :phoenix_html, repo: "hexpm", optional: true]}, {:plug, "~> 1.0", [hex: :plug, repo: "hexpm", optional: false]}], "hexpm", "478a1bae899cac0a6e02be1deec7e2944b7754c04e7d4107fc5a517f877743c0"},
|
||||
"phoenix_haml": {:hex, :phoenix_haml, "0.2.3", "432b689ebb03dc821f00ae0ae5fb22e814aa8704e599763cbde538daf9f389f6", [:mix], [{:calliope, "~> 0.4.1", [hex: :calliope, repo: "hexpm", optional: false]}, {:phoenix, "~> 1.1", [hex: :phoenix, repo: "hexpm", optional: false]}, {:phoenix_html, "~> 2.3", [hex: :phoenix_html, repo: "hexpm", optional: false]}], "hexpm", "bc52d3a5800034aad469c18af317cc983b362760348ce2f50c395efc733a00ec"},
|
||||
"phoenix_html": {:hex, :phoenix_html, "2.14.2", "b8a3899a72050f3f48a36430da507dd99caf0ac2d06c77529b1646964f3d563e", [:mix], [{:plug, "~> 1.5", [hex: :plug, repo: "hexpm", optional: false]}], "hexpm", "58061c8dfd25da5df1ea0ca47c972f161beb6c875cd293917045b92ffe1bf617"},
|
||||
"phoenix_live_dashboard": {:hex, :phoenix_live_dashboard, "0.2.9", "ac43a73561a4010fd2a52289a2f570829e2be5d5ea408a5af99dbed8793439e7", [:mix], [{:phoenix_html, "~> 2.14.1 or ~> 2.15", [hex: :phoenix_html, repo: "hexpm", optional: false]}, {:phoenix_live_view, "~> 0.14.3", [hex: :phoenix_live_view, repo: "hexpm", optional: false]}, {:telemetry_metrics, "~> 0.4.0 or ~> 0.5.0", [hex: :telemetry_metrics, repo: "hexpm", optional: false]}], "hexpm", "f7cd3265a53d2bcd2e541a7d3c55f5a22e07bf6070b1d4adabd81791885190f7"},
|
||||
"phoenix_live_reload": {:hex, :phoenix_live_reload, "1.2.4", "940c0344b1d66a2e46eef02af3a70e0c5bb45a4db0bf47917add271b76cd3914", [:mix], [{:file_system, "~> 0.2.1 or ~> 0.3", [hex: :file_system, repo: "hexpm", optional: false]}, {:phoenix, "~> 1.4", [hex: :phoenix, repo: "hexpm", optional: false]}], "hexpm", "38f9308357dea4cc77f247e216da99fcb0224e05ada1469167520bed4cb8cccd"},
|
||||
"phoenix_live_view": {:hex, :phoenix_live_view, "0.14.7", "e05ca2e57974bb99eb54fed88b04754a622e54cf7e832db3c868bd06e0b99ff2", [:mix], [{:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: true]}, {:phoenix, "~> 1.5.3", [hex: :phoenix, repo: "hexpm", optional: false]}, {:phoenix_html, "~> 2.14", [hex: :phoenix_html, repo: "hexpm", optional: false]}, {:telemetry, "~> 0.4.2 or ~> 0.5", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "899224a704221ab0019200da61019dea699763e12daa24d69edd79bc228fe5a5"},
|
||||
"phoenix_markdown": {:hex, :phoenix_markdown, "1.0.3", "8095c40dd5037f4b56079ad66de3fe9136406c7c44e1222ce3c74d22e4c7870a", [:mix], [{:earmark, "~> 1.2", [hex: :earmark, repo: "hexpm", optional: false]}, {:html_entities, "~> 0.4", [hex: :html_entities, repo: "hexpm", optional: false]}, {:phoenix, ">= 1.1.0", [hex: :phoenix, repo: "hexpm", optional: false]}, {:phoenix_html, ">= 2.3.0", [hex: :phoenix_html, repo: "hexpm", optional: false]}], "hexpm", "d3591c4cb3357b068cc8284952dbacedb874b287add27787eea2d1d314b18c16"},
|
||||
"phoenix_pubsub": {:hex, :phoenix_pubsub, "2.0.0", "a1ae76717bb168cdeb10ec9d92d1480fec99e3080f011402c0a2d68d47395ffb", [:mix], [], "hexpm", "c52d948c4f261577b9c6fa804be91884b381a7f8f18450c5045975435350f771"},
|
||||
"plug": {:hex, :plug, "1.10.4", "41eba7d1a2d671faaf531fa867645bd5a3dce0957d8e2a3f398ccff7d2ef017f", [:mix], [{:mime, "~> 1.0", [hex: :mime, repo: "hexpm", optional: false]}, {:plug_crypto, "~> 1.1.1 or ~> 1.2", [hex: :plug_crypto, repo: "hexpm", optional: false]}, {:telemetry, "~> 0.4", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "ad1e233fe73d2eec56616568d260777b67f53148a999dc2d048f4eb9778fe4a0"},
|
||||
"plug_cowboy": {:hex, :plug_cowboy, "2.3.0", "149a50e05cb73c12aad6506a371cd75750c0b19a32f81866e1a323dda9e0e99d", [:mix], [{:cowboy, "~> 2.7", [hex: :cowboy, repo: "hexpm", optional: false]}, {:plug, "~> 1.7", [hex: :plug, repo: "hexpm", optional: false]}, {:telemetry, "~> 0.4", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "bc595a1870cef13f9c1e03df56d96804db7f702175e4ccacdb8fc75c02a7b97e"},
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
197
lp/priv/static/js/old.js
Normal file
197
lp/priv/static/js/old.js
Normal file
|
|
@ -0,0 +1,197 @@
|
|||
//__________________ https://gamecult.games/user/plugins/backtotop/assets/js/return-to-top.js
|
||||
// ===== Scroll to Top ====
|
||||
$(window).scroll(function () {
|
||||
if ($(this).scrollTop() >= 50) { // If page is scrolled more than 50px
|
||||
$('#return-to-top').fadeIn(200); // Fade in the arrow
|
||||
} else {
|
||||
$('#return-to-top').fadeOut(200); // Else fade out the arrow
|
||||
}
|
||||
});
|
||||
$('#return-to-top').click(function () { // When arrow is clicked
|
||||
$('body,html').animate({
|
||||
scrollTop: 0 // Scroll to top of body
|
||||
}, 500);
|
||||
});
|
||||
// __________________ https://gamecult.games/user/plugins/simplesearch/js/simplesearch.js
|
||||
((function(){
|
||||
if (!Element.prototype.matches) {
|
||||
Element.prototype.matches = Element.prototype.msMatchesSelector || Element.prototype.webkitMatchesSelector;
|
||||
}
|
||||
var findAncestor = function(el, selector) {
|
||||
while ((el = el.parentElement) && !((el.matches || el.matchesSelector).call(el, selector))) {}
|
||||
return el;
|
||||
};
|
||||
|
||||
var fields = document.querySelectorAll('input[name="searchfield"][data-search-input]');
|
||||
Array.prototype.forEach.call(fields, function(field) {
|
||||
var form = findAncestor(field, 'form[data-simplesearch-form]'),
|
||||
min = field.getAttribute('data-min') || false,
|
||||
location = field.getAttribute('data-search-input'),
|
||||
separator = field.getAttribute('data-search-separator');
|
||||
|
||||
if (min) {
|
||||
var invalid = field.getAttribute('data-search-invalid');
|
||||
field.addEventListener('keydown', function() {
|
||||
field.setCustomValidity(field.value.length >= min ? '' : invalid);
|
||||
});
|
||||
}
|
||||
|
||||
form.addEventListener('submit', function(event) {
|
||||
event.preventDefault();
|
||||
|
||||
if (field.checkValidity()) {
|
||||
window.location.href = location + separator + field.value;
|
||||
}
|
||||
});
|
||||
});
|
||||
})());
|
||||
|
||||
//_______________ https://gamecult.games/user/themes/klb4/js/jquery.treemenu.js
|
||||
/*
|
||||
treeMenu - jQuery plugin
|
||||
version: 0.6
|
||||
|
||||
Copyright 2014 Stepan Krapivin
|
||||
|
||||
*/
|
||||
(function($){
|
||||
$.fn.treemenu = function(options) {
|
||||
options = options || {};
|
||||
options.delay = options.delay || 0;
|
||||
options.openActive = options.openActive || false;
|
||||
options.closeOther = options.closeOther || false;
|
||||
options.activeSelector = options.activeSelector || ".active";
|
||||
|
||||
this.addClass("treemenu");
|
||||
|
||||
if (!options.nonroot) {
|
||||
this.addClass("treemenu-root");
|
||||
}
|
||||
|
||||
options.nonroot = true;
|
||||
|
||||
this.find("> li").each(function() {
|
||||
e = $(this);
|
||||
var subtree = e.find('> ul');
|
||||
var button = e.find('.toggler').eq(0);
|
||||
|
||||
if(button.length == 0) {
|
||||
// create toggler
|
||||
var button = $('<span>');
|
||||
button.addClass('toggler');
|
||||
e.prepend(button);
|
||||
}
|
||||
|
||||
if(subtree.length > 0) {
|
||||
subtree.hide();
|
||||
|
||||
e.addClass('tree-closed');
|
||||
|
||||
e.find(button).click(function() {
|
||||
var li = $(this).parent('li');
|
||||
|
||||
if (options.closeOther && li.hasClass('tree-closed')) {
|
||||
var siblings = li.parent('ul').find("li:not(.tree-empty)");
|
||||
siblings.removeClass("tree-opened");
|
||||
siblings.addClass("tree-closed");
|
||||
siblings.removeClass(options.activeSelector);
|
||||
siblings.find('> ul').slideUp(options.delay);
|
||||
}
|
||||
|
||||
li.find('> ul').slideToggle(options.delay);
|
||||
li.toggleClass('tree-opened');
|
||||
li.toggleClass('tree-closed');
|
||||
li.toggleClass(options.activeSelector);
|
||||
});
|
||||
|
||||
$(this).find('> ul').treemenu(options);
|
||||
} else {
|
||||
$(this).addClass('tree-empty');
|
||||
}
|
||||
});
|
||||
|
||||
if (options.openActive) {
|
||||
var cls = this.attr("class");
|
||||
|
||||
this.find(options.activeSelector).each(function(){
|
||||
var el = $(this).parent();
|
||||
|
||||
while (el.attr("class") !== cls) {
|
||||
el.find('> ul').show();
|
||||
if(el.prop("tagName") === 'UL') {
|
||||
el.show();
|
||||
} else if (el.prop("tagName") === 'LI') {
|
||||
el.removeClass('tree-closed');
|
||||
el.addClass("tree-opened");
|
||||
el.show();
|
||||
}
|
||||
|
||||
el = el.parent();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
return this;
|
||||
}
|
||||
})(jQuery);
|
||||
|
||||
//____________________________ https://gamecult.games/user/themes/klb4/js/site.js
|
||||
var isTouch = window.DocumentTouch && document instanceof DocumentTouch;
|
||||
|
||||
function scrollHeader() {
|
||||
// Has scrolled class on header
|
||||
var zvalue = $(document).scrollTop();
|
||||
if ( zvalue > 75 )
|
||||
$("#header").addClass("scrolled");
|
||||
else
|
||||
$("#header").removeClass("scrolled");
|
||||
}
|
||||
|
||||
function parallaxBackground() {
|
||||
$('.parallax').css('background-positionY', ($(window).scrollTop() * 0.3) + 'px');
|
||||
}
|
||||
|
||||
jQuery(document).ready(function($){
|
||||
|
||||
scrollHeader();
|
||||
|
||||
// Scroll Events
|
||||
if (!isTouch){
|
||||
$(document).scroll(function() {
|
||||
scrollHeader();
|
||||
parallaxBackground();
|
||||
});
|
||||
};
|
||||
|
||||
// Touch scroll
|
||||
$(document).on({
|
||||
'touchmove': function(e) {
|
||||
scrollHeader(); // Replace this with your code.
|
||||
}
|
||||
});
|
||||
|
||||
//Smooth scroll to start
|
||||
$('#to-start').click(function(){
|
||||
var start_y = $('#start').position().top;
|
||||
var header_offset = 45;
|
||||
window.scroll({ top: start_y - header_offset, left: 0, behavior: 'smooth' });
|
||||
return false;
|
||||
});
|
||||
|
||||
//Smooth scroll to top
|
||||
$('#to-top').click(function(){
|
||||
window.scroll({ top: 0, left: 0, behavior: 'smooth' });
|
||||
return false;
|
||||
});
|
||||
|
||||
// Responsive Menu
|
||||
$('#toggle').click(function () {
|
||||
$(this).toggleClass('active');
|
||||
$('#overlay').toggleClass('open');
|
||||
$('body').toggleClass('mobile-nav-open');
|
||||
});
|
||||
|
||||
// Tree Menu
|
||||
$(".tree").treemenu({delay:300});
|
||||
|
||||
});
|
||||
Reference in a new issue