Initial commit
Some checks failed
/ render (push) Failing after 33s

This commit is contained in:
ayakael 2025-03-31 15:27:36 -04:00
commit a41f3baa84
No known key found for this signature in database
GPG key ID: 70904985A46AF9AF
36 changed files with 1780 additions and 0 deletions

1
.domains Normal file
View file

@ -0,0 +1 @@
gripuqam.org.grip-uqam.ilot.io

View file

@ -0,0 +1,32 @@
on:
pull_request:
types: [ closed, merged ]
jobs:
cleanup:
runs-on: x86_64
container:
image: alpine:latest
steps:
- name: Environment setup
run: |
apk add git nodejs jq coreutils curl tree gawk grep
- name: Pages repo pull
uses: actions/checkout@v4
with:
fetch-depth: 0
ref: pages
- name: Render website
run: |
export GITHUB_PR_NAME=$(grep -l ${{ github.sha }} previews/*/git_sha.txt | awk -F '/' '{print $2}')
echo $GITHUB_PR_NAME >> $GITHUB_ENV
rm -rf previews/$GITHUB_PR_NAME || true
cd previews
tree -d -H '.' -L 1 --noreport --charset utf-8 -T "Versions" -o index.html
- name: Website upload
run: |
git config user.name "forgejo-actions[bot]"
git config user.email "dev@ayakael.net"
git add .
git commit -m "Clean-up $GITHUB_PR_NAME"
git push

View file

@ -0,0 +1,41 @@
on:
push:
branches:
- 'main'
jobs:
render:
runs-on: x86_64
container:
image: alpine:latest
steps:
- name: Environment setup
run: |
apk add git ikiwiki po4a perl-yaml-tiny tree nodejs imagemagick-perlmagick imagemagick imagemagick-jpeg findutils bash imagemagick-webp
- name: Repo pull
uses: actions/checkout@v4
with:
fetch-depth: 1
- name: Pages repo pull
uses: actions/checkout@v4
with:
fetch-depth: 0
ref: pages
path: public
- name: Render website
run: ikiwiki --setup ikiwiki.setup
- name: Website upload
run: |
cp .pages-domains public/.domains
cp .pages-redirect public/_redirects
git log -1 --pretty=%B > commit.txt
cd public
find -name 'index.html' -type 'l' -delete
find -name 'index.fr.html' -exec bash -c 'ln -s "${0/.*\/}" "${0/.fr/}"' {} \;
date > generated.txt
# Note: the following account information will not work on GHES
git config user.name "forgejo-actions[bot]"
git config user.email "dev@ayakael.net"
git add .
git commit -F ../commit.txt
git push

View file

@ -0,0 +1,47 @@
on:
pull_request:
types: [ assigned, opened, synchronize, reopened ]
jobs:
preview:
runs-on: x86_64
container:
image: alpine:latest
steps:
- name: Environment setup
run: |
apk add git ikiwiki po4a perl-yaml-tiny tree nodejs jq coreutils curl imagemagick-perlmagick imagemagick imagemagick-jpeg findutils bash imagemagick-webp
echo "GITHUB_PR_NAME=$(curl -Ls ${{ github.server_url }}/api/v1/repos/${{ github.repository }}/pulls/${{ github.ref_name }} -H 'accept: application/json' -H 'Authorization: token ${{ secrets.FORGEJO_TOKEN }}' | jq .title | tr ' ' '-' | tr -d ':' | tr -d '"' | tr '[:upper:]' '[:lower:]' | tr '/' '-' | tr -d ',')" >> $GITHUB_ENV
- name: Repo pull
uses: actions/checkout@v4
with:
fetch-depth: 1
- name: Public repo pull
uses: actions/checkout@v4
with:
fetch-depth: 0
ref: pages
path: public
- name: Render website
run: |
rm -rf public/previews/$GITHUB_PR_NAME || true
mkdir -p public/previews/$GITHUB_PR_NAME
sed -i "s|destdir.*|destdir: ./public/previews/$GITHUB_PR_NAME|" ikiwiki.setup
ikiwiki --setup ikiwiki.setup
cd public/previews
tree -d -H '.' -L 1 --noreport --charset utf-8 -T "Versions" -o index.html
cd $GITHUB_PR_NAME
find -name 'index.html' -type 'l' -delete
find -name 'index.fr.html' -exec bash -c 'ln -s "${0/.*\/}" "${0/.fr/}"' {} \;
- name: Website upload
run: |
git log -1 --pretty=%B > commit.txt
cd public
date > previews/$GITHUB_PR_NAME/generated.txt
echo ${{ github.sha }} > previews/$GITHUB_PR_NAME/git_sha.txt
# Note: the following account information will not work on GHES
git config user.name "forgejo-actions[bot]"
git config user.email "dev@ayakael.net"
git add .
git commit -F ../commit.txt
git push

9
.gitignore vendored Normal file
View file

@ -0,0 +1,9 @@
.ikiwiki/
public/
http-server/
*.mo
*.mo~
*.po~
*.pot~
*.pyc
*.swp

1
.pages-domains Normal file
View file

@ -0,0 +1 @@
pages.gripuqam.org.grip-uqam.ilot.io

1
.pages-redirect Normal file
View file

@ -0,0 +1 @@
/index.fr.html index.html 302

177
css/local.css Normal file
View file

@ -0,0 +1,177 @@
/*
* Color palette
*/
:root {
--bs-danger-rgb: 159, 19, 19;
--bs-primary-rgb: 55, 106, 48;
--bs-secondary-rgb: 255, 255, 255;
--bs-primary: #376A30;
--bs-link-color-rgb: 55, 106, 48;
--bs-link-hover-color-rgb: 40, 89, 33;
}
.btn-primary, .btn-primary:hover, .btn-primary:active, .btn-primary:visited {
--bs-btn-bg: var(--bs-primary) !important;
--bs-btn-hover-bg: var(--bs-primary) !important;
--bs-btn-border-color: var(--bs-primary) !important;
--bs-btn-active-bg: var(--bs-primary) !important;
--bs-link-color-rgb: 255, 255, 255;
--bs-link-hover-color-rgb: 230, 230, 230;
}
/*
* Page width settings
*/
/* Override bootstrap sass variables for container-max-width */
@media (min-width: 1400px) {
.container, .container-lg, .container-md, .container-sm, .container-xl, .container-xxl {
max-width: 1140px;
}
}
@media (min-width: 1200px) {
.container-lg, .container-md, .container-sm, .container-xl, .container-xxl {
max-width: 1140px;
}
}
.ratio-4x3 {
@media (min-width: 768px) {
--bs-aspect-ratio: 33.33%; // 1x3
}
}
/* Without this images like to pop-out*/
#content img {
max-width: 100%;
}
/*
* Caroussel settings
*/
/* Makes caroussel buttons under caroussel */
.carousel-control-prev,
.carousel-control-next{
align-self: flex-end; /* Aligns it at the bottom */
padding-bottom: 10px;
}
/*
* Card settings
*/
.card {
padding: 0px 30px;
position: relative;
border-radius: 6px;
box-shadow: 0 4px 8px 0 rgba(0,0,0,0.2);
}
/*
* Fonts settings
*/
/* Applies link-underline to a within a div, rather than a directly */
.link-underline a {
text-decoration-color: rgba(var(--bs-link-color-rgb),var(--bs-link-underline-opacity,1)) !important;
}
h1, h2, h3, h4, h5 {
--bs-text-opacity: 1;
color: rgba(var(--bs-primary-rgb),var(--bs-text-opacity)) !important;
font-weight: bold;
}
/* enlarge body point size for charter for larger displays */
@media (min-device-width: 750px) {
body {
font-size: 20px;
line-height: 1.5; /* default in FF is ~1.48, try seems a bit to sparse */
}
/* to match the other bootstrap workaround, below */
blockquote {
font-size: 18px;
}
/* UI elements should be a little more intrusive */
.btn, .navbar, .footer {
font-size: 22px;
font-weight: bold;
}
}
/* Font stacks from: https://modernfontstacks.com/#font-stacks */
.navbar, .footer, body {
font-family: 'OpenDyslexic', Seravek, 'Gill Sans Nova', Ubuntu, Calibri, 'DejaVu Sans', source-sans-pro, sans-serif;
}
/*
* Navbar
*/
/* Language switchers */
.language-switcher {
font-size: 14px;
background: #f8f8f8;
color: #333;
border-color: #ccc;
}
.language-switcher:hover {
background: #e6e6e6;
}
/* Main buttons */
.action-button:hover {
background: #e6e6e6;
}
/* In this case used for the language drop-down menu */
.dropdown-menu li a {
font-size: 14px;
display: block;
padding: 3px 20px;
clear: both;
font-weight: 400;
line-height: 1.42857143;
color: #333;
border-color: #ccc;
white-space: nowrap;
}
.dropdown-menu {
--bs-dropdown-bg: #fff;
--bs-dropdown-border-color: #000;
}
.dropdown-menu li a:hover {
background: #e6e6e6;
}
/* Usually is set automatically by bootstrap, but do it manually to let ikiwiki handle links */
.nav-link {
--bs-nav-link-padding-y: 5px;
--bs-nav-link-padding-x: 15px;
}
.nav-link li a, .nav-link .selflink {
display: block;
padding: var(--bs-nav-link-padding-y) var(--bs-nav-link-padding-x);
font-size: var(--bs-nav-link-font-size);
font-weight: var(--bs-nav-link-font-weight);
color: #FFFFFF;
text-decoration: none;
transition: color .15s ease-in-out, background-color .15s ease-in-out, border-color .15s ease-in-out;
}
.nav-link .selflink {
color: #a6a6a6;
}
.nav-link li a:hover, .nav-link .selflink:hover {
color: #a6a6a6;
}

36
css/opendyslexic.css Normal file
View file

@ -0,0 +1,36 @@
@font-face {
font-family: 'opendyslexic';
src:
src: url('../fonts/OpenDyslexic-Regular.woff2') format('woff2'),
url('../fonts/OpenDyslexic-Regular.woff') format('woff'),
url('../fonts/OpenDyslexic-Regular.otp') format('opentype');
font-style: normal;
font-weight: normal;
}
@font-face {
font-family: 'opendyslexic';
src: url('../fonts/OpenDyslexic-Italic.woff2') format('woff2'),
url('../fonts/OpenDyslexic-Italic.woff') format('woff'),
url('../fonts/OpenDyslexic-Italic.otp') format('opentype');
font-style: italic;
font-weight: normal;
}
@font-face {
font-family: 'opendyslexic';
src: url('../fonts/OpenDyslexic-Bold.woff2') format('woff2'),
url('../fonts/OpenDyslexic-Bold.woff') format('woff'),
url('../fonts/OpenDyslexic-Bold.otp') format('opentype');
font-weight: bold;
font-style: normal;
}
@font-face {
font-family: 'opendyslexic';
src: url('../fonts/OpenDyslexic-BoldItalic.woff2') format('woff2'),
url('../fonts/OpenDyslexic-BoldItalic.woff') format('woff'),
url('../fonts/OpenDyslexic-BoldItalic.otp') format('opentype');
font-weight: bold;
font-style: italic;
}

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
fonts/OpenDyslexic-Bold.eot Normal file

Binary file not shown.

BIN
fonts/OpenDyslexic-Bold.otf Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

15
footer.html Normal file
View file

@ -0,0 +1,15 @@
<div class="text-center">
<h2>Liens intéressants</h2>
<ul>
<li><a href=https://www.facebook.com/GRIPUQAM" target="_blank">Page Facebook du GRIP-UQÀM</a></li>
<li><a href="https://www.facebook.com/groups/gripuqam" target="_blank">Groupe Facebook du GRIP-UQÀM</a></li>
<li><a href="https://assoarmu.wordpress.com/a-propos/" target="_blank">Association pour la Réappropriation des Milieux Urbains</a></li>
<li><a href="https://bibliothequedira.wordpress.com/" target="_blank">Bibliothèque DIRA</a></li>
<li><a href="https://www.resistancemontreal.org/calendrier" target="_blank">Calendrier Résistance Montréal</a></li>
<li><a href="https://www.clac-montreal.net/" target="_blank">Convergence des luttes anticapitalistes Montréal</a></li>
<li><a href="https://www.qpirgconcordia.org/" target="_blank">QPIRG Concordia GRIP</a></li>
<li><a href="https://qpirgmcgill.org/" target="_blank">QPIRG | GRIP McGill</a></li>
<li><a href="https://rqge.qc.ca/" target="_blank">Réseau Québecois des Groupes Écologistes</a></li>
<li><a href="https://www.pourlatransitionenergetique.org/" target="_blank">Front commun pour la transition énergétique</a></li>
</ul>
</div>

416
ikiwiki.setup Normal file
View file

@ -0,0 +1,416 @@
# IkiWiki::Setup::Yaml - YAML formatted setup file
#
# Setup file for ikiwiki.
#
# Passing this to ikiwiki --setup will make ikiwiki generate
# wrappers and build the wiki.
#
# Remember to re-run ikiwiki --setup any time you edit this file.
#
# name of the wiki
wikiname: GRIP-UQAM
# contact email for wiki
adminemail: support@ilot.io
# users who are wiki admins
adminuser: []
# users who are banned from the wiki
banned_users: []
# where the source of the wiki is located
srcdir: ./
# where to build the wiki
destdir: ./public
# base url to the wiki
url: https://grip-uqam.org
# url to the ikiwiki.cgi
cgiurl: ''
# do not adjust cgiurl if CGI is accessed via different URL
reverse_proxy: 0
# filename of cgi wrapper to generate
cgi_wrapper: ''
# mode for cgi_wrapper (can safely be made suid)
cgi_wrappermode: 06755
# number of seconds to delay CGI requests when overloaded
cgi_overload_delay: ''
# message to display when overloaded (may contain html)
cgi_overload_message: ''
# enable optimization of only refreshing committed changes?
only_committed_changes: 0
# rcs backend to use
rcs: ''
# plugins to add to the default configuration
add_plugins:
- html
- goodstuff
- favicon
- highlight
- typography
- sidebar2
- inline
# plugins to disable
disable_plugins:
- htmlscrubber
# additional directory to search for template files
templatedir: ./templates
#templatedir: /usr/share/ikiwiki/templates
# base wiki source location
#underlaydir: /usr/share/ikiwiki/basewiki
# display verbose messages?
verbose: 1
# log to syslog?
#syslog: 1
# create output files named page/index.html?
usedirs: 1
# use '!'-prefixed preprocessor directives?
prefix_directives: 1
# use page/index.mdwn source files
indexpages: 0
# enable Discussion pages?
discussion: 1
# name of Discussion pages
discussionpage: Discussion
# use elements new in HTML5 like <section>?
html5: 1
# only send cookies over SSL connections?
sslcookie: 0
# extension to use for new pages
default_pageext: mdwn
# extension to use for html files
htmlext: html
# strftime format string to display date
timeformat: '%c'
# UTF-8 locale to use
#locale: en_US.UTF-8
# put user pages below specified page
userdir: ''
# how many backlinks to show before hiding excess (0 to show all)
numbacklinks: 10
# attempt to hardlink source files? (optimisation for large files)
hardlink: 0
# force ikiwiki to use a particular umask (keywords public, group or private, or a number)
#umask: public
# group for wrappers to run in
#wrappergroup: ikiwiki
# extra library and plugin directories
libdirs: [plugins]
# extra library and plugin directory (searched after libdirs)
libdir: ''
# environment variables
ENV: {}
# time zone name
timezone: :/etc/localtime
# regexp of normally excluded files to include
#include: ^\.htaccess$
# regexp of files that should be skipped
exclude: ^(tools/.*|public/.*|plugins/.*)$
# specifies the characters that are allowed in source filenames
wiki_file_chars: -[:alnum:]+/.:_
# allow symlinks in the path leading to the srcdir (potentially insecure)
allow_symlinks_before_srcdir: 0
# cookie control
cookiejar:
file: ~/.ikiwiki/cookies
# set custom user agent string for outbound HTTP requests e.g. when fetching aggregated RSS feeds
useragent: ikiwiki/3.20160509
# theme has a responsive layout? (mobile-optimized)
responsive_layout: 1
# try harder to produce deterministic output
deterministic: 0
######################################################################
# core plugins
# (editpage, htmlscrubber, inline, link, meta, parentlinks, templatebody)
######################################################################
# htmlscrubber plugin
# PageSpec specifying pages not to scrub
#htmlscrubber_skip: '!*/Discussion'
# inline plugin
# enable rss feeds by default?
#rss: 0
# enable atom feeds by default?
#atom: 0
# allow rss feeds to be used?
#allowrss: 0
# allow atom feeds to be used?
#allowatom: 0
# urls to ping (using XML-RPC) on feed update
pingurl: []
######################################################################
# auth plugins
# (anonok, blogspam, emailauth, httpauth, lockedit, moderatedcomments,
# opendiscussion, openid, passwordauth, signinedit)
######################################################################
# anonok plugin
# PageSpec to limit which pages anonymous users can edit
#anonok_pagespec: '*/discussion'
# blogspam plugin
# PageSpec of pages to check for spam
#blogspam_pagespec: postcomment(*)
# options to send to blogspam server
#blogspam_options: blacklist=1.2.3.4,blacklist=8.7.6.5,max-links=10
# blogspam server JSON url
#blogspam_server: ''
# emailauth plugin
# email address to send emailauth mails as (default: adminemail)
#emailauth_sender: ''
# httpauth plugin
# url to redirect to when authentication is needed
#cgiauthurl: http://example.com/wiki/auth/ikiwiki.cgi
# PageSpec of pages where only httpauth will be used for authentication
#httpauth_pagespec: '!*/Discussion'
# lockedit plugin
# PageSpec controlling which pages are locked
#locked_pages: '!*/Discussion'
# moderatedcomments plugin
# PageSpec matching users or comment locations to moderate
#moderate_pagespec: '*'
# openid plugin
# url pattern of openid realm (default is cgiurl)
#openid_realm: ''
# url to ikiwiki cgi to use for openid authentication (default is cgiurl)
#openid_cgiurl: ''
# passwordauth plugin
# a password that must be entered when signing up for an account
#account_creation_password: s3cr1t
# cost of generating a password using Authen::Passphrase::BlowfishCrypt
#password_cost: 8
######################################################################
# format plugins
# (creole, highlight, hnb, html, mdwn, otl, rawhtml, rst, textile, txt)
######################################################################
# highlight plugin
# types of source files to syntax highlight
#tohighlight: .c .h .cpp .pl .py Makefile:make
# location of highlight's filetypes.conf
#filetypes_conf: /etc/highlight/filetypes.conf
# location of highlight's langDefs directory
#langdefdir: /usr/share/highlight/langDefs
# mdwn plugin
# enable multimarkdown features?
#multimarkdown: 0
# disable use of markdown discount?
#nodiscount: 0
######################################################################
# special-purpose plugins
# (osm, underlay)
######################################################################
# osm plugin
# the default zoom when you click on the map link
#osm_default_zoom: 15
# the icon shown on links and on the main map
#osm_default_icon: ikiwiki/images/osm.png
# the alt tag of links, defaults to empty
#osm_alt: ''
# the output format for waypoints, can be KML, GeoJSON or CSV (one or many, comma-separated)
#osm_format: KML
# the icon attached to a tag, displayed on the map for tagged pages
#osm_tag_default_icon: icon.png
# Url for the OpenLayers.js file
#osm_openlayers_url: http://www.openlayers.org/api/OpenLayers.js
# Layers to use in the map. Can be either the 'OSM' string or a type option for Google maps (GoogleNormal, GoogleSatellite, GoogleHybrid or GooglePhysical). It can also be an arbitrary URL in a syntax acceptable for OpenLayers.Layer.OSM.url parameter.
#osm_layers:
# OSM: GoogleSatellite
# Google maps API key, Google layer not used if missing, see https://code.google.com/apis/console/ to get an API key
#osm_google_apikey: ''
# underlay plugin
# extra underlay directories to add
#add_underlays:
#- /home/axil/wiki.underlay
######################################################################
# web plugins
# (404, attachment, comments, editdiff, edittemplate, getsource, google,
# goto, mirrorlist, remove, rename, repolist, search, theme, userlist,
# websetup, wmd)
######################################################################
# attachment plugin
# enhanced PageSpec specifying what attachments are allowed
#allowed_attachments: virusfree() and mimetype(image/*) and maxsize(50kb)
# virus checker program (reads STDIN, returns nonzero if virus found)
#virus_checker: clamdscan -
# comments plugin
# PageSpec of pages where comments are allowed
#comments_pagespec: blog/* and !*/Discussion
# PageSpec of pages where posting new comments is not allowed
#comments_closed_pagespec: blog/controversial or blog/flamewar
# Base name for comments, e.g. "comment_" for pages like "sandbox/comment_12"
#comments_pagename: ''
# Interpret directives in comments?
#comments_allowdirectives: 0
# Allow anonymous commenters to set an author name?
#comments_allowauthor: 0
# commit comments to the VCS
#comments_commit: 1
# Restrict formats for comments to (no restriction if empty)
#comments_allowformats: mdwn txt
# getsource plugin
# Mime type for returned source.
#getsource_mimetype: text/plain; charset=utf-8
# mirrorlist plugin
# list of mirrors
#mirrorlist: {}
# generate links that point to the mirrors' ikiwiki CGI
#mirrorlist_use_cgi: 1
# repolist plugin
# URIs of repositories containing the wiki's source
#repositories:
#- svn://svn.example.org/wiki/trunk
# search plugin
# path to the omega cgi program
#omega_cgi: /usr/lib/cgi-bin/omega/omega
# use google site search rather than internal xapian index?
#google_search: 1
# theme plugin
# name of theme to enable
#theme: night_city
# websetup plugin
# list of plugins that cannot be enabled/disabled via the web interface
#websetup_force_plugins: []
# list of additional setup field keys to treat as unsafe
#websetup_unsafe: []
# show unsafe settings, read-only, in web interface?
#websetup_show_unsafe: 1
######################################################################
# widget gins
# (calendar, color, conditional, cutpaste, date, format, fortune,
# graphviz, haiku, headinganchors, img, linkmap, listdirectives, map,
# more, orphans, pagecount, pagestats, poll, polygen, postsparkline,
# progress, shortcut, sparkline, table, template, teximg, toc, toggle,
# version)
######################################################################
# calendar plugin
# base of the archives hierarchy
#archivebase: archives
# PageSpec of pages to include in the archives, if option `calendar_autocreate` is true.
#archive_pagespec: page(posts/*) and !*/Discussion
# autocreate new calendar pages?
#calendar_autocreate: 1
# if set, when building calendar pages, also build pages of year and month when no pages were published (building empty calendars).
#calendar_fill_gaps: 1
# img plugin
# Image formats to process (jpeg, png, gif, svg, pdf or 'everything' to accept all)
#img_allowed_formats: [svg, webp]
# listdirectives plugin
# directory in srcdir that contains directive descriptions
#directive_description_dir: ikiwiki/directive
# teximg plugin
# Should teximg use dvipng to render, or dvips and convert?
#teximg_dvipng: ''
# LaTeX prefix for teximg plugin
#teximg_prefix: |
# \documentclass{article}
# \usepackage[utf8]{inputenc}
# \usepackage{amsmath}
# \usepackage{amsfonts}
# \usepackage{amssymb}
# \pagestyle{empty}
# \begin{document}
# LaTeX postfix for teximg plugin
#teximg_postfix: \end{document}
######################################################################
# other plugins
# (aggregate, autoindex, brokenlinks, camelcase, ddate, embed, favicon,
# filecheck, flattr, goodstuff, htmlbalance, localstyle, loginselector,
# notifyemail, pagetemplate, pingee, pinger, prettydate, recentchanges,
# recentchangesdiff, relativedate, rsync, sidebar, smiley,
# sortnaturally, tag, testpagespec, trail, transient)
######################################################################
# aggregate plugin
# enable aggregation to internal pages?
#aggregateinternal: 1
# allow aggregation to be triggered via the web?
#aggregate_webtrigger: 0
# autoindex plugin
# commit autocreated index pages
#autoindex_commit: 1
# camelcase plugin
# list of words to not turn into links
#camelcase_ignore: []
# flattr plugin
# userid or user name to use by default for Flattr buttons
#flattr_userid: joeyh
# pinger plugin
# how many seconds to try pinging before timing out
#pinger_timeout: 15
# prettydate plugin
# format to use to display date
#prettydateformat: '%X, %B %o, %Y'
# recentchanges plugin
# name of the recentchanges page
recentchangespage: recentchanges
# number of changes to track
recentchangesnum: 100
# rsync plugin
# command to run to sync updated pages
#rsync_command: rsync -qa --delete . user@host:/path/to/docroot/
# sidebar plugin
# show sidebar page on all pages?
#global_sidebars: 1
# tag plugin
# parent page tags are located under
#tagbase: tag
# autocreate new tag pages?
#tag_autocreate: 1
# commit autocreated tag pages
#tag_autocreate_commit: 1
# sidebar2 plugin
# https://ikiwiki.info/plugins/contrib/sidebar2/
global_sidebars:
- sidebar
- sidebar
- "*"
- footer
- footer
- "*"
# po plugin
# used to set the "master" language
po_master_language: fr|Français
# po_slave_languages is used to set the list of supported "slave" languages
po_slave_languages:
- en|English
# configures what pages are translatable
po_translatable_pages: ''
# used to decide how internal links should be generated, depending on web server features and site-specific preferences.
po_link_to: current

264
index.html Normal file
View file

@ -0,0 +1,264 @@
[[!meta title="Accueil"]]
[[!meta description="Le Groupe de Recherche dIntérêt Public du Québec à lUniversité du Québec à Montréal (GRIP-UQAM) réunit des personnes de la communauté étudiante uqamienne souhaitant agir de façon équitable en visant le très long terme pour le bien-être social et écologique des collectivités présentes et futures dans une perspective anticoloniale."]]
<div class="block">
<a href="https://f.gripuqam.org/bienvenue?newtest=Y" target="_blank">Abonne-toi à notre infolettre, dis-nous tes intérêts</a> ou envoie-nous [[un courriel|contact]] ! :)
</div>
<div class="block">
<h2>Comités du GRIPUQAM</h2>
<p>Voici la liste des comités du GRIPUQAM :</p>
<div class="row">
<div class="col">
<ul>
<li>[[Centre Social l'Achoppe|index#achoppe]]</li>
<li>[[Coordination|index#coordination]]</li>
<li>[[CRAPAUD|index#crapaud]]</li>
<li>[[Éducation Populaire|index#educpop]]</li>
<li>[[Lueurs|index#lueurs]]</li>
<li>[[Médi@s Libres|index#medialibre]]</li>
</ul>
</div>
<div class="col">
<ul>
<li>[[Projet Accompagnement Solidarité Colombie (PASC)|index#pasc]]</li>
<li>[[SOS Territoire / l'Alliance Mamo en construction|index#sosterritoire]]</li>
<li>[[Stasis|index#stasis]]</li>
<ul>
</div>
</div>
<p>Suivez-nous sur <a href="https://www.facebook.com/GRIPUQAM" target="_blank">facebook</a> ou <a href="https://www.instagram.com/grip_uqam" target="_blank">instagram</a> !</p>
<p>Voir les [[anciens comités|ancienscomites].</p>
<p>Voir les [[questions-réponses|faq]].</p>
</div>
<div class="block">
<a name="achoppe">
<h2>Centre Social l'Achoppe</h2>
<p>Le <a href="https://www.facebook.com/lecentresocial"
target="_blank">Centre Social l'Achoppe</a>, anciennement le Collectif
étudiant de lutte pour des lieux urbains libérés (CELLUL) entend lutter contre
la marchandisation de lespace public, la gentrification des quartiers, la
bétonisation de la ville ainsi que la dérive sécuritaire et la surveillance de
nos milieux.</p>
<div class="text-center">
<p><a href="https://www.instagram.com/csa_lachoppe/" class="instagram" target="_blank">Instagram</a> <a href="https://www.facebook.com/lecentresocial" class="facebook" target="_blank">Facebook</a> <a href="mailto:lachoppe@riseup.net" class="email" target="_blank">Email</a></p>
<p><a href="https://www.facebook.com/bchoppe" class="facebook" target="_blank">B-choppe, atelier communautaire de vélo du Centre social L'Achoppe</a></p>
</div>
</div>
<div class="block">
<a name="coordination">
<h2>La Coordination</h2>
<p>Composée de léquipe des personnes à la co-coordination, du conseil exécutif,
du conseil dadministration et des autres personnes qui souhaitent sy
impliquer, la coordination soccupe des affaires courantes du GRIP, assure
une communication avec et entre les comités et organisent des activités
dintérêt général.</p>
[[Joignez-nous|se-joindre]] ! [[Écrivez-nous|contact]] !
<div class="text-center">
<p><a href="https://www.instagram.com/grip_uqam/" class="instagram" target="_blank">Instagram</a> <a href="https://www.facebook.com/GRIPUQAM" class="facebook" target="_blank">Facebook</a> <a href="mailto:info@gripuqam.org" class="email" target="_blank">Email</a> <a href="https://gripuqam.org/" class="website" target="_blank">Site web</a></p>
</div>
</div>
<div class="block">
<a name=crapaud">
<h2>CRAPAUD</h2>
<p>Le CRAPAUD a comme mission de développer et promouvoir une agriculture
urbaine plurielle, accessible, créative et viable par lexpérimentation, la
pratique, lautogestion, la recherche, la diffusion et lactivité
politique.</p>
<div class="text-center">
<p><a href="https://www.instagram.com/crapauduqam/" class="instagram" target="_blank">Instagram</a> <a href="https://www.facebook.com/crapauduqam" class="facebook" target="_blank">Facebook</a> <a href="mailto:info@lecrapaud.org" class="email" target="_blank">Email</a> <a href="https://lecrapaud.org/" class="website" target="_blank">Site web</a></p>
</div>
</div>
<div class="block">
<a name="educpop">
<h2>Éducation populaire</h2>
<p>Le comité Éducation populaire organise des « teach-ins » (journée
dateliers, podcasts, conférences et discussions) et une banque dateliers
anticapitalistes pour rassembler et renforcer les différents groupes et
mouvement anticapitalistes de Montréal, dans une perspective déducation
populaire.</p>
<div class="text-center">
<p><a href="mailto:info@clac-montreal.net" class="email" target="_blank">Email</a> <a href="https://www.clac-montreal.net/" class="website" target="_blank">Site web</a></p>
</div>
</div>
<div class="block">
<a name="medialibre">
<h2>Médi@s Libres</h2>
<p><a href="https://www.facebook.com/M%C3%A9dias-Libres-142108832620801/"
target="_blank">Médias Libres</a> est un collectif de médias alternatifs qui
vise à promouvoir des discours médiatiques alternatifs. Nous travaillons tant à
la production, quà la diffusion de projets médiatiques porteurs dune
perspective originale et critique. Nous oeuvrons également au réseautage des
médias indépendants. Notre démarche est inclusive et nous croyons à léchange
de connaissances et à lhorizontalité des rapports interpersonnels.</p>
<h3>Activités</h3>
<ul>
<li><a href="https://www.facebook.com/insurgentprojections/" target="_blank">Projections insurgées!</a> Soirées de diffusion de films radicaux;</li>
<li>Développement du portail <a href="https://infos.media/" target="_blank">INFOS.media</a> rassemblant a une seule adresse une constellations de médias dinformation indépendants;</li>
<li>Fonds discrétionnaire daide aux médias indépendants;</li>
<li>Productions audiovisuelles, ateliers cinématographiques, ciné-débats et bien plus!</li>
<ul>
<div class="text-center">
<p><a href="https://www.facebook.com/insurgentprojections" class="facebook" target="_blank">Projections insurgées</a> <a href="https://www.facebook.com/M%C3%A9dias-Libres-142108832620801/" class="facebook" target="_blank">Médi@s Libres</a> <a href="mailto:projectionsinsurgees@riseup.net" class="email" target="_blank">Email</a> <a href="https://www.mediaslibresmontreal.wordpress.com/" class="website" target="_blank">Site web</a></p>
</div>
</div>
<div class="block">
<a name="pasc">
<h2>Projet Accompagnement Solidarité Colombie (PASC)</h2>
<p>Le <a href="https://pasc.ca/" target="_blank">Projet Accompagnement
Solidarité Colombie (PASC)</a> est un collectif anticolonial et féministe
basé au « Québec » qui réalise de laccompagnement auprès de communautés et
organisations colombiennes, tout en dénonçant les intérêts canadiens impliqués
dans le conflit social et armé en Colombie. Nous faisons des liens entre des
luttes ici et là-bas contre limposition de projets dextraction des
ressources.</p>
<div class="text-center">
<p><a href="https://www.instagram.com/collectif_pasc/" class="instagram" target="_blank">Instagram</a> <a href="https://www.facebook.com/ProjetAccompagnementSolidariteColombie" class="facebook" target="_blank">Facebook</a> <a href="mailto:info@pasc.ca" class="email" target="_blank">Email</a> <a href="https://pasc.ca/" class="website" target="_blank">Site web</a></p>
</div>
</div>
<div class="block">
<a name="sosterritoire">
<h2>SOS Territoire</h2>
<p>SOS Territoire est un comité du [[GRIP-UQAM|a-propos]] et un groupe de
recherche et daction pour la protection du territoire dans une perspective
d'écologie sociale en visant un rapprochement entre les autochtones et
non-autochtones, notamment à travers lAlliance Mamo en construction.</p>
<p><a href="https://www.facebook.com/alliancemamoenconstruction/"
target="_blank">L'Alliance Mamo</a> (Mamo veut dire « ensemble » en
atikamekw nehiromowin) est un projet porté par SOS Territoire. L'Alliance
Mamo se veut un réseau daction et de communication entre Autochtones et
Allochtones pour la défense de la biodiversité et contre le colonialisme. La
toile ci-contre a été réalisée par lartiste atikamekw Jacques Newashish lors
de Mitshetuteuat II pour lAlliance Mamo. Megwetch Monsieur Newashish !</p>
<p>Le territoire en péril est considéré sous ses diverses formes - forêts,
rivières et lacs, sous-sol, terres cultivables, environnement rural ou urbain
- incluant ses habitant·es : animales/animaux, humain·es et
végétaux/végétales. Les communautés des Premiers Peuples sont des témoins
privilégié·es de létat des territoires soi-disant « non habités ». Souvent
les premières victimes humaines de la destruction de ces écosystèmes auxquels
leur identité traditionnelle est inextricablement liée, les Autochtones sont
des allié·es essentiel·les de l'écologie sociale afin de se diriger vers une
société écologique et conviviale.</p>
<p>Au sein du GRIP-UQAM, et lorsque possible en partenariat avec d'autres
comités tels [[Anarchives|index#anarchives]] et le [[PASC|index#pasc]] ou
encore le <a href="https://cpnuqam.ca/" target="_blank">Cercle des Premières
Nations de l'UQAM (CPNUQAM)</a>, le comité SOS Territoire travaille sur
l'aspect anticolonial de l'écologie sociale, notamment à travers le support
matériel (nourriture, transport, audiovisuel) et organisationnel (traduction,
partage des connaissances, mise en contact entre écologistes Autochtones et
Allochtones) en collaboration avec les Autochtones écologistes, ainsi qu'en
partageant et en diffusant les recherches et l'information anticoloniales et
écologistes par des ateliers et des conférences.</p>
<p>À l'initiative de SOS Territoire, le GRIP-UQAM alloue une partie de son
budget pour financer les initiatives autochtones à travers le <a
href="https://gripuqam.org/terresnoncedees/#cercle" target="_blank">Cercle
Aiatshitau Mamu</a> (Luttons Ensemble) qui sengage à encourager les projets
menés surtout par des autochtones pour la protection des terres sacrées de
lÎle de la Tortue et des projets de décolonisation / justice sociale /
libération juridique pour les Premiers Peuples. Le montant amassé sera
distribué à différents projets par les membres (exclusivement autochtones) du
Cercle.</p>
<p>SOS Territoire et le CPNUQAM ont des missions complémentaires et
distinctes. Alors que le CPNUQAM soutien l'intégration et le cheminement des
étudiant·es autochtones à la vie universitaire en milieu urbain, promouvoit
et diffuse les cultures autochtones et les réalités que vivent les Premiers
Peuples et établit des liens d'amitié et de coopération entre les Autochtones
et les Allochtones, SOS Territoire éveille les étudiant·es de l'UQAM ainsi
que la communauté uqamienne aux enjeux écologiques et anticoloniaux. Nous
encourageons les alliances avec des autochtones, particulièrement autour des
enjeux écologiques, et nous travaillons, sur demande des communautés
autochtones, à fournir du soutien pratique et académique aux écologistes
autochtones qui protègent leurs territoires ancestraux et aux Autochtones et
Allochtones de la communauté uqamienne qui les appuient.</p>
<p>Afin de pouvoir travailler avec le CPNUQAM, SOS Territoire utilise leur
méthode de fonctionnement par consensus. Notre plus grosse collaboration à ce
jour avec le CPNUQAM sont les rencontres Mitshetuteuat I à la chaufferie de
l'UQAM en avril 2014 et Mitshetuteuat II à Wemotaci en septembre 2015, d'où
est née l'Alliance Mamo, projet que nous portons depuis cette rencontre.</p>
<p>SOS Territoire est membre des regroupements écologistes suivants : le <a
href="https://www.pourlatransitionenergetique.org/" target="_blank">Front
commun pour une transition énergétique</a> et le <a href="https://rqge.qc.ca/"
target="_blank">Réseau Québécois des Groupes Écologistes</a> (RQGE). Nous
travaillons fort pour y apporter une perspective anticoloniale.</p>
<h3>Liens du comité SOS Territoire :</h3>
<ul>
<li><a href="https://www.facebook.com/alliancemamoenconstruction/" target="_blank">L'Alliance Mamo en construction</a>, initiative portée par SOS Territoire<li>
<li>Pour nous rejoindre :<a href="mailto:sos_territoire_ma@lists.riseup.net" target="_blank">sos_territoire_ma@lists.riseup.net</a></li>
<li>[[Page du cercle Aiatshitau Mamu|terrenoncedees#cercle]] (subvention par et presque en totalité pour autochtones)</li>
<li>[[Page sur les luttes autochtones|terrenoncedees]]</li>
<li><a href="https://share.mayfirst.org/s/bmFJkbkH4fSFyZC" target="_blank">Ressources anticoloniales</a></li>
</ul>
<h3>Liens pour Mitshetuteuat I :</h3>
<ul>
<li><a href="https://evemarieblog.wordpress.com/2014/04/11/mitshetuteuat-cercle-de-parole/" target="_blank">Sur le blogue de evemarieblogueuse</a></li>
<li><a href="https://atenacite.blogspot.com/2014/04/mitshetuteuat.html" target="_blank"> Sur le blogue de François Genest<a></li>
</ul>
<h3>Liens pour Mitshetuteuat II :</h3>
<ul>
<li><a href="https://www.facebook.com/events/865489143531680/" target="_blank">Événement facebook</a></li>
<li><a href="https://liguedesdroits.ca/mitshetuteuat-travailler-ensemble-pour-proteger-les-territoires/" target="_blank">Entrevue avec Vincent Dostaler et Charles CooCoo par Maryse Poisson</a></li>
</ul>
<div class="text-center">
<p><a href="https://www.facebook.com/alliancemamoenconstruction/" class="facebook" target="_blank">Facebook</a> <a href="mailto:sos_territoire_ma@lists.riseup.net" class="email" target="_blank">Email</a> <a href="https://gripuqam.org/#SOSTerritoire" class="website" target="_blank">Site web</a> <a href="https://share.mayfirst.org/s/bmFJkbkH4fSFyZC" class="website" target="_blank">Ressources anticoloniales</a></p>
</div>
</div>
<div class="block">
<a name="stasis">
<h2>Stasis</h2>
<p><a href="https://www.facebook.com/Stasisenquete/" target="_blank">Stasis :
Groupe denquête sur le contemporain</a> entend, par lorganisation de divers
événements, approfondir ce qui forme létoffe des résistances politiques
daujourdhui. Un lieu commun où la confrontation entre différentes positions
favorise lélaboration dune perception commune de la situation. Un espace de
création et de réflexion qui vise à élucider ce que seraient une ou des
révolutions à notre époque. La rédaction dune revue permettra ultimement de
récapituler les enjeux et les thématiques discutés tout au long de lannée.</p>
<div class="text-center">
<p><a href="https://www.instagram.com/stasis.collectif/" class="instagram" target="_blank">Instagram</a> <a href="https://www.facebook.com/Stasisenquete/" class="facebook" target="_blank">Facebook</a> <a href="mailto:collectif.stasis@gmail.com" class="email" target="_blank">Email</a> <a href="https://groupestasis.com/" class="website" target="_blank">Site web</a></p>
</div>
</div>

View file

@ -0,0 +1,325 @@
#!/usr/bin/perl
# Ikiwiki enhanced image handling plugin
# Christian Mock cm@tahina.priv.at 20061002
package IkiWiki::Plugin::img;
use warnings;
use strict;
use IkiWiki 3.00;
my %imgdefaults;
sub import {
hook(type => "getsetup", id => "img", call => \&getsetup);
hook(type => "preprocess", id => "img", call => \&preprocess, scan => 1);
}
sub getsetup () {
return
plugin => {
safe => 1,
rebuild => undef,
section => "widget",
},
img_allowed_formats => {
type => "string",
default => [qw(jpeg png gif svg webp)],
description => "Image formats to process (jpeg, png, gif, svg, webp, pdf or 'everything' to accept all)",
# ImageMagick has had arbitrary code execution flaws,
# and the whole delegates mechanism is scary from
# that perspective
safe => 0,
rebuild => 0,
},
}
sub allowed {
my $format = shift;
my $allowed = $config{img_allowed_formats};
$allowed = ['jpeg', 'png', 'gif', 'svg', 'webp'] unless defined $allowed && @$allowed;
foreach my $a (@$allowed) {
return 1 if lc($a) eq $format || lc($a) eq 'everything';
}
return 0;
}
sub preprocess (@) {
my ($image) = $_[0] =~ /$config{wiki_file_regexp}/; # untaint
my %params=@_;
if (! defined $image) {
error("bad image filename");
}
if (exists $imgdefaults{$params{page}}) {
foreach my $key (keys %{$imgdefaults{$params{page}}}) {
if (! exists $params{$key}) {
$params{$key}=$imgdefaults{$params{page}}->{$key};
}
}
}
if (! exists $params{size} || ! length $params{size}) {
$params{size}='full';
}
if ($image eq 'defaults') {
$imgdefaults{$params{page}} = \%params;
return '';
}
add_link($params{page}, $image);
add_depends($params{page}, $image);
# optimisation: detect scan mode, and avoid generating the image
if (! defined wantarray) {
return;
}
my $file = bestlink($params{page}, $image);
my $srcfile = srcfile($file, 1);
if (! length $file || ! defined $srcfile) {
return htmllink($params{page}, $params{destpage}, $image);
}
my $dir = $params{page};
my $base = IkiWiki::basename($file);
my $extension;
my $format;
if ($base =~ m/\.([a-z0-9]+)$/is) {
$extension = $1;
}
else {
error gettext("Unable to detect image type from extension");
}
# Never interpret well-known file extensions as any other format,
# in case the wiki configuration unwisely allows attaching
# arbitrary files named *.jpg, etc.
my $magic;
my $offset = 0;
open(my $in, '<', $srcfile) or error sprintf(gettext("failed to read %s: %s"), $file, $!);
binmode($in);
if ($extension =~ m/^(jpeg|jpg)$/is) {
$format = 'jpeg';
$magic = "\377\330\377";
}
elsif ($extension =~ m/^(png)$/is) {
$format = 'png';
$magic = "\211PNG\r\n\032\n";
}
elsif ($extension =~ m/^(gif)$/is) {
$format = 'gif';
$magic = "GIF8";
}
elsif ($extension =~ m/^(svg)$/is) {
$format = 'svg';
}
elsif ($extension =~ m/^(webp)$/is) {
$format = 'webp';
}
elsif ($extension =~ m/^(pdf)$/is) {
$format = 'pdf';
$magic = "%PDF-";
}
else {
# allow ImageMagick to auto-detect (potentially dangerous)
my $im = Image::Magick->new();
my $r = $im->Ping(file => $in);
if ($r) {
$format = lc $r;
}
else {
error sprintf(gettext("failed to determine format of %s"), $file);
}
}
error sprintf(gettext("%s image processing disabled in img_allowed_formats configuration"), $format ? $format : "\"$extension\"") unless allowed($format ? $format : "everything");
# Try harder to protect ImageMagick from itself
if (defined $magic) {
my $content;
read($in, $content, length $magic) or error sprintf(gettext("failed to read %s: %s"), $file, $!);
if ($magic ne $content) {
error sprintf(gettext("\"%s\" does not seem to be a valid %s file"), $file, $format);
}
}
my $ispdf = $base=~s/\.pdf$/.png/i;
my $pagenumber = exists($params{pagenumber}) ? int($params{pagenumber}) : 0;
if ($pagenumber != 0) {
$base = "p$pagenumber-$base";
}
my $imglink;
my $imgdatalink;
my ($dwidth, $dheight);
my ($w, $h);
if ($params{size} ne 'full') {
($w, $h) = ($params{size} =~ /^(\d*)x(\d*)$/);
}
if ($format eq 'svg') {
# svg images are not scaled using ImageMagick because the
# pipeline is complex. Instead, the image size is simply
# set to the provided values.
#
# Aspect ratio will be preserved automatically when
# only a width or only a height is specified.
# When both are specified, aspect ratio will not be
# preserved.
$imglink = $file;
$dwidth = $w if length $w;
$dheight = $h if length $h;
}
else {
eval q{use Image::Magick};
error gettext("Image::Magick is not installed") if $@;
my $im = Image::Magick->new();
my $r = $im->Read("$format:$srcfile\[$pagenumber]");
error sprintf(gettext("failed to read %s: %s"), $file, $r) if $r;
if ($config{deterministic}) {
$im->Set('date:create' => 0);
$im->Set('date:modify' => 0);
$im->Set('option' => 'png:exclude-chunk=time');
}
if (! defined $im->Get("width") || ! defined $im->Get("height")) {
error sprintf(gettext("failed to get dimensions of %s"), $file);
}
if (! length $w && ! length $h) {
$dwidth = $im->Get("width");
$dheight = $im->Get("height");
} else {
error sprintf(gettext('wrong size format "%s" (should be WxH)'), $params{size})
unless (defined $w && defined $h &&
(length $w || length $h));
if ($im->Get("width") == 0 || $im->Get("height") == 0) {
($dwidth, $dheight)=(0, 0);
} elsif (! length $w || (length $h && $im->Get("height")*$w > $h * $im->Get("width"))) {
# using height because only height is given or ...
# because original image is more portrait than $w/$h
# ... slimness of $im > $h/w
# ... $im->Get("height")/$im->Get("width") > $h/$w
# ... $im->Get("height")*$w > $h * $im->Get("width")
$dheight=$h;
$dwidth=$h / $im->Get("height") * $im->Get("width");
} else { # (! length $h) or $w is what determines the resized size
$dwidth=$w;
$dheight=$w / $im->Get("width") * $im->Get("height");
}
}
if ($dwidth < $im->Get("width") || $ispdf) {
# resize down, or resize to pixels at all
my $outfile = "$config{destdir}/$dir/$params{size}-$base";
$imglink = "$dir/$params{size}-$base";
will_render($params{page}, $imglink);
if (-e $outfile && (-M $srcfile >= -M $outfile)) {
$im = Image::Magick->new;
$r = $im->Read($outfile);
error sprintf(gettext("failed to read %s: %s"), $outfile, $r) if $r;
}
else {
$r = $im->Resize(geometry => "${dwidth}x${dheight}");
error sprintf(gettext("failed to resize: %s"), $r) if $r;
$im->set($ispdf ? (magick => 'png') : ());
my @blob = $im->ImageToBlob();
# don't actually write resized file in preview mode;
# rely on width and height settings
if (! $params{preview}) {
writefile($imglink, $config{destdir}, $blob[0], 1);
}
else {
eval q{use MIME::Base64};
error($@) if $@;
$imgdatalink = "data:image/".$im->Get("magick").";base64,".encode_base64($blob[0]);
}
}
# always get the true size of the resized image (it could be
# that imagemagick did its calculations differently)
$dwidth = $im->Get("width");
$dheight = $im->Get("height");
} else {
$imglink = $file;
}
if (! defined($dwidth) || ! defined($dheight)) {
error sprintf(gettext("failed to determine size of image %s"), $file)
}
}
my ($fileurl, $imgurl);
my $urltobase = $params{preview} ? undef : $params{destpage};
$fileurl=urlto($file, $urltobase);
$imgurl=$imgdatalink ? $imgdatalink : urlto($imglink, $urltobase);
if (! exists $params{class}) {
$params{class}="img";
}
my $attrs='';
foreach my $attr (qw{alt title class id hspace vspace}) {
if (exists $params{$attr}) {
$attrs.=" $attr=\"$params{$attr}\"";
}
}
my $imgtag='<img src="'.$imgurl.'"';
$imgtag.=' width="'.$dwidth.'"' if defined $dwidth;
$imgtag.=' height="'.$dheight.'"' if defined $dheight;
$imgtag.= $attrs.
(exists $params{align} && ! exists $params{caption} ? ' align="'.$params{align}.'"' : '').
' />';
my $link;
if (! defined $params{link}) {
$link=$fileurl;
}
elsif ($params{link} =~ /^\w+:\/\//) {
$link=$params{link};
}
if (defined $link) {
$imgtag='<a href="'.$link.'">'.$imgtag.'</a>';
}
else {
my $b = bestlink($params{page}, $params{link});
if (length $b) {
add_depends($params{page}, $b, deptype("presence"));
$imgtag=htmllink($params{page}, $params{destpage},
$params{link}, linktext => $imgtag,
noimageinline => 1,
);
}
}
if (exists $params{caption}) {
return '<table class="img'.
(exists $params{align} ? " align-$params{align}" : "").
'">'.
'<caption>'.$params{caption}.'</caption>'.
'<tr><td>'.$imgtag.'</td></tr>'.
'</table>';
}
else {
return $imgtag;
}
}
1

View file

@ -0,0 +1,214 @@
#!/usr/bin/perl
package IkiWiki::Plugin::sidebar2;
=head1 NAME
IkiWiki::Plugin::sidebar2 - Improved version of IkiWiki::Plugin::sidebar
=head1 VERSION
This describes version B<0.1> of IkiWiki::Plugin::sidebar2
=cut
our $VERSION = '0.1';
=head1 DESCRIPTION
Improved version of IkiWiki::Plugin::sidebar2. Main features are:
- allowing several sidebars;
- enabling sidebars using pagespects.
See doc/plugins/sidebar2.mdwn for documentation.
=head1 PREREQUISITES
IkiWiki
=head1 URL
http://atelier.gresille.org/projects/gresille-ikiwiki/wiki/Sidebar2
http://ikiwiki.info/plugins/contrib/sidebar2/
=head1 AUTHOR
Tuomo Valkonen wrote the original Ikiwiki::plugin::sidebar.
Others (on http://ikiwiki.info) helped to improve it.
Louis Paternault (spalax) <spalax at gresille dot org> improved it to write Ikiwiki::plugin::sidebar2.
=head1 COPYRIGHT
Copyright 2006 Tuomo Valkonen <tuomov at iki dot fi>
Copyright 2013 by Louis Paternault <spalax at gresille dot org>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
=cut
use warnings;
use strict;
use IkiWiki 3.00;
sub import {
hook(type => "checkconfig", id => "sidebar2", call => \&checkconfig);
hook(type => "getsetup", id => "sidebar2", call => \&getsetup);
hook(type => "preprocess", id => "sidebar", call => \&preprocess);
hook(type => "pagetemplate", id => "sidebar2", call => \&pagetemplate);
}
sub checkconfig () {
# Parsing "sidebars"
my %sidebars;
if (defined $config{global_sidebars} and (ref($config{global_sidebars}) eq "ARRAY")) {
my $length = $#{$config{global_sidebars}}+1;
if (($length % 3) != 0) {
error("'sidebars' length must be a multiple of 3.");
}
for(my $i=0; $i<$length/3;$i += 1) {
unless(exists($sidebars{$config{global_sidebars}[3*$i]})) {
$sidebars{$config{global_sidebars}[3*$i]} = ();
}
push(
@{$sidebars{$config{global_sidebars}[3*$i]}},
@{[[
$config{global_sidebars}[3*$i+1],
$config{global_sidebars}[3*$i+2],
]]}
);
}
} else {
if (not defined $config{global_sidebars}) {
$config{global_sidebars} = 1;
}
if (IkiWiki::yesno($config{global_sidebars})) {
%sidebars = (
"sidebar" => [["sidebar", "*"]]
);
}
}
@{$config{sidebars}} = %sidebars;
}
sub getsetup () {
return
plugin => {
safe => 1,
rebuild => 1,
},
global_sidebars => {
type => "boolean",
example => 1,
description => "show sidebar page on all pages?",
safe => 1,
rebuild => 1,
},
}
my %pagesidebar;
sub preprocess (@) {
my %params=@_;
my $page=$params{page};
return "" unless $page eq $params{destpage};
if (! defined $params{var}) {
$params{var} = "sidebar";
}
if (! defined $params{content}) {
$pagesidebar{$page}{$params{var}}=undef;
}
else {
my $file = $pagesources{$page};
my $type = pagetype($file);
unless(exists($pagesidebar{$page})) {
$pagesidebar{$page} = ();
}
$pagesidebar{$page}{$params{var}} = IkiWiki::htmlize($page, $page, $type,
IkiWiki::linkify($page, $page,
IkiWiki::preprocess($page, $page, $params{content})));
}
return "";
}
my $oldfile;
my $oldcontent;
sub sidebar_content ($$$$) {
my $templatevar=shift;
my $page=shift;
my $included=shift;
my $pagespec=shift;
return delete $pagesidebar{$page}{$templatevar} if defined $pagesidebar{$page}{$templatevar};
return if ! exists $pagesidebar{$page}{$templatevar} &&
! pagespec_match($page, $pagespec)
;
my $sidebar_page=bestlink($page, $included) || return;
my $sidebar_file=$pagesources{$sidebar_page} || return;
my $sidebar_type=pagetype($sidebar_file);
if (defined $sidebar_type) {
# FIXME: This isn't quite right; it won't take into account
# adding a new sidebar page. So adding such a page
# currently requires a wiki rebuild.
add_depends($page, $sidebar_page);
my $content;
if (defined $oldfile && $sidebar_file eq $oldfile) {
$content=$oldcontent;
}
else {
$content=readfile(srcfile($sidebar_file));
$oldcontent=$content;
$oldfile=$sidebar_file;
}
return unless length $content;
return IkiWiki::htmlize($sidebar_page, $page, $sidebar_type,
IkiWiki::linkify($sidebar_page, $page,
IkiWiki::preprocess($sidebar_page, $page,
IkiWiki::filter($sidebar_page, $page, $content))));
}
}
sub pagetemplate (@) {
my %params=@_;
my $template=$params{template};
my %sidebars = @{$config{sidebars}};
if ($params{destpage} eq $params{page}) {
foreach my $templatevar (keys(%sidebars)) {
if ($template->query(name => $templatevar) and exists($sidebars{$templatevar})) {
for my $data (@{$sidebars{$templatevar}}) {
my $content=sidebar_content($templatevar, $params{destpage}, @{$data}[0], @{$data}[1]);
if (defined $content && length $content) {
$template->param($templatevar => $content);
last;
}
}
}
}
}
}
1

4
sidebar.html Normal file
View file

@ -0,0 +1,4 @@
<!-- the anchors force ikiwiki to use a tags instead of spans. hopefully. -->
<ul class="navbar-nav nav-link align-items-center ms-auto">
<li>[[Accueil|index]]</li>
</ul>

124
templates/page.tmpl Normal file
View file

@ -0,0 +1,124 @@
<!DOCTYPE html>
<TMPL_IF HTML_LANG_CODE>
<html lang="<TMPL_VAR HTML_LANG_CODE>" dir="<TMPL_VAR HTML_LANG_DIR>" xmlns="http://www.w3.org/1999/xhtml">
<TMPL_ELSE>
<html xmlns="http://www.w3.org/1999/xhtml">
</TMPL_IF>
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
<meta name='robots' content='max-image-preview:large' />
<!-- Facebook Meta Tags -->
<meta property="og:url" content="https://cdpq-palestine.info/">
<meta property="og:type" content="website">
<meta property="og:title" content="<TMPL_VAR TITLE>">
<meta property="og:description" content="<TMPL_VAR WIKINAME>">
<meta property="og:image" content="<TMPL_VAR URL>/og-image.png">
<!-- Twitter Meta Tags -->
<meta name="twitter:card" content="summary_large_image">
<meta property="twitter:domain" content="cdpq-palestine.info">
<meta property="twitter:url" content="https://cdpq-palestine.info/">
<meta name="twitter:title" content="<TMPL_VAR TITLE>">
<meta name="twitter:description" content="<TMPL_VAR WIKINAME>">
<meta name="twitter:image" content="<TMPL_VAR URL>/og-image.png">
<TMPL_IF NAME="META"><TMPL_VAR META></TMPL_IF>
<title><TMPL_VAR TITLE> - <TMPL_VAR WIKINAME></title>
<link rel="icon" type="image/png" href="<TMPL_VAR BASEURL>favicon-96x96.png" sizes="96x96" />
<link rel="icon" type="image/svg+xml" href="<TMPL_VAR BASEURL>favicon.svg" />
<link rel="shortcut icon" href="<TMPL_VAR BASEURL>favicon.ico" />
<link rel="apple-touch-icon" sizes="180x180" href="<TMPL_VAR BASEURL>apple-touch-icon.png" />
<meta name="apple-mobile-web-app-title" content="GRIP-UQAM" />
<link rel="manifest" href="<TMPL_VAR BASEURL>site.webmanifest" />
<!-- Bootstrap core CSS -->
<!-- those checksums can be verified with: shasum -b -a 384 $file | xxd -r -p |
base64 -->
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-QWTKZyjpPEjISv5WaRU9OFeRpok6YctnYmDr5pNlyT2bRjXh0JMhjY6hW+ALEwIH" crossorigin="anonymous">
<!-- Custom styles for derivatives -->
<TMPL_IF LOCAL_CSS>
<link rel="stylesheet" href="<TMPL_VAR BASEURL><TMPL_VAR LOCAL_CSS>" type="text/css" />
<TMPL_ELSE>
<link rel="stylesheet" href="<TMPL_VAR BASEURL>css/local.css" type="text/css" />
</TMPL_IF>
<!-- opendyslexic font -->
<link href="<TMPL_VAR BASEURL>css/opendyslexic.css" rel="stylesheet" />
</head>
<body class="d-flex flex-column h-100">
<header>
<nav class="navbar navbar-expand-md navbar-light bg-danger text-white border" data-bs-theme="dark">
<div class="container-lg">
<a class="navbar-brand me-auto" href="<TMPL_VAR BASEURL>">
<img alt="<TMPL_VAR WIKINAME>" src="<TMPL_VAR BASEURL>favicon-96x96.png" width="96" height="96" />
</a>
<TMPL_IF OTHERLANGUAGES>
<div class="dropdown ps-2 pe-2">
<button class="btn language-switcher dropdown" type="button" id="language-menu-top" data-bs-toggle="dropdown" aria-expanded="false">
<div class="collapse navbar-collapse float-end ms-1" id="navbar">
<TMPL_VAR LANG_NAME>
</div>
<img src="<TMPL_VAR BASEURL>images/languages.png">
</button>
<ul class="dropdown-menu dropdown-menu-end dropdown-menu-lg-start" aria-labelledby="language-menu-top">
<TMPL_LOOP OTHERLANGUAGES>
<li><a href="<TMPL_VAR URL>"><TMPL_VAR LANGUAGE></a></li>
</TMPL_LOOP>
</ul>
</div>
</TMPL_IF>
<button class="navbar-toggler collapsed" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbarScroll" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div id="navbar" class="collapse navbar-collapse">
<TMPL_IF SIDEBAR><TMPL_VAR SIDEBAR></TMPL_IF>
<ul class="nav navbar-nav">
<TMPL_LOOP BOOTMENU>
<TMPL_IF FIRSTNAV>
<li <TMPL_IF ACTIVE>class="active"</TMPL_IF>><a href="<TMPL_VAR URL>"><TMPL_VAR PAGE></a></li>
</TMPL_IF>
</TMPL_LOOP>
</ul>
</div>
</div>
</nav>
</header>
<main class="flex-shrink-0 bg-secondary">
<div id="content">
<TMPL_VAR CONTENT>
<TMPL_IF ENCLOSURE>
<section id="enclosure">
<a href="<TMPL_VAR ENCLOSURE>">Download</a>
</section>
</TMPL_IF>
<TMPL_IF TRAILS><TMPL_VAR TRAILS></TMPL_IF>
</div> <!-- /container -->
</main>
<footer class="footer mt-auto py-2 bg-primary bg-opacity-25" role="contentinfo">
<div class="container-lg h-100">
<TMPL_IF FOOTER><TMPL_VAR FOOTER></TMPL_IF>
</div>
</footer>
<!-- Bootstrap core JavaScript
================================================== -->
<!-- Placed at the end of the document so the pages load faster -->
<script src="https://cdn.jsdelivr.net/npm/@popperjs/core@2.11.8/dist/umd/popper.min.js" integrity="sha384-I7E8VVD/ismYTF4hNIPjVp/Zjvgyol6VFvRkX/vR+Vc4jQkC+hVqc2pM8ODewa9r" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/js/bootstrap.min.js" integrity="sha384-0pUGZvbkm6XF6gxjEnlmuGrJXVbNuzT9qBBavbLwCsOGabYfZo0T0to5eqruptLy" crossorigin="anonymous"></script>
</body>
</html>

View file

@ -0,0 +1,4 @@
<form method="get" action="<TMPL_VAR SEARCHACTION>" class="navbar-form navbar-left" role="search">
<input type="text" class="form-control" name="P" value="" size="16"
placeholder="search" />
</form>

29
templates/trails.tmpl Normal file
View file

@ -0,0 +1,29 @@
<TMPL_LOOP TRAILLOOP>
<TMPL_IF __FIRST__>
<nav class="navbar">
<ul class="nav navbar-nav pager">
</TMPL_IF>
<TMPL_IF PREVPAGE>
<li class="previous">
<a href="<TMPL_VAR PREVURL>">
<span class="glyphicon glyphicon-menu-left"></span>
<TMPL_VAR PREVTITLE></a>
</li>
</TMPL_IF>
<li class="up">
<a href="<TMPL_VAR TRAILURL>">
<span class="glyphicon glyphicon-menu-up"></span>
<TMPL_VAR TRAILTITLE></a>
</li>
<TMPL_IF NEXTPAGE>
<li class="next">
<a href="<TMPL_VAR NEXTURL>"><TMPL_VAR NEXTTITLE>
<span class="glyphicon glyphicon-menu-right"></span>
</a>
</li>
</TMPL_IF>
<TMPL_IF __LAST__>
</ul>
</nav>
</TMPL_IF>
</TMPL_LOOP>

40
tools/test-server.sh Executable file
View file

@ -0,0 +1,40 @@
#!/usr/bin/env bash
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
for i in node npm git; do
if ! command -v $i &> /dev/null; then
echo ">> $i could not be found, please install"
exit
fi
done
# http-server not pulled, pulling
if [ ! -d "$SCRIPT_DIR/http-server" ]; then
echo ">> This script will pull a lightweight nodejs http-server from https://github.com/http-party/http-server and make ./public avaiable as local http service, are you okay with this?"
read -p "Continue (y/n)?" choice
case "$choice" in
y|Y ) echo "yes";;
n|N ) echo "no";;
* ) echo "invalid";;
esac
git clone https://github.com/http-party/http-server
fi
# http-server depends not pulled, pulling
if [ ! -d "$SCRIPT_DIR/http-server/node_modules/" ]; then
echo ">> http-server dependencies not pulled, pulling"
npm --prefix "$SCRIPT_DIR"/http-server i
fi
# website not built, building
if [ ! -d "$SCRIPT_DIR/../public" ]; then
echo ">> website not build, building"
pushd "$SCRIPT_DIR"/..
ikiwiki --setup ./ikiwiki.setup
popd
fi
# starting server
echo ">> starting http server"
node "$SCRIPT_DIR"/http-server/bin/http-server -c-1 "$SCRIPT_DIR"/../public