diff --git a/js/rules-popup.js b/js/rules-popup.js new file mode 100644 index 00000000..515c5b71 --- /dev/null +++ b/js/rules-popup.js @@ -0,0 +1,42 @@ +/* + * rules-popup.js + * https://github.com/mkwia/lainchan/js/rules-popup.js + * + * Forces user to accept rules from /templates/rules.html on first welcome + * + * 2016 mkwia + * + * Usage: + * $config['additional_javascript'][] = 'js/jquery.min.js'; + * $config['additional_javascript'][] = 'js/rules-popup.js'; + * + */ + +if (typeof localStorage.rulesAccepted === "undefined") { + + // generate a 7-character long random string + captcha = Math.random().toString(36).substring(2, 9) + + $("
") + .prependTo("body"); + + $("#rules-popup") + .append("
lainchan rule agreement
") + .append("
") + .append("
"); + + $(".rules-popup-content-wrapper") + .append("
"); + $("#rules-popup-content") + .load("/templates/rules.html"); + + $(".rules-popup-bottom") + .append("
If you accept the rules, retype the captcha and press ACCEPT.
") + .append("
"); + $(".rules-popup-captcha-wrapper") + .append("
" + captcha + "
") + .append("
"); + $(".rules-popup-form") + .append("") + .append(""); +} \ No newline at end of file diff --git a/stylesheets/style.css b/stylesheets/style.css index 94428412..b495891f 100644 --- a/stylesheets/style.css +++ b/stylesheets/style.css @@ -1812,5 +1812,65 @@ table.fileboard .intro a { margin-left: 0px; } - - +/* Rules Popup */ +#rules-popup { + width: 80%; + height: 80%; + position: fixed; + z-index: 9999; + left: 50%; + margin-left: -40%; + top: 50%; + margin-top: -40vh; + background: #000000; + text-align: center; + font-family: sans-serif; + font-size: 14px; + color: #FFFFFF; +} +#rules-popup .rules-popup-top { + font-size: 40px; + line-height: 60px; + position: absolute; + top: 0px; + height: 60px; + width: 100%; +} +#rules-popup .rules-popup-content-wrapper { + text-align: left; + position: absolute; + bottom: 80px; + top: 60px; + width: 100%; + background-color: #DDDDDD; + overflow: auto; + color: #444; +} +#rules-popup #rules-popup-content { + padding: 10px; + font-size: 12px; +} +#rules-popup .rules-popup-bottom { + bottom: 0px; + height: 80px; + width: 100%; + position: absolute; +} +#rules-popup .rules-popup-bottom-instructions { + line-height: 40px; +} +#rules-popup .rules-popup-captcha-wrapper { + height: 40px; +} +#rules-popup .rules-popup-captcha { + display: inline-block; + border: 1px solid white; + font-family: serif; + padding: 3px; +} +#rules-popup .rules-popup-form { + display: inline-block; +} +#rules-popup .rules-popup-form-input { + width: 100px; +} diff --git a/templates/rules.html b/templates/rules.html new file mode 100644 index 00000000..1de2f1d4 --- /dev/null +++ b/templates/rules.html @@ -0,0 +1,68 @@ +
+

GLOBAL RULES

+
    +
  1. Do not post in or view any boards if you are under 18 years of age.
  2. +
  3. If you break the rules we will delete your post. Do it repeatedly and you'll be derezzed.
  4. +
  5. Do not call for mods, or announce reports in a thread.
  6. +
  7. Always argue in good faith and avoid using personal attacks.
  8. +
  9. You should always elaborate on your opinions rather than just spilling the soykaf.
  10. +
  11. Don't respond with aggression to perceived flames or trolls (or at all.)
  12. +
  13. Do not whine and cry about 8chan, "quality", "invasions", "newfags", mods, bans, or kalyx outside of /q/.
  14. +
  15. Do not spam or advertise unrelated content.
  16. +
  17. Do not post child pornography or questionable 2D/3DCG/3DPG sexual depictions of children. This includes "child models".
  18. +
  19. If you must post it, spoiler any NSFW content and make sure it's relevant to the discussion.
  20. +
  21. Do not upload malicious archives.
  22. +
  23. Read the rules again. /* infinite iteration will fix later */
  24. +
+
+ +
+

PRO TIPS FOR MAXIMUM FUN:

+
    +
  • The mods are not on powertrips, they are friendly and are trying to ensure the quality of lainchan, not belittle your ideas.
  • +
  • Lainchan is a place to have your voice heard but not a place for you to drown out others' voices.
  • +
  • Mods usually ask each other for opinions before doing anything. We hate having to ban someone.
  • +
  • Just relax and try to have fun. Jokes are always welcome.
  • +
  • Visit a board you've never been to. Try out /random/.
  • +
  • Max file size is 35 mb.
  • +
  • PDF, ePub, and webm are supported across the boards.
  • +
  • We ALWAYS need contributors to our board software, located on github
  • +
  • Dice rolling: posting in the email field with the form "dice XdY+/-Z" will result in X Y-sided dice rolled and summed, with the modifier Z added, the result is displayed at the top of the post body.
  • +
  • Be smart when posting about potentially illegal activities.
  • +
+
+ +
+

Boards

+
    +
  • /cyb/ is the general cyberpunk board for the discussion of the philosophy and anything else you can think of as being "cyberpunk".
  • +
  • /λ/ is the programming board.
  • +
      +
    • Hard technical discussion of software development and project ideas is the only intended purpose of this board.
    • +
    • The Beginner's General is where all questions concerning novice programming should go, unless there is a more specific thread for your interests.
    • +
    +
  • /tech/ is for the discussion of consumer technology.
  • +
      +
    • Discussion concerning programs not intimately related to programming belongs on /tech/.
    • +
    +
  • /zzz/ is the board for the discussion of dreams and dreaming techniques.
  • +
  • /drg/ is the board for discussing your waifu's experiences with drug usage, including buying and selling.
  • +
  • /lit/ is the board for reading, writing, and sharing written works of art.
  • +
  • /civ/ is for the discussion of politics, civic affairs and similar topics.
  • +
  • /diy/ is for the discussion of electronics and the construction and modification thereof.
  • +
      +
    • The construction and modification of objects that are not electronic is also welcomed.
    • +
    • Cooking is one example of a topic that would fit on /diy/.
    • +
    +
  • /art/ is the board for the discussion of other forms of art, including music, movies, and television.
  • +
  • /w/ is the board for the discussion of Japanese culture and anime.
  • +
  • /r/ is the board for the discussion of topics that do not have a dedicated board. It is not for purely random threads.
  • +
  • /layer/ is the ddt board. For more information see the sticky on the board or the official how-to guide.
  • +
  • /q/ is the questions board.
  • +
      +
    • In specific, questions about the moderation, the quality of Lainchan, feature requests, and other questions about the website are valid.
    • +
    +
  • Keep discussion rational. It's why we're here.
  • +
  • When in doubt about the topic of a board, lurk it for a while and check the catalog to get an idea of it.
  • +
+
\ No newline at end of file diff --git a/templates/themes/rules/rules.html b/templates/themes/rules/rules.html index 552db911..8f4b870a 100755 --- a/templates/themes/rules/rules.html +++ b/templates/themes/rules/rules.html @@ -23,74 +23,8 @@ mascot -
-

GLOBAL RULES

-
    -
  1. Do not post in or view any boards if you are under 18 years of age.
  2. -
  3. If you break the rules we will delete your post. Do it repeatedly and you'll be derezzed.
  4. -
  5. Do not call for mods, or announce reports in a thread.
  6. -
  7. Always argue in good faith and avoid using personal attacks.
  8. -
  9. You should always elaborate on your opinions rather than just spilling the soykaf.
  10. -
  11. Don't respond with aggression to perceived flames or trolls (or at all.)
  12. -
  13. Do not whine and cry about 8chan, "quality", "invasions", "newfags", mods, bans, or kalyx outside of /q/.
  14. -
  15. Do not spam or advertise unrelated content.
  16. -
  17. Do not post child pornography or questionable 2D/3DCG/3DPG sexual depictions of children. This includes "child models".
  18. -
  19. If you must post it, spoiler any NSFW content and make sure it's relevant to the discussion.
  20. -
  21. Do not upload malicious archives.
  22. -
  23. Read the rules again. /* infinite iteration will fix later */
  24. - -
-
- -
-

PRO TIPS FOR MAXIMUM FUN:

-
    -
  • The mods are not on powertrips, they are friendly and are trying to ensure the quality of lainchan, not belittle your ideas.
  • -
  • Lainchan is a place to have your voice heard but not a place for you to drown out others' voices.
  • -
  • Mods usually ask each other for opinions before doing anything. We hate having to ban someone.
  • -
  • Just relax and try to have fun. Jokes are always welcome.
  • -
  • Visit a board you've never been to. Try out /random/.
  • -
  • Max file size is 35 mb.
  • -
  • PDF, ePub, and webm are supported across the boards.
  • -
  • We ALWAYS need contributors to our board software, located on github
  • -
  • Dice rolling: posting in the email field with the form "dice XdY+/-Z" will result in X Y-sided dice rolled and summed, with the modifier Z added, the result is displayed at the top of the post body.
  • -
  • Be smart when posting about potentially illegal activities.
  • -
-
-
-

Boards

-
    -
  • /cyb/ is the general cyberpunk board for the discussion of the philosophy and anything else you can think of as being "cyberpunk".
  • -
  • /λ/ is the programming board.
  • -
      -
    • Hard technical discussion of software development and project ideas is the only intended purpose of this board.
    • -
    • The Beginner's General is where all questions concerning novice programming should go, unless there is a more specific thread for your interests.
    • -
    -
  • /tech/ is for the discussion of consumer technology.
  • -
      -
    • Discussion concerning programs not intimately related to programming belongs on /tech/.
    • -
    -
  • /zzz/ is the board for the discussion of dreams and dreaming techniques.
  • -
  • /drg/ is the board for discussing your waifu's experiences with drug usage, including buying and selling.
  • -
  • /lit/ is the board for reading, writing, and sharing written works of art.
  • -
  • /civ/ is for the discussion of politics, civic affairs and similar topics.
  • -
  • /diy/ is for the discussion of electronics and the construction and modification thereof.
  • -
      -
    • The construction and modification of objects that are not electronic is also welcomed.
    • -
    • Cooking is one example of a topic that would fit on /diy/.
    • -
    -
  • /art/ is the board for the discussion of other forms of art, including music, movies, and television.
  • -
  • /w/ is the board for the discussion of Japanese culture and anime.
  • -
  • /r/ is the board for the discussion of topics that do not have a dedicated board. It is not for purely random threads.
  • -
  • /layer/ is the ddt board. For more information see the sticky on the board or the official how-to guide.
  • -
  • /q/ is the questions board.
  • -
      -
    • In specific, questions about the moderation, the quality of Lainchan, feature requests, and other questions about the website are valid.
    • -
    -
  • Keep discussion rational. It's why we're here.
  • -
  • When in doubt about the topic of a board, lurk it for a while and check the catalog to get an idea of it.
  • - -
+ { include '/templates/rules.html' } + {% endfilter %}