first commit

master
tuan 3 years ago
commit 36cbf1737e
  1. 3
      .gitmodules
  2. 0
      README.md
  3. 6
      archetypes/default.md
  4. 14
      assets/images/logo.html
  5. BIN
      assets/images/logo.png
  6. 35
      config/_default/config.toml
  7. 11
      config/_default/language.yaml
  8. 20
      config/_default/menus.en.toml
  9. 20
      config/_default/menus.tr.toml
  10. 21
      config/_default/params.toml
  11. 4
      content/docs/_index.md
  12. 32
      content/docs/test/_index.md
  13. 34
      content/docs/test/test.md
  14. 3
      content/en/posts/_index.md
  15. 17
      content/en/posts/test.md
  16. 6
      content/en/posts/testingenzi.md
  17. 80
      content/homepage/about.md
  18. 78
      content/homepage/about.tr.md
  19. 64
      content/homepage/experiences.md
  20. 63
      content/homepage/experiences.tr.md
  21. 3
      content/homepage/index.md
  22. 71
      content/homepage/intro.html
  23. 71
      content/homepage/intro.tr.html
  24. 35
      content/homepage/pages.md
  25. BIN
      resources/_gen/images/images/logo_hu57cd6ec9b68db850b11b772b793d6cab_23820_180x180_fill_box_center_2.png
  26. BIN
      resources/_gen/images/images/logo_hu57cd6ec9b68db850b11b772b793d6cab_23820_32x32_fill_box_center_2.png
  27. 137
      static/en/jquery.teletype.js
  28. 137
      static/jquery.teletype.js
  29. 137
      static/tr/jquery.teletype.js
  30. 1
      themes/eureka

3
.gitmodules vendored

@ -0,0 +1,3 @@
[submodule "themes/eureka"]
path = themes/eureka
url = https://github.com/wangchucheng/hugo-eureka.git

@ -0,0 +1,6 @@
---
title: "{{ replace .Name "-" " " | title }}"
date: {{ .Date }}
draft: true
---

@ -0,0 +1,14 @@
<img class="rounded-full">
<div class="rounded-full"><pre style="
"> .o.
'l. ': .NM.
.:x' lo O0 OM0
.,X.,Nk. ;OMO:,,,k;:kWMMl
,M;.NK,ONMMMMKMMMMMNXNMWO.
.dOOxKNWMMMMNWNXKOxl;..
cMWx:
:M,'
.Nk '
co,..
</pre><img>
</div>

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

@ -0,0 +1,35 @@
baseURL = "https://metufss.org"
# languageCode = "en-us"
title = "fss@metu"
theme = "eureka"
paginate = 3
copyright = """
&copy; 2021 <a href="https://www.wangchucheng.com/">C. Wang</a> and <a href="https://www.ruiqima.com/">R. Ma</a>
"""
enableEmoji = true
enableGitInfo = false
summaryLength = 75
defaultContentLanguage = "en"
hasCJKLanguage = false
defaultContentLanguageInSubdir = true
[markup.highlight]
codeFences = false
noClasses = false
[markup.tableOfContents]
startLevel = 2
endLevel = 6
ordered = false
[markup.goldmark.renderer]
unsafe = true
[taxonomies]
category = "categories"
tag = "tags"
series = "series"
author = "authors"
[build]
useResourceCacheWhen = "always"

@ -0,0 +1,11 @@
en:
languageCode: en
languageName: English
contentDir: content/en
title: English
tr:
languageCode: tr
languageName: Türkçe
contentDir: content/tr
title: Türkçe

@ -0,0 +1,20 @@
[[main]]
name = "About"
url = "#about"
weight = 1
[[main]]
name = "Projects"
url = "#experiences"
weight = 2
[[main]]
name = "Posts"
url = "/posts/"
weight = 3
[[main]]
name = "Docs"
url = "/docs/"
weight = 4

@ -0,0 +1,20 @@
[[main]]
name = "Hakkında"
url = "#about"
weight = 1
[[main]]
name = "Projeler"
url = "#experiences"
weight = 2
[[main]]
name = "Yazılar"
url = "/posts/"
weight = 3
[[main]]
name = "Dökümanlar"
url = "/docs/"
weight = 4

@ -0,0 +1,21 @@
mainSections = [ "posts" ]
description = "METUFSS"
siteType = "Society"
icon = "images/logo.png"
publisherName = "Free Software Society"
[highlight]
handler = "highlightjs"
[highlight.highlightjs]
languages = [ "dart" ]
style = "solarized-light"
[math]
handler = "katex"
[comment]
[comment.disqus]
[comment.commento]

@ -0,0 +1,4 @@
---
title: Docs
layout: doc-list #Do not modify
---

@ -0,0 +1,32 @@
---
title: Test
description: Test doc
toc: true
authors: []
date: 2021-03-05T16:21:30+03:00
lastmod: 2021-03-05T16:21:30+03:00
draft: false
weight: 1
---
This is the root of test doc.
## Duis vel leo nec mi convallis sodales
Sed efficitur nibh sed euismod dictum. Donec posuere, nisl a egestas dignissim, risus magna placerat tortor, quis tincidunt ipsum erat at nunc. Cras consectetur ex eget tortor fermentum mattis. Nullam sodales sed purus eget ornare. Vestibulum aliquam cursus odio vitae placerat. Etiam vel pharetra diam. Morbi molestie varius tincidunt. Morbi molestie tortor vitae metus venenatis, ut fermentum nisl luctus. Aenean at condimentum lorem, rhoncus dapibus nibh. Donec et dui consequat ipsum ultrices tristique vitae vitae est.
## Sed efficitur ante a tortor euismod
In ornare ultricies sapien in tincidunt. Integer malesuada tellus sed nibh dictum facilisis non sit amet nibh. Vestibulum sed tincidunt ante, nec tincidunt lectus. Pellentesque id dolor ipsum. Sed efficitur tristique mauris eu tristique. Aliquam nec volutpat dolor. Praesent vitae feugiat nibh. Curabitur mollis placerat sem, ut eleifend mi. Sed sed nisl elit. Pellentesque eget elit nec arcu imperdiet imperdiet. Aliquam dictum arcu ac pharetra rutrum.
### Cras ac diam efficitur
Donec iaculis bibendum suscipit. Ut egestas ligula vel orci posuere scelerisque. Nam vel elementum nibh, congue tempus sapien. Aliquam luctus ante sit amet urna vehicula hendrerit. Morbi at ante nisl. Sed euismod vel dolor in iaculis. Aliquam lacinia lorem sit amet vestibulum finibus. Nulla facilisi. Vivamus lacinia consectetur hendrerit. Integer commodo a nibh nec rhoncus. Nulla non aliquet erat. Cras vel orci a urna malesuada viverra vel quis nisi. Donec pharetra laoreet ante, vulputate volutpat ante consequat eget. Donec efficitur consequat nisi vitae volutpat. Vestibulum volutpat, odio nec sodales cursus, ligula nulla pellentesque erat, ut iaculis magna lorem non purus. Curabitur efficitur tortor et elit sodales, in lobortis risus feugiat.
### Cras hendrerit nibh non pulvinar consectetur
Donec justo diam, auctor et rhoncus a, feugiat in felis. Etiam lectus est, tincidunt iaculis mi et, feugiat rutrum tellus. Ut sit amet tellus vitae nisi faucibus pulvinar non a augue. Etiam auctor porttitor mi, vitae posuere lacus pretium ac. Pellentesque sed ante magna. Proin tempor faucibus risus, vitae tincidunt arcu ultrices egestas. Aenean rutrum purus vel vulputate lobortis. Aenean auctor ipsum quam, eu molestie magna ultricies quis. Phasellus vitae diam erat. Nam at facilisis massa. Nam vulputate nec quam vel iaculis. Maecenas mauris felis, semper vel ultricies eu, interdum condimentum lacus. Mauris quis tincidunt erat, quis efficitur dolor.
## Quisque vehicula tellus eget nunc molestie
Phasellus ligula tortor, sodales ac ipsum vel, lobortis lacinia eros. Maecenas et viverra enim, sit amet bibendum risus. Duis a est pulvinar, suscipit diam id, sagittis lectus. Sed vulputate est sed ipsum faucibus tempus. Morbi non varius nibh. Vestibulum vel tincidunt neque. Vestibulum pellentesque sed metus eu gravida. Donec rhoncus, quam in dictum bibendum, diam libero pretium lacus, vitae suscipit diam neque eget arcu. Pellentesque id hendrerit lorem. Curabitur fermentum purus orci, nec ullamcorper dolor consequat at. Suspendisse lectus dolor, efficitur non molli

@ -0,0 +1,34 @@
---
title: Test Chapter 1
description: This is an test chapter doc layout of Eureka theme
toc: true
authors:
tags:
categories:
series:
date: '2020-10-16'
lastmod: '2020-10-16'
draft: false
---
This is the root of chapter 1 doc.
## Duis vel leo nec mi convallis sodales
Sed efficitur nibh sed euismod dictum. Donec posuere, nisl a egestas dignissim, risus magna placerat tortor, quis tincidunt ipsum erat at nunc. Cras consectetur ex eget tortor fermentum mattis. Nullam sodales sed purus eget ornare. Vestibulum aliquam cursus odio vitae placerat. Etiam vel pharetra diam. Morbi molestie varius tincidunt. Morbi molestie tortor vitae metus venenatis, ut fermentum nisl luctus. Aenean at condimentum lorem, rhoncus dapibus nibh. Donec et dui consequat ipsum ultrices tristique vitae vitae est.
## Sed efficitur ante a tortor euismod
In ornare ultricies sapien in tincidunt. Integer malesuada tellus sed nibh dictum facilisis non sit amet nibh. Vestibulum sed tincidunt ante, nec tincidunt lectus. Pellentesque id dolor ipsum. Sed efficitur tristique mauris eu tristique. Aliquam nec volutpat dolor. Praesent vitae feugiat nibh. Curabitur mollis placerat sem, ut eleifend mi. Sed sed nisl elit. Pellentesque eget elit nec arcu imperdiet imperdiet. Aliquam dictum arcu ac pharetra rutrum.
### Cras ac diam efficitur
Donec iaculis bibendum suscipit. Ut egestas ligula vel orci posuere scelerisque. Nam vel elementum nibh, congue tempus sapien. Aliquam luctus ante sit amet urna vehicula hendrerit. Morbi at ante nisl. Sed euismod vel dolor in iaculis. Aliquam lacinia lorem sit amet vestibulum finibus. Nulla facilisi. Vivamus lacinia consectetur hendrerit. Integer commodo a nibh nec rhoncus. Nulla non aliquet erat. Cras vel orci a urna malesuada viverra vel quis nisi. Donec pharetra laoreet ante, vulputate volutpat ante consequat eget. Donec efficitur consequat nisi vitae volutpat. Vestibulum volutpat, odio nec sodales cursus, ligula nulla pellentesque erat, ut iaculis magna lorem non purus. Curabitur efficitur tortor et elit sodales, in lobortis risus feugiat.
### Cras hendrerit nibh non pulvinar consectetur
Donec justo diam, auctor et rhoncus a, feugiat in felis. Etiam lectus est, tincidunt iaculis mi et, feugiat rutrum tellus. Ut sit amet tellus vitae nisi faucibus pulvinar non a augue. Etiam auctor porttitor mi, vitae posuere lacus pretium ac. Pellentesque sed ante magna. Proin tempor faucibus risus, vitae tincidunt arcu ultrices egestas. Aenean rutrum purus vel vulputate lobortis. Aenean auctor ipsum quam, eu molestie magna ultricies quis. Phasellus vitae diam erat. Nam at facilisis massa. Nam vulputate nec quam vel iaculis. Maecenas mauris felis, semper vel ultricies eu, interdum condimentum lacus. Mauris quis tincidunt erat, quis efficitur dolor.
## Quisque vehicula tellus eget nunc molestie
Phasellus ligula tortor, sodales ac ipsum vel, lobortis lacinia eros. Maecenas et viverra enim, sit amet bibendum risus. Duis a est pulvinar, suscipit diam id, sagittis lectus. Sed vulputate est sed ipsum faucibus tempus. Morbi non varius nibh. Vestibulum vel tincidunt neque. Vestibulum pellentesque sed metus eu gravida. Donec rhoncus, quam in dictum bibendum, diam libero pretium lacus, vitae suscipit diam neque eget arcu. Pellentesque id hendrerit lorem. Curabitur fermentum purus orci, nec ullamcorper dolor consequat at. Suspendisse lectus dolor, efficitur non mollis eget, suscipit ut nisl. Quisque id ex metus. Sed lobortis venenatis lacinia. Sed at lorem leo.

@ -0,0 +1,3 @@
---
title: Posts
---

@ -0,0 +1,17 @@
---
title: "Test"
toc: true
authors: []
categories: []
series: []
date: 2021-03-05T14:31:06+03:00
lastmod: "2021-03-05T14:31:06+03:00"
featuredImage: ""
draft: false
---
This is a test post
+ metufss
+ `FSS`

@ -0,0 +1,6 @@
---
title: "Testingenzi"
date: 2021-03-29T19:05:17+03:00
draft: true
---

@ -0,0 +1,80 @@
---
title: Free Software Society
draft: false
role:
organization:
name: Middle East Technical University
url: http://www.metu.edu.tr/
avatar: images/logo.png
bio: Use, study, share, develop!
social:
- icon: envelope
iconPack: fas
url: mailto:example@example.com
- icon: tree
iconPack: fab
url: https://metu.life/@fss
- icon: twitter
iconPack: fab
url: https://twitter.com/metuFSS
- icon: github
iconPack: fab
url: https://git.oyd.org.tr/MetuFSS
# Section you want to display
section:
# Pages count
count: 3
# Options: card, plain and masonry.
style:
weight: 2
widget:
handler: about
# Options: sm, md, lg and xl. Default is md.
width:
sidebar:
# Options: left and right. Leave blank to hide.
position:
# Options: sm, md, lg and xl. Default is md.
scale:
background:
# Options: primary, secondary, tertiary or any valid color value. Default is primary.
color: secondary
image:
# Options: auto, cover and contain. Default is auto.
size:
# Options: center, top, right, bottom, left.
position:
# Options: fixed, local, scroll.
attachment:
---
## Introduction
FSS is a student society that brings together students who are interested in free software and want to improve their level of technological literacy.
Free Software Society aims:
To work towards increasing the awareness of free software and the use of these technologies within the culture of METU, to ensure that activities are carried out and continue in accordance with the objectives.
## Objectives
+ Conducting trainings and dissemination activities in order to popularize the GNU philosophy and the use of free software.
+ To encourage the use and contribution of free software so that the benefits of academic studies can be shared publicly.
+ Works for network neutrality and accessible internet.
+ It opposes the limitation of our fundamental rights and freedoms, the efforts to create a society of surveillance / control, and struggles for the use of technology to liberate people and society more.
+ It works for the development of a brand new communication culture against social networks being seen and used as a mere consumption and exhibition tool.
+ Opposes scientific and technological accumulation to be private or private property.
+ Advocates sharing production models and licenses against patents and licenses that dominate these collective assets that are not benefitial for the society.

@ -0,0 +1,78 @@
---
title: Özgür Yazılım Topluluğu
draft: false
role:
organization:
name: Ortadoğu Teknik Üniversitesi
url: http://www.metu.edu.tr/
avatar: images/logo.png
bio: Kullan, Araştır, Paylaş, Geliştir
social:
- icon: envelope
iconPack: fas
url: mailto:example@example.com
- icon: tree
iconPack: fab
url: https://metu.life/@fss
- icon: twitter
iconPack: fab
url: https://twitter.com/metuFSS
- icon: github
iconPack: fab
url: https://git.oyd.org.tr/MetuFSS
# Section you want to display
section:
# Pages count
count: 3
# Options: card, plain and masonry.
style:
weight: 2
widget:
handler: about
# Options: sm, md, lg and xl. Default is md.
width:
sidebar:
# Options: left and right. Leave blank to hide.
position:
# Options: sm, md, lg and xl. Default is md.
scale:
background:
# Options: primary, secondary, tertiary or any valid color value. Default is primary.
color: secondary
image:
# Options: auto, cover and contain. Default is auto.
size:
# Options: center, top, right, bottom, left.
position:
# Options: fixed, local, scroll.
attachment:
---
## Introduction
Topluluk özgür yazılım üzerine meraklı ve teknolojik okuryazarlık seviyesini geliştirmek isteyen öğrencileri bir araya getiren bir öğrenci topluluğudur. Topluluğun amacı:
ODTÜ kültürü içerisinde özgür yazılım farkındalığını ve bu teknolojilerin kullanımının arttırılması yönünde çalışmalar yapmak, amaçlara uygun faaliyetlerin yapılması ve sürdürülmesini sağlamak, ülke düzeyinde etkinliklerde bulunmak.
## Objectives
+ GNU felsefesini ve özgür yazılımların kullanımını yaygınlaştırmak amacı ile eğitimler ve yaygınlaştırma çalışmaları gerçekleştirmek.
+ Akademik çalışmalarının faydalarının tüm insanlıkça paylaşılabilmesi için özgür yazılımlar kullanmaya ve katkı vermeye teşvik etmek.
+ Ağ tarafsızlığı ve herkese erişilebilir internet için çalışır.
+ Hayatımızı hızla saran teknolojilerin temel hak ve özgürlüklerimizi sınırlandırmasına, gözetim / denetim toplumu yaratma çabalarına karşı çıkar, teknolojinin insanı ve toplumu daha fazla özgürleştirmesi amacıyla kullanılması için mücadele eder.
+ Sosyal ağların salt bir tüketim ve teşhir aracı olarak görülmesine ve kullanılmasına karşı, yepyeni bir iletişim kültürünün gelişmesi için çalışır.
+ Bilimsel ve teknolojik birikimin, kişisel veya özel mülk olmasına karşı çıkar.
+ Bu ortak birikimler üzerinde toplum yararına olmayan bir tahakküm kuran patent ve lisanslara karşı, paylaşımcı üretim modellerini ve lisanslarını savunur.

@ -0,0 +1,64 @@
---
title: Projects
draft: false
experiences:
- title: Metu Wiki
organization:
name: metu.wiki
url: https://metu.wiki
dates: '2021 - February'
location:
writeup: >
A **free** and **open** informative database for all things about METU.
- title: Think
organization:
name: think.metu.life
url: https://think.metu.life
dates: '2021 February'
location:
writeup: >
Think with hocams.
- Discussion board based on Discourse
- title: Metu Life
organization:
name: metu.life
url: https://metu.life
dates: '2020 - November'
location:
writeup: >
Follow hocams and discover new ones!
- Distributed Social Media based on Mastodon
- No tracking and advertisement mechanisms
weight: 2
widget:
handler: experiences
# Options: sm, md, lg and xl. Default is md.
width: lg
sidebar:
# Options: left and right. Leave blank to hide.
position: left
# Options: sm, md, lg and xl. Default is md.
scale:
background:
# Options: primary, secondary, tertiary or any valid color value. Default is primary.
color:
image:
# Options: auto, cover and contain. Default is auto.
size:
# Options: center, top, right, bottom, left.
position:
# Options: fixed, local, scroll.
attachment:
---

@ -0,0 +1,63 @@
---
title: Projects
draft: false
experiences:
- title: Metu Life
organization:
name: metu.life
url: https://metu.life
dates: '2020 - Present'
location:
writeup: >
Follow hocams and discover new ones!
- Distributed Social Media based on Mastodon
- No tracking and advertisement mechanisms
- title: Think
organization:
name: think.metu.life
url: https://think.metu.life
dates: '2021 - Present'
location:
writeup: >
Think with hocams.
- Discussion board based on Discourse
- title: Metu Wiki
organization:
name: metu.wiki
url: https://metu.wiki
dates: '2021 - Present'
location:
writeup: >
A **free** and **open** informative database for all things about METU.
weight: 3
widget:
handler: experiences
# Options: sm, md, lg and xl. Default is md.
width: lg
sidebar:
# Options: left and right. Leave blank to hide.
position: left
# Options: sm, md, lg and xl. Default is md.
scale:
background:
# Options: primary, secondary, tertiary or any valid color value. Default is primary.
color:
image:
# Options: auto, cover and contain. Default is auto.
size:
# Options: center, top, right, bottom, left.
position:
# Options: fixed, local, scroll.
attachment:
---

@ -0,0 +1,3 @@
---
headless: true
---

@ -0,0 +1,71 @@
---
title: Intro
draft: false
weight: 1
widget:
handler: blank
# Options: sm, md, lg and xl. Default is md.
width:
sidebar:
# Options: left and right. Leave blank to hide.
position:
# Options: sm, md, lg and xl. Default is md.
scale:
background:
# Options: primary, secondary, tertiary or any valid color value. Default is primary.
color:
image:
# Options: auto, cover and contain. Default is auto.
size:
# Options: center, top, right, bottom, left.
position:
# Options: fixed, local, scroll.
attachment:
---
<!DOCTYPE html>
<head>
<style>
.teletype-prefix, .teletype-cursor { color: #e31837; }
</style>
</head>
<body>
<p class="type-text" title="Free as in freedom!^2000 ~14 Software, Free Society!">:)</p>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<script src="jquery.teletype.js"></script>
<script>
$( function() {
$( '.type-text' ).each( function() {
var items = $( this ).attr( 'title' ) + ';' + $( this ).text();
$( this ).empty().attr( 'title', '' ).teletype( {
text: $.map( items.split( ';' ), $.trim ),
typeDelay: 10,
backDelay: 20,
cursor: '▋',
delay: 3000,
preserve: false,
prefix: '[fss@metu ~]$ ',
loop: 0
} );
} );
} );
</script>
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-36251023-1']);
_gaq.push(['_setDomainName', 'jqueryscript.net']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
</body>
</html>

@ -0,0 +1,71 @@
---
title: Intro
draft: false
weight: 1
widget:
handler: blank
# Options: sm, md, lg and xl. Default is md.
width:
sidebar:
# Options: left and right. Leave blank to hide.
position:
# Options: sm, md, lg and xl. Default is md.
scale:
background:
# Options: primary, secondary, tertiary or any valid color value. Default is primary.
color:
image:
# Options: auto, cover and contain. Default is auto.
size:
# Options: center, top, right, bottom, left.
position:
# Options: fixed, local, scroll.
attachment:
---
<!DOCTYPE html>
<head>
<style>
.teletype-prefix, .teletype-cursor { color: #e31837; }
</style>
</head>
<body>
<p class="type-text" title="Özgür Yazılım, Özgür Toplum!^2000 ~23 leşin :)">Kullan, Araştır, Paylaş, Geliştir!</p>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<script src="jquery.teletype.js"></script>
<script>
$( function() {
$( '.type-text' ).each( function() {
var items = $( this ).attr( 'title' ) + ';' + $( this ).text();
$( this ).empty().attr( 'title', '' ).teletype( {
text: $.map( items.split( ';' ), $.trim ),
typeDelay: 10,
backDelay: 20,
cursor: '▋',
delay: 3000,
preserve: false,
prefix: '[fss@metu ~]$ ',
loop: 0
} );
} );
} );
</script>
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-36251023-1']);
_gaq.push(['_setDomainName', 'jqueryscript.net']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
</body>
</html>

@ -0,0 +1,35 @@
---
title: Pages
draft: false
# Section you want to display
section: posts
# Pages count
count: 5
# Options: card, plain and masonry.
style: plain
weight: 3
widget:
handler: pages
# Options: sm, md, lg and xl. Default is md.
width:
sidebar:
# Options: left and right. Leave blank to hide.
position:
# Options: sm, md, lg and xl. Default is md.
scale:
background:
# Options: primary, secondary, tertiary or any valid color value. Default is primary.
color:
image:
# Options: auto, cover and contain. Default is auto.
size:
# Options: center, top, right, bottom, left.
position:
# Options: fixed, local, scroll.
attachment:
---

@ -0,0 +1,137 @@
/*
* Teletype jQuery Plugin
* @version 0.1
*
* @author Steve Whiteley
* @see http://teletype.rocks
* @see https://github.com/stvwhtly/jquery-teletype-plugin
*
* Copyright (c) 2014 Steve Whiteley
* Dual licensed under the MIT or GPL Version 2 licenses.
*
*/
( function ( $ ) {
$.fn.teletype = function( options ) {
var settings = $.extend( {}, $.fn.teletype.defaults, options );
var self = $( this ),
output = null,
current = {
string: '',
index: 0,
position: 0,
loop: 0
};
var next = function() {
current.index++;
if ( current.index >= settings.text.length ) {
current.index = 0;
current.loop++;
if ( settings.loop != false && ( settings.loop == current.loop ) ) {
return false;
}
}
current.position = 0;
current.string = settings.text[current.index];
return true;
};
var type = function() {
if ( settings.prefix && current.position == 0 ) {
if ( current.loop == 0 && current.index == 0 ) {
$( '<span />' ).addClass( 'teletype-prefix' ).html( settings.prefix ).prependTo( self );
}
}
var letters = current.string.split( '' ),
letter = letters[current.position];
if ( letter == '^' || letter == '~' ) {
var end = current.string.substr( current.position + 1 ).indexOf( ' ' );
var value = current.string.substr( current.position + 1, end );
if ( $.isNumeric( value ) ) {
current.string = current.string.replace( letter + value + ' ', '' );
if ( letter == '^' ) {
window.setTimeout( function() {
window.setTimeout( type, delay( settings.typeDelay ) );
}, value );
} else {
var index = current.position - value;
current.string = current.string.substr( 0, index - 1 ) + current.string.substr( current.position - 1 );
window.setTimeout( function() {
backspace( Math.max( index, 0 ) );
}, delay( settings.backDelay ) );
}
return;
}
} else if ( letter == '\\' ) {
var nextChar = current.string.substr( current.position + 1, 1 );
if ( nextChar == 'n' ) {
current.position++;
letter = '<br />';
}
}
output.html( output.html() + letter );
current.position++;
if ( current.position < current.string.length ) {
window.setTimeout( type, delay( settings.typeDelay ) );
} else if ( settings.preserve == false ) {
window.setTimeout( function() {
window.setTimeout( backspace, delay( settings.backDelay ) );
}, settings.delay );
} else {
output.html( output.html() + '<br />' + '<span class="teletype-prefix">' + settings.prefix + '</span>' );
if ( next() ) {
window.setTimeout( function() {
window.setTimeout( type, delay( settings.typeDelay ) );
}, settings.delay );
}
}
};
var backspace = function( stop ) {
if ( !stop ) {
stop = 0;
}
if ( current.position > stop ) {
output.html( output.html().slice( 0, -1 ) );
window.setTimeout( function() {
backspace( stop );
}, delay( settings.backDelay ) );
current.position--;
} else {
if ( stop == 0 ) {
if ( next() == false ) {
return;
}
}
window.setTimeout( type, delay( settings.typeDelay ) );
}
};
var delay = function( speed ) {
return Math.floor( Math.random() * 200 ) + speed;
};
return this.each( function() {
current.string = settings.text[current.index];
self.addClass( 'teletype' ).empty();
output = $( '<span />' ).addClass( 'teletype-text' ).appendTo( self );
if ( settings.cursor ) {
var cursor = $( '<span />' )
.text( settings.cursor )
.addClass( 'teletype-cursor' )
.appendTo( self );
setInterval ( function() {
cursor.animate( { opacity: 0 } ).animate( { opacity: 1 } );
}, settings.blinkSpeed );
}
type();
} );
};
$.fn.teletype.defaults = {
text: [ 'one', 'two', 'three' ],
typeDelay: 100,
backDelay: 50,
blinkSpeed: 1000,
delay: 2000,
cursor: '|',
preserve: false,
prefix: '',
loop: 0
};
}( jQuery ) );

@ -0,0 +1,137 @@
/*
* Teletype jQuery Plugin
* @version 0.1
*
* @author Steve Whiteley
* @see http://teletype.rocks
* @see https://github.com/stvwhtly/jquery-teletype-plugin
*
* Copyright (c) 2014 Steve Whiteley
* Dual licensed under the MIT or GPL Version 2 licenses.
*
*/
( function ( $ ) {
$.fn.teletype = function( options ) {
var settings = $.extend( {}, $.fn.teletype.defaults, options );
var self = $( this ),
output = null,
current = {
string: '',
index: 0,
position: 0,
loop: 0
};
var next = function() {
current.index++;
if ( current.index >= settings.text.length ) {
current.index = 0;
current.loop++;
if ( settings.loop != false && ( settings.loop == current.loop ) ) {
return false;
}
}
current.position = 0;
current.string = settings.text[current.index];
return true;
};
var type = function() {
if ( settings.prefix && current.position == 0 ) {
if ( current.loop == 0 && current.index == 0 ) {
$( '<span />' ).addClass( 'teletype-prefix' ).html( settings.prefix ).prependTo( self );
}
}
var letters = current.string.split( '' ),
letter = letters[current.position];
if ( letter == '^' || letter == '~' ) {
var end = current.string.substr( current.position + 1 ).indexOf( ' ' );
var value = current.string.substr( current.position + 1, end );
if ( $.isNumeric( value ) ) {
current.string = current.string.replace( letter + value + ' ', '' );
if ( letter == '^' ) {
window.setTimeout( function() {
window.setTimeout( type, delay( settings.typeDelay ) );
}, value );
} else {
var index = current.position - value;
current.string = current.string.substr( 0, index - 1 ) + current.string.substr( current.position - 1 );
window.setTimeout( function() {
backspace( Math.max( index, 0 ) );
}, delay( settings.backDelay ) );
}
return;
}
} else if ( letter == '\\' ) {
var nextChar = current.string.substr( current.position + 1, 1 );
if ( nextChar == 'n' ) {
current.position++;
letter = '<br />';
}
}
output.html( output.html() + letter );
current.position++;
if ( current.position < current.string.length ) {
window.setTimeout( type, delay( settings.typeDelay ) );
} else if ( settings.preserve == false ) {
window.setTimeout( function() {
window.setTimeout( backspace, delay( settings.backDelay ) );
}, settings.delay );
} else {
output.html( output.html() + '<br />' + '<span class="teletype-prefix">' + settings.prefix + '</span>' );
if ( next() ) {
window.setTimeout( function() {
window.setTimeout( type, delay( settings.typeDelay ) );
}, settings.delay );
}
}
};
var backspace = function( stop ) {
if ( !stop ) {
stop = 0;
}
if ( current.position > stop ) {
output.html( output.html().slice( 0, -1 ) );
window.setTimeout( function() {
backspace( stop );
}, delay( settings.backDelay ) );
current.position--;
} else {
if ( stop == 0 ) {
if ( next() == false ) {
return;
}
}
window.setTimeout( type, delay( settings.typeDelay ) );
}
};
var delay = function( speed ) {
return Math.floor( Math.random() * 200 ) + speed;
};
return this.each( function() {
current.string = settings.text[current.index];
self.addClass( 'teletype' ).empty();
output = $( '<span />' ).addClass( 'teletype-text' ).appendTo( self );
if ( settings.cursor ) {
var cursor = $( '<span />' )
.text( settings.cursor )
.addClass( 'teletype-cursor' )
.appendTo( self );
setInterval ( function() {
cursor.animate( { opacity: 0 } ).animate( { opacity: 1 } );
}, settings.blinkSpeed );
}
type();
} );
};
$.fn.teletype.defaults = {
text: [ 'one', 'two', 'three' ],
typeDelay: 100,
backDelay: 50,
blinkSpeed: 1000,
delay: 2000,
cursor: '|',
preserve: false,
prefix: '',
loop: 0
};
}( jQuery ) );

@ -0,0 +1,137 @@
/*
* Teletype jQuery Plugin
* @version 0.1
*
* @author Steve Whiteley
* @see http://teletype.rocks
* @see https://github.com/stvwhtly/jquery-teletype-plugin
*
* Copyright (c) 2014 Steve Whiteley
* Dual licensed under the MIT or GPL Version 2 licenses.
*
*/
( function ( $ ) {
$.fn.teletype = function( options ) {
var settings = $.extend( {}, $.fn.teletype.defaults, options );
var self = $( this ),
output = null,
current = {
string: '',
index: 0,
position: 0,
loop: 0
};
var next = function() {
current.index++;
if ( current.index >= settings.text.length ) {
current.index = 0;
current.loop++;
if ( settings.loop != false && ( settings.loop == current.loop ) ) {
return false;
}
}
current.position = 0;
current.string = settings.text[current.index];
return true;
};
var type = function() {
if ( settings.prefix && current.position == 0 ) {
if ( current.loop == 0 && current.index == 0 ) {
$( '<span />' ).addClass( 'teletype-prefix' ).html( settings.prefix ).prependTo( self );
}
}
var letters = current.string.split( '' ),
letter = letters[current.position];
if ( letter == '^' || letter == '~' ) {
var end = current.string.substr( current.position + 1 ).indexOf( ' ' );
var value = current.string.substr( current.position + 1, end );
if ( $.isNumeric( value ) ) {
current.string = current.string.replace( letter + value + ' ', '' );
if ( letter == '^' ) {
window.setTimeout( function() {
window.setTimeout( type, delay( settings.typeDelay ) );
}, value );
} else {
var index = current.position - value;
current.string = current.string.substr( 0, index - 1 ) + current.string.substr( current.position - 1 );
window.setTimeout( function() {
backspace( Math.max( index, 0 ) );
}, delay( settings.backDelay ) );
}
return;
}
} else if ( letter == '\\' ) {
var nextChar = current.string.substr( current.position + 1, 1 );
if ( nextChar == 'n' ) {
current.position++;
letter = '<br />';
}
}
output.html( output.html() + letter );
current.position++;
if ( current.position < current.string.length ) {
window.setTimeout( type, delay( settings.typeDelay ) );
} else if ( settings.preserve == false ) {
window.setTimeout( function() {
window.setTimeout( backspace, delay( settings.backDelay ) );
}, settings.delay );
} else {
output.html( output.html() + '<br />' + '<span class="teletype-prefix">' + settings.prefix + '</span>' );
if ( next() ) {
window.setTimeout( function() {
window.setTimeout( type, delay( settings.typeDelay ) );
}, settings.delay );
}
}
};
var backspace = function( stop ) {
if ( !stop ) {
stop = 0;
}
if ( current.position > stop ) {
output.html( output.html().slice( 0, -1 ) );
window.setTimeout( function() {
backspace( stop );
}, delay( settings.backDelay ) );
current.position--;
} else {
if ( stop == 0 ) {
if ( next() == false ) {
return;
}
}
window.setTimeout( type, delay( settings.typeDelay ) );
}
};
var delay = function( speed ) {
return Math.floor( Math.random() * 200 ) + speed;
};
return this.each( function() {
current.string = settings.text[current.index];
self.addClass( 'teletype' ).empty();
output = $( '<span />' ).addClass( 'teletype-text' ).appendTo( self );
if ( settings.cursor ) {
var cursor = $( '<span />' )
.text( settings.cursor )
.addClass( 'teletype-cursor' )
.appendTo( self );
setInterval ( function() {
cursor.animate( { opacity: 0 } ).animate( { opacity: 1 } );
}, settings.blinkSpeed );
}
type();
} );
};
$.fn.teletype.defaults = {
text: [ 'one', 'two', 'three' ],
typeDelay: 100,
backDelay: 50,
blinkSpeed: 1000,
delay: 2000,
cursor: '|',
preserve: false,
prefix: '',
loop: 0
};
}( jQuery ) );

@ -0,0 +1 @@
Subproject commit 4d319a1c3594e8efe16b47b2c0ced5716c0237e5
Loading…
Cancel
Save